Rather than construct our own dynamics simulation package, for this early phase of GreenSpace, we turned to the literature to find an existing package which could be integrated into our system. Such a package was expected to provide rigid body simulation, including collision detection.
Researchers at the University of Stuttgart in Germany describe such a system in Virtual Mechanics: Simulation and Animation of Rigid Body Systems and provide source code at their ftp site. The heart of this AERO system may eventually serve as the collision detection and dynamics engine for GreenSpace.
Fortunately, the authors of the AERO package have maintained the simulation code as a logically separate C library, named FSB ("Folge Schritt Berechnung"). Unfortunately, all of the FSB filenames, indentifiers, and comments are written in German.
The basic structure of the FSB library is shown below. A set of files are oriented towards the initialization of the simulation itself and another set of files interact to carry ou the simulation.
Once a body has been initialized and placed in a world, one can modify or observe its physical location in three-space. The user has access to an object's position, velocity, angular velocity, quaternion (orientation), acceleration, and angular acceleration.
Additionally, the FSB library allows users to place connections between objects in the form of rods or springs.
The following is a translation file which translates the german identifiers of this module into english indentifiers for our use.
The following is a flow chart which depicts the general state transition operation:
All of the routines, object types, and variables from this module were important enough to translate:
The Collision Detection module not only determines if two bodies are in contact, but also whether they are resting on eachother, moving away from eachother, or impacting eachother.
Depending on which type of collision it is, the Collision Response module uses different routines from either the Contact Forces module or the Body Impact module to determine what physical situation will result.
In order to determine if a sensor body under our control, such as a user's head or hand, comes in contact with another free moving body in the environment, we will directly access the Collision Detection module translated below:
However, with a more powerful hardware system, we may find that we can afford the cpu time and achieve a superior level of interactive rigid body simulation than something like sensor-actuator networks can provide. The english language translation files will provide support for further exploration of the AERO system once our hardware platform is expanded.