Gazebo | Ignition | Community
Ask Your Question

Velocity controllers and missing P gain

asked 2019-01-04 06:09:58 -0500

kumpakri gravatar image

I am using the VelocityJointController from velocity_controllers to control a robot loaded in Gazebo simulation. I specify PID gains in a .yaml file. However when I launch the simulation, the error pops out

[ERROR] [1546601044.601198350, 0.165000000]: No p gain specified for pid.  Namespace: /robot/gazebo_ros_control/pid_gains/joint_rear_left_wheel

And no metter what PID gains I set, the robot behaves always the same. The PID gains set in .yaml configuration file has no effect on the simulation.

my transmission:

<transmission name="tran_rear_left_wheel">
    <joint name="joint_rear_left_wheel">
    <actuator name="motor_rear_left_wheel">

control yaml

  # Publish all joint states -----------------------------------
    type: joint_state_controller/JointStateController
    publish_rate: 50  

  # Velocity Controllers -----------------------------------------
    type: velocity_controllers/JointVelocityController
    joint: joint_rear_left_wheel
    pid: {p: 1, i: 1, d: 1}

What is happening?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-10-24 11:00:24 -0500

kumpakri gravatar image

updated 2019-10-24 11:00:57 -0500

Since Weasfas brought this old question up, I can tell now, that velocity_controllers does not use PID for commanding velocity, because the input already is the velocity. It uses PID for controlling positions, however. So if I had controller of type velocity_controllers/JointPositionController, I would need to specify PID parameters and the behavior of the robot would depend on those values.

edit flag offensive delete link more


not sure how this answers the question. From Control systems perspective, you are right the position part is not needed but how to fix this in Gazebo?

CroCo gravatar imageCroCo ( 2022-05-20 14:55:33 -0500 )edit

answered 2019-10-24 05:58:34 -0500

Weasfas gravatar image

Just for the record, with velocity controllers you can define the gains like this:

          p: 1.0
          i: 1.0
          d: 1.0
edit flag offensive delete link more


If this required format for velocity controllers?

kumpakri gravatar imagekumpakri ( 2019-10-24 06:24:24 -0500 )edit

but how do you declare that in roslaunch file?

igricart gravatar imageigricart ( 2021-04-06 09:08:10 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-01-04 06:09:58 -0500

Seen: 2,226 times

Last updated: Oct 24 '19