ChppGikPointingConstraint Class Reference

Constraint on a line segment attached to a body to be aligned with a given point in the world frame. More...

#include <hpp/gik/constraint/pointing-constraint.hh>

Inheritance diagram for ChppGikPointingConstraint:
Collaboration diagram for ChppGikPointingConstraint:

Public Member Functions

 ChppGikPointingConstraint (CjrlDynamicRobot &inRobot, CjrlJoint &inJoint, const vector3d &inLocalOrigin, const vector3d &inLocalVector, const vector3d &inTargetWorldPoint)
 Constructor. More...
 
virtual CjrlGikStateConstraintclone () const
 Copy. More...
 
virtual void localOrigin (const vector3d &inPoint)
 Set the origin of the pointing vector in joint's local frame (illelgal operation for gaze constraint). More...
 
const vector3dlocalOrigin ()
 Get the origin of the pointing vector. More...
 
virtual void localVector (const vector3d &inPoint)
 Set the pointing vector in joint's local frame (illelgal operation for gaze constraint). More...
 
const vector3dlocalVector ()
 Set the pointing vector in joint's local frame. More...
 
void worldTarget (const vector3d &inPoint)
 Set the target point associated to the constraint (in world's frame). More...
 
const vector3dworldTarget ()
 Get the target point associated to the constraint (in world's frame). More...
 
virtual void computeVectorizedState ()
 Get the full state (this constraint and its first two derivatives) of the constraint expressed as a vectorN. More...
 
virtual void computeVectorizedTarget ()
 Compute the target of the constraint as a vectorN. More...
 
virtual bool vectorizedTarget (const vectorN &inTarget)
 A unified method to change the target of the constraint with a vectorN. More...
 
void computeValue ()
 Compute the value of the constraint. More...
 
void computeJacobian ()
 Get the constraint Jacobian wrt internal configuration variables. More...
 
virtual ~ChppGikPointingConstraint ()
 Destructor. More...
 
- Public Member Functions inherited from CjrlLinearConstraint
virtual ~CjrlLinearConstraint ()
 
- Public Member Functions inherited from ChppGikJointStateConstraint
 ChppGikJointStateConstraint (CjrlDynamicRobot &inRobot, CjrlJoint &inJoint, unsigned int inDimension)
 Constructor. More...
 
virtual unsigned int dimension () const
 Get the dimension of the constraint. More...
 
virtual CjrlDynamicRobot & robot ()
 Get robot associated to the constraint. More...
 
virtual void joint (CjrlJoint *inJoint)
 Set the joint associated to the constraint. More...
 
virtual CjrlJoint * joint ()
 Get the joint associated to the constraint. More...
 
virtual void computeInfluencingDofs ()
 Compute a binary vector whose size matches the robot cnfiguration's, where an element with value 1 indicates that the corresponding degree of freedom can modify the value of this constraint, and an element with value 0 cannot. More...
 
virtual const vectorNvalue ()
 Get the constraint value. More...
 
virtual const matrixNxPjacobian ()
 Get the constraint jacobian. More...
 
virtual vectorNinfluencingDofs ()
 Get the influencing dofs. More...
 
virtual void jacobianRoot (CjrlJoint &inJoint)
 inherited. More...
 
- Public Member Functions inherited from ChppGikVectorizableConstraint
virtual const vectorNvectorizedState () const
 Get the full state (this constraint and its first two derivatives) of the constraint expressed as a vectorN. More...
 
virtual const vectorNvectorizedTarget () const
 Get the target of the constraint expressed as a vectorN. More...
 
virtual ~ChppGikVectorizableConstraint ()
 Destructor. More...
 

Protected Attributes

vector3d attLocalOriginVector3
 
vector3d attLocalVectorVector3
 
vector3d attWorldTargetVector3
 
vectorN attLocalOrigin
 
vectorN attLocalVector
 
vectorN attWorldTarget
 
Computation temporary variables (to avoid dynamic allocation)

{@

matrixNxP tempRot
 
matrixNxP matOP
 
matrixNxP matOT
 
matrixNxP matFO
 
matrixNxP rotF
 
matrixNxP jointrot
 
vectorN jointpos
 
vectorN posO
 
vectorN posF
 
vectorN posP
 
vectorN vecFO
 
vectorN vecOP
 
vectorN vecOT
 
matrixNxP tempJacobian
 
- Protected Attributes inherited from ChppGikJointStateConstraint
vectorN attValue
 
matrixNxP attJacobian
 
vectorN attInfluencingDofs
 
CjrlJoint * attRootJoint
 
- Protected Attributes inherited from ChppGikVectorizableConstraint
vectorN attVectorizedTarget
 The vectorial expression of the constraint's target at the moment of computation. More...
 
vectorN attVectorizedState
 The vectorial expression of the constraint's full sdtate at the moment of computation. More...
 

Detailed Description

Constraint on a line segment attached to a body to be aligned with a given point in the world frame.

The line segment is defined by an origin point and a vector both given in the body's local frame.

Constructor & Destructor Documentation

◆ ChppGikPointingConstraint()

ChppGikPointingConstraint::ChppGikPointingConstraint ( CjrlDynamicRobot &  inRobot,
CjrlJoint &  inJoint,
const vector3d inLocalOrigin,
const vector3d inLocalVector,
const vector3d inTargetWorldPoint 
)

Constructor.

◆ ~ChppGikPointingConstraint()

virtual ChppGikPointingConstraint::~ChppGikPointingConstraint ( )
virtual

Destructor.

Member Function Documentation

◆ clone()

virtual CjrlGikStateConstraint* ChppGikPointingConstraint::clone ( ) const
virtual

Copy.

Implements CjrlGikStateConstraint.

◆ computeJacobian()

void ChppGikPointingConstraint::computeJacobian ( )
virtual

Get the constraint Jacobian wrt internal configuration variables.

This method supposes that: the robot has at least one fixed joint. the jacobian for this fixed joint has been computed for the current configuration

Only the first fixed joint of the robot affects the computation of the jacobian. (closed kinematic chains are not handeled)

Implements CjrlGikStateConstraint.

◆ computeValue()

void ChppGikPointingConstraint::computeValue ( )
virtual

Compute the value of the constraint.

Implements CjrlGikStateConstraint.

◆ computeVectorizedState()

virtual void ChppGikPointingConstraint::computeVectorizedState ( )
virtual

Get the full state (this constraint and its first two derivatives) of the constraint expressed as a vectorN.

Implements ChppGikVectorizableConstraint.

◆ computeVectorizedTarget()

virtual void ChppGikPointingConstraint::computeVectorizedTarget ( )
virtual

Compute the target of the constraint as a vectorN.

Implements ChppGikVectorizableConstraint.

◆ localOrigin() [1/2]

virtual void ChppGikPointingConstraint::localOrigin ( const vector3d inPoint)
virtual

Set the origin of the pointing vector in joint's local frame (illelgal operation for gaze constraint).

Implements CjrlGikPointingConstraint.

Reimplemented in ChppGikGazeConstraint.

◆ localOrigin() [2/2]

const vector3d& ChppGikPointingConstraint::localOrigin ( )
virtual

Get the origin of the pointing vector.

Implements CjrlGikPointingConstraint.

◆ localVector() [1/2]

virtual void ChppGikPointingConstraint::localVector ( const vector3d inPoint)
virtual

Set the pointing vector in joint's local frame (illelgal operation for gaze constraint).

Implements CjrlGikPointingConstraint.

Reimplemented in ChppGikGazeConstraint.

◆ localVector() [2/2]

const vector3d& ChppGikPointingConstraint::localVector ( )
virtual

Set the pointing vector in joint's local frame.

Implements CjrlGikPointingConstraint.

◆ vectorizedTarget()

virtual bool ChppGikPointingConstraint::vectorizedTarget ( const vectorN inTarget)
virtual

A unified method to change the target of the constraint with a vectorN.

Returns
false if the argument's size does not match the one expected for this constraint type

Implements ChppGikVectorizableConstraint.

◆ worldTarget() [1/2]

void ChppGikPointingConstraint::worldTarget ( const vector3d inPoint)
virtual

Set the target point associated to the constraint (in world's frame).

Implements CjrlGikPointingConstraint.

◆ worldTarget() [2/2]

const vector3d& ChppGikPointingConstraint::worldTarget ( )
virtual

Get the target point associated to the constraint (in world's frame).

Implements CjrlGikPointingConstraint.

Member Data Documentation

◆ attLocalOrigin

vectorN ChppGikPointingConstraint::attLocalOrigin
protected

◆ attLocalOriginVector3

vector3d ChppGikPointingConstraint::attLocalOriginVector3
protected

◆ attLocalVector

vectorN ChppGikPointingConstraint::attLocalVector
protected

◆ attLocalVectorVector3

vector3d ChppGikPointingConstraint::attLocalVectorVector3
protected

◆ attWorldTarget

vectorN ChppGikPointingConstraint::attWorldTarget
protected

◆ attWorldTargetVector3

vector3d ChppGikPointingConstraint::attWorldTargetVector3
protected

◆ jointpos

vectorN ChppGikPointingConstraint::jointpos
protected

◆ jointrot

matrixNxP ChppGikPointingConstraint::jointrot
protected

◆ matFO

matrixNxP ChppGikPointingConstraint::matFO
protected

◆ matOP

matrixNxP ChppGikPointingConstraint::matOP
protected

◆ matOT

matrixNxP ChppGikPointingConstraint::matOT
protected

◆ posF

vectorN ChppGikPointingConstraint::posF
protected

◆ posO

vectorN ChppGikPointingConstraint::posO
protected

◆ posP

vectorN ChppGikPointingConstraint::posP
protected

◆ rotF

matrixNxP ChppGikPointingConstraint::rotF
protected

◆ tempJacobian

matrixNxP ChppGikPointingConstraint::tempJacobian
protected

◆ tempRot

matrixNxP ChppGikPointingConstraint::tempRot
protected

◆ vecFO

vectorN ChppGikPointingConstraint::vecFO
protected

◆ vecOP

vectorN ChppGikPointingConstraint::vecOP
protected

◆ vecOT

vectorN ChppGikPointingConstraint::vecOT
protected