Blender
V3.3
|
#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 |
![]() | |
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 () |
![]() | |
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 () |
![]() | |
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 WorldObject | world |
![]() | |
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 |
![]() | |
Cache * | m_cache |
KDL::Frame | m_internalPose |
bool | m_updated |
Definition at line 19 of file Armature.hpp.
Definition at line 58 of file Armature.hpp.
Definition at line 82 of file Armature.hpp.
Definition at line 96 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 60 of file Armature.hpp.
iTaSC::Armature::Armature | ( | ) |
Definition at line 21 of file Armature.cpp.
|
virtual |
Definition at line 48 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 297 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.
|
virtual |
Reimplemented from iTaSC::Object.
Definition at line 354 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 335 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 231 of file Armature.cpp.
References KDL::Tree::addSegment(), KDL::Joint::getNDof(), KDL::Joint::getType(), and M.
|
virtual |
Reimplemented from iTaSC::Object.
Definition at line 373 of file Armature.cpp.
References iTaSC::ConstraintValues::alpha, Freestyle::c, KDL::epsilon, KDL::Tree::getSegmentPtr(), iTaSC::ControlledObject::initialize(), blender::math::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 47 of file Armature.hpp.
|
virtual |
Definition at line 438 of file Armature.cpp.
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().
double iTaSC::Armature::getMaxJointChange | ( | ) |
|
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().
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().
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 248 of file Armature.cpp.
References KDL::Joint::getNDof(), KDL::Tree::getSegment(), and KDL::Tree::getSegments().
Referenced by base_callback(), and execute_scene().
Implements iTaSC::Object.
Definition at line 135 of file Armature.cpp.
References iTaSC::Cache::addChannel(), NULL, and KDL::JntArray::rows().
Implements iTaSC::Object.
Definition at line 419 of file Armature.cpp.
References iTaSC::Timestamp::cache, iTaSC::Timestamp::cacheTimestamp, and iTaSC::Timestamp::substep.
Referenced by updateKinematics().
|
virtual |
Definition at line 714 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 427 of file Armature.cpp.
References KDL::JntArray::rows(), and updateJacobian().
Referenced by execute_scene().
Implements iTaSC::ControlledObject.
Definition at line 668 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 635 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 443 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, max, iTaSC::Armature::Joint_struct::min, min, iTaSC::Armature::Joint_struct::ndof, norm(), iTaSC::Timestamp::realTimestep, Rot(), KDL::Joint::Sphere, KDL::sqr(), KDL::sqrt(), KDL::Joint::Swing, sx, and iTaSC::Armature::Joint_struct::type.
Implements iTaSC::Object.
Definition at line 621 of file Armature.cpp.
References pushCache(), KDL::JntArray::rows(), and updateJacobian().