[ODE] matching body orientation
Daan Nusman
d.nusman at keepitsimple.nl
Sat May 7 16:49:05 MST 2005
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
More information about the ODE
mailing list