[ODE] Resetting a moving vehicle

John Buehler johnbue at msn.com
Wed Oct 13 12:48:43 MST 2004


Lukas Henschke writes:

> Has anyone experience with this issue ? Does anyone know a way
> how to realy set all velocities and forces to null ? I am missing
> a function like FreeObjectFromAllForces() or so to be able to set
> it to an arbitrary position/rotation and kind of start the
> simulation for this object from the beginning of the next frame.

Yes, I ran into this in attempting to move a jointed figure that used
hinges, and then I moved to a mix of hinges and ball joints.  The hinged
figure was willing to be moved around by simply using dBodySetPosition on
each body, while trying to do that with the ball jointed figure was a
complete disaster.  It picked up all sorts of forces and velocities as a
result of the move, as you're also seeing.

I tried to clear the force accumulators and to set the linear and angular
velocities on the bodies to zero, but I had no luck.  Also, I should observe
that moving just the bodies in the ball joint case caused the ball joint
anchors to move to the origins of the attached bodies.  Moving just the
bodies in the hinge case worked just fine, as I mentioned.

Nobody on the list was able to offer any insights, and I just worked around
the problem (I create the object at the destination and then never
reposition it except through the application of forces and such).  I'm not
interested enough in the problem to delve the code and the data structures
to figure out why I saw the behavior that I saw.

If you find a solution or can figure out what the situation is with ODE, I'd
certainly love to hear about it.

JB




More information about the ODE mailing list