[ODE] Assembling Bodies

Jaap Stolk jwstolk at gmail.com
Tue Apr 18 10:51:27 MST 2006


On 4/18/06, Wesley Smith <wesley.hoke at gmail.com> wrote:
> Thanks for the help Jaap.  Indeed that will help me exclude them from
> the collide process which is great, but it doesn't help me keep them
> in the same relative position to each other.  They still merge with
> each other which is not what I want.  I want them to stick to each
> other.
> Any ideas on how to do this?

(note: I'm an ODE newbe)
The best way would be to just convert the two bodies into a single
body. What makes it more difficult is that you want to connect (and
split) them while running the simulation.
Maybe remove (or temporarily disable) the two bodies, and make a new
body and add the two masses of the old bodies using dMassAdd( ) to
keep the same mass distribution.
I think you then can add both of the old geoms to the new body.
you will also have to set the speed and rotational velocity of the new
body in some way, as well as re-connecting any other joints that where
connected to one of the old bodies.

another option to connect two bodies (mentioned in the doc's) is to
use an angular motor with zero axes. I think that would only make the
bodies rotate in the same way, you still may need to add a ball-socket
joint to keep them at the correct distance apart.



More information about the ODE mailing list