[ODE] Returning to a previous state?
Jun Li
junjy at dcs.qmul.ac.uk
Thu Mar 2 14:45:50 MST 2006
I have encountered the same problem.
As you mentioned, the current save-to-file scheme is not suitable for
the application such as:
try to apply a torque/force to some link, observe it's effect to the
system, according that effects
of every torque compute the correct value for the torque/force and then
recover the system state
and apply the obtained torque/force(s).
In the following, note those in capital, which is not mentioned in your
mail.
I used the same way as yours, that is, storing all the positions,
rotations(quaternions), linear and
ANGULAR velocities, joint anchor points and AXES and reset them.
Joint ANGLEs are computed from the axis of the joint and the
orientations of the two bodies
attached. It is set to zero every time you call dJointSetXXXX(), so you
cannot explicitly reset
a joint angle. If you want keep track to the angle, you need to record
them every time you store
and reset the system.
One pitfall of this method I encountered is that: the ORDER of resetting
those values is
important. As mentioned above, dJointSetXXXX remember the corrent bodies
orientations
and affects the following dJointGetAngle(). So when you reset the
system, you must first
reset all bodies' configuration(position, orientation, and l/a
velocities), and then you can
reset the joint anchor point and axis. Otherwise, you shall failed to
track the joint angles.
BTW,
Why I can only receive the daily digest of this mail list? Who can tell
me how to get fresh mails?
(Please send to my mailbox directly.)
Jun Li
More information about the ODE
mailing list