Biorbd Release_1.13.0
Loading...
Searching...
No Matches
BIORBD_NAMESPACE::rigidbody::Joints Class Reference

This is the core of the musculoskeletal model in biorbd. More...

#include <Joints.h>

Inheritance diagram for BIORBD_NAMESPACE::rigidbody::Joints:
BIORBD_NAMESPACE::Model

Public Member Functions

 Joints ()
 Construct a joint model.
 Joints (const Joints &other)
 Construct a joint model from another model.
virtual ~Joints ()
 Properly destroy class.
Joints DeepCopy () const
 Deep copy of the joints.
void DeepCopy (const Joints &other)
 Deep copy of the joints.
size_t AddSegment (const utils::String &segmentName, const utils::String &parentName, const utils::String &translationSequence, const utils::String &rotationSequence, const std::vector< utils::Range > &QRanges, const std::vector< utils::Range > &QdotRanges, const std::vector< utils::Range > &QddotRanges, const std::vector< utils::Scalar > &jointDampings, const SegmentCharacteristics &characteristics, const utils::RotoTrans &referenceFrame)
 Add a segment to the model.
size_t AddSegment (const utils::String &segmentName, const utils::String &parentName, const utils::String &translationSequence, const std::vector< utils::Range > &QRanges, const std::vector< utils::Range > &QdotRanges, const std::vector< utils::Range > &QddotRanges, const std::vector< utils::Scalar > &jointDampings, const SegmentCharacteristics &characteristics, const utils::RotoTrans &referenceFrame)
 Add a segment to the model.
utils::Vector3d getGravity () const
 Get the current gravity.
void setGravity (const utils::Vector3d &newGravity)
 Set the gravity.
int getBodyBiorbdId (const utils::String &segmentName) const
 Return the biorbd body identification.
int getBodyRbdlId (const utils::String &segmentName) const
 Return the rbdl body identification.
int getBodyRbdlIdToBiorbdId (const int idx) const
 Return the Biorbd body identification from rbdl.
size_t getBodyBiorbdIdToRbdlId (const int idx) const
 Return the Rbdl body identification from Biorbd.
std::vector< std::vector< size_t > > getDofSubTrees ()
 Return the rbdl idx of subtrees of each segments.
size_t nbGeneralizedTorque () const
 Return the number of generalized torque.
size_t nbSegment () const
 Return the actual number of segment.
size_t nbDof () const
 Return the number of degrees of freedom (DoF).
size_t getDofIndex (const utils::String &SegmentName, const utils::String &dofName)
 Return the index of a DoF in a segment.
std::vector< utils::String > nameDof () const
 Return the names of the degree of freedom (DoF).
size_t nbQ () const
 Return the number of generalized coordinates (Q).
size_t nbQdot () const
 Return the number of generalized velocities (Qdot).
size_t nbQddot () const
 Return the number of generalized acceleration (Qddot).
size_t nbRoot () const
 Return the dof on the root.
size_t nbQuat () const
 Return the number of segments that are described using quaternions.
void updateSegmentCharacteristics (size_t idx, const SegmentCharacteristics &characteristics)
 updateSegmentCharacteristics Change the inertia characteristics of the segment idx
Segment & segment (size_t idx)
 Get a segment of index idx.
Segment & segment (const utils::String &name)
 Get a segment of a specific name.
const Segment & segment (size_t idx) const
 Get a segment of index idx.
const Segment & segment (const utils::String &name) const
 Get a segment of a specific name.
std::vector< Segment > & segments () const
 Get all the segments.
GeneralizedTorque computeDampedTau (const GeneralizedVelocity &Qdot) const
 Get the joint dampings to apply to the dynamics.
Joints & UpdateKinematicsCustom (const GeneralizedCoordinates *Q=nullptr, const GeneralizedVelocity *Qdot=nullptr, const rigidbody::GeneralizedAcceleration *Qddot=nullptr)
 Update the kinematic variables such as body velocities and accelerations in the model to reflect the variables passed to this function.
std::vector< utils::RotoTrans > allGlobalJCS (const GeneralizedCoordinates &Q, bool updateKin=true)
 Return the joint coordinate system (JCS) in global reference frame at a given Q.
utils::RotoTrans globalJCS (const GeneralizedCoordinates &Q, const utils::String &name, bool updateKin=true)
 Return the joint coordinate system (JCS) for the segment in global reference frame at a given Q.
utils::RotoTrans globalJCS (const GeneralizedCoordinates &Q, size_t idx, bool updateKin=true)
 Return the joint coordinate system (JCS) for the segment idx in global reference frame at a given Q.
std::vector< utils::RotoTrans > localJCS () const
 Return all the joint coordinate system (JCS) in its parent reference frame.
utils::RotoTrans localJCS (const utils::String &name) const
 Return the joint coordinate system (JCS) of the segment its parent reference frame.
utils::RotoTrans localJCS (const size_t idx) const
 Return the joint coordinate system (JCS) of the segment idx its parent reference frame.
utils::Vector3d CalcBodyToBaseCoordinates (const rigidbody::GeneralizedCoordinates &Q, utils::String segmentName, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcBodyToBaseCoordinates. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::Vector3d CalcBodyToBaseCoordinates (const rigidbody::GeneralizedCoordinates &Q, unsigned int bodyId, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcBodyToBaseCoordinates. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::Vector3d CalcPointVelocity (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, utils::String segmentName, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcPointVelocity. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::Vector3d CalcPointVelocity (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, unsigned int bodyId, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcPointVelocity. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::SpatialVector CalcPointVelocity6D (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, utils::String segmentName, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcPointVelocity6D. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::SpatialVector CalcPointVelocity6D (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, unsigned int bodyId, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcPointVelocity6D. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::Vector3d CalcPointAcceleration (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, utils::String segmentName, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcPointAcceleration. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::Vector3d CalcPointAcceleration (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, unsigned int bodyId, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcPointAcceleration. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::Matrix CalcPointJacobian (const rigidbody::GeneralizedCoordinates &Q, utils::String segmentName, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcPointJacobian. Instead of sending the jacobian as an parameter, it is returned. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::Matrix CalcPointJacobian (const rigidbody::GeneralizedCoordinates &Q, unsigned int bodyId, const utils::Vector3d &pointInLocal, bool updateKin=true)
 Interface to call CalcPointJacobian. Instead of sending the jacobian as an parameter, it is returned. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
NodeSegment projectPoint (const GeneralizedCoordinates &Q, const utils::Vector3d &v, int segmentIdx, const utils::String &axesToRemove, bool updateKin=true)
 Project a point on specific axis of a segment.
std::vector< NodeSegment > projectPoint (const GeneralizedCoordinates &Q, const std::vector< NodeSegment > &v, bool updateKin=true)
 Project multiples points on their respective segment.
NodeSegment projectPoint (const GeneralizedCoordinates &Q, const NodeSegment &n, bool updateKin)
 Return the projected markers from a point corresponding to a marker from the model.
utils::Matrix projectPointJacobian (const GeneralizedCoordinates &Q, NodeSegment node, bool updateKin)
 Return the jacobian matrix of the projected markers for a marker from the model.
utils::Matrix projectPointJacobian (const GeneralizedCoordinates &Q, const utils::Vector3d &v, int segmentIdx, const utils::String &axesToRemove, bool updateKin)
 Return the Jacobian matrix of a projected marker on the segment segmentIdx.
std::vector< utils::Matrix > projectPointJacobian (const GeneralizedCoordinates &Q, const std::vector< NodeSegment > &v, bool updateKin)
 Return the jacobian matrix of the projected markers.
utils::Scalar mass () const
 Return the total mass of the model.
utils::Vector3d CoM (const GeneralizedCoordinates &Q, bool updateKin=true)
 Return the position of the center of mass.
void CalcCenterOfMass (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration *Qddot, utils::Scalar &mass, utils::Vector3d &com, utils::Vector3d *comVelocity=NULL, utils::Vector3d *comAcceleration=NULL, utils::Vector3d *angularMomentum=NULL, utils::Vector3d *changeOfAngularMomentum=NULL, bool updateKin=true)
 Interface to CalcCenterOfMass. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.
utils::Vector3d CalcZeroMomentPoint (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, bool updateKin=true)
 Compute the zero moment point on a contact surface.
utils::Vector3d CalcZeroMomentPoint (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, const utils::Vector3d &normal, const utils::Vector3d &point, bool updateKin=true)
 Compute the zero moment point on a contact surface.
std::vector< NodeSegment > CoMbySegment (const GeneralizedCoordinates &Q, bool updateKin=true)
 Return the position of the center of mass of each segment.
utils::Matrix CoMbySegmentInMatrix (const GeneralizedCoordinates &Q, bool updateKin=true)
 Return the position of the center of mass of each segment in a matrix.
utils::Vector3d CoMbySegment (const GeneralizedCoordinates &Q, const size_t idx, bool updateKin=true)
 Return the position of the center of mass of segment idx.
utils::Vector3d CoMdot (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin=true)
 Return the velocity of the center of mass.
utils::Vector3d CoMddot (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, bool updateKin=true)
 Return the acceleration of the center of mass.
std::vector< utils::Vector3d > CoMdotBySegment (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin=true)
 Return the velocity of the center of mass of each segment.
utils::Vector3d CoMdotBySegment (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const size_t idx, bool updateKin=true)
 Return the velocity of the center of mass of segment idx.
std::vector< utils::Vector3d > CoMddotBySegment (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, bool updateKin=true)
 Return the acceleration of the center of mass of each segment.
utils::Vector3d CoMddotBySegment (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, const size_t idx, bool updateKin=true)
 Return the acceleration of the center of mass of segment idx.
utils::Matrix CoMJacobian (const GeneralizedCoordinates &Q, bool updateKin=true)
 Return the jacobian matrix of the center of mass.
std::vector< std::vector< utils::Vector3d > > meshPoints (const GeneralizedCoordinates &Q, bool updateKin=true)
 Return the vertices of the mesh for all segments in global reference frame.
std::vector< utils::Vector3d > meshPoints (const GeneralizedCoordinates &Q, size_t idx, bool updateKin=true)
 Return the vertices of the mesh for the segment idx.
std::vector< utils::Matrix > meshPointsInMatrix (const GeneralizedCoordinates &Q, bool updateKin=true)
 Return all the vertices of the mesh points in a matrix.
std::vector< std::vector< MeshFace > > meshFaces () const
 Return the mesh faces for all the segments.
const std::vector< MeshFace > & meshFaces (size_t idx) const
 Return the mesh faces for segment idx.
std::vector< Mesh > mesh () const
 Return the segment mesh.
const Mesh & mesh (size_t idx) const
 Return the segment mesh for segment idx.
void overrideMeshFolders (const utils::String &folder)
 Set the folder for all the meshes.
utils::Vector3d angularMomentum (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin=true)
 Calculate the angular momentum of the center of mass. This method is an interface to CalcAngularMomemtum.
utils::Matrix massMatrix (const GeneralizedCoordinates &Q, bool updateKin=true)
 Get the mass matrix at a given position Q.
utils::Matrix massMatrixInverse (const rigidbody::GeneralizedCoordinates &Q, bool updateKin=true)
 Get the inverse mass matrix at a given position Q.
utils::Vector3d CalcAngularMomentum (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin)
 Calculate the angular momentum of the center of mass.
utils::Vector3d CalcAngularMomentum (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, bool updateKin)
 Calculate the angular momentum of the center of mass.
std::vector< utils::Vector3d > CalcSegmentsAngularMomentum (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin)
 Calculate the segment's contribution to the whole body angular momentum with respect to the global center of mass / formulae used: H_i = m_i * (r_i - r_com) x (v_i - v_com) + I_i * w_i) / The matrix returned contains a contribution for each last dof of a segment, zeros on all other DoFs.
std::vector< utils::Vector3d > CalcSegmentsAngularMomentum (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, bool updateKin)
 Calculate the segment's contribution to the whole body angular momentum with respect to the global center of mass / formulae used: H_i = m_i * (r_i - r_com) x (v_i - v_com) + I_i * w_i) / The matrix returned contains a contribution for each last dof of a segment, zeros on all other DoFs.
utils::Vector3d bodyAngularVelocity (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, bool updateKin=true)
 Calculate the angular velocity of the model around its center of mass.
void CalcMatRotJacobian (const GeneralizedCoordinates &Q, size_t segmentIdx, const utils::Matrix3d &rotation, utils::Matrix &G, bool updateKin)
 Calculate the jacobian matrix of a rotation matrix.
utils::Matrix JacobianSegmentRotMat (const rigidbody::GeneralizedCoordinates &Q, size_t segmentIdx, bool updateKin)
 Calculate the jacobian matrix of a rotation matrix for a given segment idx.
GeneralizedVelocity computeQdot (const GeneralizedCoordinates &Q, const GeneralizedCoordinates &Qdot, const utils::Scalar &k_stab=1)
 Return the derivate of Q in function of Qdot (if not Quaternion, Qdot is directly returned).
utils::Vector3d segmentAngularVelocity (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, size_t idx, bool updateKin=true)
 Return the angular velocity of the segment.
utils::Scalar KineticEnergy (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, bool updateKin=true)
 Interface for the Kinetic Energy of RBDL.
utils::Scalar PotentialEnergy (const rigidbody::GeneralizedCoordinates &Q, bool updateKin=true)
 Interface for the Potential Energy of RBDL.
utils::Scalar Lagrangian (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, bool updateKin=true)
 Compute the Lagrangian of the system.
utils::Scalar TotalEnergy (const rigidbody::GeneralizedCoordinates &Q, const rigidbody::GeneralizedVelocity &Qdot, bool updateKin=true)
 Compute the Total Energy of System.
GeneralizedTorque InverseDynamics (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot)
 Interface for the inverse dynamics of RBDL.
GeneralizedTorque InverseDynamics (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const rigidbody::GeneralizedAcceleration &Qddot, rigidbody::ExternalForceSet &externalForces)
 Interface for the inverse dynamics of RBDL.
GeneralizedTorque NonLinearEffect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot)
 Interface to NonLinearEffect.
GeneralizedTorque NonLinearEffect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, rigidbody::ExternalForceSet &externalForces)
 Interface to NonLinearEffect.
rigidbody::GeneralizedAcceleration ForwardDynamics (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedTorque &Tau)
 Interface for the forward dynamics of RBDL.
rigidbody::GeneralizedAcceleration ForwardDynamics (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedTorque &Tau, rigidbody::ExternalForceSet &externalForces)
 Interface for the forward dynamics of RBDL.
rigidbody::GeneralizedAcceleration ForwardDynamicsFreeFloatingBase (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedAcceleration &QddotJoints)
 Biorbd's implementation of forward dynamics with a free floating base.
rigidbody::GeneralizedAcceleration ForwardDynamicsConstraintsDirect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedTorque &Tau, bool updateKin=true)
 Interface for the forward dynamics with contact of RBDL.
rigidbody::GeneralizedAcceleration ForwardDynamicsConstraintsDirect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedTorque &Tau, rigidbody::ExternalForceSet &externalForces, bool updateKin=true)
 Interface for the forward dynamics with contact of RBDL.
rigidbody::GeneralizedAcceleration ForwardDynamicsConstraintsDirect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedTorque &Tau, Contacts &CS, bool updateKin=true)
 Interface for the forward dynamics with contact of RBDL.
rigidbody::GeneralizedAcceleration ForwardDynamicsConstraintsDirect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedTorque &Tau, Contacts &CS, rigidbody::ExternalForceSet &externalForces, bool updateKin=true)
 Interface for the forward dynamics with contact of RBDL.
utils::Vector ContactForcesFromForwardDynamicsConstraintsDirect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedTorque &Tau)
 Interface for contacts of the forward dynamics with contact of RBDL.
utils::Vector ContactForcesFromForwardDynamicsConstraintsDirect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &Qdot, const GeneralizedTorque &Tau, rigidbody::ExternalForceSet &externalForces)
 Interface for contacts of the forward dynamics with contact of RBDL.
utils::Matrix3d bodyInertia (const rigidbody::GeneralizedCoordinates &Q, bool updateKin=true)
 bodyInertia Return the matrix of inertia of the body expressed in the global reference frame computed at the center of mass
GeneralizedVelocity ComputeConstraintImpulsesDirect (const GeneralizedCoordinates &Q, const GeneralizedVelocity &QdotPre)
 Compute the Qdot post from an impact.
void checkGeneralizedDimensions (const GeneralizedCoordinates *Q=nullptr, const GeneralizedVelocity *Qdot=nullptr, const rigidbody::GeneralizedAcceleration *Qddot=nullptr, const GeneralizedTorque *torque=nullptr)
 Check for the Generalized coordinates, velocities, acceleration and torque dimensions.

Protected Member Functions

std::vector< std::vector< size_t > > recursiveDofSubTrees (std::vector< std::vector< size_t > > subTrees, size_t idx)
 Return the rbdl idx of subtrees of each segments.
utils::SpatialTransform CalcBodyWorldTransformation (const GeneralizedCoordinates &Q, const size_t segmentIdx, bool updateKin=true)
 Calculate the joint coordinate system (JCS) in global reference frame of a specified segment.
std::vector< utils::Vector3d > meshPoints (const std::vector< utils::RotoTrans > &RT, size_t idx) const
 Return the mesh vertices of segment idx.

Protected Attributes

std::shared_ptr< std::vector< Segment > > m_segments
 All the articulations.
std::shared_ptr< size_t > m_nbRoot
 The number of DoF on the root segment.
std::shared_ptr< size_t > m_nbDof
 The total number of degrees of freedom.
std::shared_ptr< size_t > m_nbQ
 The total number of Q.
std::shared_ptr< size_t > m_nbQdot
 The total number of Qdot.
std::shared_ptr< size_t > m_nbQddot
 The total number of Qddot.
std::shared_ptr< size_t > m_nRotAQuat
 The number of segments per quaternion.
std::shared_ptr< bool > m_isKinematicsComputed
 If the kinematics are computed.
std::shared_ptr< utils::Scalar > m_totalMass
 Mass of all the bodies combined.

Detailed Description

This is the core of the musculoskeletal model in biorbd.

Definition at line 46 of file Joints.h.

Constructor & Destructor Documentation

◆ Joints() [1/2]

rigidbody::Joints::Joints ( )

Construct a joint model.

Definition at line 35 of file Joints.cpp.

◆ Joints() [2/2]

rigidbody::Joints::Joints ( const Joints & other)

Construct a joint model from another model.

Parameters
otherThe other joint model

Definition at line 50 of file Joints.cpp.

◆ ~Joints()

rigidbody::Joints::~Joints ( )
virtual

Properly destroy class.

Definition at line 62 of file Joints.cpp.

Member Function Documentation

◆ AddSegment() [1/2]

size_t rigidbody::Joints::AddSegment ( const utils::String & segmentName,
const utils::String & parentName,
const utils::String & translationSequence,
const std::vector< utils::Range > & QRanges,
const std::vector< utils::Range > & QdotRanges,
const std::vector< utils::Range > & QddotRanges,
const std::vector< utils::Scalar > & jointDampings,
const SegmentCharacteristics & characteristics,
const utils::RotoTrans & referenceFrame )

Add a segment to the model.

Parameters
segmentNameName of the segment
parentNameName of the segment parent
translationSequenceThe translation sequence
QRangesRanges of the translations and rotations dof. The length of QRanges must be equal to length of translations and rotations
QdotRangesRanges of the translations and rotations dof velocity. The length of QdotRanges must be equal to length of translations and rotations
QddotRangesRanges of the translations and rotations dof acceleration. The length of QddotRanges must be equal to length of translations and rotations
jointDampingsThe damping of the joints to apply to the dynamics
characteristicsThe characteristics of the semgent (mass, center of mass, inertia of the segment, etc)
referenceFrameTransformation of the parent to child
Returns
The index of the new segment

Definition at line 156 of file Joints.cpp.

◆ AddSegment() [2/2]

size_t rigidbody::Joints::AddSegment ( const utils::String & segmentName,
const utils::String & parentName,
const utils::String & translationSequence,
const utils::String & rotationSequence,
const std::vector< utils::Range > & QRanges,
const std::vector< utils::Range > & QdotRanges,
const std::vector< utils::Range > & QddotRanges,
const std::vector< utils::Scalar > & jointDampings,
const SegmentCharacteristics & characteristics,
const utils::RotoTrans & referenceFrame )

Add a segment to the model.

Parameters
segmentNameName of the segment
parentNameName of the segment parent
translationSequenceThe translation sequence
rotationSequenceEuler sequence of rotations
QRangesRanges of the translations and rotations dof. The length of QRanges must be equal to length of translations and rotations
QdotRangesRanges of the translations and rotations dof velocity. The length of QdotRanges must be equal to length of translations and rotations
QddotRangesRanges of the translations and rotations dof acceleration. The length of QddotRanges must be equal to length of translations and rotations
jointDampingsThe damping of the joints to apply to the dynamics
characteristicsThe characteristics of the semgent (mass, center of mass, inertia of the segment, etc)
referenceFrameTransformation of the parent to child
Returns
The index of the new segment

Definition at line 112 of file Joints.cpp.

◆ allGlobalJCS()

std::vector< utils::RotoTrans > rigidbody::Joints::allGlobalJCS ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Return the joint coordinate system (JCS) in global reference frame at a given Q.

Parameters
QThe generalized coordinates
updateKinIf the kinematics should be updated
Returns
The JCS in global reference frame at a given Q

Definition at line 343 of file Joints.cpp.

◆ angularMomentum()

utils::Vector3d rigidbody::Joints::angularMomentum ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin = true )

Calculate the angular momentum of the center of mass. This method is an interface to CalcAngularMomemtum.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
updateKinIf the kinematics of the model should be computed
Returns
The angular momentum of the center of mass

Definition at line 775 of file Joints.cpp.

◆ bodyAngularVelocity()

utils::Vector3d rigidbody::Joints::bodyAngularVelocity ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin = true )

Calculate the angular velocity of the model around its center of mass.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
updateKinIf the kinematics of the model should be computed
Returns
The the angular velocity around the center of mass in the global reference frame

Definition at line 1826 of file Joints.cpp.

◆ bodyInertia()

utils::Matrix3d rigidbody::Joints::bodyInertia ( const rigidbody::GeneralizedCoordinates & Q,
bool updateKin = true )

bodyInertia Return the matrix of inertia of the body expressed in the global reference frame computed at the center of mass

Parameters
QThe Generalized Coordinates
updateKinIf the kinematics of the model should be computed
Returns
The total inertia of the body

Definition at line 1792 of file Joints.cpp.

◆ CalcAngularMomentum() [1/2]

utils::Vector3d rigidbody::Joints::CalcAngularMomentum ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin )

Calculate the angular momentum of the center of mass.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
updateKinIf the kinematics of the model should be computed
Returns
The angular momentum of the center of mass

Definition at line 1291 of file Joints.cpp.

◆ CalcAngularMomentum() [2/2]

utils::Vector3d rigidbody::Joints::CalcAngularMomentum ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
bool updateKin )

Calculate the angular momentum of the center of mass.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
updateKinIf the kinematics of the model should be computed
Returns
The angular momentum of the center of mass

Definition at line 1311 of file Joints.cpp.

◆ CalcBodyToBaseCoordinates() [1/2]

utils::Vector3d rigidbody::Joints::CalcBodyToBaseCoordinates ( const rigidbody::GeneralizedCoordinates & Q,
unsigned int bodyId,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcBodyToBaseCoordinates. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
bodyIdThe index of the segment (obtainable with GetBodyId)
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The position of the point in the global reference frame

Definition at line 399 of file Joints.cpp.

◆ CalcBodyToBaseCoordinates() [2/2]

utils::Vector3d rigidbody::Joints::CalcBodyToBaseCoordinates ( const rigidbody::GeneralizedCoordinates & Q,
utils::String segmentName,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcBodyToBaseCoordinates. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
segmentNameThe name of the segment
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The position of the point in the global reference frame

Definition at line 390 of file Joints.cpp.

◆ CalcBodyWorldTransformation()

utils::SpatialTransform rigidbody::Joints::CalcBodyWorldTransformation ( const GeneralizedCoordinates & Q,
const size_t segmentIdx,
bool updateKin = true )
protected

Calculate the joint coordinate system (JCS) in global reference frame of a specified segment.

Parameters
QThe generalized coordinates
segmentIdxThe index of the segment
updateKinIf the kinematics of the model should be computed
Returns
The JCS of the segment in global reference frame

Definition at line 709 of file Joints.cpp.

◆ CalcCenterOfMass()

void rigidbody::Joints::CalcCenterOfMass ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration * Qddot,
utils::Scalar & mass,
utils::Vector3d & com,
utils::Vector3d * comVelocity = NULL,
utils::Vector3d * comAcceleration = NULL,
utils::Vector3d * angularMomentum = NULL,
utils::Vector3d * changeOfAngularMomentum = NULL,
bool updateKin = true )

Interface to CalcCenterOfMass. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe current joint positions
QdotThe current joint velocities
Qddot(optional input) The current joint accelerations
mass(output) total mass of the model
com(output) location of the Center of Mass of the model in base coordinates
comVelocity(optional output) linear velocity of the COM in base coordinates
comAcceleration(optional output) linear acceleration of the COM in base coordinates
angularMomentum(optional output) angular momentum of the model at the COM in base coordinates
changeOfAngularMomentum(optional output) change of angular momentum of the model at the COM in base coordinates
updateKin(optional input) whether the kinematics should be updated (defaults to true)
Note
When wanting to compute com_acceleration or change_of_angular momentum one has to provide Qddot. In all other cases one can use NULL as argument for Qddot.

Definition at line 1003 of file Joints.cpp.

◆ CalcMatRotJacobian()

void rigidbody::Joints::CalcMatRotJacobian ( const GeneralizedCoordinates & Q,
size_t segmentIdx,
const utils::Matrix3d & rotation,
utils::Matrix & G,
bool updateKin )

Calculate the jacobian matrix of a rotation matrix.

Parameters
QThe generalized coordinates
segmentIdxThe index of the segment
rotationThe rotation matrix
GThe jacobian matrix (output)
updateKinIf the kinematics of the model should be computed

Definition at line 1905 of file Joints.cpp.

◆ CalcPointAcceleration() [1/2]

utils::Vector3d rigidbody::Joints::CalcPointAcceleration ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
unsigned int bodyId,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcPointAcceleration. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
bodyIdThe index of the segment (obtainable with GetBodyId)
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The acceleration of the point in the global reference frame

Definition at line 487 of file Joints.cpp.

◆ CalcPointAcceleration() [2/2]

utils::Vector3d rigidbody::Joints::CalcPointAcceleration ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
utils::String segmentName,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcPointAcceleration. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
segmentNameThe name of the segment
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The acceleration of the point in the global reference frame

Definition at line 471 of file Joints.cpp.

◆ CalcPointJacobian() [1/2]

utils::Matrix rigidbody::Joints::CalcPointJacobian ( const rigidbody::GeneralizedCoordinates & Q,
unsigned int bodyId,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcPointJacobian. Instead of sending the jacobian as an parameter, it is returned. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
bodyIdThe index of the segment (obtainable with GetBodyId)
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The jacobian of the point

Definition at line 517 of file Joints.cpp.

◆ CalcPointJacobian() [2/2]

utils::Matrix rigidbody::Joints::CalcPointJacobian ( const rigidbody::GeneralizedCoordinates & Q,
utils::String segmentName,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcPointJacobian. Instead of sending the jacobian as an parameter, it is returned. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates///
segmentNameThe name of the segment
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The jacobian of the point

Definition at line 508 of file Joints.cpp.

◆ CalcPointVelocity() [1/2]

utils::Vector3d rigidbody::Joints::CalcPointVelocity ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
unsigned int bodyId,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcPointVelocity. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
bodyIdThe index of the segment (obtainable with GetBodyId)
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The velocity of the point in the global reference frame

Definition at line 425 of file Joints.cpp.

◆ CalcPointVelocity() [2/2]

utils::Vector3d rigidbody::Joints::CalcPointVelocity ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
utils::String segmentName,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcPointVelocity. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
segmentNameThe name of the segment
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The velocity of the point in the global reference frame

Definition at line 415 of file Joints.cpp.

◆ CalcPointVelocity6D() [1/2]

utils::SpatialVector rigidbody::Joints::CalcPointVelocity6D ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
unsigned int bodyId,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcPointVelocity6D. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
bodyIdThe index of the segment (obtainable with GetBodyId)
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The angular and linear velocity of the point in the global reference frame

Definition at line 453 of file Joints.cpp.

◆ CalcPointVelocity6D() [2/2]

utils::SpatialVector rigidbody::Joints::CalcPointVelocity6D ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
utils::String segmentName,
const utils::Vector3d & pointInLocal,
bool updateKin = true )

Interface to call CalcPointVelocity6D. It is pretty much useless in Eigen, but fixes an issue in Casadi where RBDL changes internal variables which creates a free variables issue.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
segmentNameThe name of the segment
pointInLocalThe point in the body
updateKinIf the kinematics of the model should be computed (always true for casadi)
Returns
The angular and linear velocity of the point in the global reference frame

Definition at line 443 of file Joints.cpp.

◆ CalcSegmentsAngularMomentum() [1/2]

std::vector< utils::Vector3d > rigidbody::Joints::CalcSegmentsAngularMomentum ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin )

Calculate the segment's contribution to the whole body angular momentum with respect to the global center of mass / formulae used: H_i = m_i * (r_i - r_com) x (v_i - v_com) + I_i * w_i) / The matrix returned contains a contribution for each last dof of a segment, zeros on all other DoFs.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
updateKinIf the kinematics of the model should be computed
Returns
A matrix of each segment's angular momentum contribution (3xnbQ)

Definition at line 1332 of file Joints.cpp.

◆ CalcSegmentsAngularMomentum() [2/2]

std::vector< utils::Vector3d > rigidbody::Joints::CalcSegmentsAngularMomentum ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
bool updateKin )

Calculate the segment's contribution to the whole body angular momentum with respect to the global center of mass / formulae used: H_i = m_i * (r_i - r_com) x (v_i - v_com) + I_i * w_i) / The matrix returned contains a contribution for each last dof of a segment, zeros on all other DoFs.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
updateKinIf the kinematics of the model should be computed
Returns
A matrix of each segment's angular momentum contribution (3xnbQ)

Definition at line 1381 of file Joints.cpp.

◆ CalcZeroMomentPoint() [1/2]

utils::Vector3d rigidbody::Joints::CalcZeroMomentPoint ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
bool updateKin = true )

Compute the zero moment point on a contact surface.

Parameters
QThe current joint positions
QdotThe current joint velocities
QddotThe current joint accelerations
updateKinIf the kinematics of the model should be computed
Returns
The Zero Moment Point projected on the horizontal surface

Definition at line 1038 of file Joints.cpp.

◆ CalcZeroMomentPoint() [2/2]

utils::Vector3d rigidbody::Joints::CalcZeroMomentPoint ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
const utils::Vector3d & normal,
const utils::Vector3d & point,
bool updateKin = true )

Compute the zero moment point on a contact surface.

Parameters
QThe current joint positions
QdotThe current joint velocities
QddotThe current joint accelerations
normalThe normal of the contact surface
pointA point on the contact surface
updateKinIf the kinematics of the model should be computed
Returns
The Zero Moment Point projected on the contact surface

Definition at line 1052 of file Joints.cpp.

◆ checkGeneralizedDimensions()

void rigidbody::Joints::checkGeneralizedDimensions ( const GeneralizedCoordinates * Q = nullptr,
const GeneralizedVelocity * Qdot = nullptr,
const rigidbody::GeneralizedAcceleration * Qddot = nullptr,
const GeneralizedTorque * torque = nullptr )

Check for the Generalized coordinates, velocities, acceleration and torque dimensions.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
torqueThe generalized torques

Definition at line 1993 of file Joints.cpp.

◆ CoM()

utils::Vector3d rigidbody::Joints::CoM ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Return the position of the center of mass.

Parameters
QThe generalized coordinates
updateKinIf the kinematics of the model should be computed
Returns
The position of the center of mass

Definition at line 756 of file Joints.cpp.

◆ CoMbySegment() [1/2]

std::vector< rigidbody::NodeSegment > rigidbody::Joints::CoMbySegment ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Return the position of the center of mass of each segment.

Parameters
QThe generalized coordinates
updateKinIf the kinematics of the model should be computed
Returns
The position of the center of mass of each segment

Definition at line 1078 of file Joints.cpp.

◆ CoMbySegment() [2/2]

utils::Vector3d rigidbody::Joints::CoMbySegment ( const GeneralizedCoordinates & Q,
const size_t idx,
bool updateKin = true )

Return the position of the center of mass of segment idx.

Parameters
QThe generalized coordinates
idxThe index of the segment
updateKinIf the kinematics of the model should be computed
Returns
The position of the center of mass of segment idx

Definition at line 1107 of file Joints.cpp.

◆ CoMbySegmentInMatrix()

utils::Matrix rigidbody::Joints::CoMbySegmentInMatrix ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Return the position of the center of mass of each segment in a matrix.

Parameters
QThe generalized coordinates
updateKinIf the kinematics of the model should be computed
Returns
The position of the center of mass of each segment

Definition at line 1095 of file Joints.cpp.

◆ CoMddot()

utils::Vector3d rigidbody::Joints::CoMddot ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
bool updateKin = true )

Return the acceleration of the center of mass.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe acceleration variables
updateKinIf the kinematics of the model should be computed
Returns
The acceleration of the center of mass

Definition at line 953 of file Joints.cpp.

◆ CoMddotBySegment() [1/2]

std::vector< utils::Vector3d > rigidbody::Joints::CoMddotBySegment ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
bool updateKin = true )

Return the acceleration of the center of mass of each segment.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe acceleration variables
updateKinIf the kinematics of the model should be computed
Returns
The acceleration of the center of mass of each segment

Definition at line 1157 of file Joints.cpp.

◆ CoMddotBySegment() [2/2]

utils::Vector3d rigidbody::Joints::CoMddotBySegment ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
const size_t idx,
bool updateKin = true )

Return the acceleration of the center of mass of segment idx.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe acceleration variables
idxThe segment identification
updateKinIf the kinematics of the model should be computed
Returns
The acceleration of the center of mass of segment idx

Definition at line 1179 of file Joints.cpp.

◆ CoMdot()

utils::Vector3d rigidbody::Joints::CoMdot ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin = true )

Return the velocity of the center of mass.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
updateKinIf the kinematics of the model should be computed
Returns
The velocity of the center of mass

Definition at line 925 of file Joints.cpp.

◆ CoMdotBySegment() [1/2]

std::vector< utils::Vector3d > rigidbody::Joints::CoMdotBySegment ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
bool updateKin = true )

Return the velocity of the center of mass of each segment.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
updateKinIf the kinematics of the model should be computed
Returns
The velocity of the center of mass of each segment

Definition at line 1121 of file Joints.cpp.

◆ CoMdotBySegment() [2/2]

utils::Vector3d rigidbody::Joints::CoMdotBySegment ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const size_t idx,
bool updateKin = true )

Return the velocity of the center of mass of segment idx.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
idxThe index of the segment
updateKinIf the kinematics of the model should be computed
Returns
The velocity of the center of mass of segment idx

Definition at line 1140 of file Joints.cpp.

◆ CoMJacobian()

utils::Matrix rigidbody::Joints::CoMJacobian ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Return the jacobian matrix of the center of mass.

Parameters
QThe generalized coordinates
updateKinIf the kinematics of the model should be computed
Returns
The jacobian matrix of the center of mass

Definition at line 976 of file Joints.cpp.

◆ ComputeConstraintImpulsesDirect()

rigidbody::GeneralizedVelocity rigidbody::Joints::ComputeConstraintImpulsesDirect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & QdotPre )

Compute the Qdot post from an impact.

Parameters
QThe Generalized Coordinates
QdotPreThe Generalized Velocities before impact
Returns
The Generalized Velocities post acceleration

Definition at line 1769 of file Joints.cpp.

◆ computeDampedTau()

rigidbody::GeneralizedTorque rigidbody::Joints::computeDampedTau ( const GeneralizedVelocity & Qdot) const

Get the joint dampings to apply to the dynamics.

Parameters
QdotThe generalized velocities
Returns
The joint dampings to apply to the dynamics

Definition at line 230 of file Joints.cpp.

◆ computeQdot()

rigidbody::GeneralizedVelocity rigidbody::Joints::computeQdot ( const GeneralizedCoordinates & Q,
const GeneralizedCoordinates & Qdot,
const utils::Scalar & k_stab = 1 )

Return the derivate of Q in function of Qdot (if not Quaternion, Qdot is directly returned).

Parameters
QThe generalized coordinates
QdotThe generalized velocities
k_stab
Returns
The derivate of Q in function of Qdot

Definition at line 1433 of file Joints.cpp.

◆ ContactForcesFromForwardDynamicsConstraintsDirect() [1/2]

utils::Vector rigidbody::Joints::ContactForcesFromForwardDynamicsConstraintsDirect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedTorque & Tau )

Interface for contacts of the forward dynamics with contact of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
TauThe Generalized Torques
Returns
The Contraint set

Definition at line 1747 of file Joints.cpp.

◆ ContactForcesFromForwardDynamicsConstraintsDirect() [2/2]

utils::Vector rigidbody::Joints::ContactForcesFromForwardDynamicsConstraintsDirect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedTorque & Tau,
rigidbody::ExternalForceSet & externalForces )

Interface for contacts of the forward dynamics with contact of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
TauThe Generalized Torques
externalForcesExternal force acting on the system if there are any
Returns
The Contraint set

Definition at line 1757 of file Joints.cpp.

◆ DeepCopy() [1/2]

rigidbody::Joints rigidbody::Joints::DeepCopy ( ) const

Deep copy of the joints.

Returns
Copy of the joints

Definition at line 64 of file Joints.cpp.

◆ DeepCopy() [2/2]

void rigidbody::Joints::DeepCopy ( const Joints & other)

Deep copy of the joints.

Parameters
otherThe joints to copy

Definition at line 70 of file Joints.cpp.

◆ ForwardDynamics() [1/2]

rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamics ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedTorque & Tau )

Interface for the forward dynamics of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
TauThe Generalized Torques
Returns
The Generalized Accelerations

Definition at line 1607 of file Joints.cpp.

◆ ForwardDynamics() [2/2]

rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamics ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedTorque & Tau,
rigidbody::ExternalForceSet & externalForces )

Interface for the forward dynamics of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
TauThe Generalized Torques
externalForcesExternal force acting on the system if there are any
Returns
The Generalized Accelerations

Definition at line 1615 of file Joints.cpp.

◆ ForwardDynamicsConstraintsDirect() [1/4]

rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamicsConstraintsDirect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedTorque & Tau,
bool updateKin = true )

Interface for the forward dynamics with contact of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
TauThe Generalized Torques
updateKinIf the kinematics of the model should be computed
Returns
The Generalized Accelerations

Definition at line 1685 of file Joints.cpp.

◆ ForwardDynamicsConstraintsDirect() [2/4]

rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamicsConstraintsDirect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedTorque & Tau,
rigidbody::Contacts & CS,
bool updateKin = true )

Interface for the forward dynamics with contact of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
TauThe Generalized Torques
CSThe Constraint set that will be filled
updateKinIf the kinematics of the model should be computed
Returns
The Generalized Accelerations

Definition at line 1709 of file Joints.cpp.

◆ ForwardDynamicsConstraintsDirect() [3/4]

rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamicsConstraintsDirect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedTorque & Tau,
rigidbody::Contacts & CS,
rigidbody::ExternalForceSet & externalForces,
bool updateKin = true )

Interface for the forward dynamics with contact of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
TauThe Generalized Torques
CSThe Constraint set that will be filled
externalForcesExternal force acting on the system if there are any
updateKinIf the kinematics of the model should be computed
Returns
The Generalized Accelerations

Definition at line 1722 of file Joints.cpp.

◆ ForwardDynamicsConstraintsDirect() [4/4]

rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamicsConstraintsDirect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedTorque & Tau,
rigidbody::ExternalForceSet & externalForces,
bool updateKin = true )

Interface for the forward dynamics with contact of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
TauThe Generalized Torques
externalForcesExternal force acting on the system if there are any
updateKinIf the kinematics of the model should be computed
Returns
The Generalized Accelerations

Definition at line 1696 of file Joints.cpp.

◆ ForwardDynamicsFreeFloatingBase()

rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamicsFreeFloatingBase ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const GeneralizedAcceleration & QddotJoints )

Biorbd's implementation of forward dynamics with a free floating base.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
QddotJointsThe Generalized Accelerations of the joints (no root)
Returns
The Generalized Accelerations of the root

Definition at line 1637 of file Joints.cpp.

◆ getBodyBiorbdId()

int rigidbody::Joints::getBodyBiorbdId ( const utils::String & segmentName) const

Return the biorbd body identification.

Parameters
segmentNameThe name of the segment
Returns
The biorbd body identification

Definition at line 246 of file Joints.cpp.

◆ getBodyBiorbdIdToRbdlId()

size_t rigidbody::Joints::getBodyBiorbdIdToRbdlId ( const int idx) const

Return the Rbdl body identification from Biorbd.

Parameters
idxThe Biorbd segment Id
Returns
The Rbdl body identification

Definition at line 266 of file Joints.cpp.

◆ getBodyRbdlId()

int rigidbody::Joints::getBodyRbdlId ( const utils::String & segmentName) const

Return the rbdl body identification.

Parameters
segmentNameThe name of the segment
Returns
The rbdl body identification

Definition at line 254 of file Joints.cpp.

◆ getBodyRbdlIdToBiorbdId()

int rigidbody::Joints::getBodyRbdlIdToBiorbdId ( const int idx) const

Return the Biorbd body identification from rbdl.

Parameters
idxThe Rbdl body Id
Returns
The Biorbd body identification

Definition at line 258 of file Joints.cpp.

◆ getDofIndex()

size_t rigidbody::Joints::getDofIndex ( const utils::String & SegmentName,
const utils::String & dofName )

Return the index of a DoF in a segment.

Parameters
SegmentNameThe name of the Segment
dofNameThe name of the degree of freedom (DoF)
Returns
The index of a DoF in a segment

Definition at line 1858 of file Joints.cpp.

◆ getDofSubTrees()

std::vector< std::vector< size_t > > rigidbody::Joints::getDofSubTrees ( )

Return the rbdl idx of subtrees of each segments.

Returns
the rbdl idx of subtrees of each segments

Definition at line 270 of file Joints.cpp.

◆ getGravity()

utils::Vector3d rigidbody::Joints::getGravity ( ) const

Get the current gravity.

Returns
The current gravity

Definition at line 191 of file Joints.cpp.

◆ globalJCS() [1/2]

utils::RotoTrans rigidbody::Joints::globalJCS ( const GeneralizedCoordinates & Q,
const utils::String & name,
bool updateKin = true )

Return the joint coordinate system (JCS) for the segment in global reference frame at a given Q.

Parameters
QThe generalized coordinates
nameThe name of the segment
updateKinIf the kinematics should be updated
Returns
The JCS of the segment in global reference frame at a given Q

Definition at line 360 of file Joints.cpp.

◆ globalJCS() [2/2]

utils::RotoTrans rigidbody::Joints::globalJCS ( const GeneralizedCoordinates & Q,
size_t idx,
bool updateKin = true )

Return the joint coordinate system (JCS) for the segment idx in global reference frame at a given Q.

Parameters
QThe generalized coordinates
idxThe index of the segment
updateKinIf the kinematics should be updated
Returns
The JCS of the segment idx in global reference frame at a given Q

Definition at line 367 of file Joints.cpp.

◆ InverseDynamics() [1/2]

rigidbody::GeneralizedTorque rigidbody::Joints::InverseDynamics ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot )

Interface for the inverse dynamics of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
QddotThe Generalzed Acceleration
Returns
The Generalized Torques

Definition at line 1556 of file Joints.cpp.

◆ InverseDynamics() [2/2]

rigidbody::GeneralizedTorque rigidbody::Joints::InverseDynamics ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
const rigidbody::GeneralizedAcceleration & Qddot,
rigidbody::ExternalForceSet & externalForces )

Interface for the inverse dynamics of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
QddotThe Generalzed Acceleration
externalForcesExternal force acting on the system if there are any
Returns
The Generalized Torques

Definition at line 1564 of file Joints.cpp.

◆ JacobianSegmentRotMat()

utils::Matrix rigidbody::Joints::JacobianSegmentRotMat ( const rigidbody::GeneralizedCoordinates & Q,
size_t segmentIdx,
bool updateKin )

Calculate the jacobian matrix of a rotation matrix for a given segment idx.

Parameters
QThe generalized coordinates
segmentIdxThe index of the segment
updateKinIf the kinematics of the model should be computed
Returns
The jacobian of the rotation matrix of the segment

Definition at line 1979 of file Joints.cpp.

◆ KineticEnergy()

utils::Scalar rigidbody::Joints::KineticEnergy ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
bool updateKin = true )

Interface for the Kinetic Energy of RBDL.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
updateKinIf the model should be updated
Returns
The Kinetic Energy

Definition at line 1487 of file Joints.cpp.

◆ Lagrangian()

utils::Scalar rigidbody::Joints::Lagrangian ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
bool updateKin = true )

Compute the Lagrangian of the system.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
updateKinIf the model should be updated
Returns
The Lagrangian: kinetic - potential energy

Definition at line 1516 of file Joints.cpp.

◆ localJCS() [1/3]

std::vector< utils::RotoTrans > rigidbody::Joints::localJCS ( ) const

Return all the joint coordinate system (JCS) in its parent reference frame.

Returns
All the JCS in parent reference frame

Definition at line 375 of file Joints.cpp.

◆ localJCS() [2/3]

utils::RotoTrans rigidbody::Joints::localJCS ( const size_t idx) const

Return the joint coordinate system (JCS) of the segment idx its parent reference frame.

Parameters
idxThe index of the segment
Returns
The JCS of the segment idx in parent reference frame

Definition at line 386 of file Joints.cpp.

◆ localJCS() [3/3]

utils::RotoTrans rigidbody::Joints::localJCS ( const utils::String & name) const

Return the joint coordinate system (JCS) of the segment its parent reference frame.

Parameters
nameThe name of the segment
Returns
The JCS of the segment in parent reference frame

Definition at line 382 of file Joints.cpp.

◆ mass()

utils::Scalar rigidbody::Joints::mass ( ) const

Return the total mass of the model.

Returns
The toal mass of the model

Definition at line 110 of file Joints.cpp.

◆ massMatrix()

utils::Matrix rigidbody::Joints::massMatrix ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Get the mass matrix at a given position Q.

Parameters
QThe generalized coordinates
updateKinIf the kinematics should be updated
Returns
The mass matrix

Definition at line 782 of file Joints.cpp.

◆ massMatrixInverse()

utils::Matrix rigidbody::Joints::massMatrixInverse ( const rigidbody::GeneralizedCoordinates & Q,
bool updateKin = true )

Get the inverse mass matrix at a given position Q.

Parameters
QThe generalized coordinates
updateKinIf the kinematics should be updated
Returns
The inverse mass matrix

Definition at line 800 of file Joints.cpp.

◆ mesh() [1/2]

std::vector< rigidbody::Mesh > rigidbody::Joints::mesh ( ) const

Return the segment mesh.

Returns
The segment mesh

Definition at line 1273 of file Joints.cpp.

◆ mesh() [2/2]

const rigidbody::Mesh & rigidbody::Joints::mesh ( size_t idx) const

Return the segment mesh for segment idx.

Parameters
idxThe index of the segment
Returns
The Segment mesh for segment idx

Definition at line 1281 of file Joints.cpp.

◆ meshFaces() [1/2]

std::vector< std::vector< rigidbody::MeshFace > > rigidbody::Joints::meshFaces ( ) const

Return the mesh faces for all the segments.

Returns
The mesh faces for all the segments

Definition at line 1258 of file Joints.cpp.

◆ meshFaces() [2/2]

const std::vector< rigidbody::MeshFace > & rigidbody::Joints::meshFaces ( size_t idx) const

Return the mesh faces for segment idx.

Parameters
idxThe index of the segment
Returns
The mesh face for segment idx

Definition at line 1267 of file Joints.cpp.

◆ meshPoints() [1/3]

std::vector< std::vector< utils::Vector3d > > rigidbody::Joints::meshPoints ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Return the vertices of the mesh for all segments in global reference frame.

Parameters
QThe generalized coordinates
updateKinIf the kinematics of the model should be computed
Returns
The vertices of the for all segments

Definition at line 1197 of file Joints.cpp.

◆ meshPoints() [2/3]

std::vector< utils::Vector3d > rigidbody::Joints::meshPoints ( const GeneralizedCoordinates & Q,
size_t idx,
bool updateKin = true )

Return the vertices of the mesh for the segment idx.

Parameters
QThe generalized coordinates
idxThe index of the segment
updateKinIf the kinematics of the model should be computed
Returns
The vertices of the of the segment idx

Definition at line 1217 of file Joints.cpp.

◆ meshPoints() [3/3]

std::vector< utils::Vector3d > rigidbody::Joints::meshPoints ( const std::vector< utils::RotoTrans > & RT,
size_t idx ) const
protected

Return the mesh vertices of segment idx.

Parameters
RTThe RotoTrans of the segment
idxThe index of the segment
Returns
The mesh vertices attached to a segment idx

Definition at line 1244 of file Joints.cpp.

◆ meshPointsInMatrix()

std::vector< utils::Matrix > rigidbody::Joints::meshPointsInMatrix ( const GeneralizedCoordinates & Q,
bool updateKin = true )

Return all the vertices of the mesh points in a matrix.

Parameters
QThe generalized coordinates
updateKinIf the kinematics of the model should be computed
Returns
All the vertices

Definition at line 1227 of file Joints.cpp.

◆ nameDof()

std::vector< utils::String > rigidbody::Joints::nameDof ( ) const

Return the names of the degree of freedom (DoF).

Returns
The names of the DoF

Definition at line 89 of file Joints.cpp.

◆ nbDof()

size_t rigidbody::Joints::nbDof ( ) const

Return the number of degrees of freedom (DoF).

Returns
The number of DoF

Definition at line 87 of file Joints.cpp.

◆ nbGeneralizedTorque()

size_t rigidbody::Joints::nbGeneralizedTorque ( ) const

Return the number of generalized torque.

Returns
The number of generalized torque

Definition at line 86 of file Joints.cpp.

◆ nbQ()

size_t rigidbody::Joints::nbQ ( ) const

Return the number of generalized coordinates (Q).

Returns
The number of Q

Definition at line 105 of file Joints.cpp.

◆ nbQddot()

size_t rigidbody::Joints::nbQddot ( ) const

Return the number of generalized acceleration (Qddot).

Returns
The number of Qddot

Definition at line 107 of file Joints.cpp.

◆ nbQdot()

size_t rigidbody::Joints::nbQdot ( ) const

Return the number of generalized velocities (Qdot).

Returns
The number of Qdot

Definition at line 106 of file Joints.cpp.

◆ nbQuat()

size_t rigidbody::Joints::nbQuat ( ) const

Return the number of segments that are described using quaternions.

Returns
The number number of segments

Definition at line 1431 of file Joints.cpp.

◆ nbRoot()

size_t rigidbody::Joints::nbRoot ( ) const

Return the dof on the root.

Returns
The dof on the root

Definition at line 108 of file Joints.cpp.

◆ nbSegment()

size_t rigidbody::Joints::nbSegment ( ) const

Return the actual number of segment.

Returns
The actual number of segment

Definition at line 244 of file Joints.cpp.

◆ NonLinearEffect() [1/2]

rigidbody::GeneralizedTorque rigidbody::Joints::NonLinearEffect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot )

Interface to NonLinearEffect.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
Returns
The Generalized Torques of the bias effects

Definition at line 1583 of file Joints.cpp.

◆ NonLinearEffect() [2/2]

rigidbody::GeneralizedTorque rigidbody::Joints::NonLinearEffect ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
rigidbody::ExternalForceSet & externalForces )

Interface to NonLinearEffect.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
externalForcesExternal force acting on the system if there are any
Returns
The Generalized Torques of the bias effects

Definition at line 1590 of file Joints.cpp.

◆ overrideMeshFolders()

void rigidbody::Joints::overrideMeshFolders ( const utils::String & folder)

Set the folder for all the meshes.

Parameters
folderThe folder to set

Definition at line 1285 of file Joints.cpp.

◆ PotentialEnergy()

utils::Scalar rigidbody::Joints::PotentialEnergy ( const rigidbody::GeneralizedCoordinates & Q,
bool updateKin = true )

Interface for the Potential Energy of RBDL.

Parameters
QThe Generalized Coordinates
updateKinIf the model should be updated
Returns
The Potential Energy

Definition at line 1503 of file Joints.cpp.

◆ projectPoint() [1/3]

rigidbody::NodeSegment rigidbody::Joints::projectPoint ( const GeneralizedCoordinates & Q,
const NodeSegment & n,
bool updateKin )

Return the projected markers from a point corresponding to a marker from the model.

Parameters
QThe generalized coordinates
nA reference to a marker from the model
updateKinIf the kinematics of the model should be computed
Returns
The projected markers from a point corresponding to a marker from the model

Definition at line 605 of file Joints.cpp.

◆ projectPoint() [2/3]

std::vector< rigidbody::NodeSegment > rigidbody::Joints::projectPoint ( const GeneralizedCoordinates & Q,
const std::vector< NodeSegment > & v,
bool updateKin = true )

Project multiples points on their respective segment.

Parameters
QThe generalized coordinates
vAll the points to project. The number of points must match the number of marker in the joint model
updateKinIf the kinematics of the model should be computed
Returns
The projected markers from points corresponding to markers from the model

Return projected markers from points corresponding to markers from the model. The vector needs to be equal to the number of markers and in the order given by Markers and in global coordinates

Definition at line 536 of file Joints.cpp.

◆ projectPoint() [3/3]

rigidbody::NodeSegment rigidbody::Joints::projectPoint ( const GeneralizedCoordinates & Q,
const utils::Vector3d & v,
int segmentIdx,
const utils::String & axesToRemove,
bool updateKin = true )

Project a point on specific axis of a segment.

Parameters
QThe generalized coordinates
vThe point to project
segmentIdxThe segment index to project the marker on
axesToRemoveThe axis to remove
updateKinIf the kinematics of the model should be computed
Returns
The position of the projected marker

Definition at line 574 of file Joints.cpp.

◆ projectPointJacobian() [1/3]

std::vector< utils::Matrix > rigidbody::Joints::projectPointJacobian ( const GeneralizedCoordinates & Q,
const std::vector< NodeSegment > & v,
bool updateKin )

Return the jacobian matrix of the projected markers.

Parameters
QThe generalized coordinates
vAll the markers. The size of which must match the one in the joint model
updateKinIf the kinematics of the model should be computed
Returns
The jacobian matrix of the projected markers

Return the jacobian matrix of projected markers from points corresponding to markers from the model. The vector needs to be equal to the number of markers and in the order given by Markers and in global coordinates

Definition at line 682 of file Joints.cpp.

◆ projectPointJacobian() [2/3]

utils::Matrix rigidbody::Joints::projectPointJacobian ( const GeneralizedCoordinates & Q,
const utils::Vector3d & v,
int segmentIdx,
const utils::String & axesToRemove,
bool updateKin )

Return the Jacobian matrix of a projected marker on the segment segmentIdx.

Parameters
QThe generalized coordinates
vThe marker to project
segmentIdxThe index of the segment to project the marker on
axesToRemoveThe axes to remove
updateKinIf the kinematics of the model should be computed
Returns
The Jacobian matrix of a projected marker on the segment segmentIdx

Definition at line 660 of file Joints.cpp.

◆ projectPointJacobian() [3/3]

utils::Matrix rigidbody::Joints::projectPointJacobian ( const GeneralizedCoordinates & Q,
rigidbody::NodeSegment node,
bool updateKin )

Return the jacobian matrix of the projected markers for a marker from the model.

Parameters
QThe generalized coordinates
nodeA reference to a marker from the model
updateKinIf the kinematics of the model should be computed
Returns
The jacobian matrix of the projected marker

Definition at line 614 of file Joints.cpp.

◆ recursiveDofSubTrees()

std::vector< std::vector< size_t > > rigidbody::Joints::recursiveDofSubTrees ( std::vector< std::vector< size_t > > subTrees,
size_t idx )
protected

Return the rbdl idx of subtrees of each segments.

Parameters
subTreesthe rbdl idx of subtrees of each segments to be filled
idxstarting index to explore the subtrees
Returns
the rbdl idx of subtrees of each segments starting from the specified index

Definition at line 316 of file Joints.cpp.

◆ segment() [1/4]

rigidbody::Segment & rigidbody::Joints::segment ( const utils::String & name)

Get a segment of a specific name.

Parameters
nameThe name of the segment to return
Returns
The segment

Definition at line 211 of file Joints.cpp.

◆ segment() [2/4]

const rigidbody::Segment & rigidbody::Joints::segment ( const utils::String & name) const

Get a segment of a specific name.

Parameters
nameThe name of the segment to return
Returns
The segment

Definition at line 221 of file Joints.cpp.

◆ segment() [3/4]

rigidbody::Segment & rigidbody::Joints::segment ( size_t idx)

Get a segment of index idx.

Parameters
idxIndex of the segment
Returns
The segment

Definition at line 205 of file Joints.cpp.

◆ segment() [4/4]

const rigidbody::Segment & rigidbody::Joints::segment ( size_t idx) const

Get a segment of index idx.

Parameters
idxIndex of the segment
Returns
The segment

Definition at line 215 of file Joints.cpp.

◆ segmentAngularVelocity()

utils::Vector3d rigidbody::Joints::segmentAngularVelocity ( const GeneralizedCoordinates & Q,
const GeneralizedVelocity & Qdot,
size_t idx,
bool updateKin = true )

Return the angular velocity of the segment.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
idxThe index of the segment
updateKinIf the model should be updated
Returns
The angular velocity of the segment

Definition at line 744 of file Joints.cpp.

◆ segments()

std::vector< rigidbody::Segment > & rigidbody::Joints::segments ( ) const

Get all the segments.

Returns
All the segments

Definition at line 226 of file Joints.cpp.

◆ setGravity()

void rigidbody::Joints::setGravity ( const utils::Vector3d & newGravity)

Set the gravity.

Parameters
newGravityThe new gravity vector

Definition at line 193 of file Joints.cpp.

◆ TotalEnergy()

utils::Scalar rigidbody::Joints::TotalEnergy ( const rigidbody::GeneralizedCoordinates & Q,
const rigidbody::GeneralizedVelocity & Qdot,
bool updateKin = true )

Compute the Total Energy of System.

Parameters
QThe Generalized Coordinates
QdotThe Generalized Velocities
updateKinIf the model should be updated
Returns
The total energy: kinetic + potential energy

Definition at line 1536 of file Joints.cpp.

◆ UpdateKinematicsCustom()

rigidbody::Joints & rigidbody::Joints::UpdateKinematicsCustom ( const GeneralizedCoordinates * Q = nullptr,
const GeneralizedVelocity * Qdot = nullptr,
const rigidbody::GeneralizedAcceleration * Qddot = nullptr )

Update the kinematic variables such as body velocities and accelerations in the model to reflect the variables passed to this function.

Parameters
QThe generalized coordinates
QdotThe generalized velocities
QddotThe generalized accelerations
Returns
The updated model

Definition at line 1888 of file Joints.cpp.

◆ updateSegmentCharacteristics()

void rigidbody::Joints::updateSegmentCharacteristics ( size_t idx,
const SegmentCharacteristics & characteristics )

updateSegmentCharacteristics Change the inertia characteristics of the segment idx

Parameters
idxThe index of the segment to change
characteristicsThe new characteristics

Warning: This function may behave surpringly due to the core of RBDL. The new characteristic values will replace everything which is attach in a fixed manner (that is no degrees-of-freedom). So if your model has 3 segments, but only the first one has dof (and the rest is rigidly attached to the first), then it doesn't matter if idx is 0, 1 or 2, because RBDL considers that all these segment are 1 segment. It is therefore expected that characteristics is the combination of mass and inertia for these 3 segments as well.

Definition at line 197 of file Joints.cpp.

Member Data Documentation

◆ m_isKinematicsComputed

std::shared_ptr<bool> BIORBD_NAMESPACE::rigidbody::Joints::m_isKinematicsComputed
protected

If the kinematics are computed.

Definition at line 1375 of file Joints.h.

◆ m_nbDof

std::shared_ptr<size_t> BIORBD_NAMESPACE::rigidbody::Joints::m_nbDof
protected

The total number of degrees of freedom.

Definition at line 1368 of file Joints.h.

◆ m_nbQ

std::shared_ptr<size_t> BIORBD_NAMESPACE::rigidbody::Joints::m_nbQ
protected

The total number of Q.

Definition at line 1369 of file Joints.h.

◆ m_nbQddot

std::shared_ptr<size_t> BIORBD_NAMESPACE::rigidbody::Joints::m_nbQddot
protected

The total number of Qddot.

Definition at line 1371 of file Joints.h.

◆ m_nbQdot

std::shared_ptr<size_t> BIORBD_NAMESPACE::rigidbody::Joints::m_nbQdot
protected

The total number of Qdot.

Definition at line 1370 of file Joints.h.

◆ m_nbRoot

std::shared_ptr<size_t> BIORBD_NAMESPACE::rigidbody::Joints::m_nbRoot
protected

The number of DoF on the root segment.

Definition at line 1367 of file Joints.h.

◆ m_nRotAQuat

std::shared_ptr<size_t> BIORBD_NAMESPACE::rigidbody::Joints::m_nRotAQuat
protected

The number of segments per quaternion.

Definition at line 1373 of file Joints.h.

◆ m_segments

std::shared_ptr<std::vector<Segment> > BIORBD_NAMESPACE::rigidbody::Joints::m_segments
protected

All the articulations.

Definition at line 1365 of file Joints.h.

◆ m_totalMass

std::shared_ptr<utils::Scalar> BIORBD_NAMESPACE::rigidbody::Joints::m_totalMass
protected

Mass of all the bodies combined.

Definition at line 1377 of file Joints.h.


The documentation for this class was generated from the following files: