gurselturkeri
gurselturkeri

Reputation: 123

Controller manager not available in ROS2

Hi I have added control plugin in robot arm urdf then created launch file but when I run launch file gazebo and robot arm model open but I get an error like below. How can I solve this problem?

[robot_state_publisher-3] Parsing robot urdf xml string.
[robot_state_publisher-3] Error:   Error document empty.
[robot_state_publisher-3]          at line 71 in /tmp/binarydeb/ros-foxy-urdfdom-2.3.3/urdf_parser/src/model.cpp
[robot_state_publisher-3] terminate called after throwing an instance of 'std::runtime_error'
[robot_state_publisher-3]   what():  Unable to initialize urdf::model from robot description
[ros2_control_node-4] terminate called after throwing an instance of 'std::runtime_error'
[ros2_control_node-4]   what():  invalid URDF passed in to robot parser
[spawner.py-5] [INFO] [1677069069.554681723] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1677069069.580805205] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawn_entity.py-2] [INFO] [1677069069.734785422] [spawn_entity]: Spawn Entity started
[spawn_entity.py-2] [INFO] [1677069069.735058596] [spawn_entity]: Loading entity XML from file /home/gursel/robotic_arm_ws/install/robotic_arm/share/robotic_arm/urdf/robotic_arm.urdf
[spawn_entity.py-2] [INFO] [1677069069.736418915] [spawn_entity]: Waiting for service /spawn_entity, timeout = 30
[spawn_entity.py-2] [INFO] [1677069069.736653475] [spawn_entity]: Waiting for service /spawn_entity
[ERROR] [gazebo-1]: process has died [pid 4545, exit code 255, cmd 'gazebo -s libgazebo_ros_factory.so'].
[ERROR] [robot_state_publisher-3]: process has died [pid 4549, exit code -6, cmd '/opt/ros/foxy/lib/robot_state_publisher/robot_state_publisher /home/gursel/robotic_arm_ws/install/robotic_arm/share/robotic_arm/urdf/robotic_arm.urdf --ros-args --params-file /tmp/launch_params_302rtmoc'].
[ERROR] [ros2_control_node-4]: process has died [pid 4551, exit code -6, cmd '/opt/ros/foxy/lib/controller_manager/ros2_control_node --ros-args --params-file /tmp/launch_params_wb0x7xnl --params-file /home/gursel/robotic_arm_ws/install/robotic_arm/share/robotic_arm/config/jtc.yaml'].
[spawner.py-5] [INFO] [1677069071.570302266] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1677069071.595951515] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1677069073.586642702] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1677069073.612373454] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1677069075.603461546] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1677069075.629372887] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner.py-5] [INFO] [1677069077.620421456] [spawner_joint_state_broadcaster]: Waiting for /controller_manager services
[spawner.py-6] [INFO] [1677069077.646128433] [spawner_joint_trajectory_controller]: Waiting for /controller_manager services
[spawner.py-5] [ERROR] [1677069079.637362419] [spawner_joint_state_broadcaster]: Controller manager not available
[spawner.py-6] [ERROR] [1677069079.662836259] [spawner_joint_trajectory_controller]: Controller manager not available
[ERROR] [spawner.py-5]: process has died [pid 4553, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_state_broadcaster --controller-manager /controller_manager --ros-args'].
[ERROR] [spawner.py-6]: process has died [pid 4555, exit code 1, cmd '/opt/ros/foxy/lib/controller_manager/spawner.py joint_trajectory_controller -c /controller_manager --ros-args'].

SOLVED: The problem was ROS2 version and changing in launch file. It works with Ubuntu 22.04 Humble and you should install all control package such as joint_trajectory_controller, joint_state_broadcaster, controller_manager, joint-state-publisher-gui then edit your launch file.

Upvotes: 1

Views: 3804

Answers (0)

Related Questions