Home | Tutorials | Wiki | Issues
Ask Your Question
1

Gazebo_ros_pkgs: No p gain specified for pid in PositionJointInterface

asked 2014-02-11 12:12:47 -0500

costashatz gravatar image

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..

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-02-11 15:49:51 -0500

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.

edit flag offensive delete link more

Comments

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.

costashatz gravatar imagecostashatz ( 2014-02-11 16:58:36 -0500 )edit
0

answered 2014-02-13 05:44:34 -0500

costashatz gravatar image

@Jim Rothrock

The problem was solved using pid gains for Position Joint Controllers (Interfaces).

But I still believe that this should be fixed in a later version. When you specify a position joint controller, not having pid gains is exactly what you want (in some cases - in my case too, because I don't have access to the robot's motors specifications and the robot uses servo motors).

Anyway, thanks for the reply and I've finally solved my issue. :)

edit flag offensive delete link more

Comments

The fix requires a change to Gazebo. If a joint doesn't have a PID controller, gazebo_ros_control calls joint->SetAngle(). Gazebo doesn't handle friction well when SetAngle() is used. The ability to specify a PID controller for each joint was added as a work-around for this issue.

Jim Rothrock gravatar imageJim Rothrock ( 2014-02-13 11:47:56 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-02-11 12:12:47 -0500

Seen: 6,559 times

Last updated: Feb 13 '14