[ODE] matching body orientation
Megan Fox
shalinor at gmail.com
Fri May 13 12:47:57 MST 2005
Please understand, I can't give specifics on the use of AMotor
because, frankly, I don't fully understand what I'm doing myself - the
axis I'm setting occasionally seem "off" compared to what I would
expect... "but"... as I understand them, this should work:
You would use your network of joints in the suit to determine the
real-world positioning matrix of the limb in question. This limb
matrix will have the 3 vectors necessary to orient the AMotor, but how
you do that is up to you...
I think, if I were you, I would orient them relative to the parent
limb - even though you do have a system in place that expresses
absolute motion cap data, the same system is adaptable to enhanced
reality interaction. And for that, you would need a system that could
cope with constraints not being reachable (that is, where you have
your hand is blocked for one reason or another in the virtual
world)... and I think for the constraints to work properly in that
case, you'd need parent-relative orientations. Still, I've never
tested global, maybe they'd work fine too.
So - now you've got each limb body joined with AMotors, and you have
the parent-relative axis you need to feed each AMotor (3 in all), and
you've got each AMotor in user mode. For absolutely accurate mocap
data, you'd want the Lo/Hi Stop set at 0, but it seems like that could
create noisy animation data (ODE doesn't usually like absolutely hard
constraints) - you'd probably want to either set the Lo/Hi stops to
something slightly more/less than 0, or tweak ERP/CFM to values that
allow the joints to be slightly soft. Again, though, you'd have to
test to see what's what.
The only thing remaining is to set FMax to something reasonable, which
will depend entirely on what masses you set to your limbs, what
gravity you're using, your overall simulation scale, etc.
... but as I said, your mileage may vary - in my implementation, I set
my stops once and go to it. The joints behave properly if the stops
don't initially align with the limb position (that is, the limb moves
into the position dictated by the stops without exploding), but that's
an extremely limited test compared to what you're doing.
-Megan Fox
On 5/7/05, Daan Nusman <d.nusman at keepitsimple.nl> wrote:
> Hi everyone,
>
> First some background information (for the interested, you can skip
> this): for my thesis I'm working on connecting an experimental full-body
> motion capture suit, that uses inertial sensors, to an ODE articulated
> human body, in a distributed virtual environment. I've created a ragdoll
> that works quite well, using ball joints and hinge joints. Now I'm
> looking for a way to control the ragdoll using the motion capture suit.
> The suit measures the absolute orientation of each limb, represented by
> quaternions. So onto..
>
> THE QUESTION: I've got some quaternion 'qd' and an ODE body with
> quaternion 'qb'. I want the body to (try to) orient itself from qb to qd
> during the simulation. How can I best do this?
>
> One option seems to be to take the 'forward' vectors of qd and qb, use
> the cross product on them to find the torque axis, and use the dot
> product to find out how much force is required (how long the torque axis
> should be). This is essentially a spring as described in section 7.5 of
> the manual, but only angular, I guess. So the problems are: finding a
> usable spring constant, the body has to come up to speed in several
> steps, and possible extra forces might lead to the body never reaching
> the orientation or speed at all. Another problem is that the body won't
> match the rotation along the forward axis. I'd have to add torque along
> the forward axis, but I can't figure out how much that would be.
>
> I've looked at the angular motor, but I must admit I don't really
> understand the user mode. Does anyone know if the amotor is suitable to
> do this?
> - should I attach the amotor to only one body?
> - what kind of axes should I set? How should I relate the velocity of
> the axes to my desired quaternion?
>
> Any help would be greatly appreciated,
> Daan Nusman
> www.keepitsimple.nl
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
More information about the ODE
mailing list