Rigid Body Dynamics Library
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:
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.
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 Model::SetFloatingBaseBody(...).
A simple example can be found here.
For this see the documentation see RigidBodyDynamics::Addons::URDFReadFromFile.