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

youBot is not moving after adding gazebo_ros_control/gains #21

Open
ghost opened this issue Aug 24, 2022 · 0 comments
Open

youBot is not moving after adding gazebo_ros_control/gains #21

ghost opened this issue Aug 24, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 24, 2022

ROS Melodic, Gazebo 9.0, Ubuntu 18.04

I'm trying to control Kuka youBot in Gazebo but I'm having some issues. When I run the simulation I get these errors.

No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/wheel_joint_fl
No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/caster_joint_fl
No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/wheel_joint_fr
No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/caster_joint_fr
No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/wheel_joint_bl
No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/caster_joint_bl
No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/wheel_joint_br
No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/caster_joint_br

and when I don't send any twist commands, I've noticed the base is drifting slowly. I thought this is because the above errors since Gazebo didn't set the pid gains. One of the solutions I've found is to add the following lines to base_controller.yaml file

gazebo_ros_control/pid_gains:
    wheel_joint_fl: {p: 100.0, i: 0.0, d: 1.0}
    caster_joint_fl: {p: 100.0, i: 0.0, d: 1.0}
    wheel_joint_fr: {p: 100.0, i: 0.0, d: 1.0}
    caster_joint_fr: {p: 100.0, i: 0.0, d: 1.0}
    wheel_joint_bl: {p: 100.0, i: 0.0, d: 1.0}
    caster_joint_bl: {p: 100.0, i: 0.0, d: 1.0}
    wheel_joint_br: {p: 100.0, i: 0.0, d: 1.0}
    caster_joint_br: {p: 100.0, i: 0.0, d: 1.0}

The above errors disappeared and the base is firmly stationary. However, when I send the twist commands, it seems the base is not moving at all. Changing the pid gains didn't solve the problem. I've checked urdf files and they seem fine. Any suggestions?

Edit:
After some investigation, it seems the non-zero d gain causing the base to move even if there is no input applied. However, still applying gazebo_ros_control forces the base to be stationary even if I apply inputs.

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

0 participants