- 3.0.2 rigid body dynamics module.
iit::rbd Namespace Reference

Namespaces

 internal
 
 tpl
 

Classes

struct  Core
 
struct  DoubleTrait
 
struct  FloatTrait
 
class  HomogeneousTransformBase
 
class  JacobianBase
 
class  RotationTransformBase
 
class  SpatialTransformBase
 
class  StateDependentBase
 
class  StateDependentMatrix
 
class  Utils
 

Typedefs

using InertiaMatrixDense = tpl::InertiaMatrixDense< double >
 
using Velocity = typename Core< S >::VelocityVector
 
using Force = typename Core< S >::ForceVector
 
using Mat33 = typename Core< S >::Matrix33
 
using Mat66 = typename Core< S >::Matrix66
 
using Vec3 = typename Core< S >::Vector3
 
using Vec6 = typename Core< S >::Vector6
 
using InertiaMat = tpl::InertiaMatrixDense< S >
 
General matrix types
template<typename Derived >
using MatrixBase = Eigen::MatrixBase< Derived >
 
template<typename Scalar , int R, int C>
using PlainMatrix = Eigen::Matrix< Scalar, R, C >
 
template<typename XprType , int R, int C>
using MatrixBlock = Eigen::Block< XprType, R, C >
 
template<typename Scalar >
using SparseMatrix = Eigen::SparseMatrix< Scalar >
 
template<typename Scalar >
using SparseVector = Eigen::SparseVector< Scalar >
 

Enumerations

Vector coordinates

Constants to index either 6D or 3D coordinate vectors.

enum  Coords3D { X =0, Y, Z }
 To be used with 6D vectors. 'A' stands for angular, 'L' for linear. More...
 
enum  Coords6D {
  AX =0, AY, AZ, LX,
  LY, LZ
}
 To be used with 6D vectors. 'A' stands for angular, 'L' for linear. More...
 

Functions

template<typename Derived >
Force< DScalarvxIv (const Velocity< DScalar > &v, const MatrixBase< Derived > &I)
 
template<typename Derived >
Force< DScalarvxIv (const DScalar &omegaz, const MatrixBase< Derived > &I)
 
template<typename S = double>
void motionCrossProductMx (const Velocity< S > &v, Mat66< S > &vx)
 
template<typename S = double>
void forceCrossProductMx (const Velocity< S > &v, Mat66< S > &vx)
 
template<typename S = double>
void fillInertia (S mass, const Vec3< S > &com, const internal::SymmMat3x3Coefficients< S > &I3x3, InertiaMat< S > &I)
 
template<typename Scalar = double>
void transformInertia (const InertiaMat< Scalar > &I_A, const Mat66< Scalar > &XF, InertiaMat< Scalar > &I_B)
 
Articulated inertia - Coordinate transform

These functions perform the coordinate transform of a spatial articulated inertia, in the special case of a mass-less handle (see chapter 7 of the RBDA book, §7.2.2, equation 7.23)

Two specialized functions are available for the two cases of revolute and prismatic joint (which connects the subtree with the mass-less handle), since the inertia exhibits two different sparsity patterns.

Parameters
Ia_Athe articulated inertia in A coordinates
XMa spatial coordinate transform for motion vectors, in the form A_XM_B (that is, mapping forces from A to B coordinates)
[out]Ia_B_constthe same articulated inertia, but expressed in B coordinates. Note that the constness is casted away (trick required with Eigen)
template<typename D1 , typename D2 , typename D3 >
void ctransform_Ia_revolute (const MatrixBase< D1 > &Ia_A, const MatrixBase< D2 > &XM, const MatrixBase< D3 > &Ia_B_const)
 
template<typename D1 , typename D2 , typename D3 >
void ctransform_Ia_prismatic (const MatrixBase< D1 > &Ia_A, const MatrixBase< D2 > &XM, const MatrixBase< D3 > &Ia_B_const)
 
Articulated inertia - Computation

These functions calculate the spatial articulated inertia of a subtree, in the special case of a mass-less handle (see chapter 7 of the RBDA book, §7.2.2, equation 7.23)

Two specialized functions are available for the two cases of revolute and prismatic joint (which connects the subtree with the mass-less handle), since the inertia exhibits two different sparsity patterns.

Parameters
IAthe regular articulated inertia of some subtree
Uthe U term for the current joint (cfr. eq. 7.43 of RBDA)
Dthe D term for the current joint (cfr. eq. 7.44 of RBDA)
[out]Ia_constthe articulated inertia for the same subtree, but propagated across the current joint. The matrix is assumed to be already initialized with zeros, at least in the row and column which is known to be zero. In other words, those elements are not computed nor assigned in this function. Note that the constness of the argument is casted away (trick required with Eigen), as this is an output argument.
template<typename D1 , typename D2 >
void compute_Ia_revolute (const MatrixBase< D1 > &IA, const Vec6< typename D1::Scalar > &U, const typename D1::Scalar &D, const MatrixBase< D2 > &Ia_const)
 
template<typename D1 , typename D2 >
void compute_Ia_prismatic (const MatrixBase< D1 > &IA, const Vec6< typename D1::Scalar > &U, const typename D1::Scalar &D, const MatrixBase< D2 > &Ia_const)
 

Types with 'double' as the scalar type.

Explicit instantiation of all the various matrix types using the standard double as the scalar type. See Core

typedef Core< double > Cored
 
using Matrix33d = Cored::Matrix33
 
using Vector3d = Cored::Vector3
 
using Matrix66d = Cored::Matrix66
 
using Vector6d = Cored::Vector6
 
using Vector6D = Cored::Vector6D
 
using VelocityVector = Cored::VelocityVector
 
using ForceVector = Cored::ForceVector
 
using Part3D = Cored::Part3D
 
using Part3DConst = Cored::Part3DConst
 
using Column6d = Cored::Column6D
 
using SparseMatrixd = SparseMatrix< double >
 
using SparseColumnd = SparseVector< double >
 
Part3D angularPart (Vector6D &f)
 
Part3D linearPart (Vector6D &f)
 
Part3DConst angularPart (const Vector6D &f)
 
Part3DConst linearPart (const Vector6D &f)
 

Detailed Description

This namespace contains some basic types and functions related to spatial vectors and Rigid Body Dynamics (RBD).

This code has been developed to provide basic types and general utilities to be used in turn by the C++ classes generated by the Robotics Code Generator (RobCoGen). That is, the code is just meant to be a common, generic facility for all the robot-specific code that RobCoGen can generate.

In other words, the primary target of the iit_rbd library is not to provide a comprehensive object-oriented implementation of concepts of rigid-body dynamics and spatial vectors, for end-user applications. Some of such concepts do appear in this software, although the implementation is relatively simple. However, the library may very well be used in custom code that needs e.g. a type for spatial vectors or for the spatial 6x6 inertia tensor.

Typedef Documentation

◆ InertiaMatrixDense

◆ Velocity

using iit::rbd::Velocity = typedef typename Core<S>::VelocityVector

◆ Force

using iit::rbd::Force = typedef typename Core<S>::ForceVector

◆ Mat33

using iit::rbd::Mat33 = typedef typename Core<S>::Matrix33

◆ Mat66

using iit::rbd::Mat66 = typedef typename Core<S>::Matrix66

◆ Vec3

using iit::rbd::Vec3 = typedef typename Core<S>::Vector3

◆ Vec6

using iit::rbd::Vec6 = typedef typename Core<S>::Vector6

◆ InertiaMat