carla-simulator / ros-bridge

ROS bridge for CARLA Simulator
MIT License
513 stars 414 forks source link

fail to build pcl_recorder #621

Open samuelseu2022 opened 2 years ago

samuelseu2022 commented 2 years ago

Hello, it happens to me that pcl_recorder is failed to build with colcon build tool with ros2 galactic environment. In ros-bridge/pcl_recorder/src/PclRecorderROS2.cpp file, line 30, the callback_group namespace is not declared. I also checked latest rclcpp code. There's no callback_group namespace (https://github.com/ros2/rclcpp/blob/master/rclcpp/include/rclcpp/callback_group.hpp). Please correct me if I'm wrong.

@joel-mb seems your commit brought the changes.

//problem code:
sub_opt.callback_group = this->create_callback_group(rclcpp::callback_group::CallbackGroupType::MutuallyExclusive);

//correct code:
sub_opt.callback_group = this->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);
youxiho1 commented 1 year ago

Hello, it happens to me that pcl_recorder is failed to build with colcon build tool with ros2 galactic environment. In ros-bridge/pcl_recorder/src/PclRecorderROS2.cpp file, line 30, the callback_group namespace is not declared. I also checked latest rclcpp code. There's no callback_group namespace (https://github.com/ros2/rclcpp/blob/master/rclcpp/include/rclcpp/callback_group.hpp). Please correct me if I'm wrong.

@joel-mb seems your commit brought the changes.

//problem code:
sub_opt.callback_group = this->create_callback_group(rclcpp::callback_group::CallbackGroupType::MutuallyExclusive);

//correct code:
sub_opt.callback_group = this->create_callback_group(rclcpp::CallbackGroupType::MutuallyExclusive);

Ah, I can build successfully when I use ros2 foxy but I encountered into this problem too when I build with ros2 galactic environment. I've wasted lots of time in solving it. I revised the code as you wrote here and it fixed my problem! Thank you a lot!!!

MarinBao commented 7 months ago

thank you