|
Blender
V2.59
|
#include <Armature.hpp>

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_struct > | EffectorList |
| typedef std::vector < JointConstraint_struct * > | JointConstraintList |
| typedef std::vector< Joint_struct > | JointList |
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 void | finalize () |
| virtual int | addEndEffector (const std::string &name) |
| virtual const Frame & | getPose (const unsigned int end_effector) |
| virtual bool | updateJoint (const Timestamp ×tamp, JointLockCallback &callback) |
| virtual void | updateKinematics (const Timestamp ×tamp) |
| virtual void | pushCache (const Timestamp ×tamp) |
| virtual void | updateControlOutput (const Timestamp ×tamp) |
| 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::JntArray & | getJointArray () |
| virtual double | getArmLength () |
Protected Member Functions | |
| virtual void | updateJacobian () |
Definition at line 19 of file Armature.hpp.
| typedef std::vector<Effector_struct> iTaSC::Armature::EffectorList |
Definition at line 58 of file Armature.hpp.
| typedef std::vector<JointConstraint_struct*> iTaSC::Armature::JointConstraintList |
Definition at line 82 of file Armature.hpp.
| typedef std::vector<Joint_struct> iTaSC::Armature::JointList |
Definition at line 96 of file Armature.hpp.
| enum iTaSC::Armature::ID |
Definition at line 60 of file Armature.hpp.
| iTaSC::Armature::Armature | ( | ) |
Definition at line 22 of file Armature.cpp.
| iTaSC::Armature::~Armature | ( | ) | [virtual] |
Definition at line 47 of file Armature.cpp.
References NULL.
| int iTaSC::Armature::addConstraint | ( | const std::string & | segment_name, |
| ConstraintCallback | _function, | ||
| void * | _param = NULL, |
||
| bool | _freeParam = false, |
||
| bool | _substep = false |
||
| ) |
Definition at line 296 of file Armature.cpp.
References iTaSC::Armature::JointConstraint_struct::freeParam, iTaSC::Armature::JointConstraint_struct::function, KDL::Tree::getSegment(), KDL::Tree::getSegments(), iTaSC::Armature::JointConstraint_struct::param, iTaSC::Armature::JointConstraint_struct::segment, iTaSC::Armature::JointConstraint_struct::substep, and iTaSC::Armature::JointConstraint_struct::v_nr.
| int iTaSC::Armature::addEndEffector | ( | const std::string & | name | ) | [virtual] |
Reimplemented from iTaSC::Object.
Definition at line 353 of file Armature.cpp.
References KDL::Tree::getSegments().
| int iTaSC::Armature::addLimitConstraint | ( | const std::string & | segment_name, |
| unsigned int | dof, | ||
| double | _min, | ||
| double | _max | ||
| ) |
Definition at line 334 of file Armature.cpp.
References KDL::Joint::getNDof(), KDL::Tree::getSegment(), KDL::Tree::getSegments(), KDL::Joint::getType(), iTaSC::Armature::Joint_struct::max, iTaSC::Armature::Joint_struct::min, KDL::Joint::Swing, and iTaSC::Armature::Joint_struct::useLimit.
| 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 230 of file Armature.cpp.
References KDL::Tree::addSegment(), KDL::Joint::getNDof(), and KDL::Joint::getType().
| void iTaSC::Armature::finalize | ( | ) | [virtual] |
Reimplemented from iTaSC::Object.
Definition at line 372 of file Armature.cpp.
References iTaSC::ConstraintValues::alpha, KDL::epsilon, KDL::Tree::getSegment(), i, iTaSC::ControlledObject::initialize(), length(), iTaSC::ControlledObject::m_Cq, iTaSC::ControlledObject::m_Wy, KDL::Vector::Norm(), KDL::Frame::p, KDL::JntArray::resize(), iTaSC::Armature::JointConstraint_struct::segment, updateJacobian(), iTaSC::Armature::JointConstraint_struct::v_nr, and iTaSC::Armature::JointConstraint_struct::values.
| virtual double iTaSC::Armature::getArmLength | ( | ) | [inline, virtual] |
Definition at line 47 of file Armature.hpp.
| const KDL::JntArray & iTaSC::Armature::getJointArray | ( | ) | [virtual] |
Definition at line 434 of file Armature.cpp.
| double iTaSC::Armature::getMaxEndEffectorChange | ( | ) |
Definition at line 277 of file Armature.cpp.
References KDL::diff(), i, KDL::Vector::Norm(), KDL::Twist::rot, and KDL::Twist::vel.
Referenced by execute_scene().
| double iTaSC::Armature::getMaxJointChange | ( | ) |
Definition at line 263 of file Armature.cpp.
Referenced by execute_scene().
| const Frame & iTaSC::Armature::getPose | ( | const unsigned int | end_effector | ) | [virtual] |
Reimplemented from iTaSC::Object.
Definition at line 650 of file Armature.cpp.
References iTaSC::F_identity, and iTaSC::ControlledObject::m_nee.
Referenced by base_callback().
| bool iTaSC::Armature::getRelativeFrame | ( | Frame & | result, |
| const std::string & | segment_name, | ||
| const std::string & | base_name = m_root |
||
| ) |
Definition at line 657 of file Armature.cpp.
References KDL::TreeFkSolverPos_recursive::JntToCart().
Referenced by base_callback(), and execute_scene().
| 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 247 of file Armature.cpp.
References KDL::Joint::getNDof(), KDL::Tree::getSegment(), and KDL::Tree::getSegments().
Referenced by base_callback(), and execute_scene().
| void iTaSC::Armature::initCache | ( | Cache * | _cache | ) | [virtual] |
Implements iTaSC::Object.
Definition at line 134 of file Armature.cpp.
References iTaSC::Cache::addChannel(), iTaSC::constraintCacheSize, NULL, and KDL::JntArray::rows().
| void iTaSC::Armature::pushCache | ( | const Timestamp & | timestamp | ) | [virtual] |
Implements iTaSC::Object.
Definition at line 415 of file Armature.cpp.
References iTaSC::Timestamp::cache, iTaSC::Timestamp::cacheTimestamp, and iTaSC::Timestamp::substep.
Referenced by updateKinematics().
| bool iTaSC::Armature::setControlParameter | ( | unsigned int | constraintId, |
| unsigned int | valueId, | ||
| ConstraintAction | action, | ||
| double | value, | ||
| double | timestep = 0.0 |
||
| ) | [virtual] |
Definition at line 710 of file Armature.cpp.
References iTaSC::ACT_ALPHA, iTaSC::ACT_FEEDBACK, iTaSC::ACT_NONE, iTaSC::ACT_TOLERANCE, iTaSC::ACT_VALUE, iTaSC::ACT_VELOCITY, iTaSC::ConstraintValues::alpha, CONSTRAINT_ID_ALL, iTaSC::ConstraintValues::feedback, i, iTaSC::ConstraintSingleValue::id, ID_JOINT, iTaSC::ControlledObject::m_Wy, iTaSC::ConstraintValues::tolerance, iTaSC::Armature::JointConstraint_struct::v_nr, iTaSC::Armature::JointConstraint_struct::value, iTaSC::Armature::JointConstraint_struct::values, iTaSC::Armature::JointConstraint_struct::y_nr, iTaSC::ConstraintSingleValue::yd, and iTaSC::ConstraintSingleValue::yddot.
| bool iTaSC::Armature::setJointArray | ( | const KDL::JntArray & | joints | ) | [virtual] |
Definition at line 423 of file Armature.cpp.
References KDL::JntArray::rows(), and updateJacobian().
Referenced by execute_scene().
| void iTaSC::Armature::updateControlOutput | ( | const Timestamp & | timestamp | ) | [virtual] |
Implements iTaSC::ControlledObject.
Definition at line 664 of file Armature.cpp.
References iTaSC::ConstraintValues::alpha, iTaSC::Timestamp::cacheTimestamp, iTaSC::ConstraintValues::feedback, iTaSC::Armature::JointConstraint_struct::function, i, iTaSC::Timestamp::interpolate, jit, iTaSC::ControlledObject::m_Wy, iTaSC::ControlledObject::m_ydot, iTaSC::Armature::JointConstraint_struct::param, iTaSC::Timestamp::reiterate, KDL::JntArray::rows(), iTaSC::Armature::JointConstraint_struct::segment, iTaSC::Timestamp::substep, iTaSC::Armature::JointConstraint_struct::substep, iTaSC::Armature::JointConstraint_struct::v_nr, iTaSC::Armature::JointConstraint_struct::value, iTaSC::Armature::JointConstraint_struct::values, iTaSC::ConstraintSingleValue::y, iTaSC::Armature::JointConstraint_struct::y_nr, iTaSC::ConstraintSingleValue::yd, iTaSC::ConstraintSingleValue::yddot, and iTaSC::ConstraintSingleValue::ydot.
| void iTaSC::Armature::updateJacobian | ( | ) | [protected, virtual] |
Implements iTaSC::Object.
Definition at line 631 of file Armature.cpp.
References KDL::changeRefPoint(), e_matrix, i, KDL::TreeFkSolverPos_recursive::JntToCart(), KDL::TreeJntToJacSolver::JntToJac(), iTaSC::ControlledObject::m_JqArray, iTaSC::ControlledObject::m_nee, iTaSC::ControlledObject::m_nq, and iTaSC::Object::m_updated.
Referenced by finalize(), setJointArray(), and updateKinematics().
| bool iTaSC::Armature::updateJoint | ( | const Timestamp & | timestamp, |
| JointLockCallback & | callback | ||
| ) | [virtual] |
Implements iTaSC::ControlledObject.
Definition at line 439 of file Armature.cpp.
References KDL::epsilon, KDL::epsilon2, i, KDL::Rotation::Inverse(), iTaSC::Armature::Joint_struct::locked, iTaSC::ControlledObject::JointLockCallback::lockJoint(), iTaSC::ControlledObject::m_nq, iTaSC::ControlledObject::m_qdot, max, iTaSC::Armature::Joint_struct::max, min, iTaSC::Armature::Joint_struct::min, iTaSC::Armature::Joint_struct::ndof, norm(), iTaSC::Timestamp::realTimestep, Rot(), KDL::Joint::Sphere, KDL::sqr(), sqrt(), KDL::Joint::Swing, and iTaSC::Armature::Joint_struct::type.
| void iTaSC::Armature::updateKinematics | ( | const Timestamp & | timestamp | ) | [virtual] |
Implements iTaSC::Object.
Definition at line 617 of file Armature.cpp.
References pushCache(), KDL::JntArray::rows(), and updateJacobian().