[ODE] Better way to find 'Desired Velocity'
Andrew Schroeder
schroe2a at gmail.com
Fri Jan 28 09:33:36 MST 2005
Hey ode'ers,
I'm beginning to think that the key to creating believable simulations
of living beings (non-mechanical stuff) is realistic motion control.
By that I mean that it comes natural to create believable cars, robots
& other machines using a physics engine like ODE, but when I create a
person it behaves like a robot because the motion is controlled by
simple joint motors.
I think I need to come up with a better way to figure out what to
set Desired Velocity (setparam(vel)) to. Better I mean than the
"servo" section in the ODE Wiki FAC. I'm finding that I want to have
my simulated joints move bodies to a desired position-as fast as
possible-without overshooting(much)-using only the max force allowed
to do it. Thats what a real person does when he/she moves an arm to a
desired spot, for instance. I'm having real problems figuring out
what to set desired velocity to get to that position.
In the servo model from the FAC if your 'gain' is to low, you're
bodies move to slow,(like a robot) but if you set it higher they
overshoot the target back and forth before settling in the desired
position. (which looks like your person is intoxicated or something)
I keep coming back to the problem: "How fast can I go toward my target
and still be able to stop when I get there using the max force i am
allowed?"
My approach has been to use joint motors and calculate the desired
velocity to get to the desired position. Here are the problems I run
into when I try to do the math for this...
1) I can't always figure out "current angle around given axis." or
"distance from target." When using uJoint, hinge or aMotor in Eular
Mode I can use dGetAxisAngle, but if I have an aMotor in usermode I'm
not sure how to figure out how much I've rotated around a given axis.
I sent an earlier message to this list about this question. Eular mode
works fine unless you want attach a body to the static environment....
2) The math requires knowing the "max force" you're allowed to use,
and you can get this from the getparam(Fmax), but this is the force,
not how much you can accelerate/decelerate factoring in Mass,
rotational inertia, and whatever other forces are going on at the
time.
3) I run into a special case for: if you can get there in one
timestep, you can overshoot in one step and then overshoot back then
next step, and you get jitter.
Has anyone else developed an approach to these challenges? Am I going
about this all wrong? I think this motion control issue could be
fundamental to creating my simulation of living things.
thanks,
Andy
More information about the ODE
mailing list