ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Number of ros_control nodes with a controller_manager (ros1 - noetic)

asked 2022-09-12 02:28:45 -0500

CoffeeKangaroo gravatar image

updated 2022-09-12 03:01:32 -0500

I am currently building a robot. The robot has two continuous spinning motors (wheels) and two servos. I plan on using the ros_control stack to control the operators.

In order to enhance have a nice separation between the two types of hardware I would like to have them in separate notes. Each of the nodes should implement hardware_interface::RobotHW. Since the hardware interface has to be registered in the controller_manager I need a controller_manager in both nodes.

Might is cause problems to spawn two instances of the controller_manager? Is there anything special to take care of in this case? Should the whole robot hardware be controlled with a single ros_control node or are two nodes preferable (one for each type of hardware used)?

Note: ros-noetic on Ubuntu 20.04

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-09-12 03:01:08 -0500

CoffeeKangaroo gravatar image

updated 2022-09-12 13:46:40 -0500

Apparently it can cause problems when spawning multiple controller_manager instances (multiple nodes which implement the hardware_interface::RobotHW interface and a control loop) as discussed here.

A solution to this problem seems to be the combined_robot_hw interface (see here). A guide how to use the combined_robot_hw interface can be found here.

edit flag offensive delete link more



You mention you're thinking of using different nodes for each controller_manager. That will work, and is a different situation from what is described in the issues you link.

Note that using different nodes immediately makes synchronised motion across all targeted joints impossible.

gvdhoorn gravatar image gvdhoorn  ( 2022-09-12 06:22:43 -0500 )edit

@gvdhoorn Thank you for the hint, I edited my answer.

CoffeeKangaroo gravatar image CoffeeKangaroo  ( 2022-09-12 13:47:45 -0500 )edit

Question Tools



Asked: 2022-09-12 02:28:45 -0500

Seen: 63 times

Last updated: Sep 12 '22