1 #ifndef BIORBD_RIGIDBODY_SEGMENT_H
2 #define BIORBD_RIGIDBODY_SEGMENT_H
5 #include <rbdl/Model.h>
6 #include <rbdl/Joint.h>
7 #include "biorbdConfig.h"
8 #include "Utils/Node.h"
18 class SegmentCharacteristics;
51 const std::vector<biorbd::utils::Range>& QRanges,
52 const std::vector<biorbd::utils::Range>& QDotRanges,
53 const std::vector<biorbd::utils::Range>& QDDotRanges,
55 const RigidBodyDynamics::Math::SpatialTransform& cor,
76 const std::vector<biorbd::utils::Range>& QRanges,
77 const std::vector<biorbd::utils::Range>& QDotRanges,
78 const std::vector<biorbd::utils::Range>& QDDotRanges,
80 const RigidBodyDynamics::Math::SpatialTransform& cor,
105 unsigned int id()
const;
111 int platformIdx()
const;
129 const std::vector<biorbd::utils::Range>&
136 const std::vector<biorbd::utils::Range>&
143 const std::vector<biorbd::utils::Range>&
150 unsigned int nbDof()
const;
156 unsigned int nbDofTrans()
const;
162 unsigned int nbDofRot()
const;
168 unsigned int nbQ()
const;
174 unsigned int nbQdot()
const;
180 unsigned int nbQddot()
const;
188 unsigned int nbGeneralizedTorque()
const;
194 unsigned int getDofIdx(
202 const unsigned int i)
const;
220 bool isRotationAQuaternion()
const;
236 std::shared_ptr<RigidBodyDynamics::Math::SpatialTransform>
m_cor;
251 const std::vector<biorbd::utils::Range>& QRanges,
252 const std::vector<biorbd::utils::Range>& QDotRanges,
253 const std::vector<biorbd::utils::Range>& QDDotRanges);
261 unsigned int nbTrans,
264 std::shared_ptr<biorbd::utils::String>
m_seqT;
265 std::shared_ptr<biorbd::utils::String>
m_seqR;
266 std::shared_ptr<std::vector<biorbd::utils::Range>>
m_QRanges;
288 std::shared_ptr<std::vector<RigidBodyDynamics::Joint>>
m_dof;
289 std::shared_ptr<std::vector<unsigned int>>
m_idxDof;
312 void str2numSequence(
313 std::vector<unsigned int> &sequenceInteger,
321 void str2numSequence(
327 std::shared_ptr<std::vector<biorbd::utils::String>>
m_nameDof;
338 virtual void setJointAxis();
348 void setDofCharacteristicsOnLastBody();
358 #endif // BIORBD_RIGIDBODY_SEGMENT_H
std::shared_ptr< int > m_idxPF
Platform index which acts on the segment.
std::shared_ptr< std::vector< biorbd::utils::Range > > m_QDDotRanges
Minimum and maximum acceleration values that each dof should hold. This is only prescriptive and can ...
std::shared_ptr< std::vector< unsigned int > > m_sequenceRot
Euler rotation sequence.
std::shared_ptr< biorbd::utils::String > m_seqT
Translation sequence.
std::shared_ptr< std::vector< RigidBodyDynamics::Joint > > m_dof
Actual DoF: t1, t2, t3, r1, r2, r3; where the order depends on seqT and seqR.
Characteristics of a segment, namely the mass, the center of mass, the inertia, the length and its me...
A node is an abstract element which is assigned to a parent.
std::shared_ptr< unsigned int > m_nbDofTrue
Number of degrees of freedom including the extra DoF when there is a quaternion.
std::shared_ptr< std::vector< unsigned int > > m_idxDof
Index of the parent segment.
std::shared_ptr< unsigned int > m_nbQdot
Number of generalized velocities.
std::shared_ptr< unsigned int > m_nbDofTrans
Number of degrees of freedom in translation.
std::shared_ptr< unsigned int > m_nbDof
Number of degrees of freedom.
std::shared_ptr< std::vector< biorbd::utils::Range > > m_QDotRanges
Minimum and maximum velocity values that each dof should hold. This is only prescriptive and can be i...
std::shared_ptr< std::vector< unsigned int > > m_sequenceTrans
Translation sequence.
This is the core of the musculoskeletal model in biorbd.
Homogenous matrix to describe translations and rotations simultaneously.
std::shared_ptr< biorbd::utils::String > m_seqR
Euler rotation sequence.
std::shared_ptr< bool > m_isQuaternion
If DoF in rotation is a Quaternion.
Description of a segment.
std::shared_ptr< unsigned int > m_nbDofQuat
Number of degrees of freedom in rotation if expressed in quaternion.
std::shared_ptr< std::vector< biorbd::rigidbody::SegmentCharacteristics > > m_dofCharacteristics
Variable containing the inertial data and other from each segment (on a 6DoF segment,...
std::shared_ptr< std::vector< biorbd::utils::Range > > m_QRanges
Minimum and maximum coordinate values that each dof should hold. This is only prescriptive and can be...
std::shared_ptr< biorbd::rigidbody::SegmentCharacteristics > m_characteristics
Non-used virtual segment; it allows to "save" the data and to avoid the use of multiple intermediate ...
Wrapper around the std::string class with augmented functionality.
std::shared_ptr< std::vector< biorbd::utils::String > > m_nameDof
To store the DoF names.
std::shared_ptr< unsigned int > m_nbDofTrueOutside
Number of degree of freedom read from the outside (Same as nDof except if Quaternion)
std::shared_ptr< unsigned int > m_nbQddot
Number of generalized accelerations.
std::shared_ptr< RigidBodyDynamics::Math::SpatialTransform > m_cor
Attitude of the segment in parent reference frame.
std::shared_ptr< unsigned int > m_nbDofRot
Number of degrees of freedom in rotation.
std::shared_ptr< std::vector< unsigned int > > m_dofPosition
Position in the x, y, and z sequence.