Robot Dynamics Library
Public Member Functions | Public Attributes | List of all members
RobotDynamics::Body Struct Reference

Describes all properties of a single body. More...

#include <Body.hpp>

Collaboration diagram for RobotDynamics::Body:
Collaboration graph
[legend]

Public Member Functions

 Body ()
 
 Body (const Body &body)
 
Bodyoperator= (const Body &body)
 
 Body (const double &mass, const Math::Vector3d &com, const Math::Vector3d &gyration_radii, const Math::Vector3d &centerOfBuoyancy, const double volume, const Math::SpatialMatrix &addedMassMatrix, const DragData &dragData)
 Constructs a body from mass, center of mass, radii of gyration, the center of buoyancy, added mass matrix, drag data, and the volume taken up by the body. More...
 
 Body (const double &mass, const Math::Vector3d &com, const Math::Vector3d &gyration_radii, const Math::Vector3d &centerOfBuoyancy, const double volume, const Math::SpatialMatrix &addedMassMatrix)
 Constructs a body from mass, center of mass, radii of gyration, the center of buoyancy, and hydrodynamic parameters. More...
 
 Body (const double &mass, const Math::Vector3d &com, const Math::Vector3d &gyration_radii)
 Constructs a body from mass, center of mass, radii of gyration. Hydrodynamic terms are set such that they will have no effect on the dynamics. More...
 
 Body (const double &mass, const Math::Vector3d &com, const Math::Matrix3d &inertia_C, const Math::Vector3d &centerOfBuoyancy, const double volume, const Math::SpatialMatrix &addedMassMatrix, const DragData &dragData)
 Constructs a body from mass, center of mass, a 3x3 inertia matrix, the center of buoyancy, and hydrodynamic parameters. More...
 
 Body (const double &mass, const Math::Vector3d &com, const Math::Matrix3d &inertia_C, const Math::Vector3d &centerOfBuoyancy, const double volume, const Math::SpatialMatrix addedMassMatrix)
 Constructs a body from mass, center of mass, a 3x3 inertia matrix, the center of buoyancy, and hydrodynamic parameters. More...
 
 Body (const double &mass, const Math::Vector3d &com, const Math::Matrix3d &inertia_C)
 Constructs a body from mass, center of mass, a 3x3 inertia matrix. Hydrodynamic terms are set such that they will have no dynamic effects. More...
 
void join (const Math::SpatialTransform &transform, const Body &other_body)
 Joins inertial parameters of two bodies to create a composite body. More...
 
 ~Body ()
 

Public Attributes

double mMass
 The mass of the body. More...
 
Math::Vector3d mCenterOfMass
 The position of the center of mass in body coordinates. More...
 
Math::Matrix3d mInertia
 Inertia matrix at the center of mass. More...
 
double volume
 
Math::Vector3d mCenterOfBuoyancy
 
Math::SpatialMatrix addedMassMatrix
 
DragData dragData
 
bool mIsVirtual
 

Detailed Description

Describes all properties of a single body.

A Body contains information about mass, the location of its center of mass, the ineria tensor in the center of mass as well as information for hydrodynamics such as center of buoyancy, volume, and shape parameters for modeling fluid added mass/drag effects. This class is designed to use the given information and transform it such that it can directly be used by the spatial algebra.

Constructor & Destructor Documentation

◆ Body() [1/8]

RobotDynamics::Body::Body ( )
inline

◆ Body() [2/8]

RobotDynamics::Body::Body ( const Body body)
inline

◆ Body() [3/8]

RobotDynamics::Body::Body ( const double &  mass,
const Math::Vector3d com,
const Math::Vector3d gyration_radii,
const Math::Vector3d centerOfBuoyancy,
const double  volume,
const Math::SpatialMatrix addedMassMatrix,
const DragData dragData 
)
inline

Constructs a body from mass, center of mass, radii of gyration, the center of buoyancy, added mass matrix, drag data, and the volume taken up by the body.

This constructor eases the construction of a new body as all the required parameters can be specified as parameters to the constructor. These are then used to generate the spatial inertia matrix which is expressed at the origin.

Parameters
massthe mass of the body
comthe position of the center of mass in the bodies coordinates
gyration_radiithe radii of gyration at the center of mass of the body
centerOfBuoyancyThe center of buoyancy for the body
volumeThe volume taken up by the body
addedMassMatrixThe hydrodynamic added mass matrix
dragDataHydrodynamic drag data struct for the body

◆ Body() [4/8]

RobotDynamics::Body::Body ( const double &  mass,
const Math::Vector3d com,
const Math::Vector3d gyration_radii,
const Math::Vector3d centerOfBuoyancy,
const double  volume,
const Math::SpatialMatrix addedMassMatrix 
)
inline

Constructs a body from mass, center of mass, radii of gyration, the center of buoyancy, and hydrodynamic parameters.

This constructor eases the construction of a new body as all the required parameters can be specified as parameters to the constructor. These are then used to generate the spatial inertia matrix which is expressed at the origin.

Parameters
massthe mass of the body
comthe position of the center of mass in the bodies coordinates
gyration_radiithe radii of gyration at the center of mass of the body
centerOfBuoyancyThe center of buoyancy for the body
volumeThe volume taken up by the body
addedMassMatrixThe hydrodynamic added mass matrix for the body

◆ Body() [5/8]

RobotDynamics::Body::Body ( const double &  mass,
const Math::Vector3d com,
const Math::Vector3d gyration_radii 
)
inline

Constructs a body from mass, center of mass, radii of gyration. Hydrodynamic terms are set such that they will have no effect on the dynamics.

This constructor eases the construction of a new body as all the required parameters can be specified as parameters to the constructor. These are then used to generate the spatial inertia matrix which is expressed at the origin.

Parameters
massthe mass of the body
comthe position of the center of mass in the bodies coordinates
gyration_radiithe radii of gyration at the center of mass of the body

◆ Body() [6/8]

RobotDynamics::Body::Body ( const double &  mass,
const Math::Vector3d com,
const Math::Matrix3d inertia_C,
const Math::Vector3d centerOfBuoyancy,
const double  volume,
const Math::SpatialMatrix addedMassMatrix,
const DragData dragData 
)
inline

Constructs a body from mass, center of mass, a 3x3 inertia matrix, the center of buoyancy, and hydrodynamic parameters.

This constructor eases the construction of a new body as all the required parameters can simply be specified as parameters to the constructor. These are then used to generate the spatial inertia matrix which is expressed at the origin.

Parameters
massthe mass of the body
comthe position of the center of mass in the bodies coordinates
inertia_Cthe inertia at the center of mass
centerOfBuoyancyThe center of buoyancy for the body
volumeThe volume taken up by the body
addedMassMatrixHydrodynamic added mass matrix for the body
dragDataThe drag data for this body

◆ Body() [7/8]

RobotDynamics::Body::Body ( const double &  mass,
const Math::Vector3d com,
const Math::Matrix3d inertia_C,
const Math::Vector3d centerOfBuoyancy,
const double  volume,
const Math::SpatialMatrix  addedMassMatrix 
)
inline

Constructs a body from mass, center of mass, a 3x3 inertia matrix, the center of buoyancy, and hydrodynamic parameters.

This constructor eases the construction of a new body as all the required parameters can simply be specified as parameters to the constructor. These are then used to generate the spatial inertia matrix which is expressed at the origin.

Parameters
massthe mass of the body
comthe position of the center of mass in the bodies coordinates
inertia_Cthe inertia at the center of mass
centerOfBuoyancyThe center of buoyancy for the body
volumeThe volume taken up by the body
addedMassMatrixThe hydrodynamic added mass matrix for the body

◆ Body() [8/8]

RobotDynamics::Body::Body ( const double &  mass,
const Math::Vector3d com,
const Math::Matrix3d inertia_C 
)
inline

Constructs a body from mass, center of mass, a 3x3 inertia matrix. Hydrodynamic terms are set such that they will have no dynamic effects.

This constructor eases the construction of a new body as all the required parameters can simply be specified as parameters to the constructor. These are then used to generate the spatial inertia matrix which is expressed at the origin.

Parameters
massthe mass of the body
comthe position of the center of mass in the bodies coordinates
inertia_Cthe inertia at the center of mass

◆ ~Body()

RobotDynamics::Body::~Body ( )
inline

Member Function Documentation

◆ join()

void RobotDynamics::Body::join ( const Math::SpatialTransform transform,
const Body other_body 
)
inline

Joins inertial parameters of two bodies to create a composite body.

This function can be used to join inertial parameters of two bodies to create a composite body that has the inertial properties as if the two bodies were joined by a fixed joint.

Note
The drag terms and added mass matrices for both bodies will simply be added together
Parameters
transformThe frame transformation from the origin of the original body to the origin of the added body
other_bodyThe other body that will be merged with *this.

◆ operator=()

Body& RobotDynamics::Body::operator= ( const Body body)
inline

Member Data Documentation

◆ addedMassMatrix

Math::SpatialMatrix RobotDynamics::Body::addedMassMatrix

The hydrodynamic added mass for the body

◆ dragData

DragData RobotDynamics::Body::dragData

The hydrodynamic drag data for the body

◆ mCenterOfBuoyancy

Math::Vector3d RobotDynamics::Body::mCenterOfBuoyancy

Center of buoyancy for a body

◆ mCenterOfMass

Math::Vector3d RobotDynamics::Body::mCenterOfMass

The position of the center of mass in body coordinates.

◆ mInertia

Math::Matrix3d RobotDynamics::Body::mInertia

Inertia matrix at the center of mass.

◆ mIsVirtual

bool RobotDynamics::Body::mIsVirtual

◆ mMass

double RobotDynamics::Body::mMass

The mass of the body.

◆ volume

double RobotDynamics::Body::volume

Volume taken up by body.


The documentation for this struct was generated from the following file: