Public Types | |
enum | { Options = _Options } |
typedef std::map< std::string, ConfigVectorType > | ConfigVectorMap |
typedef VectorXs | ConfigVectorType |
Dense vectorized version of a joint configuration vector. | |
typedef DataTpl< Scalar, Options, JointCollectionTpl > | Data |
typedef ForceTpl< Scalar, Options > | Force |
typedef FrameTpl< Scalar, Options > | Frame |
typedef pinocchio::FrameIndex | FrameIndex |
typedef container::aligned_vector< Frame > | FrameVector |
typedef pinocchio::GeomIndex | GeomIndex |
typedef pinocchio::Index | Index |
typedef std::vector< Index > | IndexVector |
typedef InertiaTpl< Scalar, Options > | Inertia |
typedef JointCollectionTpl< Scalar, Options > | JointCollection |
typedef JointDataTpl< Scalar, Options, JointCollectionTpl > | JointData |
typedef container::aligned_vector< JointData > | JointDataVector |
typedef pinocchio::JointIndex | JointIndex |
typedef JointModelTpl< Scalar, Options, JointCollectionTpl > | JointModel |
typedef container::aligned_vector< JointModel > | JointModelVector |
typedef MotionTpl< Scalar, Options > | Motion |
typedef _Scalar | Scalar |
typedef SE3Tpl< Scalar, Options > | SE3 |
typedef VectorXs | TangentVectorType |
Dense vectorized version of a joint tangent vector (e.g. velocity, acceleration, etc). It also handles the notion of co-tangent vector (e.g. torque, etc). | |
typedef Eigen::Matrix< Scalar, 3, 1, Options > | Vector3 |
typedef Eigen::Matrix< Scalar, Eigen::Dynamic, 1, Options > | VectorXs |
Public Member Functions | |
ModelTpl () | |
Default constructor. Builds an empty model with no joints. | |
int | addBodyFrame (const std::string &body_name, const JointIndex &parentJoint, const SE3 &body_placement=SE3::Identity(), int previousFrame=-1) |
Add a body to the frame tree. More... | |
int | addFrame (const Frame &frame) |
Adds a frame to the kinematic tree. More... | |
template<typename JointModelDerived > | |
JointIndex | addJoint (const JointIndex parent, const JointModelBase< JointModelDerived > &joint_model, const SE3 &joint_placement, const std::string &joint_name, const VectorXs &max_effort, const VectorXs &max_velocity, const VectorXs &min_config, const VectorXs &max_config) |
Add a joint to the kinematic tree with given bounds. More... | |
template<typename JointModelDerived > | |
JointIndex | addJoint (const JointIndex parent, const JointModelBase< JointModelDerived > &joint_model, const SE3 &joint_placement, const std::string &joint_name) |
Add a joint to the kinematic tree with infinite bounds. More... | |
int | addJointFrame (const JointIndex &jointIndex, int frameIndex=-1) |
Add a joint to the frame tree. More... | |
void | appendBodyToJoint (const JointIndex joint_index, const Inertia &Y, const SE3 &body_placement=SE3::Identity()) |
Append a body to a given joint of the kinematic tree. More... | |
template<typename NewScalar > | |
ModelTpl< NewScalar, Options, JointCollectionTpl > | cast () const |
template<typename D > | |
bool | check (const AlgorithmCheckerBase< D > &checker=AlgorithmCheckerBase< D >()) const |
bool | check () const |
Run check(fusion::list) with DEFAULT_CHECKERS as argument. | |
bool | check (const Data &data) const |
bool | existBodyName (const std::string &name) const |
Check if a body given by its name exists. More... | |
bool | existFrame (const std::string &name, const FrameType &type=(FrameType)(JOINT|FIXED_JOINT|BODY|OP_FRAME|SENSOR)) const |
Checks if a frame given by its name exists. More... | |
bool | existJointName (const std::string &name) const |
Check if a joint given by its name exists. More... | |
JointIndex | getBodyId (const std::string &name) const |
Return the index of a body given by its name. More... | |
FrameIndex | getFrameId (const std::string &name, const FrameType &type=(FrameType)(JOINT|FIXED_JOINT|BODY|OP_FRAME|SENSOR)) const |
Returns the index of a frame given by its name. More... | |
JointIndex | getJointId (const std::string &name) const |
Return the index of a joint given by its name. More... | |
PINOCCHIO_DEPRECATED const std::string & | getJointName (const JointIndex index) const |
Get the name of a joint given by its index. More... | |
bool | operator!= (const ModelTpl &other) const |
bool | operator== (const ModelTpl &other) const |
Equality comparison operator. More... | |
![]() | |
void | loadFromBinary (const std::string &filename) |
Loads a Derived object from an binary file. | |
void | loadFromText (const std::string &filename) |
Loads a Derived object from a text file. | |
void | loadFromXML (const std::string &filename, const std::string &tag_name) |
Loads a Derived object from an XML file. | |
void | saveToBinary (const std::string &filename) const |
Saves a Derived object as an binary file. | |
void | saveToText (const std::string &filename) const |
Saves a Derived object as a text file. | |
void | saveToXML (const std::string &filename, const std::string &tag_name) const |
Saves a Derived object as an XML file. | |
Public Attributes | |
TangentVectorType | effortLimit |
Vector of maximal joint torques. | |
FrameVector | frames |
Vector of operational frames registered on the model. | |
Motion | gravity |
Spatial gravity of the model. | |
container::aligned_vector< Inertia > | inertias |
Spatial inertias of the body i expressed in the supporting joint frame i. | |
container::aligned_vector< SE3 > | jointPlacements |
Placement (SE3) of the input of joint i regarding to the parent joint output li. | |
JointModelVector | joints |
Model of joint i, encapsulated in a JointModelAccessor. | |
VectorXs | lowerPositionLimit |
Lower joint configuration limit. | |
std::string | name |
Model name;. | |
std::vector< std::string > | names |
Name of joint i | |
int | nbodies |
Number of bodies. | |
PINOCCHIO_DEPRECATED ConfigVectorType | neutralConfiguration |
Vector of joint's neutral configurations. | |
int | nframes |
Number of operational frames. | |
int | njoints |
Number of joints. | |
int | nq |
Dimension of the configuration vector representation. | |
int | nv |
Dimension of the velocity vector space. | |
std::vector< JointIndex > | parents |
Joint parent of joint i, denoted li (li==parents[i]). | |
ConfigVectorMap | referenceConfigurations |
Map of reference configurations, indexed by user given names. | |
VectorXs | rotorGearRatio |
Vector of rotor gear ratio parameters. | |
VectorXs | rotorInertia |
Vector of rotor inertia parameters. | |
std::vector< IndexVector > | subtrees |
Vector of subtrees. subtree[j] corresponds to the subtree supported by the joint j. The first element of subtree[j] is the index of the joint j itself. | |
VectorXs | upperPositionLimit |
Upper joint configuration limit. | |
TangentVectorType | velocityLimit |
Vector of maximal joint velocities. | |
Static Public Attributes | |
static const Vector3 | gravity981 |
Default 3D gravity vector (=(0,0,-9.81)). | |
Protected Member Functions | |
void | addJointIndexToParentSubtrees (const JointIndex joint_id) |
Add the joint_id to its parent subtrees. More... | |
Definition at line 19 of file multibody/fwd.hpp.
int addBodyFrame | ( | const std::string & | body_name, |
const JointIndex & | parentJoint, | ||
const SE3 & | body_placement = SE3::Identity() , |
||
int | previousFrame = -1 |
||
) |
Add a body to the frame tree.
[in] | body_name | Name of the body. |
[in] | parentJoint | Index of the parent joint. |
[in] | body_placement | The relative placement of the body regarding to the parent joint. Set default to the Identity placement. |
[in] | previousFrame | Index of the parent frame. If negative, the parent frame is the frame of the parent joint. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
int addFrame | ( | const Frame & | frame | ) |
Adds a frame to the kinematic tree.
[in] | frame | The frame to add to the kinematic tree. |
Referenced by ModelTpl< ADScalar, Options >::ModelTpl(), and ModelTpl< ADScalar, Options >::operator!=().
JointIndex addJoint | ( | const JointIndex | parent, |
const JointModelBase< JointModelDerived > & | joint_model, | ||
const SE3 & | joint_placement, | ||
const std::string & | joint_name, | ||
const VectorXs & | max_effort, | ||
const VectorXs & | max_velocity, | ||
const VectorXs & | min_config, | ||
const VectorXs & | max_config | ||
) |
Add a joint to the kinematic tree with given bounds.
JointModelDerived | The type of the joint model. |
[in] | parent | Index of the parent joint. |
[in] | joint_model | The joint model. |
[in] | joint_placement | Placement of the joint inside its parent joint. |
[in] | joint_name | Name of the joint. If empty, the name is random. |
[in] | max_effort | Maximal joint torque. |
[in] | max_velocity | Maximal joint velocity. |
[in] | min_config | Lower joint configuration. |
[in] | max_config | Upper joint configuration. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
JointIndex addJoint | ( | const JointIndex | parent, |
const JointModelBase< JointModelDerived > & | joint_model, | ||
const SE3 & | joint_placement, | ||
const std::string & | joint_name | ||
) |
Add a joint to the kinematic tree with infinite bounds.
JointModelDerived | The type of the joint model. |
[in] | parent | Index of the parent joint. |
[in] | joint_model | The joint model. |
[in] | joint_placement | Placement of the joint inside its parent joint. |
[in] | joint_name | Name of the joint. If empty, the name is random. |
int addJointFrame | ( | const JointIndex & | jointIndex, |
int | frameIndex = -1 |
||
) |
Add a joint to the frame tree.
[in] | jointIndex | Index of the joint. |
[in] | frameIndex | Index of the parent frame. If negative, the parent frame is the frame of the parent joint. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
|
protected |
Add the joint_id to its parent subtrees.
[in] | joint_id | The id of the joint to add to the subtrees |
Referenced by ModelTpl< ADScalar, Options >::check().
void appendBodyToJoint | ( | const JointIndex | joint_index, |
const Inertia & | Y, | ||
const SE3 & | body_placement = SE3::Identity() |
||
) |
Append a body to a given joint of the kinematic tree.
[in] | joint_index | Index of the supporting joint. |
[in] | Y | Spatial inertia of the body. |
[in] | body_placement | The relative placement of the body regarding to the parent joint. Set default to the Identity placement. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
|
inline |
Eigen Vectors TODO: remove this pragma when neutralConfiguration will be removed
reserve vectors
copy into vectors
Definition at line 170 of file multibody/model.hpp.
|
inline |
Check the validity of the attributes of Model with respect to the specification of some algorithms.
The method is a template so that the checkers can be defined in each algorithms.
[in] | checker | a class, typically defined in the algorithm module, that validates the attributes of model. |
Definition at line 513 of file multibody/model.hpp.
Referenced by pinocchio::kineticEnergy(), and pinocchio::potentialEnergy().
|
inline |
Run checkData on data and current model.
[in] | data | to be checked wrt *this. |
bool existBodyName | ( | const std::string & | name | ) | const |
Check if a body given by its name exists.
[in] | name | Name of the body. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
bool existFrame | ( | const std::string & | name, |
const FrameType & | type = (FrameType)(JOINT|FIXED_JOINT|BODY|OP_FRAME|SENSOR) |
||
) | const |
Checks if a frame given by its name exists.
[in] | name | Name of the frame. |
[in] | type | Type of the frame. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
bool existJointName | ( | const std::string & | name | ) | const |
Check if a joint given by its name exists.
[in] | name | Name of the joint. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
JointIndex getBodyId | ( | const std::string & | name | ) | const |
Return the index of a body given by its name.
[in] | name | Name of the body. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
FrameIndex getFrameId | ( | const std::string & | name, |
const FrameType & | type = (FrameType)(JOINT|FIXED_JOINT|BODY|OP_FRAME|SENSOR) |
||
) | const |
Returns the index of a frame given by its name.
[in] | name | Name of the frame. |
[in] | type | Type of the frame. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
JointIndex getJointId | ( | const std::string & | name | ) | const |
Return the index of a joint given by its name.
[in] | name | Name of the joint. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
PINOCCHIO_DEPRECATED const std::string& getJointName | ( | const JointIndex | index | ) | const |
Get the name of a joint given by its index.
[in] | index | Index of the joint. |
Referenced by ModelTpl< ADScalar, Options >::operator!=().
|
inline |
Definition at line 314 of file multibody/model.hpp.
|
inline |
Equality comparison operator.
TODO: remove this pragma when neutralConfiguration will be removed
Definition at line 234 of file multibody/model.hpp.