Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
IKConstraint Class Referenceabstract

Base class for constraints. More...

#include <ik.h>

Inheritance diagram for IKConstraint:
Inheritance graph
[legend]

Public Member Functions

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...
 
virtual IK::ConstType GetType ()=0
 Returns the constraint type. More...
 
int iConst ()
 
int ID ()
 
 IKConstraint (IK *_ik, const char *_jname, Joint *_jnt, IK::Priority _pri, double _gain)
 Default constructor. More...
 
int nConst ()
 
virtual int Reset ()
 
virtual void SetCharacterScale (double _scale, const char *charname=0)
 
void SetGain (double _gain)
 set the gain More...
 
void SetPriority (IK::Priority _pri)
 set the priproty More...
 
virtual ~IKConstraint ()
 Destructor. More...
 

Protected Member Functions

virtual int calc_feedback ()=0
 compute the feedback velocity More...
 
virtual int calc_jacobian ()
 Computes the constraint Jacobian. More...
 
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

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

Private Member Functions

int count_constraints ()
 

Friends

class IK
 

Detailed Description

Base class for constraints.

Definition at line 253 of file ik.h.

Constructor & Destructor Documentation

IKConstraint::IKConstraint ( IK _ik,
const char *  _jname,
Joint _jnt,
IK::Priority  _pri,
double  _gain 
)
inline

Default constructor.

Default constructor.

Parameters
[in]_ikpointer to the IK object
[in]_jnamename of the joint to which the constraint is attached
[in]_jntpointer to the joint
[in]_pripriority of the constraint
[in]_gaingain of the constraint

Definition at line 266 of file ik.h.

virtual IKConstraint::~IKConstraint ( )
inlinevirtual

Destructor.

Definition at line 286 of file ik.h.

Member Function Documentation

void IKConstraint::Activate ( )
inline

activate the constraint

Definition at line 307 of file ik.h.

int IKConstraint::Active ( )
inline

whether the constraint is activate

Definition at line 315 of file ik.h.

virtual int IKConstraint::calc_feedback ( )
protectedpure virtual

compute the feedback velocity

Implemented in IKScalarJointLimit, IKCom, IKDesire, and IKHandle.

int IKConstraint::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 in IKCom, and IKHandle.

Definition at line 76 of file update_ik.cpp.

int IKConstraint::calc_jacobian ( Joint cur)
protected

the function recursively called for all joints (don't override)

Definition at line 84 of file update_ik.cpp.

virtual int IKConstraint::calc_jacobian_free ( Joint cur)
inlineprotectedvirtual

Reimplemented in IKDesire.

Definition at line 378 of file ik.h.

virtual int IKConstraint::calc_jacobian_rotate ( Joint cur)
inlineprotectedvirtual

Reimplemented in IKScalarJointLimit, and IKDesire.

Definition at line 369 of file ik.h.

virtual int IKConstraint::calc_jacobian_slide ( Joint cur)
inlineprotectedvirtual

Reimplemented in IKScalarJointLimit, and IKDesire.

Definition at line 372 of file ik.h.

virtual int IKConstraint::calc_jacobian_sphere ( Joint cur)
inlineprotectedvirtual

Reimplemented in IKDesire.

Definition at line 375 of file ik.h.

int IKConstraint::copy_jacobian ( )
protected

copy each constraint Jacobian to the whole Jacobian matrix

Definition at line 446 of file update_ik.cpp.

int IKConstraint::count_constraints ( )
private

Definition at line 434 of file update_ik.cpp.

void IKConstraint::Diactivate ( )
inline

diactivate the constraint

Definition at line 311 of file ik.h.

void IKConstraint::Disable ( )
inline

disable the constraint

Definition at line 302 of file ik.h.

int IKConstraint::Dropped ( )
inline

Definition at line 350 of file ik.h.

void IKConstraint::Enable ( )
inline

enable the constraint

Definition at line 298 of file ik.h.

double IKConstraint::GetGain ( )
inline

get the gain

Definition at line 324 of file ik.h.

Joint* IKConstraint::GetJoint ( )
inline

Definition at line 344 of file ik.h.

IK::Priority IKConstraint::GetPriority ( )
inline

get the priproty

Definition at line 333 of file ik.h.

virtual IK::ConstType IKConstraint::GetType ( )
pure virtual

Returns the constraint type.

Implemented in IKScalarJointLimit, IKCom, IKDesire, and IKHandle.

int IKConstraint::iConst ( )
inline

Definition at line 337 of file ik.h.

int IKConstraint::ID ( )
inline

Definition at line 347 of file ik.h.

int IKConstraint::nConst ( )
inline

Definition at line 340 of file ik.h.

virtual int IKConstraint::Reset ( )
inlinevirtual

Reimplemented in IKCom, IKDesire, and IKHandle.

Definition at line 293 of file ik.h.

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

Reimplemented in IKScalarJointLimit, IKDesire, and IKHandle.

Definition at line 355 of file ik.h.

void IKConstraint::SetGain ( double  _gain)
inline

set the gain

Definition at line 320 of file ik.h.

void IKConstraint::SetPriority ( IK::Priority  _pri)
inline

set the priproty

Definition at line 329 of file ik.h.

Friends And Related Function Documentation

friend class IK
friend

Definition at line 255 of file ik.h.

Member Data Documentation

int IKConstraint::active
protected

Definition at line 400 of file ik.h.

int IKConstraint::enabled
protected

number of constraints

Definition at line 399 of file ik.h.

fVec IKConstraint::fb
protected

Jacobian matrix (n_const x total DOF)

Definition at line 403 of file ik.h.

double IKConstraint::gain
protected

priority

Definition at line 396 of file ik.h.

int IKConstraint::i_const
protected

feedback velocity (n_const)

Definition at line 404 of file ik.h.

int IKConstraint::id
protected

ID (unique to each constraint)

Definition at line 393 of file ik.h.

IK* IKConstraint::ik
protected

Definition at line 390 of file ik.h.

int IKConstraint::is_dropped
protected

index in the constraints with the same priority

Definition at line 406 of file ik.h.

fMat IKConstraint::J
protected

Definition at line 402 of file ik.h.

Joint* IKConstraint::joint
protected

target joint

Definition at line 391 of file ik.h.

char* IKConstraint::joint_name
protected

Definition at line 392 of file ik.h.

int IKConstraint::n_const
protected

weight

Definition at line 398 of file ik.h.

IK::Priority IKConstraint::priority
protected

Definition at line 395 of file ik.h.

fVec IKConstraint::weight
protected

feedback gain

Definition at line 397 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