Blender  V3.3
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
iTaSC::Armature Class Reference

#include <Armature.hpp>

Inheritance diagram for iTaSC::Armature:
iTaSC::ControlledObject iTaSC::Object

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 19 of file Armature.hpp.

Member Typedef Documentation

◆ EffectorList

Definition at line 58 of file Armature.hpp.

◆ JointConstraintList

Definition at line 82 of file Armature.hpp.

◆ JointList

Definition at line 96 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 60 of file Armature.hpp.

Constructor & Destructor Documentation

◆ Armature()

iTaSC::Armature::Armature ( )

Definition at line 21 of file Armature.cpp.

◆ ~Armature()

iTaSC::Armature::~Armature ( )
virtual

Definition at line 48 of file Armature.cpp.

References NULL.

Member Function Documentation

◆ addConstraint()

int iTaSC::Armature::addConstraint ( const std::string &  segment_name,
ConstraintCallback  _function,
void _param = NULL,
bool  _freeParam = false,
bool  _substep = false 
)

◆ addEndEffector()

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

Reimplemented from iTaSC::Object.

Definition at line 354 of file Armature.cpp.

References KDL::Tree::getSegments().

◆ 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 231 of file Armature.cpp.

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

◆ finalize()

bool iTaSC::Armature::finalize ( )
virtual

◆ getArmLength()

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

Definition at line 47 of file Armature.hpp.

◆ getJointArray()

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

Definition at line 438 of file Armature.cpp.

◆ getMaxEndEffectorChange()

double iTaSC::Armature::getMaxEndEffectorChange ( )

Definition at line 278 of file Armature.cpp.

References KDL::diff(), KDL::Vector::Norm(), KDL::Twist::rot, and KDL::Twist::vel.

Referenced by execute_scene().

◆ getMaxJointChange()

double iTaSC::Armature::getMaxJointChange ( )

Definition at line 264 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 654 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 661 of file Armature.cpp.

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

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 135 of file Armature.cpp.

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

◆ pushCache()

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

◆ setControlParameter()

bool iTaSC::Armature::setControlParameter ( unsigned int  constraintId,
unsigned int  valueId,
ConstraintAction  action,
double  value,
double  timestep = 0.0 
)
virtual

◆ setJointArray()

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

Definition at line 427 of file Armature.cpp.

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

Referenced by execute_scene().

◆ updateControlOutput()

void iTaSC::Armature::updateControlOutput ( const Timestamp timestamp)
virtual

◆ updateJacobian()

void iTaSC::Armature::updateJacobian ( )
protectedvirtual

◆ updateJoint()

bool iTaSC::Armature::updateJoint ( const Timestamp timestamp,
JointLockCallback callback 
)
virtual

◆ updateKinematics()

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

Implements iTaSC::Object.

Definition at line 621 of file Armature.cpp.

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


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