ros2-realtime-demo / pendulum

ROS, ROS2, real-time, control, pendulum
Apache License 2.0
132 stars 38 forks source link

[FEA]Add support to callback-group executor as a proof of finer control of realtime profile. #86

Open ZhenshengLee opened 3 years ago

ZhenshengLee commented 3 years ago

Is your feature request related to a problem? Please describe. This is a great demo to show possibility of setting realtime profile to ros2 nodes and get a better realtime performance. But currently, a realtime profile is set on all threads or all callback threads of a node, there is no way to set realtime profile to a certain callback thread.

Describe the solution you'd like callback-group executor is a method to assign realtime profile in the granularity of callback thread, see this article for details. the example is available is in ros2/examples

So this demo could add this feature to nodes as a proof of finer control of realtime profile of a thread.

Thanks.

carlossvg commented 2 years ago

Hi @ZhenshengLee,

Sorry for the late reply and thanks for the suggestion.

callback-group executor is a method to assign realtime profile in the granularity of callback thread, see this article for details. the example is available is in ros2/examples

This is something we are considering. Actually, I started a big refactoring using callback groups and wait-set-based loops in this PR https://github.com/ros2-realtime-demo/pendulum/pull/82/files. I think I can do this in smaller steps and create an intermediate PR using callbacks in different callback groups. What do you think?

ZhenshengLee commented 1 year ago

As the current v0.1 arch is about multi-process-node with StaticSingleThreadedExecutor by a node, I don't see it necessary to add the executor-level-cbg.

But I would like to keep it open.