A fast and flexible implementation of Rigid Body Dynamics algorithms and their analytical derivatives
Loading...
Searching...
No Matches
CheatSheet: SE(3) operations
Rigid transformation
Transformation from B to A:
Transformation from A to B:
For Featherstone, and . Then:
Composition
Motion Application
For Featherstone, and . Then:
Force Application
For any , and then:
(because ).
For Featherstone, and . Then:
Inertia
Inertia application
Coordinate transform:
since:
Cannonical form. The inertia about the center of mass is:
Expressed in any non-centered coordinate system :
Changing the coordinates system from to :
Representing the spatial inertia in by the triplet , the expression in is:
Similarly, the inverse action is:
Motion-to-force map:
Nota: the square of the cross product is: There is no computational interest in using it.
Inertia addition
Cross products
Motion-motion product:
Motion-force product:
A special form of the motion-force product is often used:
Setting , this product can be written:
This last form cost five , four and one matrix-vector multiplication.
Joint
We denote by the coordinate system attached to the parent (predecessor) body at the joint input, and by the coordinate system attached to the (child) successor body at the joint output. We neglect the possible time variation of the joint model (ie the bias velocity is null).
The joint geometry is expressed by the rigid transformation from the input to the ouput, parametrized by the joint coordinate system :
The joint velocity (i.e. the velocity of the child wrt. the parent in the child coordinate system) is:
where is the joint Jacobian (or constraint matrix) that define the motion subspace allowed by the joint, and is the joint coordinate velocity (i.e. an element of the Lie algebra associated with the joint coordinate manifold), which would be when exists.
The joint acceleration is:
where (null in the usual cases) and is the velocity of the parent body with respect to an absolute (Galilean) coordinate system
NB: The abosulte velocity is also the relative velocity wrt. the Galilean coordinate system . The exhaustive notation should be but is prefered for simplicity.
The joint calculations take as input the joint position and velocity and should output , and (this last vector being often a trivial vector). In addition, the joint model should store the position of the joint input in the central coordinate system of the previous joint which is a constant value.
The joint integrator computes the exponential map associated with the joint manifold. The function inputs are the initial position , the velocity and the length of the integration interval . It computes as:
For the simple vectorial case where , we have . Written in the more general case of a Lie group, we have where denotes the exponential map (i.e. integration of a constant vector field from the Lie algebra into the Lie group). This integration only considers first order explicit Euler. More general integrators (e.g. Runge-Kutta in Lie groups) remains to be written. Adequate references are welcome.
RNEA
Initialization
In the following, the coordinate system is attached to the output of the joint (child body), while is the central coordinate system attached to the parent joint. The coordinated system associated with the joint input is denoted by . The constant rigid transformation from to the joint input is then .
Forward loop
For each joint , update the joint calculation .calc( ). This compute , , and . Attached to the joint is also its placement in body denoted by . Then:
Backward loop
For each joint from leaf to root, do:
Nota
It is more efficient to apply than . Similarly, it is more efficient to apply than . Therefore, it is better to store the transformations and than and .