Ask Your Question

[ERROR] No p gain specified for pid.

asked 2013-02-08 14:49:05 -0600

MartinW gravatar image

Hello all,

I working on writing my own PID controller for my project. When I try to launch my controllers I get this error:

[ERROR] [1360377867.632497162]: No p gain specified for pid.  Namespace: /l_arm_controller/pid_parameters
[ERROR] [1360377867.632712020]: LeftArmController could not construct PID controller for joint 'base_to_left_shoulder'
[ERROR] [1360377867.632769857]: Initializing controller 'l_arm_controller' failed

It says I don't have any p gain specified but here is my .yaml file:

  type: my_controller_pkg/LeftArmControllerPlugin
  left_shoulder_link: base_to_left_shoulder
  left_tricep_link: left_rotator_to_tricep
  left_lower_bicep_link: left_upper_to_lower_bicep
  left_upper_forearm_link: left_lower_bicep_to_upper_forearm
  left_wrist_link: left_lower_forearm_to_wrist
  left_hand_link: left_wrist_to_hand
  p: 150.0
  i: 0.0
  d: 0.0
  i_clamp: 0.0

  type: my_controller_pkg/RightArmControllerPlugin
  right_shoulder_link: base_to_right_shoulder
  right_tricep_link: right_rotator_to_tricep
  right_lower_bicep_link: right_upper_to_lower_bicep
  right_upper_forearm_link: right_lower_bicep_to_upper_forearm
  right_wrist_link: right_lower_forearm_to_wrist
  right_hand_link: right_wrist_to_hand
  p: 150.0
  i: 0.0
  d: 0.0
  i_clamp: 0.0

The pid values are just the test values from the tutorial to see if I can launch the controllers but unfortunately they don't launch. Does any one know where this error comes from?

Kind Regards, Martin

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-08 17:17:31 -0600

jbohren gravatar image

updated 2013-02-08 17:18:46 -0600

Based on the indentation in that yaml file, it looks neither set of pid_parameters is under X_arm_controller they're both in the parent namespace.

You'd need to indent the pid_parameters block by two more spaces like (spaces replaced with . for clarity):

..type: my_controller_pkg/LeftArmControllerPlugin
..left_shoulder_link: base_to_left_shoulder
..left_tricep_link: left_rotator_to_tricep
..left_lower_bicep_link: left_upper_to_lower_bicep
..left_upper_forearm_link: left_lower_bicep_to_upper_forearm
..left_wrist_link: left_lower_forearm_to_wrist
..left_hand_link: left_wrist_to_hand
....p: 150.0
....i: 0.0
....d: 0.0
....i_clamp: 0.0
edit flag offensive delete link more


Oh man, I did not even know that! I'm still learning a lot of new programming :) Thank you very much for the response

MartinW gravatar image MartinW  ( 2013-02-09 09:25:40 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-02-08 14:49:05 -0600

Seen: 1,978 times

Last updated: Feb 08 '13