ROS 2 Control Async

Hi - I am trying to understand more about async controllers in ROS 2 Jazzy. My understanding is that the is_async parameter (when true) will spawn a new thread with AsyncFunctionHandler.

I believe this is part of the same process, on the same CPU core (just a separate thread), correct? Is there an existing mechanism to parallelize across multiple cores?

I ask, as my application will have multiple controllers which have a combined execution time longer than possible at the desired frequency. I am interested to see if there are any good solutions aside from starting a new node and pub/sub.

Thanks in advance for any advice!

Hello @dufrenekm

There was no proper way to set that the new thread runs on a different CPU. Recently, I’ve added support for something similar in realtime_tools. This PR: [Controllers] Set async thread properties via parameters by saikishor · Pull Request #2613 · ros-controls/ros2_control · GitHub should address the issue you are having. I hope this helps.

Thank you

1 Like