ros-controls / gazebo_ros2_control

Wrappers, tools and additional API's for using ros2_control with Gazebo Classic
Apache License 2.0
186 stars 118 forks source link

Loading controller failed,Exception thrown during init stage with message: expected [string] got [string_array] #273

Closed PANJIACHENG-98 closed 4 months ago

PANJIACHENG-98 commented 5 months ago

[INFO] [ros2-4]: process has finished cleanly [pid 20770] [INFO] [ros2-5]: process started with pid [20814] [INFO] [ros2-6]: process started with pid [20816] [INFO] [ros2-7]: process started with pid [20818] [INFO] [ros2-8]: process started with pid [20820] [gazebo-1] [INFO] [1706239490.497724358] [controller_manager]: Loading controller 'Head_joint_trajectory_controller' [gazebo-1] Exception thrown during init stage with message: expected [string] got [string_array] [gazebo-1] [ERROR] [1706239490.526122183] [controller_manager]: Could not initialize the controller named 'Head_joint_trajectory_controller' [gazebo-1] [INFO] [1706239490.541068223] [controller_manager]: Loading controller 'Body_joint_trajectory_controller' [ros2-8] Error loading controller, check controller_manager logs [gazebo-1] Exception thrown during init stage with message: expected [string] got [string_array] [gazebo-1] [ERROR] [1706239490.558322016] [controller_manager]: Could not initialize the controller named 'Body_joint_trajectory_controller' [ros2-7] Error loading controller, check controller_manager logs [gazebo-1] [INFO] [1706239490.575401082] [controller_manager]: Loading controller 'Right_arm_joint_trajectory_controller' [gazebo-1] Exception thrown during init stage with message: expected [string] got [string_array] [gazebo-1] [ERROR] [1706239490.586553576] [controller_manager]: Could not initialize the controller named 'Right_arm_joint_trajectory_controller' [gazebo-1] [INFO] [1706239490.602357917] [controller_manager]: Loading controller 'Left_arm_joint_trajectory_controller' [ros2-5] Error loading controller, check controller_manager logs [gazebo-1] Exception thrown during init stage with message: expected [string] got [string_array] [gazebo-1] [ERROR] [1706239490.630282542] [controller_manager]: Could not initialize the controller named 'Left_arm_joint_trajectory_controller' [ros2-6] Error loading controller, check controller_manager logs [ERROR] [ros2-8]: process has died [pid 20820, exit code 1, cmd 'ros2 control load_controller --set-state active Head_joint_trajectory_controller']. [ERROR] [ros2-5]: process has died [pid 20814, exit code 1, cmd 'ros2 control load_controller --set-state active Right_arm_joint_trajectory_controller']. [ERROR] [ros2-6]: process has died [pid 20816, exit code 1, cmd 'ros2 control load_controller --set-state active Left_arm_joint_trajectory_controller']. [ERROR] [ros2-7]: process has died [pid 20818, exit code 1, cmd 'ros2 control load_controller --set-state active Body_joint_trajectory_controller'].

PANJIACHENG-98 commented 5 months ago

run: ros2 launch dual_arm_gazebo gazebo.launch.py at last, i can't load my controller,here is my controller yaml: 屏幕截图 2024-01-26 114745 the another three controller are in the same config

PANJIACHENG-98 commented 5 months ago

beg for help please!!!!!

PANJIACHENG-98 commented 5 months ago

2 3 4 5

Wiktor-99 commented 5 months ago

As stated in the documentation, you should only configure joints in your configuration file.(https://control.ros.org/master/doc/ros2_controllers/position_controllers/doc/userdoc.html)

christophfroehlich commented 5 months ago

As stated in the documentation, you should only configure joints in your configuration file.(https://control.ros.org/master/doc/ros2_controllers/position_controllers/doc/userdoc.html)

correct. @PANJIACHENG-98 you name the controller *joint_trajectory_controller, but configured the type position_controllers/JointGroupPositionController which has only one parameter joints as written above.

PANJIACHENG-98 commented 4 months ago

well solved thanks bro

PANJIACHENG-98 commented 4 months ago

image