0
$\begingroup$

Gazebo Answers logo

I have built gazebo_ros_pkgs in the catkin workspace and working with some Joint Position Controllers (successfully - I can control my joint controllers via rqt or topics). The building part in the catkin workspace is needed for the new features to work in version 2.3.4 (see pull request #135).

However, my robot keeps sliding on the ground (slowly but sliding). Here's a video of that behavior. At first I thought it was because I hadn't included friction on my links. I did include friction but nothing changed. Also, at first I had collada models for collision, but changed them to stl. Same behavior though. I suspect visual-collision misalignment (exists in my case) problems in gazebo.

Gazebo throws some errors (not fatal ones though and continues). Here's an example:

[ERROR] [1392128262.341496657, 0.791000000]: No p gain specified for pid.  Namespace: /nao_robot/gazebo_ros_control/pid_gains/RAnklePitch_Roll_Joint

I haven't created effort joint controllers as the robot I'm trying to simulate has servo motors. I am not sure if that is entirely correct. Maybe I need effort joint controllers.

Any ideas? Thanks..


Originally posted by costashatz on Gazebo Answers with karma: 23 on 2014-02-11

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

What type of hardware interface did you specify in your URDF file? PositionJointInterface? EffortJointInterface? If you are using PositionJointInterface, try specifying PID controller gains in a file similar to this:

# gazebo_ros_control_params.yaml
gazebo_ros_control/pid_gains:
  shoulder_joint: {p: 1.0, i: 0.0, d: 1.0}
  # More joints...

In your launch file, load the PID gains in a manner similar to this:

<rosparam file="$(find yourrobot_gazebo)/config/gazebo_ros_control_params.yaml" command="load"/>

Using PositionJointInterface without a PID controller works sometimes, but not always. In particular, friction does not work well without a PID controller. This problem is discussed in the comments for pull request #135, which you mentioned above.


Originally posted by Jim Rothrock with karma: 247 on 2014-02-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by costashatz on 2014-02-11:
Well, I tried it and it seems to tackle the problem. I haven't been able to find the pid values corresponding to the servo motors of the robot, but playing around with the pid values points to that direction in order to solve the problem. Thanks. I will post an answer when I've finally solved it for sure.

Comment by aniruddhkb on 2020-06-12:
I would just like to leave this here. In case you are using PositionJointInterface (on Melodic/Gazebo9) and it doesn't work as expected, supply negative PID values. For some reason the Gazebo system provides positive feedback instead of negative.

Comment by Kuralme on 2021-03-23:
This solved my problem

Comment by Ranjit on 2021-07-27:
Thanks, it works for me

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.