[ODE] "Copying" Bodies

Marcus Brubaker aurelius.marcus at rogers.com
Fri Nov 4 19:05:52 MST 2005


Ok, so I've been struggling with this for a while now and thought I 
would ask the ODE community what they thought.  I have an application 
where I have several worlds/spaces and within each of these is a set of 
bodies in various configurations.  In other words, each world has an 
identical model (same kind of geometry) but in a different state.

At a point I need to set the state of a model in one world identical to 
the state of the model in another world.  To do this I simply set the 
position, quaternion, force, torque and linear and angular velocities of 
the bodies in one world equal to those of the body in the other world.  
In other words, I do things like 
dst.body1.setQuaternion(src.body1.getQuaternion())

Seems like it should work, no?  Unfortunately whenever this is done I 
consistently get simulations with different results than in the original 
world (the one that was copied from).  Significantly different results.  
The only thing I can figure is if there is some body parameters that I'm 
missing.  Any ideas or suggestions would be greatly appreciated.

Thanks,
Marcus



More information about the ODE mailing list