ros2 / examples

Example packages for ROS 2
Apache License 2.0
691 stars 311 forks source link

Remove use of get_callback_groups(). #320

Closed clalancette closed 3 years ago

clalancette commented 3 years ago

This is not thread-safe, and we can do exactly the same thing by getting the default callback group and storing our custom callback group within the class.

Signed-off-by: Chris Lalancette clalancette@openrobotics.org

Goes along with https://github.com/ros2/rclcpp/pull/1723

clalancette commented 3 years ago

CI for this is in https://github.com/ros2/examples/pull/320

Karsten1987 commented 3 years ago

@ralph-lange just fyi. Can you verify that the RT ping/pong behavior is still in tact here?

ralph-lange commented 3 years ago

Thank you for pointing to this PR. Yes, the ping-pong demo works as before. I've already tested it on Saturday, while adding jitter measurement, cf. https://github.com/boschresearch/ros2_examples/tree/cbg_executor/jitter.

ros-discourse commented 1 year ago

This pull request has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/compilation-bloat-issue/30345/1