[ODE] Ball and Socket or (Universal +Hinge)

Jaap Stolk jwstolk at gmail.com
Tue Apr 11 08:29:59 MST 2006


On 4/11/06, Brian Dexter Allen <chokma at gmail.com> wrote:
> retrieving the current angle works fine for Euler-mode AMotors.

I read that when euler angles are used, the axes are re-computed after
each step. Will I be
able to keep the control as expected ?
I think I'm going back to the universal joint, and add a hinge joint
for the rotation. May be a bit slower, but it will then be simple to
correctly get the angles and set the torques.

> BTW, what are you using for rendering?  It is very pleasing with a
> nice color scheme.

Sorry i missed your question in the first reply.

I use the open-source http://www.povray.org/ rendering program.
It has a radiosity rendering mode that I really like. basically
every surface is illuminated by all other surfaces (starting from
the white sky) No lights where used, so there are no hard shadows.
rendering is slow, about 2 minutes / frame, but you can play with the
settings to trade quality for speed. i set it to pretty high quality,
since the smooth texture makes the errors very visible.

I use a simple diffuse-only texture with a simple color:
base_col = 0.7;
pigment{ color rgb <1.0,         base_col, base_col> }
pigment{ color rgb <base_col, 1.0,         base_col> }
pigment{ color rgb <base_col, base_col, 1.0        > }

I run a C program that uses ODE and saves the positions and rotations
for each frame to a text file. Then i run a povray file to render each
frame, then ffmpeg to make the mpg.

http://jwstolk.xs4all.nl/wisse/main.c      (before the ball joint stuff)
http://jwstolk.xs4all.nl/wisse/test2.pov  (used for rendering)

povray normally uses rotation about the the x, y and z axes, but it
has (limited) support for matrix transformations. I needed to swap
some things in the matrix around because ODE stores the rotations in a
different order and because povray uses a left hand coordinate system.

Jaap.



More information about the ODE mailing list