Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
IKConstraint Class Reference

Base class for constraints. More...

#include <ik.h>

Inheritance diagram for IKConstraint:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void Activate ()
 activate the constraint
int Active ()
 whether the constraint is activate
void Diactivate ()
 diactivate the constraint
void Disable ()
 disable the constraint
int Dropped ()
void Enable ()
 enable the constraint
double GetGain ()
 get the gain
JointGetJoint ()
IK::Priority GetPriority ()
 get the priproty
virtual IK::ConstType GetType ()=0
 Returns the constraint type.
int iConst ()
int ID ()
 IKConstraint (IK *_ik, const char *_jname, Joint *_jnt, IK::Priority _pri, double _gain)
 Default constructor.
int nConst ()
virtual int Reset ()
virtual void SetCharacterScale (double _scale, const char *charname=0)
void SetGain (double _gain)
 set the gain
void SetPriority (IK::Priority _pri)
 set the priproty
virtual ~IKConstraint ()
 Destructor.

Protected Member Functions

virtual int calc_feedback ()=0
 compute the feedback velocity
virtual int calc_jacobian ()
 Computes the constraint Jacobian.
int calc_jacobian (Joint *cur)
 the function recursively called for all joints (don't override)
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

Protected Attributes

int active
int enabled
 number of constraints
fVec fb
 Jacobian matrix (n_const x total DOF)
double gain
 priority
int i_const
 feedback velocity (n_const)
int id
 ID (unique to each constraint)
IKik
int is_dropped
 index in the constraints with the same priority
fMat J
Jointjoint
 target joint
char * joint_name
int n_const
 weight
IK::Priority priority
fVec weight
 feedback gain

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 ( ) [inline, virtual]

Destructor.

Definition at line 286 of file ik.h.


Member Function Documentation

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 ( ) [protected, pure virtual]

compute the feedback velocity

Implemented in IKScalarJointLimit, IKCom, IKDesire, and IKHandle.

int IKConstraint::calc_jacobian ( ) [protected, virtual]

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) [inline, protected, virtual]

Reimplemented in IKDesire.

Definition at line 378 of file ik.h.

virtual int IKConstraint::calc_jacobian_rotate ( Joint cur) [inline, protected, virtual]

Reimplemented in IKScalarJointLimit, and IKDesire.

Definition at line 369 of file ik.h.

virtual int IKConstraint::calc_jacobian_slide ( Joint cur) [inline, protected, virtual]

Reimplemented in IKScalarJointLimit, and IKDesire.

Definition at line 372 of file ik.h.

virtual int IKConstraint::calc_jacobian_sphere ( Joint cur) [inline, protected, virtual]

Reimplemented in IKDesire.

Definition at line 375 of file ik.h.

copy each constraint Jacobian to the whole Jacobian matrix

Definition at line 446 of file update_ik.cpp.

Definition at line 434 of file update_ik.cpp.

diactivate the constraint

Definition at line 311 of file ik.h.

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.

Definition at line 344 of file ik.h.

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 ( ) [inline, virtual]

Reimplemented in IKCom, IKDesire, and IKHandle.

Definition at line 293 of file ik.h.

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

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.

set the priproty

Definition at line 329 of file ik.h.


Friends And Related Function Documentation

friend class IK [friend]

Reimplemented in IKScalarJointLimit, IKDesire, and IKHandle.

Definition at line 255 of file ik.h.


Member Data Documentation

Definition at line 400 of file ik.h.

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.

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.

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.

weight

Definition at line 398 of file ik.h.

Definition at line 395 of file ik.h.

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 Thu Apr 11 2019 03:30:21