PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
GroupLocalPlan< CfgType > Class Template Referencefinal

Public Member Functions

Construction
 GroupLocalPlan (GroupRoadmapType *const _g=nullptr, const std::string &_lpLabel="", const double _w=0.0, const GroupCfgPath &_path=GroupCfgPath())
 
Ordering and Equality
virtual bool operator== (const GroupLocalPlan &_w) const noexcept
 
virtual bool operator!= (const GroupLocalPlan &_w) const noexcept
 
virtual bool operator< (const GroupLocalPlan &_other) const noexcept
 
Roadmap Edge Weight

Get/set the numeric weight for this local plan as used when querying a roadmap.

EdgeWeight GetWeight () const noexcept
 
void SetWeight (const EdgeWeight _w) noexcept
 
Misc. Interface Functions
void SetSkipEdge () noexcept
 
bool SkipEdge () const noexcept
 
void SetActiveRobots (const std::vector< size_t > &_indices)
 
const std::vector< size_t > & GetActiveRobots () const noexcept
 
void Clear () noexcept
 Reset the states of this object.
 
GroupCfgPath & GetIntermediates () noexcept
 Get the group configuration intermediates.
 
const GroupCfgPath & GetIntermediates () const noexcept
 Get the group configuration intermediates.
 
void SetIntermediates (const GroupCfgPath &_cfgs)
 Set the group configuration intermediates.
 
const std::string & GetLPLabel () const noexcept
 Get the string label of this current local plan.
 
void SetLPLabel (const std::string _label) noexcept
 
Individual Local Plans
void SetEdge (const size_t _robot, IndividualEdge &&_edge)
 
void SetEdge (Robot *const _robot, IndividualEdge &&_edge)
 overload for Robot pointer
 
void SetEdge (Robot *const _robot, const ED _ed)
 
IndividualEdgeGetEdge (Robot *const _robot)
 
const IndividualEdgeGetEdge (Robot *const _robot) const
 
IndividualEdgeGetEdge (const size_t _robotIndex)
 Overloads for using index instead of robot pointer.
 
const IndividualEdgeGetEdge (const size_t _robotIndex) const
 
std::vector< IndividualEdge > & GetLocalEdges () noexcept
 Get a vector of local edges in the plan.
 
std::vector< ED > & GetEdgeDescriptors () noexcept
 Get a vector of local edges' descriptors.
 
void ClearLocalEdges () noexcept
 Clear all local edges in the plan.
 
size_t GetNumRobots () const noexcept
 Get the number of robots given in this group local plan.
 
Stapl graph interface
virtual GroupLocalPlan operator+ (const GroupLocalPlan &_other) const
 This only adds weights, it doesn't take intermediates into account.
 
double Weight () const noexcept
 Get the weight of the plan.
 

Public Types

Local Types
typedef double EdgeWeight
 
typedef DefaultWeight< CfgType > IndividualEdge
 
typedef GroupRoadmap< GroupCfg, GroupLocalPlanGroupRoadmapType
 
typedef std::vector< GroupCfgGroupCfgPath
 
typedef std::vector< size_t > Formation
 
typedef size_t GroupVID
 
typedef stapl::edge_descriptor_impl< size_t > ED
 

Iteration

Iterate over the EDs in this edge.

typedef std::vector< ED >::iterator iterator
 
typedef std::vector< ED >::const_iterator const_iterator
 
iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 

Detailed Description

template<typename CfgType>
class GroupLocalPlan< CfgType >

A local plan for multiple robots. Each robot will be executing this motion simultaneously, and the total time is the same for each robot.

Todo:

Remove the 'active robots'. All robots are always active in a group edge. We do need to retain formation data for reconstructing edges.

Remove the 'skip edge' stuff. There is no such thing as a skipped edge: the disassembly code needs to be adjusted to only use the edges they want.

Rework so that we only need a robot group to construct this, in which case it will have all local edges. It should only get tied to a roadmap with SetGroupRoadmap after it has been added to one.

Constructor & Destructor Documentation

◆ GroupLocalPlan()

template<typename CfgType >
GroupLocalPlan< CfgType >::GroupLocalPlan ( GroupRoadmapType *const  _g = nullptr,
const std::string &  _lpLabel = "",
const double  _w = 0.0,
const GroupCfgPath &  _path = GroupCfgPath() 
)

Constructs a GroupLocalPlan.

Parameters
_gThe group of robots to follow this edge. Defaults to nullptr.
_lpLabelThe string label to assign to this plan. Defaults to empty string.
_wThe weight of the plan. Defaults to 0.0.
_pathThe path to be given by the plan. Defaults to GroupCfgPath().

Member Function Documentation

◆ operator==()

template<typename CfgType >
bool GroupLocalPlan< CfgType >::operator== ( const GroupLocalPlan< CfgType > &  _w) const
virtualnoexcept

Check if the given plan is equal to the current.

Parameters
_wThe given plan.

◆ operator!=()

template<typename CfgType >
bool GroupLocalPlan< CfgType >::operator!= ( const GroupLocalPlan< CfgType > &  _w) const
virtualnoexcept

Check if the given plan is unequal to the current.

Parameters
_wThe given plan.

◆ operator<()

template<typename CfgType >
bool GroupLocalPlan< CfgType >::operator< ( const GroupLocalPlan< CfgType > &  _other) const
virtualnoexcept

Check if the given plan is less than the current.

Parameters
_otherThe given plan.

◆ SetActiveRobots()

template<typename CfgType >
void GroupLocalPlan< CfgType >::SetActiveRobots ( const std::vector< size_t > &  _indices)

Set the list of active robots to the vector of robot indices given.

Parameters
Thevector of robo indices given.

◆ GetActiveRobots()

template<typename CfgType >
const std::vector< size_t > & GroupLocalPlan< CfgType >::GetActiveRobots
noexcept

Get the vector of active robots indices.

Returns
The vector of active robot indices.

◆ SetLPLabel()

template<typename CfgType >
void GroupLocalPlan< CfgType >::SetLPLabel ( const std::string  _label)
noexcept

Set the string label of this current local plan.

Parameters
Thedesired string label.

◆ SetEdge() [1/2]

template<typename CfgType >
void GroupLocalPlan< CfgType >::SetEdge ( const size_t  _robot,
IndividualEdge &&  _edge 
)

Set the individual edge for a robot to a local copy of an edge.

Parameters
_robotThe robot which the edge refers to.
_edgeThe edge.

◆ SetEdge() [2/2]

template<typename CfgType >
void GroupLocalPlan< CfgType >::SetEdge ( Robot *const  _robot,
const ED  _ed 
)

Set the individual edge for a robot to a roadmap copy of an edge.

Parameters
_robotThe robot which the edge refers to.
_edThe edge descriptor.

◆ GetEdge() [1/2]

template<typename CfgType >
GroupLocalPlan< CfgType >::IndividualEdge * GroupLocalPlan< CfgType >::GetEdge ( Robot *const  _robot)

Get the individual edge for a robot.

Parameters
_robotThe robot which the edge refers to.
Returns
A pointer to the edge for _robot. It will be null if it has not yet been set.

◆ GetEdge() [2/2]

template<typename CfgType >
const GroupLocalPlan< CfgType >::IndividualEdge * GroupLocalPlan< CfgType >::GetEdge ( Robot *const  _robot) const

Get the individual edge for a robot.

Parameters
_robotThe robot which the edge refers to.
Returns
A pointer to the edge for _robot. It will be null if it has not yet been set.

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