|
Biorbd Release_1.13.0
|
This is the core of the musculoskeletal model in biorbd. More...
#include <Joints.h>
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. | |
| rigidbody::Joints::Joints | ( | ) |
Construct a joint model.
Definition at line 35 of file Joints.cpp.
| rigidbody::Joints::Joints | ( | const Joints & | other | ) |
Construct a joint model from another model.
| other | The other joint model |
Definition at line 50 of file Joints.cpp.
|
virtual |
Properly destroy class.
Definition at line 62 of file Joints.cpp.
| 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.
| segmentName | Name of the segment |
| parentName | Name of the segment parent |
| translationSequence | The translation sequence |
| QRanges | Ranges of the translations and rotations dof. The length of QRanges must be equal to length of translations and rotations |
| QdotRanges | Ranges of the translations and rotations dof velocity. The length of QdotRanges must be equal to length of translations and rotations |
| QddotRanges | Ranges of the translations and rotations dof acceleration. The length of QddotRanges must be equal to length of translations and rotations |
| jointDampings | The damping of the joints to apply to the dynamics |
| characteristics | The characteristics of the semgent (mass, center of mass, inertia of the segment, etc) |
| referenceFrame | Transformation of the parent to child |
Definition at line 156 of file Joints.cpp.
| 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.
| segmentName | Name of the segment |
| parentName | Name of the segment parent |
| translationSequence | The translation sequence |
| rotationSequence | Euler sequence of rotations |
| QRanges | Ranges of the translations and rotations dof. The length of QRanges must be equal to length of translations and rotations |
| QdotRanges | Ranges of the translations and rotations dof velocity. The length of QdotRanges must be equal to length of translations and rotations |
| QddotRanges | Ranges of the translations and rotations dof acceleration. The length of QddotRanges must be equal to length of translations and rotations |
| jointDampings | The damping of the joints to apply to the dynamics |
| characteristics | The characteristics of the semgent (mass, center of mass, inertia of the segment, etc) |
| referenceFrame | Transformation of the parent to child |
Definition at line 112 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| updateKin | If the kinematics should be updated |
Definition at line 343 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| updateKin | If the kinematics of the model should be computed |
Definition at line 775 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1826 of file Joints.cpp.
| 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
| Q | The Generalized Coordinates |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1792 of file Joints.cpp.
| utils::Vector3d rigidbody::Joints::CalcAngularMomentum | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | Qdot, | ||
| bool | updateKin ) |
Calculate the angular momentum of the center of mass.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1291 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The generalized accelerations |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1311 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| bodyId | The index of the segment (obtainable with GetBodyId) |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 399 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| segmentName | The name of the segment |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 390 of file Joints.cpp.
|
protected |
Calculate the joint coordinate system (JCS) in global reference frame of a specified segment.
| Q | The generalized coordinates |
| segmentIdx | The index of the segment |
| updateKin | If the kinematics of the model should be computed |
Definition at line 709 of file Joints.cpp.
| 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.
| Q | The current joint positions |
| Qdot | The 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) |
Definition at line 1003 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| segmentIdx | The index of the segment |
| rotation | The rotation matrix |
| G | The jacobian matrix (output) |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1905 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The generalized accelerations |
| bodyId | The index of the segment (obtainable with GetBodyId) |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 487 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The generalized accelerations |
| segmentName | The name of the segment |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 471 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| bodyId | The index of the segment (obtainable with GetBodyId) |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 517 of file Joints.cpp.
| 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.
| Q | The generalized coordinates/// |
| segmentName | The name of the segment |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 508 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| bodyId | The index of the segment (obtainable with GetBodyId) |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 425 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| segmentName | The name of the segment |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 415 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| bodyId | The index of the segment (obtainable with GetBodyId) |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 453 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| segmentName | The name of the segment |
| pointInLocal | The point in the body |
| updateKin | If the kinematics of the model should be computed (always true for casadi) |
Definition at line 443 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1332 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The generalized accelerations |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1381 of file Joints.cpp.
| 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.
| Q | The current joint positions |
| Qdot | The current joint velocities |
| Qddot | The current joint accelerations |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1038 of file Joints.cpp.
| 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.
| Q | The current joint positions |
| Qdot | The current joint velocities |
| Qddot | The current joint accelerations |
| normal | The normal of the contact surface |
| point | A point on the contact surface |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1052 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The generalized accelerations |
| torque | The generalized torques |
Definition at line 1993 of file Joints.cpp.
| utils::Vector3d rigidbody::Joints::CoM | ( | const GeneralizedCoordinates & | Q, |
| bool | updateKin = true ) |
Return the position of the center of mass.
| Q | The generalized coordinates |
| updateKin | If the kinematics of the model should be computed |
Definition at line 756 of file Joints.cpp.
| std::vector< rigidbody::NodeSegment > rigidbody::Joints::CoMbySegment | ( | const GeneralizedCoordinates & | Q, |
| bool | updateKin = true ) |
Return the position of the center of mass of each segment.
| Q | The generalized coordinates |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1078 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| idx | The index of the segment |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1107 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1095 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The acceleration variables |
| updateKin | If the kinematics of the model should be computed |
Definition at line 953 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The acceleration variables |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1157 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The acceleration variables |
| idx | The segment identification |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1179 of file Joints.cpp.
| utils::Vector3d rigidbody::Joints::CoMdot | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | Qdot, | ||
| bool | updateKin = true ) |
Return the velocity of the center of mass.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| updateKin | If the kinematics of the model should be computed |
Definition at line 925 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1121 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| idx | The index of the segment |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1140 of file Joints.cpp.
| utils::Matrix rigidbody::Joints::CoMJacobian | ( | const GeneralizedCoordinates & | Q, |
| bool | updateKin = true ) |
Return the jacobian matrix of the center of mass.
| Q | The generalized coordinates |
| updateKin | If the kinematics of the model should be computed |
Definition at line 976 of file Joints.cpp.
| rigidbody::GeneralizedVelocity rigidbody::Joints::ComputeConstraintImpulsesDirect | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | QdotPre ) |
Compute the Qdot post from an impact.
| Q | The Generalized Coordinates |
| QdotPre | The Generalized Velocities before impact |
Definition at line 1769 of file Joints.cpp.
| rigidbody::GeneralizedTorque rigidbody::Joints::computeDampedTau | ( | const GeneralizedVelocity & | Qdot | ) | const |
Get the joint dampings to apply to the dynamics.
| Qdot | The generalized velocities |
Definition at line 230 of file Joints.cpp.
| 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).
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| k_stab |
Definition at line 1433 of file Joints.cpp.
| 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.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Tau | The Generalized Torques |
Definition at line 1747 of file Joints.cpp.
| 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.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Tau | The Generalized Torques |
| externalForces | External force acting on the system if there are any |
Definition at line 1757 of file Joints.cpp.
| rigidbody::Joints rigidbody::Joints::DeepCopy | ( | ) | const |
| void rigidbody::Joints::DeepCopy | ( | const Joints & | other | ) |
Deep copy of the joints.
| other | The joints to copy |
Definition at line 70 of file Joints.cpp.
| rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamics | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | Qdot, | ||
| const GeneralizedTorque & | Tau ) |
Interface for the forward dynamics of RBDL.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Tau | The Generalized Torques |
Definition at line 1607 of file Joints.cpp.
| rigidbody::GeneralizedAcceleration rigidbody::Joints::ForwardDynamics | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | Qdot, | ||
| const GeneralizedTorque & | Tau, | ||
| rigidbody::ExternalForceSet & | externalForces ) |
Interface for the forward dynamics of RBDL.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Tau | The Generalized Torques |
| externalForces | External force acting on the system if there are any |
Definition at line 1615 of file Joints.cpp.
| 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.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Tau | The Generalized Torques |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1685 of file Joints.cpp.
| 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.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Tau | The Generalized Torques |
| CS | The Constraint set that will be filled |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1709 of file Joints.cpp.
| 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.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Tau | The Generalized Torques |
| CS | The Constraint set that will be filled |
| externalForces | External force acting on the system if there are any |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1722 of file Joints.cpp.
| 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.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Tau | The Generalized Torques |
| externalForces | External force acting on the system if there are any |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1696 of file Joints.cpp.
| 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.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| QddotJoints | The Generalized Accelerations of the joints (no root) |
Definition at line 1637 of file Joints.cpp.
| int rigidbody::Joints::getBodyBiorbdId | ( | const utils::String & | segmentName | ) | const |
Return the biorbd body identification.
| segmentName | The name of the segment |
Definition at line 246 of file Joints.cpp.
| size_t rigidbody::Joints::getBodyBiorbdIdToRbdlId | ( | const int | idx | ) | const |
Return the Rbdl body identification from Biorbd.
| idx | The Biorbd segment Id |
Definition at line 266 of file Joints.cpp.
| int rigidbody::Joints::getBodyRbdlId | ( | const utils::String & | segmentName | ) | const |
Return the rbdl body identification.
| segmentName | The name of the segment |
Definition at line 254 of file Joints.cpp.
| int rigidbody::Joints::getBodyRbdlIdToBiorbdId | ( | const int | idx | ) | const |
Return the Biorbd body identification from rbdl.
| idx | The Rbdl body Id |
Definition at line 258 of file Joints.cpp.
| size_t rigidbody::Joints::getDofIndex | ( | const utils::String & | SegmentName, |
| const utils::String & | dofName ) |
Return the index of a DoF in a segment.
| SegmentName | The name of the Segment |
| dofName | The name of the degree of freedom (DoF) |
Definition at line 1858 of file Joints.cpp.
| std::vector< std::vector< size_t > > rigidbody::Joints::getDofSubTrees | ( | ) |
Return the rbdl idx of subtrees of each segments.
Definition at line 270 of file Joints.cpp.
| utils::Vector3d rigidbody::Joints::getGravity | ( | ) | const |
| 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.
| Q | The generalized coordinates |
| name | The name of the segment |
| updateKin | If the kinematics should be updated |
Definition at line 360 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| idx | The index of the segment |
| updateKin | If the kinematics should be updated |
Definition at line 367 of file Joints.cpp.
| rigidbody::GeneralizedTorque rigidbody::Joints::InverseDynamics | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | Qdot, | ||
| const rigidbody::GeneralizedAcceleration & | Qddot ) |
Interface for the inverse dynamics of RBDL.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Qddot | The Generalzed Acceleration |
Definition at line 1556 of file Joints.cpp.
| 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.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| Qddot | The Generalzed Acceleration |
| externalForces | External force acting on the system if there are any |
Definition at line 1564 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| segmentIdx | The index of the segment |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1979 of file Joints.cpp.
| utils::Scalar rigidbody::Joints::KineticEnergy | ( | const rigidbody::GeneralizedCoordinates & | Q, |
| const rigidbody::GeneralizedVelocity & | Qdot, | ||
| bool | updateKin = true ) |
Interface for the Kinetic Energy of RBDL.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| updateKin | If the model should be updated |
Definition at line 1487 of file Joints.cpp.
| utils::Scalar rigidbody::Joints::Lagrangian | ( | const rigidbody::GeneralizedCoordinates & | Q, |
| const rigidbody::GeneralizedVelocity & | Qdot, | ||
| bool | updateKin = true ) |
Compute the Lagrangian of the system.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| updateKin | If the model should be updated |
Definition at line 1516 of file Joints.cpp.
| std::vector< utils::RotoTrans > rigidbody::Joints::localJCS | ( | ) | const |
Return all the joint coordinate system (JCS) in its parent reference frame.
Definition at line 375 of file Joints.cpp.
| utils::RotoTrans rigidbody::Joints::localJCS | ( | const size_t | idx | ) | const |
Return the joint coordinate system (JCS) of the segment idx its parent reference frame.
| idx | The index of the segment |
Definition at line 386 of file Joints.cpp.
| utils::RotoTrans rigidbody::Joints::localJCS | ( | const utils::String & | name | ) | const |
Return the joint coordinate system (JCS) of the segment its parent reference frame.
| name | The name of the segment |
Definition at line 382 of file Joints.cpp.
| utils::Scalar rigidbody::Joints::mass | ( | ) | const |
Return the total mass of the model.
Definition at line 110 of file Joints.cpp.
| utils::Matrix rigidbody::Joints::massMatrix | ( | const GeneralizedCoordinates & | Q, |
| bool | updateKin = true ) |
Get the mass matrix at a given position Q.
| Q | The generalized coordinates |
| updateKin | If the kinematics should be updated |
Definition at line 782 of file Joints.cpp.
| utils::Matrix rigidbody::Joints::massMatrixInverse | ( | const rigidbody::GeneralizedCoordinates & | Q, |
| bool | updateKin = true ) |
Get the inverse mass matrix at a given position Q.
| Q | The generalized coordinates |
| updateKin | If the kinematics should be updated |
Definition at line 800 of file Joints.cpp.
| std::vector< rigidbody::Mesh > rigidbody::Joints::mesh | ( | ) | const |
| const rigidbody::Mesh & rigidbody::Joints::mesh | ( | size_t | idx | ) | const |
Return the segment mesh for segment idx.
| idx | The index of the segment |
Definition at line 1281 of file Joints.cpp.
| std::vector< std::vector< rigidbody::MeshFace > > rigidbody::Joints::meshFaces | ( | ) | const |
Return the mesh faces for all the segments.
Definition at line 1258 of file Joints.cpp.
| const std::vector< rigidbody::MeshFace > & rigidbody::Joints::meshFaces | ( | size_t | idx | ) | const |
Return the mesh faces for segment idx.
| idx | The index of the segment |
Definition at line 1267 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1197 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| idx | The index of the segment |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1217 of file Joints.cpp.
|
protected |
Return the mesh vertices of segment idx.
| RT | The RotoTrans of the segment |
| idx | The index of the segment |
Definition at line 1244 of file Joints.cpp.
| std::vector< utils::Matrix > rigidbody::Joints::meshPointsInMatrix | ( | const GeneralizedCoordinates & | Q, |
| bool | updateKin = true ) |
Return all the vertices of the mesh points in a matrix.
| Q | The generalized coordinates |
| updateKin | If the kinematics of the model should be computed |
Definition at line 1227 of file Joints.cpp.
| std::vector< utils::String > rigidbody::Joints::nameDof | ( | ) | const |
Return the names of the degree of freedom (DoF).
Definition at line 89 of file Joints.cpp.
| size_t rigidbody::Joints::nbDof | ( | ) | const |
Return the number of degrees of freedom (DoF).
Definition at line 87 of file Joints.cpp.
| size_t rigidbody::Joints::nbGeneralizedTorque | ( | ) | const |
Return the number of generalized torque.
Definition at line 86 of file Joints.cpp.
| size_t rigidbody::Joints::nbQ | ( | ) | const |
Return the number of generalized coordinates (Q).
Definition at line 105 of file Joints.cpp.
| size_t rigidbody::Joints::nbQddot | ( | ) | const |
Return the number of generalized acceleration (Qddot).
Definition at line 107 of file Joints.cpp.
| size_t rigidbody::Joints::nbQdot | ( | ) | const |
Return the number of generalized velocities (Qdot).
Definition at line 106 of file Joints.cpp.
| size_t rigidbody::Joints::nbQuat | ( | ) | const |
Return the number of segments that are described using quaternions.
Definition at line 1431 of file Joints.cpp.
| size_t rigidbody::Joints::nbRoot | ( | ) | const |
| size_t rigidbody::Joints::nbSegment | ( | ) | const |
Return the actual number of segment.
Definition at line 244 of file Joints.cpp.
| rigidbody::GeneralizedTorque rigidbody::Joints::NonLinearEffect | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | Qdot ) |
Interface to NonLinearEffect.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
Definition at line 1583 of file Joints.cpp.
| rigidbody::GeneralizedTorque rigidbody::Joints::NonLinearEffect | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | Qdot, | ||
| rigidbody::ExternalForceSet & | externalForces ) |
Interface to NonLinearEffect.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| externalForces | External force acting on the system if there are any |
Definition at line 1590 of file Joints.cpp.
| void rigidbody::Joints::overrideMeshFolders | ( | const utils::String & | folder | ) |
Set the folder for all the meshes.
| folder | The folder to set |
Definition at line 1285 of file Joints.cpp.
| utils::Scalar rigidbody::Joints::PotentialEnergy | ( | const rigidbody::GeneralizedCoordinates & | Q, |
| bool | updateKin = true ) |
Interface for the Potential Energy of RBDL.
| Q | The Generalized Coordinates |
| updateKin | If the model should be updated |
Definition at line 1503 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| n | A reference to a marker from the model |
| updateKin | If the kinematics of the model should be computed |
Definition at line 605 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| v | All the points to project. The number of points must match the number of marker in the joint model |
| updateKin | If the kinematics of the model should be computed |
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.
| 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.
| Q | The generalized coordinates |
| v | The point to project |
| segmentIdx | The segment index to project the marker on |
| axesToRemove | The axis to remove |
| updateKin | If the kinematics of the model should be computed |
Definition at line 574 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| v | All the markers. The size of which must match the one in the joint model |
| updateKin | If the kinematics of the model should be computed |
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.
| 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.
| Q | The generalized coordinates |
| v | The marker to project |
| segmentIdx | The index of the segment to project the marker on |
| axesToRemove | The axes to remove |
| updateKin | If the kinematics of the model should be computed |
Definition at line 660 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| node | A reference to a marker from the model |
| updateKin | If the kinematics of the model should be computed |
Definition at line 614 of file Joints.cpp.
|
protected |
Return the rbdl idx of subtrees of each segments.
| subTrees | the rbdl idx of subtrees of each segments to be filled |
| idx | starting index to explore the subtrees |
Definition at line 316 of file Joints.cpp.
| rigidbody::Segment & rigidbody::Joints::segment | ( | const utils::String & | name | ) |
Get a segment of a specific name.
| name | The name of the segment to return |
Definition at line 211 of file Joints.cpp.
| const rigidbody::Segment & rigidbody::Joints::segment | ( | const utils::String & | name | ) | const |
Get a segment of a specific name.
| name | The name of the segment to return |
Definition at line 221 of file Joints.cpp.
| rigidbody::Segment & rigidbody::Joints::segment | ( | size_t | idx | ) |
Get a segment of index idx.
| idx | Index of the segment |
Definition at line 205 of file Joints.cpp.
| const rigidbody::Segment & rigidbody::Joints::segment | ( | size_t | idx | ) | const |
Get a segment of index idx.
| idx | Index of the segment |
Definition at line 215 of file Joints.cpp.
| utils::Vector3d rigidbody::Joints::segmentAngularVelocity | ( | const GeneralizedCoordinates & | Q, |
| const GeneralizedVelocity & | Qdot, | ||
| size_t | idx, | ||
| bool | updateKin = true ) |
Return the angular velocity of the segment.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| idx | The index of the segment |
| updateKin | If the model should be updated |
Definition at line 744 of file Joints.cpp.
| std::vector< rigidbody::Segment > & rigidbody::Joints::segments | ( | ) | const |
| void rigidbody::Joints::setGravity | ( | const utils::Vector3d & | newGravity | ) |
Set the gravity.
| newGravity | The new gravity vector |
Definition at line 193 of file Joints.cpp.
| utils::Scalar rigidbody::Joints::TotalEnergy | ( | const rigidbody::GeneralizedCoordinates & | Q, |
| const rigidbody::GeneralizedVelocity & | Qdot, | ||
| bool | updateKin = true ) |
Compute the Total Energy of System.
| Q | The Generalized Coordinates |
| Qdot | The Generalized Velocities |
| updateKin | If the model should be updated |
Definition at line 1536 of file Joints.cpp.
| 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.
| Q | The generalized coordinates |
| Qdot | The generalized velocities |
| Qddot | The generalized accelerations |
Definition at line 1888 of file Joints.cpp.
| void rigidbody::Joints::updateSegmentCharacteristics | ( | size_t | idx, |
| const SegmentCharacteristics & | characteristics ) |
updateSegmentCharacteristics Change the inertia characteristics of the segment idx
| idx | The index of the segment to change |
| characteristics | The 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.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |