ChppGikReachTask Class Reference

Use this task to make the robot reach for a target. More...

#include <hpp/gik/task/reach-task.hh>

Inheritance diagram for ChppGikReachTask:
Collaboration diagram for ChppGikReachTask:

Public Member Functions

 ChppGikReachTask (ChppGikStandingRobot *inStandingRobot, double inSamplingPeriod)
 constructor More...
 
void target (const vector3d &inReachTarget, bool isForRightHand)
 set reach target (a point in world frame) and effector (a boolean indicating the hand: 'true' for 'right hand') More...
 
void gazeTarget (const vector3d &inGazeTarget)
 enable the gaze constraint and set the gaze target (a point in world frame) More...
 
void disableGaze ()
 disable the gaze constraint More...
 
void handOrientation (const vector3d &inTargetOrientation)
 enable the hand okayAxis constraint and set the target orientation (a vector in world frame) . More...
 
void disableOrientation ()
 disable the hand okayAxis orientation constraint More...
 
void steppingEnabled (bool inOption)
 enable or disable stepping More...
 
void bringBackZMP (bool inChoice, double inStartTime, double inDuration)
 Option to bring back the ZMP before any other motion (Disabled by default). More...
 
void tasksDuration (double inDuration)
 Modify reaching motion duration. More...
 
 ~ChppGikReachTask ()
 Destructor. More...
 
- Public Member Functions inherited from ChppGikRobotTask
 ChppGikRobotTask (ChppGikStandingRobot *inStandingRobot, double inSamplingPeriod, const char *inTaskName)
 Constructor. More...
 
bool solve ()
 Solve for joint motion. More...
 
void showResolutionTime (bool inSwitch)
 show the resolution time More...
 
ChppRobotMotionsolutionMotion () const
 Get the computed solution motion. More...
 
virtual ~ChppGikRobotTask ()
 destructor More...
 

Protected Member Functions

virtual bool algorithmSolve ()
 The algorithm implemented by solve() More...
 
- Protected Member Functions inherited from ChppGikRobotTask
void cleanUp ()
 Delete objects created in this instance. More...
 
void backupRobot ()
 Backup current robot configuration (q, dot q, ddot q) More...
 
void restoreRobot ()
 Restore saved robot configuration (q, dot q, ddot q) and compute forward kinematics. More...
 
void cropMotion (ChppGikRobotTask *inRobotTask)
 concatanate a task solution motion to the current attSolutionMotion and apply the last solution configuration to the robot. More...
 

Additional Inherited Members

- Protected Attributes inherited from ChppGikRobotTask
ChppGikStandingRobotattStandingRobot
 Associated robot. More...
 
double attSamplingPeriod
 Motion sampling period and its half. More...
 
double attEps
 
double attStartTime
 Start time. More...
 
bool attShowTime
 option to show resolution time More...
 
ChppRobotMotionattSolutionMotion
 The solution joint motion. More...
 
std::string attTaskName
 This task's name. More...
 
CjrlRobotConfiguration attInitialConfiguration
 Backup of robot configuration before task solving {. More...
 
struct timeval * Tps
 timimg {@ More...
 
struct timeval * Tpf
 
struct timezone * Tzp
 

Detailed Description

Use this task to make the robot reach for a target.

The following options are available:

  • enable stepping if needed to achieve the reach (default: enabled)
  • apply a gaze constraint (default: disabled)
  • apply a parallelConstraint on the okayAxis (thumb up) of the hand (default: disabled)
  • go back to half sitting configuration after reaching (default: disabaled)

the reach target has to be set through method target() or the solve() algorithm will return false.

The options are not reset by method solve()

Constructor & Destructor Documentation

◆ ChppGikReachTask()

ChppGikReachTask::ChppGikReachTask ( ChppGikStandingRobot inStandingRobot,
double  inSamplingPeriod 
)

constructor

◆ ~ChppGikReachTask()

ChppGikReachTask::~ChppGikReachTask ( )

Destructor.

Referenced by tasksDuration().

Member Function Documentation

◆ algorithmSolve()

virtual bool ChppGikReachTask::algorithmSolve ( )
protectedvirtual

The algorithm implemented by solve()

Implements ChppGikRobotTask.

Referenced by tasksDuration().

◆ bringBackZMP()

void ChppGikReachTask::bringBackZMP ( bool  inChoice,
double  inStartTime,
double  inDuration 
)
inlinevirtual

Option to bring back the ZMP before any other motion (Disabled by default).

A motion is planned to bring back the ZMP to the closest point on the line segment defining the center of the safe zone. The start time and the duration of this ZMP motion is left up to the user. The start time is defined relatively to the start of the locomotion plan. Example: bringBackZmp(-0.5, 2.0 ) will make the zmp planning start 0.5 seconds before the first locomotion element (if none, absolute time 0.0s), and take 2.0 seconds to finish. USE AT YOUR OWN RISK

Implements ChppGikRobotTask.

References ChppGikWholeBodyTask::bringBackZMP().

◆ disableGaze()

void ChppGikReachTask::disableGaze ( )

disable the gaze constraint

◆ disableOrientation()

void ChppGikReachTask::disableOrientation ( )

disable the hand okayAxis orientation constraint

◆ gazeTarget()

void ChppGikReachTask::gazeTarget ( const vector3d inGazeTarget)

enable the gaze constraint and set the gaze target (a point in world frame)

◆ handOrientation()

void ChppGikReachTask::handOrientation ( const vector3d inTargetOrientation)

enable the hand okayAxis constraint and set the target orientation (a vector in world frame) .

◆ steppingEnabled()

void ChppGikReachTask::steppingEnabled ( bool  inOption)

enable or disable stepping

◆ target()

void ChppGikReachTask::target ( const vector3d inReachTarget,
bool  isForRightHand 
)

set reach target (a point in world frame) and effector (a boolean indicating the hand: 'true' for 'right hand')

◆ tasksDuration()

void ChppGikReachTask::tasksDuration ( double  inDuration)
inline

Modify reaching motion duration.

References algorithmSolve(), ChppGikWholeBodyTask::tasksDuration(), and ~ChppGikReachTask().