[ODE] hexapod walking example

Russ Smith russ at q12.org
Fri Dec 28 16:23:01 2001


> Or, you could go for a true PID function, in which case I'm all ears.
> Something about that approach eludes me, I tried to use it in a 
> previous project but I wasn't able to get it to work well at all.

the "motors" in ODE are there precisely to prevent people from having 
to use PD or PID controllers to actuate joints. the problem with PD
controllers is that they have a couple of constants that have to be
tuned (proportional and damping constants). the good values that you
find in one region of operation may not apply to another region.
as adam pointed out, the values for a leg being on the ground are
no good when the leg is in the air. PD controllers are a classic
source of instability in a sim. BTW, PID controllers are worse as
it's very hard to find one integral constant that works everywhere -
and the extra system state introduced by the integrator makes
debugging the system much harder.

instead of applying a force, try using a motor: set the dParamVel and
dParamFMax parameters on the joint to set the desired speed and 
maximum force. as a rule, set dParamFMax to 2-3 time the "just 
enough" force you need. this should save you some headaches. note that
motors and joint stops have one case where they interact badly, see the
definition of dParamFudgeFactor.

russ.

--
Russell Smith
http://www.q12.org