sot-talos-balance  1.5.0
RobotWrapper Class Reference

Wrapper for a robot based on pinocchio. More...

#include <sot/talos_balance/robot/robot-wrapper.hh>

Collaboration diagram for RobotWrapper:
[legend]

Public Types

typedef math::ConstRefVector ConstRefVector
 
typedef pinocchio::Data Data
 
typedef pinocchio::Frame Frame
 
typedef math::Matrix Matrix
 
typedef math::Matrix3x Matrix3x
 
typedef pinocchio::Model Model
 
typedef pinocchio::Motion Motion
 
typedef math::RefVector RefVector
 
typedef pinocchio::SE3 SE3
 
typedef math::Vector Vector
 
typedef math::Vector3 Vector3
 
typedef math::Vector6 Vector6
 

Public Member Functions

 RobotWrapper (const std::string &filename, const std::vector< std::string > &package_dirs, bool verbose=false)
 
 RobotWrapper (const std::string &filename, const std::vector< std::string > &package_dirs, const pinocchio::JointModelVariant &rootJoint, bool verbose=false)
 
const Motionacceleration (const Data &data, const Model::JointIndex index) const
 
void com (const Data &data, RefVector com_pos, RefVector com_vel, RefVector com_acc) const
 
const Vector3com (const Data &data) const
 
const Vector3com_acc (const Data &data) const
 
const Vector3com_vel (const Data &data) const
 
void computeAllTerms (Data &data, const Vector &q, const Vector &v) const
 
Motion frameAcceleration (const Data &data, const Model::FrameIndex index) const
 
void frameAcceleration (const Data &data, const Model::FrameIndex index, Motion &frameAcceleration) const
 
Motion frameClassicAcceleration (const Data &data, const Model::FrameIndex index) const
 
void frameClassicAcceleration (const Data &data, const Model::FrameIndex index, Motion &frameAcceleration) const
 
void frameJacobianLocal (const Data &data, const Model::FrameIndex index, Data::Matrix6x &J) const
 
void frameJacobianWorld (const Data &data, const Model::FrameIndex index, Data::Matrix6x &J) const
 
SE3 framePosition (const Data &data, const Model::FrameIndex index) const
 
void framePosition (const Data &data, const Model::FrameIndex index, SE3 &framePosition) const
 
Motion frameVelocity (const Data &data, const Model::FrameIndex index) const
 
void frameVelocity (const Data &data, const Model::FrameIndex index, Motion &frameVelocity) const
 
const Vectorgear_ratios () const
 
bool gear_ratios (ConstRefVector gear_ratios)
 
void jacobianLocal (const Data &data, const Model::JointIndex index, Data::Matrix6x &J) const
 
void jacobianWorld (const Data &data, const Model::JointIndex index, Data::Matrix6x &J) const
 
const Matrix3xJcom (const Data &data) const
 
const Matrixmass (const Data &data)
 
const Modelmodel () const
 Accessor to model. More...
 
Modelmodel ()
 
const VectornonLinearEffects (const Data &data) const
 
virtual int nq () const
 
virtual int nv () const
 
const SE3position (const Data &data, const Model::JointIndex index) const
 
const Vectorrotor_inertias () const
 
bool rotor_inertias (ConstRefVector rotor_inertias)
 
const Motionvelocity (const Data &data, const Model::JointIndex index) const
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Scalar Scalar
 

Protected Member Functions

void updateMd ()
 

Protected Attributes

Vector m_gear_ratios
 
Matrix m_M
 diagonal part of inertia matrix due to rotor inertias More...
 
Vector m_Md
 
Model m_model
 Robot model. More...
 
std::string m_model_filename
 
Vector m_rotor_inertias
 
bool m_verbose
 

Detailed Description

Wrapper for a robot based on pinocchio.

Definition at line 41 of file robot-wrapper.hh.

Member Typedef Documentation

◆ ConstRefVector

Definition at line 58 of file robot-wrapper.hh.

◆ Data

typedef pinocchio::Data Data

Definition at line 48 of file robot-wrapper.hh.

◆ Frame

typedef pinocchio::Frame Frame

Definition at line 50 of file robot-wrapper.hh.

◆ Matrix

Definition at line 55 of file robot-wrapper.hh.

◆ Matrix3x

Definition at line 56 of file robot-wrapper.hh.

◆ Model

typedef pinocchio::Model Model

Definition at line 47 of file robot-wrapper.hh.

◆ Motion

typedef pinocchio::Motion Motion

Definition at line 49 of file robot-wrapper.hh.

◆ RefVector

Definition at line 57 of file robot-wrapper.hh.

◆ SE3

typedef pinocchio::SE3 SE3

Definition at line 51 of file robot-wrapper.hh.

◆ Vector

Definition at line 52 of file robot-wrapper.hh.

◆ Vector3

Definition at line 53 of file robot-wrapper.hh.

◆ Vector6

Definition at line 54 of file robot-wrapper.hh.

Constructor & Destructor Documentation

◆ RobotWrapper() [1/2]

RobotWrapper ( const std::string &  filename,
const std::vector< std::string > &  package_dirs,
bool  verbose = false 
)

◆ RobotWrapper() [2/2]

RobotWrapper ( const std::string &  filename,
const std::vector< std::string > &  package_dirs,
const pinocchio::JointModelVariant &  rootJoint,
bool  verbose = false 
)

Member Function Documentation

◆ acceleration()

const Motion & acceleration ( const Data data,
const Model::JointIndex  index 
) const

Definition at line 167 of file robot-wrapper.cpp.

◆ com() [1/2]

void com ( const Data data,
RefVector  com_pos,
RefVector  com_vel,
RefVector  com_acc 
) const

Definition at line 113 of file robot-wrapper.cpp.

◆ com() [2/2]

const Vector3 & com ( const Data data) const

Definition at line 123 of file robot-wrapper.cpp.

◆ com_acc()

const Vector3 & com_acc ( const Data data) const

Definition at line 133 of file robot-wrapper.cpp.

◆ com_vel()

const Vector3 & com_vel ( const Data data) const

Definition at line 128 of file robot-wrapper.cpp.

◆ computeAllTerms()

void computeAllTerms ( Data data,
const Vector q,
const Vector v 
) const

Definition at line 72 of file robot-wrapper.cpp.

References RobotWrapper::m_model, and RobotWrapper::nv().

◆ frameAcceleration() [1/2]

Motion frameAcceleration ( const Data data,
const Model::FrameIndex  index 
) const

Definition at line 215 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ frameAcceleration() [2/2]

void frameAcceleration ( const Data data,
const Model::FrameIndex  index,
Motion frameAcceleration 
) const

Definition at line 221 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ frameClassicAcceleration() [1/2]

Motion frameClassicAcceleration ( const Data data,
const Model::FrameIndex  index 
) const

Definition at line 228 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ frameClassicAcceleration() [2/2]

void frameClassicAcceleration ( const Data data,
const Model::FrameIndex  index,
Motion frameAcceleration 
) const

Definition at line 237 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ frameJacobianLocal()

void frameJacobianLocal ( const Data data,
const Model::FrameIndex  index,
Data::Matrix6x &  J 
) const

Definition at line 253 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ frameJacobianWorld()

void frameJacobianWorld ( const Data data,
const Model::FrameIndex  index,
Data::Matrix6x &  J 
) const

Definition at line 246 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ framePosition() [1/2]

SE3 framePosition ( const Data data,
const Model::FrameIndex  index 
) const

Definition at line 187 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ framePosition() [2/2]

void framePosition ( const Data data,
const Model::FrameIndex  index,
SE3 framePosition 
) const

Definition at line 194 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ frameVelocity() [1/2]

Motion frameVelocity ( const Data data,
const Model::FrameIndex  index 
) const

Definition at line 202 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ frameVelocity() [2/2]

void frameVelocity ( const Data data,
const Model::FrameIndex  index,
Motion frameVelocity 
) const

Definition at line 208 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ gear_ratios() [1/2]

const Vector & gear_ratios ( ) const

Definition at line 87 of file robot-wrapper.cpp.

References RobotWrapper::m_gear_ratios.

Referenced by RobotWrapper::gear_ratios().

◆ gear_ratios() [2/2]

bool gear_ratios ( ConstRefVector  gear_ratios)

◆ jacobianLocal()

void jacobianLocal ( const Data data,
const Model::JointIndex  index,
Data::Matrix6x &  J 
) const

Definition at line 180 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ jacobianWorld()

void jacobianWorld ( const Data data,
const Model::JointIndex  index,
Data::Matrix6x &  J 
) const

Definition at line 173 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ Jcom()

const Matrix3x & Jcom ( const Data data) const

Definition at line 138 of file robot-wrapper.cpp.

◆ mass()

const Matrix & mass ( const Data data)

Definition at line 143 of file robot-wrapper.cpp.

References RobotWrapper::m_M, RobotWrapper::m_Md, and RobotWrapper::m_model.

◆ model() [1/2]

const Model & model ( ) const

Accessor to model.

Returns
a const reference on the model.

Definition at line 69 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ model() [2/2]

Model & model ( )

Definition at line 70 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ nonLinearEffects()

const Vector & nonLinearEffects ( const Data data) const

Definition at line 150 of file robot-wrapper.cpp.

◆ nq()

int nq ( ) const
virtual

Definition at line 66 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

◆ nv()

int nv ( ) const
virtual

Definition at line 67 of file robot-wrapper.cpp.

References RobotWrapper::m_model.

Referenced by RobotWrapper::computeAllTerms().

◆ position()

const SE3 & position ( const Data data,
const Model::JointIndex  index 
) const

Definition at line 155 of file robot-wrapper.cpp.

◆ rotor_inertias() [1/2]

const Vector & rotor_inertias ( ) const

Definition at line 83 of file robot-wrapper.cpp.

References RobotWrapper::m_rotor_inertias.

Referenced by RobotWrapper::rotor_inertias().

◆ rotor_inertias() [2/2]

bool rotor_inertias ( ConstRefVector  rotor_inertias)

◆ updateMd()

void updateMd ( )
protected

◆ velocity()

const Motion & velocity ( const Data data,
const Model::JointIndex  index 
) const

Definition at line 161 of file robot-wrapper.cpp.

Member Data Documentation

◆ m_gear_ratios

Vector m_gear_ratios
protected

◆ m_M

Matrix m_M
protected

diagonal part of inertia matrix due to rotor inertias

Definition at line 173 of file robot-wrapper.hh.

Referenced by RobotWrapper::mass(), and RobotWrapper::RobotWrapper().

◆ m_Md

Vector m_Md
protected

◆ m_model

◆ m_model_filename

std::string m_model_filename
protected

Definition at line 167 of file robot-wrapper.hh.

Referenced by RobotWrapper::RobotWrapper().

◆ m_rotor_inertias

Vector m_rotor_inertias
protected

◆ m_verbose

bool m_verbose
protected

Definition at line 168 of file robot-wrapper.hh.

Referenced by RobotWrapper::RobotWrapper().

◆ Scalar

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef math::Scalar Scalar

Definition at line 46 of file robot-wrapper.hh.


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