ros-controls / ros2_control

Generic and simple controls framework for ROS 2
https://control.ros.org
Apache License 2.0
517 stars 307 forks source link

ros2_control_node via composition #1261

Open mhubii opened 11 months ago

mhubii commented 11 months ago

From the CMake it appears the ros2_control_node is compiled into an executable, refer

https://github.com/ros-controls/ros2_control/blob/54ced2a7be75750ca2cd00a7e8d572b65095bc4c/controller_manager/CMakeLists.txt#L42

Are there plans to provide composition in the future?

mateusmenezes95 commented 10 months ago

The ros2_control offers the ros2_control_node as start point and user friendly to run the ros2_control stuffs. However, nothing stops you from creating your own node. Take a look in the ros2_control_node.cpp. You can embed the same logic in a composition node. Just make sure you create the controller manager object and the control loop thread.

mhubii commented 10 months ago

Thank you for coming back. You are 100% correct @mateusmenezes95.

The question is more whether this should be provided, and why it is not.

christophfroehlich commented 10 months ago

I think this would be a minimal change and could be useful. E.g., just used the robot_state_publisher in a manual composition. Would you like to create a PR?

mhubii commented 10 months ago

thank you for coming back @christophfroehlich . Yes, I will have a look at that tomorrow/ early next week, unless someone jumps ahead

mhubii commented 9 months ago

Duplicate of #330 ?