Implementation of the Humanoid2006 papers by E.Yoshida. More...
#include <hpp/gik/task/whole-body-task.hh>
Public Member Functions | |
ChppGikWholeBodyTask (ChppGikStandingRobot *inStandingRobot, double inSamplingPeriod, unsigned int inMaxIterations=1, ChppGikGenericTask *inGenericTask=NULL) | |
Constructor. More... | |
CjrlHumanoidDynamicRobot & | robot () const |
Get associated robot. More... | |
void | addStateConstraint (CjrlGikStateConstraint *inStateConstraint, unsigned int inPriority) |
Add a prioritized state constraint. More... | |
void | addMotionConstraint (CjrlGikMotionConstraint *inMotionConstraint, unsigned int inPriority) |
Add a prioritized motion constraint. More... | |
bool | hadToStep () |
Tell if last solution computation needed making a step. More... | |
void | enableStepping (bool inEnabled) |
enable stepping if a solution could not be found with the current support polygon.Default value upon construction is True. More... | |
void | reset () |
Reset the planner by clearing entered constraints (state and motion) More... | |
bool | tasksDuration (double inDuration) |
Change tasks duration (should be greater than 0.0) More... | |
void | bringBackZMP (bool inChoice, double inStartTime, double inDuration) |
Option to bring back the ZMP before any other motion (Disabled by default). More... | |
~ChppGikWholeBodyTask () | |
Destructor. More... | |
![]() | |
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... | |
ChppRobotMotion & | solutionMotion () const |
Get the computed solution motion. More... | |
virtual | ~ChppGikRobotTask () |
destructor More... | |
Protected Member Functions | |
virtual bool | algorithmSolve () |
Compute a motion complying with the constraints contained in whole body motion task. More... | |
void | clear () |
Clear data related to previous resolution. More... | |
bool | executeResolutionPlan () |
Execute the task resolution plan. More... | |
bool | basicSolve () |
Try to compute a RobotMotion complying with the entered constraints without stepping. More... | |
void | defaultPlannerTaskMaker (double defaultStartTime, double defaultTaskDuration) |
Convert user-entered prioritized constraints to single motion planning tasks with the given start time and duration. More... | |
bool | onestepSolve () |
Try to compute a RobotMotion complying with the entered constraints by doing a step at the same time. More... | |
void | furthestTargetProjection (double centerX, double centerY, double &outX, double &outY, double &outDistance, bool &ats) |
Used by oneStep solve to find the projection of the furthest position or tranformation target from the vertical axis between the footprints. More... | |
void | createFootprintCandidates (const ChppGikFootprint *startFootprint, double targetX, double targetY, std::vector< ChppGikFootprint *> &inVectorFootprints) |
Used by onestepSolve(). More... | |
void | deleteFootprintCandidates (std::vector< ChppGikFootprint *> &inVectorFootprints) |
Used by onestepSolve(). More... | |
![]() | |
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... | |
Protected Attributes | |
bool | attEnableStep |
bool | attHadToStep |
ChppGikGenericTask * | attGenericTask |
std::vector< ChppGikPrioritizedStateConstraint * > | attUserStateTasks |
std::vector< ChppGikReadyElement * > | attUserMotionTasks |
unsigned int | attMaxIterations |
double | attTasksDuration |
![]() | |
ChppGikStandingRobot * | attStandingRobot |
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... | |
ChppRobotMotion * | attSolutionMotion |
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 |
Implementation of the Humanoid2006 papers by E.Yoshida.
This class implements a solver for a humanoid robot. Constructor takes as input
Computation of the motion is performed by method ChppGikWholeBodyTask::algorithmSolve in two steps:
ChppGikWholeBodyTask::ChppGikWholeBodyTask | ( | ChppGikStandingRobot * | inStandingRobot, |
double | inSamplingPeriod, | ||
unsigned int | inMaxIterations = 1 , |
||
ChppGikGenericTask * | inGenericTask = NULL |
||
) |
Constructor.
ChppGikWholeBodyTask::~ChppGikWholeBodyTask | ( | ) |
Destructor.
Referenced by bringBackZMP().
void ChppGikWholeBodyTask::addMotionConstraint | ( | CjrlGikMotionConstraint * | inMotionConstraint, |
unsigned int | inPriority | ||
) |
Add a prioritized motion constraint.
The motion constraint is inserted as-is to the whole body motion task. Simultaneous motion subtasks might be generated by the implemented algorithms.
void ChppGikWholeBodyTask::addStateConstraint | ( | CjrlGikStateConstraint * | inStateConstraint, |
unsigned int | inPriority | ||
) |
Add a prioritized state constraint.
The state constraint is transformed by the implemented algorithms into motion subtasks which are added to the whole body motion task.
|
protectedvirtual |
Compute a motion complying with the constraints contained in whole body motion task.
Implements ChppGikRobotTask.
Referenced by bringBackZMP().
|
protected |
Try to compute a RobotMotion complying with the entered constraints without stepping.
Referenced by bringBackZMP().
|
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 algorithmSolve(), attGenericTask, basicSolve(), ChppGikGenericTask::bringBackZMP(), clear(), createFootprintCandidates(), defaultPlannerTaskMaker(), deleteFootprintCandidates(), executeResolutionPlan(), furthestTargetProjection(), onestepSolve(), and ~ChppGikWholeBodyTask().
Referenced by ChppGikReachTask::bringBackZMP().
|
protected |
Clear data related to previous resolution.
Referenced by bringBackZMP().
|
protected |
Used by onestepSolve().
Compute footprint candidates for a stepping motion that can help realize the constraints entered by the user. attMaxIterations footprints are computed.
Referenced by bringBackZMP().
|
protected |
Convert user-entered prioritized constraints to single motion planning tasks with the given start time and duration.
Referenced by bringBackZMP().
|
protected |
Used by onestepSolve().
Delete footprints created by createFootprintCandidates()
Referenced by bringBackZMP().
void ChppGikWholeBodyTask::enableStepping | ( | bool | inEnabled | ) |
enable stepping if a solution could not be found with the current support polygon.Default value upon construction is True.
|
protected |
Execute the task resolution plan.
Referenced by bringBackZMP().
|
protected |
Used by oneStep solve to find the projection of the furthest position or tranformation target from the vertical axis between the footprints.
Referenced by bringBackZMP().
bool ChppGikWholeBodyTask::hadToStep | ( | ) |
Tell if last solution computation needed making a step.
|
protected |
Try to compute a RobotMotion complying with the entered constraints by doing a step at the same time.
Referenced by bringBackZMP().
void ChppGikWholeBodyTask::reset | ( | ) |
Reset the planner by clearing entered constraints (state and motion)
CjrlHumanoidDynamicRobot& ChppGikWholeBodyTask::robot | ( | ) | const |
Get associated robot.
|
inline |
Change tasks duration (should be greater than 0.0)
References attTasksDuration.
Referenced by ChppGikReachTask::tasksDuration().
|
protected |
|
protected |
Referenced by bringBackZMP().
|
protected |
|
protected |
|
protected |
Referenced by tasksDuration().
|
protected |
|
protected |