Blender V4.3
iTaSC::Armature Class Reference

#include <Armature.hpp>

Inherits iTaSC::ControlledObject.

Classes

struct  Effector_struct
 
struct  Joint_struct
 
struct  JointConstraint_struct
 

Public Types

enum  ID {
  ID_JOINT =1 , ID_JOINT_RX =2 , ID_JOINT_RY =3 , ID_JOINT_RZ =4 ,
  ID_JOINT_TX =2 , ID_JOINT_TY =3 , ID_JOINT_TZ =4
}
 
typedef std::vector< Effector_structEffectorList
 
typedef std::vector< JointConstraint_struct * > JointConstraintList
 
typedef std::vector< Joint_structJointList
 
- Public Types inherited from iTaSC::Object
enum  ObjectType { Controlled , UnControlled }
 

Public Member Functions

 Armature ()
 
virtual ~Armature ()
 
bool addSegment (const std::string &segment_name, const std::string &hook_name, const Joint &joint, const double &q_rest, const Frame &f_tip=F_identity, const Inertia &M=Inertia::Zero())
 
int addConstraint (const std::string &segment_name, ConstraintCallback _function, void *_param=NULL, bool _freeParam=false, bool _substep=false)
 
int addLimitConstraint (const std::string &segment_name, unsigned int dof, double _min, double _max)
 
double getMaxJointChange ()
 
double getMaxEndEffectorChange ()
 
bool getSegment (const std::string &segment_name, const unsigned int q_size, const Joint *&p_joint, double &q_rest, double &q, const Frame *&p_tip)
 
bool getRelativeFrame (Frame &result, const std::string &segment_name, const std::string &base_name=m_root)
 
virtual bool finalize ()
 
virtual int addEndEffector (const std::string &name)
 
virtual const FramegetPose (const unsigned int end_effector)
 
virtual bool updateJoint (const Timestamp &timestamp, JointLockCallback &callback)
 
virtual void updateKinematics (const Timestamp &timestamp)
 
virtual void pushCache (const Timestamp &timestamp)
 
virtual void updateControlOutput (const Timestamp &timestamp)
 
virtual bool setControlParameter (unsigned int constraintId, unsigned int valueId, ConstraintAction action, double value, double timestep=0.0)
 
virtual void initCache (Cache *_cache)
 
virtual bool setJointArray (const KDL::JntArray &joints)
 
virtual const KDL::JntArraygetJointArray ()
 
virtual double getArmLength ()
 
- Public Member Functions inherited from iTaSC::ControlledObject
 ControlledObject ()
 
virtual ~ControlledObject ()
 
virtual void initialize (unsigned int _nq, unsigned int _nc, unsigned int _nee)
 
virtual void setJointVelocity (const e_vector qdot_in)
 
virtual double getMaxTimestep (double &timestep)
 
virtual bool setControlParameter (unsigned int constraintId, unsigned int valueId, ConstraintAction action, e_scalar value, double timestep=0.0)=0
 
virtual const e_vectorgetControlOutput () const
 
virtual const e_matrixgetJq (unsigned int ee) const
 
virtual const e_matrixgetCq () const
 
virtual e_matrixgetWq ()
 
virtual void setWq (const e_matrix &Wq_in)
 
virtual const e_vectorgetWy () const
 
virtual const unsigned int getNrOfCoordinates ()
 
virtual const unsigned int getNrOfConstraints ()
 
- Public Member Functions inherited from iTaSC::Object
 Object (ObjectType _type)
 
virtual ~Object ()
 
virtual const ObjectType getType ()
 
bool updated ()
 
void updated (bool val)
 

Protected Member Functions

virtual void updateJacobian ()
 

Additional Inherited Members

- Static Public Attributes inherited from iTaSC::Object
static WorldObject world
 
- Protected Attributes inherited from iTaSC::ControlledObject
e_scalar m_maxDeltaQ
 
unsigned int m_nq
 
unsigned int m_nc
 
unsigned int m_nee
 
e_matrix m_Wq
 
e_matrix m_Cq
 
e_vector m_Wy
 
e_vector m_ydot
 
e_vector m_qdot
 
std::vector< e_matrixm_JqArray
 
- Protected Attributes inherited from iTaSC::Object
Cachem_cache
 
KDL::Frame m_internalPose
 
bool m_updated
 

Detailed Description

Definition at line 20 of file Armature.hpp.

Member Typedef Documentation

◆ EffectorList

Definition at line 59 of file Armature.hpp.

◆ JointConstraintList

Definition at line 83 of file Armature.hpp.

◆ JointList

Definition at line 97 of file Armature.hpp.

Member Enumeration Documentation

◆ ID

Enumerator
ID_JOINT 
ID_JOINT_RX 
ID_JOINT_RY 
ID_JOINT_RZ 
ID_JOINT_TX 
ID_JOINT_TY 
ID_JOINT_TZ 

Definition at line 61 of file Armature.hpp.

Constructor & Destructor Documentation

◆ Armature()

iTaSC::Armature::Armature ( )

Definition at line 22 of file Armature.cpp.

◆ ~Armature()

iTaSC::Armature::~Armature ( )
virtual

Definition at line 49 of file Armature.cpp.

References NULL.

Member Function Documentation

◆ addConstraint()

◆ addEndEffector()

int iTaSC::Armature::addEndEffector ( const std::string & name)
virtual

Reimplemented from iTaSC::Object.

Definition at line 355 of file Armature.cpp.

References KDL::Tree::getSegments().

Referenced by convert_tree().

◆ addLimitConstraint()

int iTaSC::Armature::addLimitConstraint ( const std::string & segment_name,
unsigned int dof,
double _min,
double _max )

◆ addSegment()

bool iTaSC::Armature::addSegment ( const std::string & segment_name,
const std::string & hook_name,
const Joint & joint,
const double & q_rest,
const Frame & f_tip = F_identity,
const Inertia & M = Inertia::Zero() )

Definition at line 232 of file Armature.cpp.

References KDL::Tree::addSegment(), KDL::Joint::getNDof(), KDL::Joint::getType(), and M.

Referenced by convert_tree().

◆ finalize()

◆ getArmLength()

virtual double iTaSC::Armature::getArmLength ( )
inlinevirtual

Definition at line 48 of file Armature.hpp.

◆ getJointArray()

const KDL::JntArray & iTaSC::Armature::getJointArray ( )
virtual

Definition at line 439 of file Armature.cpp.

◆ getMaxEndEffectorChange()

double iTaSC::Armature::getMaxEndEffectorChange ( )

Definition at line 279 of file Armature.cpp.

References KDL::diff().

Referenced by execute_scene().

◆ getMaxJointChange()

double iTaSC::Armature::getMaxJointChange ( )

Definition at line 265 of file Armature.cpp.

References fabs().

Referenced by execute_scene().

◆ getPose()

const Frame & iTaSC::Armature::getPose ( const unsigned int end_effector)
virtual

Reimplemented from iTaSC::Object.

Definition at line 655 of file Armature.cpp.

References iTaSC::F_identity, and iTaSC::ControlledObject::m_nee.

Referenced by base_callback().

◆ getRelativeFrame()

bool iTaSC::Armature::getRelativeFrame ( Frame & result,
const std::string & segment_name,
const std::string & base_name = m_root )

Definition at line 662 of file Armature.cpp.

References false, and KDL::TreeFkSolverPos_recursive::JntToCart().

Referenced by base_callback(), and execute_scene().

◆ getSegment()

bool iTaSC::Armature::getSegment ( const std::string & segment_name,
const unsigned int q_size,
const Joint *& p_joint,
double & q_rest,
double & q,
const Frame *& p_tip )

◆ initCache()

void iTaSC::Armature::initCache ( Cache * _cache)
virtual

Implements iTaSC::Object.

Definition at line 136 of file Armature.cpp.

References iTaSC::Cache::addChannel(), NULL, and KDL::JntArray::rows().

◆ pushCache()

void iTaSC::Armature::pushCache ( const Timestamp & timestamp)
virtual

◆ setControlParameter()

◆ setJointArray()

bool iTaSC::Armature::setJointArray ( const KDL::JntArray & joints)
virtual

Definition at line 428 of file Armature.cpp.

References KDL::JntArray::rows(), and updateJacobian().

Referenced by execute_scene().

◆ updateControlOutput()

◆ updateJacobian()

◆ updateJoint()

◆ updateKinematics()

void iTaSC::Armature::updateKinematics ( const Timestamp & timestamp)
virtual

Implements iTaSC::Object.

Definition at line 622 of file Armature.cpp.

References pushCache(), KDL::JntArray::rows(), and updateJacobian().


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