Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kaansahin-As opened this issue Nov 30, 2023 · 1 comment

Comments

@kaansahin-As
Copy link

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
Copy link

Un1Lee commented Oct 12, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants