0
$\begingroup$

I am running ROS2 Humble Hawksbill, I have a requirement where in I need to associate two executors StaticSingleThreadedExecutors for a lifecycle single node. I searched for examples. and demos in ros2 org on github, but in vain. Please be kind to enlighten me on how to achieve this in C++.

$\endgroup$

2 Answers 2

0
$\begingroup$

Adding two single threaded executors to a node doesn't especially make sense. What you are doing then is creating a multi-threaded executor. However because the two single threaded executors do not know about each other, they can't do appropriate multi-threading interactions.

This sounds a lot like an XY problem. I would suggest that you explain more about your motivation and make sure that you're asking the right question versus making an assumption about your requirements.

$\endgroup$
0
$\begingroup$

cbg_executor example is what you need. Please refer the example here, https://github.com/ros2/examples/tree/humble/rclcpp/executors/cbg_executor

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.