You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
set the priority of callback to high introduces some delay compared to simple MultiThreadedExecutor #427
hi, I try to set one callback higher priority following the example cbg_executor . But It seems it introduces some delay compared to using MultiThreadedExecutor.
I publish on the topic "high_pong" at rate 100Hz. In the pong_node.cpp, I set the parameter "high_busyloop" to 1.0, and print the timestamp when receiving the msg.
Use the code in pong.cpp (setting high_prio_executor to ThreadPriority::HIGH), the output is (msg receiving interval is 1050ms):
But if I simply use MultiThreadedExecutor and add the pong node:
Activity
fujitatomoya commentedon Sep 16, 2025
@xibeisiber can you provide the self-contained reproducible example to see the difference?
xibeisiber commentedon Sep 17, 2025
See attached file:
cbg_executor.zip
compile:
colcon build --packages-up-to examples_rclcpp_cbg_executorIn one terminal, publish on the topic at 100Hz
ros2 topic pub /high_ping std_msgs/msg/Int32 -r 100case1: run (setting high_prio_executor to ThreadPriority::HIGH)
ros2 run examples_rclcpp_cbg_executor pongcase2: run (simply use MultiThreadedExecutor and add the pong node:)
ros2 run examples_rclcpp_cbg_executor pong_multi_executor