Parasol Planning Library (PPL)
GroupTask Class Reference

#include <GroupTask.h>

Public Types

Local Types
typedef std::vector< MPTaskTaskSet
 A set of individual tasks. More...
 
typedef GenericStateGraph< Cfg, DefaultWeight< Cfg > > IndividualRoadmap
 
typedef GroupCfg< IndividualRoadmapGroupCfgType
 
typedef TaskSet::iterator iterator
 
typedef TaskSet::const_iterator const_iterator
 

Public Member Functions

Property Accessors
RobotGroupGetRobotGroup () const noexcept
 Get the robot associated with this task. More...
 
void SetRobotGroup (RobotGroup *const _r)
 
const std::string & GetLabel () const noexcept
 Get the semantic label for this task. More...
 
void SetLabel (const std::string &_label) noexcept
 Set the semantic label for this task. More...
 
size_t Size () const noexcept
 Get the number of individual tasks within this group task. More...
 
bool Empty () const noexcept
 
nonstd::status & GetStatus () noexcept
 Get the status object for this task. More...
 
const nonstd::status & GetStatus () const noexcept
 
Individual Tasks

Access, modify, and iterate over the individual tasks.

size_t GetNumGoals () const noexcept
 Get the number of goals in the longest (most goals) task. More...
 
void AddTask (const MPTask &_t)
 
iterator RemoveTask (iterator _iter)
 
iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator begin () const noexcept
 Get iterator to beginning of tasks. More...
 
const_iterator end () const noexcept
 Get iterator to end of tasks. More...
 
Constraint Accessors
void GetStartConstraintCenter (GroupCfgType &_center) const noexcept
 
Constraint Evaluation
bool EvaluateStartConstraints (const GroupCfgType &_cfg) const
 
bool EvaluatePathConstraints (const GroupCfgType &_cfg) const
 
bool EvaluateGoalConstraints (const GroupCfgType &_cfg) const
 
bool EvaluateGoalConstraints (const GroupCfgType &_cfg, const size_t _index) const
 

Disassembly Items

To be moved to a specialized derived class.

RobotGroupGetEndEffectorGroup () const noexcept
 Get the optional manipulator robot group associated with this task. More...
 
RobotGroupGetManipulatorGroup () const noexcept
 Get the optional manipulator robot group associated with this task. More...
 
RobotGetEndEffectorRobot ()
 Get the robot pointer for the (optional) end effector for the group task. More...
 
RobotGetManipulatorRobot ()
 Get the robot pointer for the (optional) manipulator for this group task. More...
 

Construction

 GroupTask (RobotGroup *const _robotGroup)
 
 GroupTask (MPProblem *const _problem, XMLNode &_node)
 
virtual ~GroupTask ()
 
static std::unique_ptr< GroupTaskFactory (MPProblem *const _problem, XMLNode &_node)
 

Detailed Description

Describes a motion task for a group of robots as a set of individual tasks.

The individual tasks may be assigned to specific robots in the group, or they may be completable by any robot in the group.

Note
The goals are 'right-aligned' in that we assume that all robots must reach their last goal together.
Assigning a group task to another group will clear any assignments of robots to individual tasks because there is no universal way to map the new robots to the same set of tasks. The new group may be smaller/larger, have different labels/capabilities, etc.
Todo:
Move disassembly-specific items to a derived class specifically for disassembly tasks.

Member Typedef Documentation

◆ const_iterator

typedef TaskSet::const_iterator GroupTask::const_iterator

◆ GroupCfgType

◆ IndividualRoadmap

◆ iterator

typedef TaskSet::iterator GroupTask::iterator

◆ TaskSet

typedef std::vector<MPTask> GroupTask::TaskSet

A set of individual tasks.

Constructor & Destructor Documentation

◆ GroupTask() [1/2]

GroupTask::GroupTask ( RobotGroup *const  _robotGroup)
explicit

Create an empty task for a given robot.

Parameters
_robotGroupThe robot group assigned to this task.

◆ GroupTask() [2/2]

GroupTask::GroupTask ( MPProblem *const  _problem,
XMLNode _node 
)
explicit

Parse the set of task constraints described in an XML node and verify that tasks are assigned to robots in group.

Parameters
_problemThe MPProblem for this task.
_nodeThe XML node to parse.

◆ ~GroupTask()

GroupTask::~GroupTask ( )
virtualdefault

Member Function Documentation

◆ AddTask()

void GroupTask::AddTask ( const MPTask _t)

Add an individual task.

Parameters
_tThe individual task to add.

◆ begin() [1/2]

GroupTask::const_iterator GroupTask::begin ( ) const
noexcept

Get iterator to beginning of tasks.

◆ begin() [2/2]

GroupTask::iterator GroupTask::begin ( )
noexcept

◆ Empty()

bool GroupTask::Empty ( ) const
noexcept

Check if there are no individual tasks.

Returns
False if no tasks or all tasks empty

◆ end() [1/2]

GroupTask::const_iterator GroupTask::end ( ) const
noexcept

Get iterator to end of tasks.

◆ end() [2/2]

GroupTask::iterator GroupTask::end ( )
noexcept

◆ EvaluateGoalConstraints() [1/2]

bool GroupTask::EvaluateGoalConstraints ( const GroupCfgType _cfg) const

Evaluate whether a configuration satisfies the final goal constraints.

Parameters
_cfgThe configuration to check.
Returns
True if each robot satsifies its last individual goal constraints at _cfg.

◆ EvaluateGoalConstraints() [2/2]

bool GroupTask::EvaluateGoalConstraints ( const GroupCfgType _cfg,
const size_t  _index 
) const

Evaluate whether a configuration satisfies the constraints for a designated goal.

Parameters
_cfgThe configuration to check.
_indexThe goal index to check.
Returns
True if each robot satsifies its individual goal constraints at _cfg for goal _index.

◆ EvaluatePathConstraints()

bool GroupTask::EvaluatePathConstraints ( const GroupCfgType _cfg) const

Evaluate whether a configuration satisfies the path constraints.

Parameters
_cfgThe configuration to check.
Returns
True if each robot satsifies its individual path constraints at _cfg.

◆ EvaluateStartConstraints()

bool GroupTask::EvaluateStartConstraints ( const GroupCfgType _cfg) const

Evaluate whether a configuration satisfies the start constraints.

Parameters
_cfgThe configuration to check.
Returns
True if each robot satsifies its individual start constraints at _cfg.

◆ Factory()

std::unique_ptr< GroupTask > GroupTask::Factory ( MPProblem *const  _problem,
XMLNode _node 
)
static

Generate a group task of the appropriate type.

Parameters
_problemThe MPProblem for this task.
_nodeThe XML node to parse.

◆ GetEndEffectorGroup()

RobotGroup * GroupTask::GetEndEffectorGroup ( ) const
noexcept

Get the optional manipulator robot group associated with this task.

◆ GetEndEffectorRobot()

Robot * GroupTask::GetEndEffectorRobot ( )

Get the robot pointer for the (optional) end effector for the group task.

Todo:
This uses magic strings in the XML files, let's find a better way.

◆ GetLabel()

const std::string & GroupTask::GetLabel ( ) const
noexcept

Get the semantic label for this task.

◆ GetManipulatorGroup()

RobotGroup * GroupTask::GetManipulatorGroup ( ) const
noexcept

Get the optional manipulator robot group associated with this task.

◆ GetManipulatorRobot()

Robot * GroupTask::GetManipulatorRobot ( )

Get the robot pointer for the (optional) manipulator for this group task.

Todo:
This uses magic strings in the XML files, let's find a better way.

◆ GetNumGoals()

size_t GroupTask::GetNumGoals ( ) const
noexcept

Get the number of goals in the longest (most goals) task.

◆ GetRobotGroup()

RobotGroup * GroupTask::GetRobotGroup ( ) const
noexcept

Get the robot associated with this task.

◆ GetStartConstraintCenter()

void GroupTask::GetStartConstraintCenter ( GroupCfgType _center) const
noexcept

Uses the robot group in _center to populate all of the individual cfgs in that group cfg.

Todo:
This is a hack that was needed to move the disassembly work forward before we had flushed out the tasks/groups. To be removed at the earliest opportunity.
Parameters
_centerRobot group to populate from

◆ GetStatus() [1/2]

const nonstd::status & GroupTask::GetStatus ( ) const
noexcept

◆ GetStatus() [2/2]

nonstd::status & GroupTask::GetStatus ( )
noexcept

Get the status object for this task.

◆ RemoveTask()

GroupTask::iterator GroupTask::RemoveTask ( iterator  _iter)

Remove an individual task.

Parameters
_iterAn iterator to the task to remove.
Returns
An iterator to the following element.

◆ SetLabel()

void GroupTask::SetLabel ( const std::string &  _label)
noexcept

Set the semantic label for this task.

◆ SetRobotGroup()

void GroupTask::SetRobotGroup ( RobotGroup *const  _r)

Assign this task to another robot group. If the new group is different, all individual tasks will have their robot pointers cleared (since there is no universal means of mapping the individual tasks to the new robots).

Parameters
_rThe destination robot which will receive this assignment.

◆ Size()

size_t GroupTask::Size ( ) const
noexcept

Get the number of individual tasks within this group task.


The documentation for this class was generated from the following files: