Rigid Body Dynamics Library

Model Structure

RBDL stores the model internally in the Model Structure. For each Body it contains spatial velocities, accelerations and other variables that describe the state of the rigid body system. Furthermore it contains variables that are used as temporary variables in the algorithms.

There are multiple ways of creating Models for RBDL:

  • Loading models from Lua files using the LuaModel addon
  • Loading models from URDF (the Unified Robot Description Format) xml files or strings using the URDFReader addon
  • using the C++ interface.

The first approach requires the addon Lua Models to be activated which is done by enabling BUILD_ADDON_LUAMODEL in CMake and is recommended when one is not interested in the details of RBDL and simply wants to create a model.

Modeling using C++

The construction of Model Structures makes use of carefully designed constructors of the classes Body and Joint to ease the process of creating articulated models.

Bodies are created by calling one of its constructors. Usually they are created by specifying the mass, center of mass and the inertia at the center of mass. Joints are similarly created and is described in detail in Joint Modeling.

Adding bodies to the model is done by specifying the parent body by its id, the transformation from the parent origin to the joint origin, the joint specification as an object, and the body itself. These parameters are then fed to the function RigidBodyDynamics::Model::AddBody() or RigidBodyDynamics::Model::AppendBody().

To create a model with a floating base (a.k.a a model with a free-flyer joint) it is recommended to use a joint of type JointTypeFloatingBase as the first joint.

Once this is done, the model structure can be used with the functions of Kinematics, Dynamics, Constraints, to perform computations.

A simple example can be found here.

Using LuaModels

For this see the documentation of Lua Models,RigidBodyDynamics::Addons::LuaModelReadFromFile, and RigidBodyDynamics::Addons::LuaModelReadFromFileWithConstraints.

Using URDF

For this see the documentation see RigidBodyDynamics::Addons::URDFReadFromFile.