RootLink Class Reference

This reference page is linked to from the following overview topics: IIKChainControl.



Detailed Description

See also:
Class LinkChain, Class Link, Class Matrix3, Class Point3, Inverse Kinematics

Description:
This class is available in release 4.0 and later only.

A RootLink consists of a rotation plus a rigidExtend. It transforms like this:

To_Coordinate_Frame = rigidExtend * rotXYZ * From_Coordinate_Frame

where rotXYZ = Rot_x(rotXYZ[0]) * Rot_y(rotXYZ[1]) * Rot_z(rotXYZ[2]).

Note that not all the x, y, and z, are degrees of freedom. Only Active() ones are. We put the whole rotation here so that some solver may choose to use it as a full rotation and then clamp the result to the permissible range.
Data Members:
Point3 rotXYZ;

The xyz rotation.

Point3 initXYZ;

Corresponds to the PrefRotation() of the Start Joint.

Point3 llimits;

The lower limits.

Point3 ulimits;

The upper limits.

Matrix3 rigidExtend;

The rigid extents.

private:

unsigned flags;

The root link flags.

#include <ikhierarchy.h>

Inheritance diagram for RootLink:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  RootLink ()
bool  GetActive (unsigned i) const
bool  GetLLimited (unsigned i) const
bool  GetULimited (unsigned i) const
CoreExport Matrix3 RotateByAxis (Matrix3 &mat, unsigned i) const
CoreExport Matrix3  LinkMatrix (bool include_rot) const
CoreExport Matrix3 ApplyLinkMatrix (Matrix3 &mat, bool include_rot) const
CoreExport void  SetActive (unsigned i, bool s)
CoreExport void  SetLLimited (unsigned i, bool s)
CoreExport void  SetULimited (unsigned i, bool s)

Public Attributes

Point3  rotXYZ
Point3  initXYZ
Point3  llimits
Point3  ulimits
Matrix3  rigidExtend

Constructor & Destructor Documentation

RootLink ( ) [inline]
Remarks:
Constructor.
Default Implementation:
{ }
:flags(7){} // x,y,z, are all active. No joint limits.

Member Function Documentation

bool GetActive ( unsigned  i ) const [inline]
Remarks:
This method informs the Solver whether a particular component is active.
Parameters:
unsigned i

The component, 0 through 3 for x, y, and z, respectively.
Returns:
TRUE if the specified component is active, otherwise FALSE.
Default Implementation:
{ return flags&(1<<i)?true:false; }
{ return flags&(1<<i)?true:false;}
bool GetLLimited ( unsigned  i ) const [inline]
Remarks:
This method informs the Solver whether a particular component has its lower limits active.
Parameters:
unsigned i

The component, 0 through 3 for x, y, and z, respectively.
Returns:
TRUE if the specified component is active, otherwise FALSE.
Default Implementation:
{ return flags&(1<<(i+3))?true:false; }
{ return flags&(1<<(i+3))?true:false;}
bool GetULimited ( unsigned  i ) const [inline]
Remarks:
This method informs the Solver whether a particular component has its upper limits active.
Parameters:
unsigned i

The component, 0 through 3 for x, y, and z, respectively.
Returns:
TRUE if the specified component is active, otherwise FALSE.
Default Implementation:
{ return flags&(1<<(i+6))?true:false; }
{ return flags&(1<<(i+6))?true:false;}
CoreExport Matrix3& RotateByAxis ( Matrix3 mat,
unsigned  i 
) const
Remarks:
This method will pre-apply the rotation about the x, y, or z axis. Therefore, starting with the identity matrix mat,

ApplyLinkMatrix(

RotateByAxis(

RotateByAxis(

RotateByAxis(mat, 2),

1),

0),

false)

should equal to LinkMatrix(true).
Parameters:
unsigned i

The component, 0 through 3 for x, y, and z, respectively.
CoreExport Matrix3 LinkMatrix ( bool  include_rot ) const
Remarks:
This method returns the link matrix just defined if the argument is TRUE.
Parameters:
bool include_rot

TRUE to return the link matrix, FALSE to return RigidExtend.
Returns:
The link matrix, otherwise it simply returns RigidExtend.
CoreExport Matrix3& ApplyLinkMatrix ( Matrix3 mat,
bool  include_rot 
) const
Remarks:
This methods applies the LinkMatrix() to the input matrix, or mat = mat * LinkMatrix(include_rot)
Parameters:
Matrix3& mat

The input matrix.

bool include_rot

When applying the DOF part, or rotation part, to a matrix, this will take place one at a time by calling RootLink::RotateByAxis(). If you want to apply the whole link, while already having applied the rotation part, you would need to set this flag to FALSE.
Returns:
The reference to the input matrix, mat.
CoreExport void SetActive ( unsigned  i,
bool  s 
)
Remarks:
This method allows you to activate or deactivate a particular component.
Parameters:
unsigned i

The component, 0 through 3 for x, y, and z, respectively.

bool s

TRUE to activate, FALSE to deactivate.
CoreExport void SetLLimited ( unsigned  i,
bool  s 
)
Remarks:
This method allows you to activate or deactivate a particular component's lower limits.
Parameters:
unsigned i

The component, 0 through 3 for x, y, and z, respectively.

bool s

TRUE to activate, FALSE to deactivate.
CoreExport void SetULimited ( unsigned  i,
bool  s 
)
Remarks:
This method allows you to activate or deactivate a particular component's upper limits.
Parameters:
unsigned i

The component, 0 through 3 for x, y, and z, respectively.

bool s

TRUE to activate, FALSE to deactivate.

Member Data Documentation


RootLink RootLink RootLink RootLink RootLink RootLink RootLink RootLink RootLink RootLink
RootLink RootLink RootLink RootLink RootLink RootLink RootLink RootLink RootLink RootLink