Robotics StackExchange | Archived questions

No p gain specififed even when specified in control.yaml

Hey,

I recently installed Ros and Gazebo on a new system. When launching I keep getting the error

[ERROR] [1558337209.098208864]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/imu_joint1
[ERROR] [1558337209.100105299]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/imu_joint2
[ERROR] [1558337209.101583263]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/imu_joint3

even though I have specified the PID values in a .yaml file. Im not sure if related but while closing I also get the error

Controller Spawner error while taking down controllers: transport error completing service call: receive_once[/controller_manager/switch_controller]: unexpected error

Thanks

Asked by Withered_Shadow on 2019-05-19 21:55:53 UTC

Comments

does #q293830 help?

It seems odd to me that the error message is actually putting <joint_name> in there...

Please share your control.yaml for further support.

(I don't think the spawner error is related...)

Asked by mgruhler on 2019-05-20 02:16:25 UTC

Here I have attached the control.yaml

link text

joint_state_controller:
  type: joint_state_controller/JointStateController
  publish_rate: 50

imu_joint1_controller:
  type: velocity_controllers/JointVelocityController
  joint: imu_joint1
  pid: {p: 3.0, i: 1.0, d: 1.0}

imu_joint2_controller:
  type: velocity_controllers/JointVelocityController
  joint: imu_joint2
  pid: {p: 5.0, i: 1.5, d: 1.25}

imu_joint3_controller:
  type: velocity_controllers/JointVelocityController
  joint: imu_joint3
  pid: {p: 1.2, i: 0.4, d: 0}

Asked by Withered_Shadow on 2019-05-20 02:30:09 UTC

SUMMARY ========

PARAMETERS
 * /imu_joint1_controller/joint: imu_joint1
 * /imu_joint1_controller/pid/d: 1.0
 * /imu_joint1_controller/pid/i: 1.0
 * /imu_joint1_controller/pid/p: 3.0
 * /imu_joint1_controller/type: velocity_controll...
 * /imu_joint2_controller/joint: imu_joint2
 * /imu_joint2_controller/pid/d: 1.25
 * /imu_joint2_controller/pid/i: 1.5
 * /imu_joint2_controller/pid/p: 5.0
 * /imu_joint2_controller/type: velocity_controll...
 * /imu_joint3_controller/joint: imu_joint3
 * /imu_joint3_controller/pid/d: 0
 * /imu_joint3_controller/pid/i: 0.4
 * /imu_joint3_controller/pid/p: 1.2
 * /imu_joint3_controller/type: velocity_controll...
 * /joint_state_controller/publish_rate: 50
 * /joint_state_controller/type: joint_state_contr...
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_sim_time: False

Asked by Withered_Shadow on 2019-05-20 02:35:33 UTC

Answers

You haven't specified the pid parameters correctly.

The correct format is described in this answer to the question linked in the comment above.

Also note that, as discussed in the (now) accepted answer is that this is actually not an error but a notification that you are not using a pid controller but rather the gazebo default.

Asked by mgruhler on 2019-05-20 02:57:44 UTC

Comments

Thanks for the help. Got it working

Asked by Withered_Shadow on 2019-05-20 03:23:45 UTC