Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
IKHandle Class Reference

Position constraint. More...

#include <ik.h>

Inheritance diagram for IKHandle:
Inheritance graph
[legend]

Public Member Functions

void GetAtt (fMat33 &_abs_att)
 obtain constraint orientation More...
 
void GetConstIndex (IK::ConstIndex _cindex[])
 
void GetPos (fVec3 &_abs_pos)
 obtain constraint position More...
 
IK::ConstType GetType ()
 Returns the constraint type. More...
 
 IKHandle (IK *_ik, const char *_jname, Joint *_jnt, IK::ConstIndex cindex[6], IK::Priority _pri, double _gain, const fVec3 &_rel_pos=0.0, const fMat33 &_rel_att=1.0, Joint *_other_joint=0)
 
int Reset ()
 reset the constraint position/orientation by the current values More...
 
void SetAtt (const fMat33 &_abs_att)
 set the constraint orientation More...
 
void SetCharacterScale (double _scale, const char *charname=0)
 
void SetPos (const fVec3 &_abs_pos)
 set the constraint position More...
 
void SetRelPos (const fVec3 &_rel_pos)
 set relative position of the constraint More...
 
 ~IKHandle ()
 
- Public Member Functions inherited from IKConstraint
void Activate ()
 activate the constraint More...
 
int Active ()
 whether the constraint is activate More...
 
void Diactivate ()
 diactivate the constraint More...
 
void Disable ()
 disable the constraint More...
 
int Dropped ()
 
void Enable ()
 enable the constraint More...
 
double GetGain ()
 get the gain More...
 
JointGetJoint ()
 
IK::Priority GetPriority ()
 get the priproty More...
 
int iConst ()
 
int ID ()
 
 IKConstraint (IK *_ik, const char *_jname, Joint *_jnt, IK::Priority _pri, double _gain)
 Default constructor. More...
 
int nConst ()
 
void SetGain (double _gain)
 set the gain More...
 
void SetPriority (IK::Priority _pri)
 set the priproty More...
 
virtual ~IKConstraint ()
 Destructor. More...
 

Protected Member Functions

int calc_feedback ()
 compute the feedback velocity More...
 
int calc_jacobian ()
 Computes the constraint Jacobian. More...
 
- Protected Member Functions inherited from IKConstraint
int calc_jacobian (Joint *cur)
 the function recursively called for all joints (don't override) More...
 
virtual int calc_jacobian_free (Joint *cur)
 
virtual int calc_jacobian_rotate (Joint *cur)
 
virtual int calc_jacobian_slide (Joint *cur)
 
virtual int calc_jacobian_sphere (Joint *cur)
 
int copy_jacobian ()
 copy each constraint Jacobian to the whole Jacobian matrix More...
 

Protected Attributes

fMat33 abs_att
 current constraint orientation More...
 
fVec3 abs_pos
 current constraint position More...
 
IK::ConstIndex const_index [6]
 with/without constraint for each DOF More...
 
Jointother_joint
 connected to other joint: constrains the relative position and/or orientation w.r.t. other_joint's frame More...
 
fMat33 rel_att
 
fVec3 rel_pos
 
- Protected Attributes inherited from IKConstraint
int active
 
int enabled
 number of constraints More...
 
fVec fb
 Jacobian matrix (n_const x total DOF) More...
 
double gain
 priority More...
 
int i_const
 feedback velocity (n_const) More...
 
int id
 ID (unique to each constraint) More...
 
IKik
 
int is_dropped
 index in the constraints with the same priority More...
 
fMat J
 
Jointjoint
 target joint More...
 
char * joint_name
 
int n_const
 weight More...
 
IK::Priority priority
 
fVec weight
 feedback gain More...
 

Friends

class IK
 

Detailed Description

Position constraint.

Definition at line 416 of file ik.h.

Constructor & Destructor Documentation

IKHandle::IKHandle ( IK _ik,
const char *  _jname,
Joint _jnt,
IK::ConstIndex  cindex[6],
IK::Priority  _pri,
double  _gain,
const fVec3 _rel_pos = 0.0,
const fMat33 _rel_att = 1.0,
Joint _other_joint = 0 
)
inline

Default constructor.

Parameters
[in]_ik
[in]_jname
[in]_jnt
[in]cindex
[in]_pri
[in]_gain
[in]_rel_posrelative position in joint frame (default: 0,0,0)
[in]_rel_attrelative orientation in joint frame (default: identity)
[in]_other_jointjoint to which the constraint is attached (default: world)

Definition at line 433 of file ik.h.

IKHandle::~IKHandle ( )
inline

Definition at line 474 of file ik.h.

Member Function Documentation

int IKHandle::calc_feedback ( )
protectedvirtual

compute the feedback velocity

Implements IKConstraint.

Definition at line 72 of file handle.cpp.

int IKHandle::calc_jacobian ( )
protectedvirtual

Computes the constraint Jacobian.

Computes the constraint Jacobian. implementing the function:

  1. override calc_jacobian_slide() - calc_jacobian_free()
    the default implementation of calc_jacobian() calls each function depending on the joint type
  2. overried calc_jacobian()
    if the implementation does not depend on the joint type

Reimplemented from IKConstraint.

Definition at line 16 of file handle.cpp.

void IKHandle::GetAtt ( fMat33 _abs_att)
inline

obtain constraint orientation

Definition at line 512 of file ik.h.

void IKHandle::GetConstIndex ( IK::ConstIndex  _cindex[])
inline

Definition at line 526 of file ik.h.

void IKHandle::GetPos ( fVec3 _abs_pos)
inline

obtain constraint position

Definition at line 508 of file ik.h.

IK::ConstType IKHandle::GetType ( )
inlinevirtual

Returns the constraint type.

Implements IKConstraint.

Definition at line 522 of file ik.h.

int IKHandle::Reset ( )
inlinevirtual

reset the constraint position/orientation by the current values

Reimplemented from IKConstraint.

Definition at line 478 of file ik.h.

void IKHandle::SetAtt ( const fMat33 _abs_att)
inline

set the constraint orientation

Definition at line 503 of file ik.h.

void IKHandle::SetCharacterScale ( double  _scale,
const char *  charname = 0 
)
virtual

Reimplemented from IKConstraint.

Definition at line 652 of file ik.cpp.

void IKHandle::SetPos ( const fVec3 _abs_pos)
inline

set the constraint position

Definition at line 499 of file ik.h.

void IKHandle::SetRelPos ( const fVec3 _rel_pos)
inline

set relative position of the constraint

Definition at line 517 of file ik.h.

Friends And Related Function Documentation

friend class IK
friend

Definition at line 419 of file ik.h.

Member Data Documentation

fMat33 IKHandle::abs_att
protected

current constraint orientation

Definition at line 541 of file ik.h.

fVec3 IKHandle::abs_pos
protected

current constraint position

Definition at line 540 of file ik.h.

IK::ConstIndex IKHandle::const_index[6]
protected

with/without constraint for each DOF

Definition at line 543 of file ik.h.

Joint* IKHandle::other_joint
protected

connected to other joint: constrains the relative position and/or orientation w.r.t. other_joint's frame

Definition at line 548 of file ik.h.

fMat33 IKHandle::rel_att
protected

Definition at line 545 of file ik.h.

fVec3 IKHandle::rel_pos
protected

Definition at line 544 of file ik.h.


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


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:43