Skip to content

Commit d6f6c38

Browse files
committed
refactor: adjust macro for readability
1 parent 8f5c586 commit d6f6c38

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

moveit_ros/perception/pointcloud_octomap_updater/src/pointcloud_octomap_updater.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,14 @@ void PointCloudOctomapUpdater::start()
118118
rclcpp::SubscriptionOptions options;
119119
options.callback_group = node_->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);
120120
/* subscribe to point cloud topic using tf filter*/
121-
point_cloud_subscriber_ = new message_filters::Subscriber<sensor_msgs::msg::PointCloud2>(node_, point_cloud_topic_,
121+
rclcpp::QoS qos_profile =
122122
#if RCLCPP_VERSION_GTE(28, 3, 0)
123-
rclcpp::SensorDataQoS(),
123+
rclcpp::SensorDataQoS();
124124
#else
125-
rmw_qos_profile_sensor_data,
125+
rmw_qos_profile_sensor_data;
126126
#endif
127-
options);
127+
point_cloud_subscriber_ =
128+
new message_filters::Subscriber<sensor_msgs::msg::PointCloud2>(node_, point_cloud_topic_, qos_profile, options);
128129
if (tf_listener_ && tf_buffer_ && !monitor_->getMapFrame().empty())
129130
{
130131
point_cloud_filter_ = new tf2_ros::MessageFilter<sensor_msgs::msg::PointCloud2>(

0 commit comments

Comments
 (0)