chvmp / champ

MIT Cheetah I Implementation
BSD 3-Clause "New" or "Revised" License
1.56k stars 360 forks source link

ROS2 galactic joint_group_effort_controller error when launch gazebo.launch.py #136

Open kaansahin-As opened 12 months ago

kaansahin-As commented 12 months ago

At the beginning there was another error : " argument --set-state: invalid choice"

[ros2-9] usage: ros2 control load_controller [-h] [--spin-time SPIN_TIME] [-s]
[ros2-9]                                     [--set-state {configure,start}]
[ros2-9]                                     [-c CONTROLLER_MANAGER]
[ros2-9]                                     [--include-hidden-nodes]
[ros2-9]                                     controller_name
[ros2-9] ros2 control load_controller: error: argument --set-state: invalid choice: 'active' (choose from 'configure', 'start')
[ERROR] [ros2-9]: process has died [pid 25167, exit code 2, cmd 'ros2 control load_controller --set-state active joint_states_controller'].
[ros2-10] usage: ros2 control load_controller [-h] [--spin-time SPIN_TIME] [-s]
[ros2-10]                                     [--set-state {configure,start}]
[ros2-10]                                     [-c CONTROLLER_MANAGER]
[ros2-10]                                     [--include-hidden-nodes]
[ros2-10]                                     controller_name
[ros2-10] ros2 control load_controller: error: argument --set-state: invalid choice: 'active' (choose from 'configure', 'start')
[ERROR] [ros2-10]: process has died [pid 25170, exit code 2, cmd 'ros2 control load_controller --set-state active joint_group_effort_controller'].

After that i changed joint_states_controller and joint_group_effort_controller arguments from active to start at champ_gazebo/launch/gazebo.launch.py.

    load_joint_state_controller = ExecuteProcess(
        cmd=['ros2', 'control', 'load_controller', '--set-state', 'start',
             'joint_states_controller'],
        output='screen',
    )
    load_joint_trajectory_effort_controller = ExecuteProcess(
        cmd=['ros2', 'control', 'load_controller', '--set-state', 'start',
             'joint_group_effort_controller'],
        output='screen'
    )

However, there is another error when configuring 'joint_group_effort_controller'.

[gzserver-6] [INFO] [1701334317.747426177] [controller_manager]: Loading controller 'joint_group_effort_controller'
[gzserver-6] [INFO] [1701334317.765631037] [controller_manager]: Setting use_sim_time=True for joint_group_effort_controller to match controller manager (see ros2_control#325 for details)
[gzserver-6] [INFO] [1701334317.767162893] [controller_manager]: Loading controller 'joint_states_controller'
[gzserver-6] [INFO] [1701334317.773502139] [controller_manager]: Setting use_sim_time=True for joint_states_controller to match controller manager (see ros2_control#325 for details)
[gzserver-6] [INFO] [1701334317.784215369] [controller_manager]: Configuring controller 'joint_group_effort_controller'
[gzserver-6] [ERROR] [1701334317.784413875] [joint_group_effort_controller]: using 'effort' command interface alone is not yet implemented yet.
[gzserver-6] [ERROR] [1701334317.784465995] [controller_manager]: After configuring, controller 'joint_group_effort_controller' is in state 'unconfigured' , expected inactive.
[gzserver-6] [INFO] [1701334317.785395161] [controller_manager]: Configuring controller 'joint_states_controller'
[gzserver-6] [INFO] [1701334317.785500193] [joint_states_controller]: 'joints' or 'interfaces' parameter is empty. All available state interfaces will be published
[ros2-10] Error configuring controller
[ros2-9] Sucessfully loaded controller joint_states_controller into state active
[ERROR] [ros2-10]: process has died [pid 28350, exit code 1, cmd 'ros2 control load_controller --set-state start joint_group_effort_controller'].
[INFO] [ros2-9]: process has finished cleanly [pid 28346]

How can i configure joint controllers and fix this? Thanks

Un1Lee commented 1 month ago

have you solved it? It meet the problem, too. I change the yml for effort add position, then it report: 'effort' command interface has to be alone. strange!!! is a bug in foxy?