[ODE] Build Model

Marco Vienup Marco at vienup.de
Wed Jan 22 12:48:02 2003


Hello everyone,
i think I have a strange problem to understand the startupsequence.

Before I can simulate anything I must create a model, ok.
Now I create for example a box (geometry, body, mass and so on) and
a second one, looks something like this: 


+----------++----------+
|   Box1   ||  Box2    |	
+----------++----------+

z  y
| /
|/
----x

They are connected with a hinge and the axis is around y.
Ok, no problem everything works fine.

But what I want is, that I can rotate the boxes for example
around the z axis. When I am in the simulation it is no problem.
But at the moment I build my model (-> place the objects at
the right place and connect them with joints)

The Model looks something like this:

          \     /
           \   /
            +-+ 
		| |
            +-+
           /   \
          /     \

y
|
|
z----x

In the middel is the torso and the other elements are the "legs".

So I programmed some functions to calculate the position, where I 
must place them.
I also placed spheres for debugging at the places where the boxes
must be. And the positon is correct.
Ok, I have now the rotated position for the boxes. To rotate the
boxes I used the ode function dBodySetQuaternion with the "same" 
rotation matrix.
 
When the simulation starts everything looks fine. But then 
the boxes moves around the hinge axis. I think its correct, but
not what I want.

So my question is: 
How must I build my model with rotated elements at the begining ?

Thanks 
Marco