|
Blender V4.3
|
#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_struct > | EffectorList |
| typedef std::vector< JointConstraint_struct * > | JointConstraintList |
| typedef std::vector< Joint_struct > | JointList |
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 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 () |
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 ×tep) |
| virtual bool | setControlParameter (unsigned int constraintId, unsigned int valueId, ConstraintAction action, e_scalar value, double timestep=0.0)=0 |
| virtual const e_vector & | getControlOutput () const |
| virtual const e_matrix & | getJq (unsigned int ee) const |
| virtual const e_matrix & | getCq () const |
| virtual e_matrix & | getWq () |
| virtual void | setWq (const e_matrix &Wq_in) |
| virtual const e_vector & | getWy () 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_matrix > | m_JqArray |
Protected Attributes inherited from iTaSC::Object | |
| Cache * | m_cache |
| KDL::Frame | m_internalPose |
| bool | m_updated |
Definition at line 20 of file Armature.hpp.
| typedef std::vector<Effector_struct> iTaSC::Armature::EffectorList |
Definition at line 59 of file Armature.hpp.
| typedef std::vector<JointConstraint_struct*> iTaSC::Armature::JointConstraintList |
Definition at line 83 of file Armature.hpp.
| typedef std::vector<Joint_struct> iTaSC::Armature::JointList |
Definition at line 97 of file Armature.hpp.
| enum iTaSC::Armature::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.
| iTaSC::Armature::Armature | ( | ) |
Definition at line 22 of file Armature.cpp.
|
virtual |
Definition at line 49 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 298 of file Armature.cpp.
References free(), 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.
Referenced by convert_tree().
|
virtual |
Reimplemented from iTaSC::Object.
Definition at line 355 of file Armature.cpp.
References KDL::Tree::getSegments().
Referenced by convert_tree().
| int iTaSC::Armature::addLimitConstraint | ( | const std::string & | segment_name, |
| unsigned int | dof, | ||
| double | _min, | ||
| double | _max ) |
Definition at line 336 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.
Referenced by convert_tree().
| 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().
|
virtual |
Reimplemented from iTaSC::Object.
Definition at line 374 of file Armature.cpp.
References iTaSC::ConstraintValues::alpha, KDL::epsilon, KDL::Tree::getSegmentPtr(), 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.
|
inlinevirtual |
Definition at line 48 of file Armature.hpp.
|
virtual |
Definition at line 439 of file Armature.cpp.
| double iTaSC::Armature::getMaxEndEffectorChange | ( | ) |
| double iTaSC::Armature::getMaxJointChange | ( | ) |
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().
| 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().
| 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(), KDL::Tree::getSegment(), and KDL::Tree::getSegments().
Referenced by base_callback(), and execute_scene().
|
virtual |
Implements iTaSC::Object.
Definition at line 136 of file Armature.cpp.
References iTaSC::Cache::addChannel(), NULL, and KDL::JntArray::rows().
|
virtual |
Implements iTaSC::Object.
Definition at line 420 of file Armature.cpp.
References iTaSC::Timestamp::cache, iTaSC::Timestamp::cacheTimestamp, and iTaSC::Timestamp::substep.
Referenced by updateKinematics().
|
virtual |
Definition at line 715 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, 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.
|
virtual |
Definition at line 428 of file Armature.cpp.
References KDL::JntArray::rows(), and updateJacobian().
Referenced by execute_scene().
|
virtual |
Implements iTaSC::ControlledObject.
Definition at line 669 of file Armature.cpp.
References iTaSC::ConstraintValues::alpha, iTaSC::Timestamp::cacheTimestamp, iTaSC::ConstraintValues::feedback, iTaSC::Armature::JointConstraint_struct::function, 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::Armature::JointConstraint_struct::substep, iTaSC::Timestamp::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.
|
protectedvirtual |
Implements iTaSC::Object.
Definition at line 636 of file Armature.cpp.
References KDL::changeRefPoint(), e_matrix, 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().
|
virtual |
Implements iTaSC::ControlledObject.
Definition at line 444 of file Armature.cpp.
References callback, KDL::epsilon, KDL::epsilon2, KDL::Rotation::Inverse(), iTaSC::Armature::Joint_struct::locked, iTaSC::ControlledObject::m_nq, iTaSC::ControlledObject::m_qdot, iTaSC::Armature::Joint_struct::max, iTaSC::Armature::Joint_struct::min, min, iTaSC::Armature::Joint_struct::ndof, norm(), iTaSC::Timestamp::realTimestep, KDL::Joint::Sphere, KDL::sqr(), KDL::sqrt(), KDL::Joint::Swing, and iTaSC::Armature::Joint_struct::type.
|
virtual |
Implements iTaSC::Object.
Definition at line 622 of file Armature.cpp.
References pushCache(), KDL::JntArray::rows(), and updateJacobian().