Gazebo | Ignition | Community
Ask Your Question

Common::PID settings (joint unable to lift a weight)

asked 2016-03-19 13:41:08 -0500

Brosseau.F gravatar image

Hello everybody,

I am trying to simulate a robot which must lift an object from the ground.

I use a prismatic joint controlled with a plugin. I use JointController class and functions like SetPositionTarget to control it.

When I send a position without an object to lift, the target position is reached. But when I have an object to lift, the target position is not reached. I tried to tune PID values but even with very high values the target position is not reached. I checked the effort limit and the effort sent to the link is ten time lower to the limit (so no limitation from the model).

Is it just a pid settings problem or is there another way to do it.

Thanks in advance

edit retag flag offensive close merge delete


could you please show me your code of this question? i am building a robot like this as a homework, but i have no idea how to do this:(, thank you a lot !

hades208002 gravatar imagehades208002 ( 2017-05-22 07:53:46 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2016-03-21 12:30:30 -0500

pcdangio gravatar image

Here are typical steps for setting PID gains empirically (aka by trial and error):

  1. Increase your P gain until the actual value reaches the desired value in the desired amount of time (rise time). This will typically result in large oscillations that take a while to settle down... but that will be fixed later. For now, just focus on rise time. Make sure that your P is low enough that the system remains stable (aka the oscillations die off after a certain amount of time). If your actual value will not reach your desired value no matter how high you set your P gain, skip to step 3.
  2. Increase your D gain to reduce the oscillations until you reach your desired settling time (aka the time it takes for the oscillations to fall below +/- 5% of the desired value). Be careful here, D gains are very sensitive and can cause very noisy responses, especially when you are working with a discrete system with relatively large time steps (like in simulation).
  3. If your system has steady state error (aka no value of P gain can get the actual value to reach the desired value), start increasing your I gain until the steady state error disappears in a satisfactory amount of time.
  4. Repeat steps 1-3 to continuously fine tune the PID controller.

The general idea here is to start with small gains, and run through these steps several times, changing the gains a little bit each time. Hope that helps!

edit flag offensive delete link more


Thanks to both of you guys. I manage to make it work.

Brosseau.F gravatar imageBrosseau.F ( 2016-03-22 02:39:47 -0500 )edit

answered 2016-03-21 12:04:31 -0500

nkoenig gravatar image
  1. Try higher values. Keep increasing the values until it moves.

  2. Make sure the inertia of the object is correct.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2016-03-19 13:41:08 -0500

Seen: 1,783 times

Last updated: Mar 21 '16