Blender V5.0
iTaSC::Armature Class Reference

#include <Armature.hpp>

Inherits iTaSC::ControlledObject.

Classes

struct  Effector_struct
struct  JointConstraint_struct
struct  Joint_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 unsigned int getNrOfCoordinates ()
virtual unsigned int getNrOfConstraints ()
Public Member Functions inherited from iTaSC::Object
 Object (ObjectType _type)
virtual ~Object ()
virtual 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

◆ 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.

References iTaSC::ControlledObject::ControlledObject(), false, and if().

◆ ~Armature()

iTaSC::Armature::~Armature ( )
virtual

Definition at line 49 of file Armature.cpp.

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 name.

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::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(), i, KDL::Vector::Norm(), KDL::Twist::rot, and KDL::Twist::vel.

Referenced by execute_scene().

◆ getMaxJointChange()

double iTaSC::Armature::getMaxJointChange ( )

Definition at line 265 of file Armature.cpp.

References fabs(), and i.

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 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 )

Definition at line 249 of file Armature.cpp.

References KDL::Joint::getNDof(), and name.

Referenced by base_callback(), and execute_scene().

◆ initCache()

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

Implements iTaSC::Object.

Definition at line 136 of file Armature.cpp.

◆ 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()

void iTaSC::Armature::updateJacobian ( )
protectedvirtual

◆ updateJoint()

◆ updateKinematics()

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

Implements iTaSC::Object.

Definition at line 622 of file Armature.cpp.

References pushCache(), and updateJacobian().


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