Skip to content

Commit

Permalink
refactor: adjust macro for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoMagriDev committed Jan 8, 2025
1 parent 8f5c586 commit d6f6c38
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,14 @@ void PointCloudOctomapUpdater::start()
rclcpp::SubscriptionOptions options;
options.callback_group = node_->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);
/* subscribe to point cloud topic using tf filter*/
point_cloud_subscriber_ = new message_filters::Subscriber<sensor_msgs::msg::PointCloud2>(node_, point_cloud_topic_,
rclcpp::QoS qos_profile =
#if RCLCPP_VERSION_GTE(28, 3, 0)
rclcpp::SensorDataQoS(),
rclcpp::SensorDataQoS();
#else
rmw_qos_profile_sensor_data,
rmw_qos_profile_sensor_data;
#endif
options);
point_cloud_subscriber_ =
new message_filters::Subscriber<sensor_msgs::msg::PointCloud2>(node_, point_cloud_topic_, qos_profile, options);
if (tf_listener_ && tf_buffer_ && !monitor_->getMapFrame().empty())
{
point_cloud_filter_ = new tf2_ros::MessageFilter<sensor_msgs::msg::PointCloud2>(
Expand Down

0 comments on commit d6f6c38

Please sign in to comment.