![]() |
Parasol Planning Library (PPL)
|
#include <MPTask.h>
Public Types | |
Local Types | |
| typedef std::vector< std::unique_ptr< Constraint > > | ConstraintSet |
| A set of constraints. More... | |
Public Member Functions | |
Construction | |
| MPTask (Robot *const _robot) | |
| MPTask (MPProblem *const _problem, XMLNode &_node, Environment *_env=nullptr) | |
| MPTask (const MPTask &_other) | |
| Copy. More... | |
| MPTask (MPTask &&_other) | |
| Move. More... | |
| ~MPTask () | |
Assignment | |
| MPTask & | operator= (const MPTask &_other) |
| Copy. More... | |
| MPTask & | operator= (MPTask &&_other) |
| Move. More... | |
Property Accessors | |
| Robot * | GetRobot () const noexcept |
| Get the robot associated with this task. More... | |
| void | SetRobot (Robot *const _r) |
| const std::string & | GetLabel () const noexcept |
| Get the semantic label for this task. More... | |
| void | SetLabel (const std::string &_label) noexcept |
| nonstd::status & | GetStatus () noexcept |
| Get the status object for this task. More... | |
| const nonstd::status & | GetStatus () const noexcept |
| bool | Empty () const noexcept |
| size_t | GetNumGoals () const noexcept |
| Get the number of goals in this task. More... | |
Constraint Accessors | |
The task will take ownership of any added constraints and delete them when necessary. | |
| void | SetStartConstraint (std::unique_ptr< Constraint > &&_c) |
| void | AddPathConstraint (std::unique_ptr< Constraint > &&_c) |
| void | AddGoalConstraint (std::unique_ptr< Constraint > &&_c) |
| const Constraint * | GetStartConstraint () const noexcept |
| Get start constraint. More... | |
| const ConstraintSet & | GetPathConstraints () const noexcept |
| Get all path constraints. More... | |
| const ConstraintSet & | GetGoalConstraints () const noexcept |
| Get all goal constraints. More... | |
| void | ClearGoalConstraints () |
| Remove all goal constraints. More... | |
| void | SetCapability (const std::string &_capability) |
| const std::string & | GetCapability () const noexcept |
Time Accessors | |
Store and fetch estimated times for beginning and completing this task. | |
| void | SetEstimatedStartTime (const double _time) noexcept |
| void | SetEstimatedCompletionTime (const double _time) noexcept |
| double | GetEstimatedStartTime () const noexcept |
| Get the estimated start time for the task. More... | |
| double | GetEstimatedCompletionTime () const noexcept |
| Get the estimated completion time for the task. More... | |
| void | SetReleaseWindow (const std::pair< double, double > _release) noexcept |
| Set release window. More... | |
| void | SetDeadlineWindow (const std::pair< double, double > _deadline) noexcept |
| Set deadline window. More... | |
| std::pair< double, double > | GetReleaseWindow () const noexcept |
| Get the release window. More... | |
| std::pair< double, double > | GetDeadlineWindow () const noexcept |
| Get the deadline window. More... | |
Constraint Evaluation | |
| bool | EvaluateCapability (const Robot *const _r) const |
| bool | EvaluateStartConstraints (const Cfg &_cfg) const |
| bool | EvaluatePathConstraints (const Cfg &_cfg) const |
| bool | EvaluateGoalConstraints (const Cfg &_cfg) const |
| bool | EvaluateGoalConstraints (const Cfg &_cfg, const size_t _index) const |
Describes a motion task for a single robot in terms of start/goal conditions and constraints on allowable trajectories.
Tasks are defined by a robot and three sets of constraints:
| typedef std::vector<std::unique_ptr<Constraint> > MPTask::ConstraintSet |
A set of constraints.
|
explicit |
Create an empty task for a given robot.
| _robot | The robot assigned to this task. |
|
explicit |
Parse the set of task constraints described in an XML node.
| _problem | The MPProblem for this task. |
| _node | The XML node to parse. |
| MPTask::MPTask | ( | const MPTask & | _other | ) |
Copy.
|
default |
Move.
|
default |
| void MPTask::AddGoalConstraint | ( | std::unique_ptr< Constraint > && | _c | ) |
Add goal constraint to task
| _c | Goal constraint to add to task |
| void MPTask::AddPathConstraint | ( | std::unique_ptr< Constraint > && | _c | ) |
Add path constraint to task
| _c | Path constraint to add to task |
| void MPTask::ClearGoalConstraints | ( | ) |
Remove all goal constraints.
|
noexcept |
A task is considered to be 'empty' if it has neither start nor goal constraints.
| bool MPTask::EvaluateCapability | ( | const Robot *const | _r | ) | const |
Evaluate whether a robot has the needed capability.
| _r | The robot to check. |
| bool MPTask::EvaluateGoalConstraints | ( | const Cfg & | _cfg | ) | const |
Check if a configuration satisfies the last goal constraints.
| _cfg | The configuration to check. |
| bool MPTask::EvaluateGoalConstraints | ( | const Cfg & | _cfg, |
| const size_t | _index | ||
| ) | const |
Check if a configuration satisfies the constraints for a specific goal.
| _cfg | The configuration to check. |
| _index | The goal index to check. |
| bool MPTask::EvaluatePathConstraints | ( | const Cfg & | _cfg | ) | const |
Check if a configuration satisfies the start constraints.
| _cfg | The configuration to check. |
| bool MPTask::EvaluateStartConstraints | ( | const Cfg & | _cfg | ) | const |
Check if a configuration satisfies the start constraints.
| _cfg | The configuration to check. |
|
noexcept |
Get the robot capability which is required to satisfy this task, if any.
|
noexcept |
Get the deadline window.
|
noexcept |
Get the estimated completion time for the task.
|
noexcept |
Get the estimated start time for the task.
|
noexcept |
Get all goal constraints.
|
noexcept |
Get the semantic label for this task.
|
noexcept |
Get the number of goals in this task.
|
noexcept |
Get all path constraints.
|
noexcept |
Get the release window.
|
noexcept |
Get the robot associated with this task.
|
noexcept |
Get start constraint.
|
noexcept |
|
noexcept |
Get the status object for this task.
| void MPTask::SetCapability | ( | const std::string & | _capability | ) |
Sets the capability required for this task.
| _capability | The capability required to complete this task. |
|
noexcept |
Set deadline window.
|
noexcept |
Set the estimated completion time for the task
| _time | The estimated completion time |
|
noexcept |
Set the estimated start time for the task
| _time | The estimated start time |
|
noexcept |
Set the semantic label for this task.
| _label | Label to set |
|
noexcept |
Set release window.
| void MPTask::SetRobot | ( | Robot *const | _r | ) |
Re-assign this task to another robot.
| _r | The destination robot which will receive this assignment. |
| void MPTask::SetStartConstraint | ( | std::unique_ptr< Constraint > && | _c | ) |
Set start constraint for task
| _c | Constraint to set as start constraint |