hsr-project / hsr_ros2_doc

6 stars 1 forks source link

[ERROR]Controller manager not available #11

Closed ayakasakurai0213 closed 3 months ago

ayakasakurai0213 commented 3 months ago

I am trying to run ROS2 foxy on actual robot of HSR. I built the environment according to hsr_ros2_doc.

I brought up HSR by entering the following command: ros2 launch hsrb_bringup hsrb.launch.py

And I got an error "Controller manager not available". image

Does anyone know anything about this issue?

y-masutani commented 3 months ago

Look for errors message about controller_manager. In my experience, I have received the following message.

[ros2_control_node-1] [FATAL] [1707466923.223891336] [controller_manager]: System cannot communicate with servo motors. Error message: Permission denied
[ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error'
[ros2_control_node-1]   what():  Failed to configure 'hsrb'

In this case, the cause was the permissions of the device file. https://github.com/hsr-project/hsr_ros2_doc/issues/6#issuecomment-1935470824

ayakasakurai0213 commented 3 months ago

I found the following error about controller_manager:

1710565287.4346595 [INFO] [ros2_control_node-1]: process started with pid [578785] 1710565287.4350066 [ERROR] [ros2_control_node-1]: process has died [pid 578785, exit code -6, cmd '/opt/ros/foxy/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_5tvlqicr --params-file /home/administrator/hsr_ros2_ws/install/hsrb_bringup/share/hsrb_bringup/config/controllers.yaml --params-file /tmp/launch_params_u8f_gtif -r odom:=~/wheel_odom']. 1710565287.4422431 [ros2_control_node-1] [WARN] [1710565287.326015479] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. 1710565287.4425011 [ros2_control_node-1] [ERROR] [1710565287.342958300] [JointCommunication]: Failed to read hash joint 21: Connection timed out 1710565287.4426601 [ros2_control_node-1] [FATAL] [1710565287.342996640] [controller_manager]: System cannot load control table. 1710565287.4427900 [ros2_control_node-1] terminate called after throwing an instance of 'std::runtime_error' 1710565287.4428799 [ros2_control_node-1] what(): Failed to configure 'hsrb'

image (1)

There may be multiple nodes with the same name.

I brought up hsr and checked running nodes by entering the ros2 node list. image (2)

It seems that /controller_manager is a duplicate...

y-masutani commented 3 months ago

Before ros2 launch hsrb_bringup hsrb.launch.py, execute ros2 node list to check if /controller_manager node remains.

k-takeshita commented 3 months ago

Could you please confirm the following three points?

ayakasakurai0213 commented 3 months ago

Sorry, I solved this problem... The batteries in the emergency stop button of HSR were dead. Thanks for your comments...!