[ODE] Better way to find 'Desired Velocity'

Jon Watte hplus-ode at mindcontrol.org
Fri Jan 28 14:56:20 MST 2005


There is some talk about this on the ODE Wiki already.

To get your body to move X in time t, you have to have a velocity 
that is X/t. If you currently have a velocity that is V, you have 
to apply a force that is   F = (X/t - V) * m   for mass m.

"t" in this case is the size of your time step.

Personally, I find that systems behave best if I control them based 
on prediction:

Given my current position and velocity, where will I be n steps 
from now? Where do I want to be n steps from now? Apply a force that's 
proportional to the difference between these two positions, times some 
scaling factor. This gives very natural and well dampened movement, 
and has two tuning variables: the number of steps n, and the scaling 
factor (which should be multiplied by n before application if you want 
to be able to vary them somewhat independently).


Cheers,

			/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Andrew Schroeder
Sent: Friday, January 28, 2005 2:17 PM
To: Royce Mitchell III; ODE at q12.org
Subject: Re: [ODE] Better way to find 'Desired Velocity'


I'm thinking that the equation 

DesiredVelocity = Error * Gain

is actually NOT a simple P-Gain situation that you are saying I should
start with.  I think this because the Input (Error) is in POSITION,
and the output is in VELOCITY, thus with the above equation we
actually set an Integrated Controller, we have a simple I-Gain,
instead of the recommended P-Gain.
Is my thinking correct on this? If so is there a way to create a
simple P-Gain like you suggest without setting the position directly?
(obviously I don't want to set the position of my ode bodies directly)

If my setpoint was a velocity then I would say the equation was a
P-Gain, but it's a position.





More information about the ODE mailing list