ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This will mean that callbacks on the same Node should be thread safe when using MultiThreadExecutor, is that true?

Your understanding is correct.

Is there a way to guarantee that the callbacks of the same node are executed sequentially or that each node has its own thread?

This is what callback groups are for. Adding a node to a MutuallyExclusiveCallbackGroup (rclpy) (MutuallyExclusive callback type (rclcpp)), will ensure that its callbacks are executed sequentially.