Final Paper

Abstract

Biped.so is a program created to accurately simulate and animate robot legs based on user defined initial physical parameters. A user interface is provided to manipulate initial parameters including joint angles and body masses. Maya is used for the working environment and MEL (Maya Embedded Language) is used to create the user interface. The code for the physical calculations is provided by SD/FAST, a program which “provides (a) physically-based simulation of mechanical systems by taking a short description of an articulated system of rigid bodies (bodies connected by joints) and deriving the full nonlinear equations of motion for that system.” (sdfast.com) Biped.so is written in C++ and MEL and is implemented as a Maya plugin.

Project Information

The user interface is written in MEL and provides the user with the capabilities of changing initial joint angles and body masses, running the simulation, and saving the data. The interface is a window with a tab organized layout where each tab corresponds to different parts of the biped. A final tab provides control buttons to run the program. The tabs corresponding to parts of the biped provide options to set the initial joint angles and to change body masses. This information is then saved to the main program via a button located on the control tab and is used in the calculations to animate the biped. The tab providing control buttons also supplies the user with other capabilities. The user can run the simulation which then performs the nonlinear equations provided by SD/FAST and determines the joint positions and orientations at each time step of the simulation. This information is then sent to Maya through MEL commands, which then animates the biped. The user is also given the option to save the current angle and mass values of the biped to a new initial input file so the simulation can be started from where the user left off. This information can be loaded into the program at a later time. The final option provided to the user saves all the calculations made by the main program to an output file for further analysis.

Biped working environment within maya

The nonlinear equations of motion needed to animate the biped according to the laws of physics are derived by SD/FAST. An input file is used to specify parameters for each joint. A joint’s definition includes: external forces on the joint (gravity), how the joint is connected to adjacent joints, the length and mass of limbs connected to the joint, the joint’s degrees of freedom and its initial orientation. The parameters defined in the input file are then used to generate code defining the nonlinear equations of motion that will perform physically correct calculations based on initial conditions provided by the user. The SD/FAST generated code determines the position and orientation of every joint at continuous time steps for a predetermined amount of time.

SD/FAST code is optimized to perform the fastest calculations based on the initial inputs defined in the input file. When the user changes parameters like the mass of a body, the SD/FAST generated code will no longer be optimized for the calculations required to animate the biped. The option of changing the original code to add better optimized SD/FAST code is therefore provided to the user. The user will have to make minor changes to the original code and be familiar with how to use SD/FAST and C++ to make the changes.

The SD/FAST code provides many of the needed functions to animate the biped, however any forces other than gravity must be defined and added to the code. A function is added to the program to calculate all the forces applied to the biped throughout the simulation. The force of the ground on the feet of the biped is one such force. A control system is also defined and needed for the simulation to run properly. A control system manages the behavior of the system. The control system is used to specify the final angle of a joint, or in the case of the biped, force it to its stable state. The stable state for the biped defined in biped.so is an upright standing position where all the joint angles are equal to the angles specified in the SD/FAST input file. The stable state can be defined differently based on the SD/FAST input file specifications.

Any communication between the main program, which is written in C++, and Maya, the working environment, must be done through MEL, the Maya Embedded Language. The main MEL scripts in biped.so draw and animate the biped, create a user interface, and save the information in the user interface back to the main program. To draw the biped in Maya, a MEL script is read into the main program as an input file and then sent directly to Maya to draw the robot’s legs. In order to animate the biped within Maya, MEL commands are used which specify the position and orientation of each joint at different time steps. The position and orientation information is provided by the SD/FAST code’s functions which perform the needed calculations.

Conclusion

The final program provides a user with the capability of seeing a biped move based on user defined initial angles of joints. This is advantageous because is provides the ability to experiment on robot legs without requiring the robot to be present. The program also gives the user the option of finding out if the experiment will or will not work before it is tested on the apparatus. The user will be able to know the capabilities of the biped before they have access to the machinery. Biped.so could potentially save time for the user and possibly prevent damage from occurring to the robot.