In this project we had to build and render an animation of a creature using the Open Dynamics Engine (ODE) for the rigid body physics and OpenGL for the graphics. An ODE world and a flat terrain were already provided to us. Our creature had to traverse the given flat terrain and also traverse an uneven terrain of our own choosing (both along the positive X axis).

 

I have created a simple creature using ODE and GLUT that has a box-shaped body and 2 box-shaped legs, which enable locomotion. The legs are attached to the body using ODE hinge joints. The joint axes are aligned along the Y axis because we want the creature to move along the X axis. To enable motion in the creature, I added Angular Motors to the hinge joints. The Angular Motors are configured to achieve a desired velocity of 10.0 using a maximum force of 10.0.

The figure below depicts my creature in the default terrain.

 

 

To create an uneven terrain, I added a couple of cylindrical geometric objects to the terrain. The figure below depicts my creature in the new terrain where it has crossed the first obstacle and is proceeding towards the second obstacle. The cylindrical obstacles are rendered in black.