PyOMD

OMD is a multibody dynamics tool for modeling mechanical system. OMD can handle three dimensional models and is built using Kane's method of recursive generalized coordinates.

PyOMD allows the user to create bodies, joints and forces. The user can define the bodies to have any mass and inertia desired. Contact is implemented using bullet's collision library. Simple shapes such as boxes and spheres can be used for contact.



OMD has been embedded into Python to take advantage of the vast number of free Python tools. All the examples use VPython. VPython is not necessary to run PyOMD but PyOMD just crunches the numbers and has no visualization tools.

Although not used in the examples, Matplotlib compliments PyOMD very well.

To try out PyOMD download it: PyOMD (sorry it is only available for windows right now).

In the zipped folder you will find the examples:
  1. ball.py: Just a body falling. No VPython
  2. ballsOnPlateAndPendV.py: Pictured here
  3. ballsOnPlateV.py: Like the model pictured here minus light bulb.
You will also find the PyOMD module. (It won't work with Linux because there is a shared object in there). I may do the linux version soon since I've got a linux machine again

Documentation

More documentation is on the way, for now the examples and the code can be used to learn how to construct a model. One trick in defining the models is in understanding how bodies are placed. The location of the body is defined when the joints are defined. Every joint has a parent and a child. Typically a vector is used to describe the location of the center of gravity of the parent to the joint and then the joint to the center of gravity of the child. This may seem odd, but this is how the solver works, a tree structure of joints and bodies define the relative coordinates which make up the states. The states are either relative translations and translational velocities or relative rotations and rotational velocities. At some point a different interface may be built but it isn't hard once you get the idea.

Tutorials

Falling Ball

Something that some may find confussing:

Although you can only directly make translational and rotation joints, they can be combined to make others. For example. Three rotational joints (with intermediate bodies) whose axis are perpendicular (for example in the x,y, and z directions) will result in a spherical joint.