Parasol Planning Library (PPL)
GroupLocalPlan< GraphType > Class Template Reference

#include <GroupLocalPlan.h>

Inheritance diagram for GroupLocalPlan< GraphType >:
Inheritance graph
[legend]
Collaboration diagram for GroupLocalPlan< GraphType >:
Collaboration graph
[legend]

Public Types

Local Types
typedef CompositeEdge< GraphType > BaseType
 
typedef BaseType::GroupGraphType GroupGraphType
 
typedef GraphType::CfgType CfgType
 
typedef GraphType::EdgeType IndividualEdge
 
typedef double EdgeWeight
 
typedef GroupCfg< GraphType > GroupCfgType
 
typedef GroupRoadmap< GroupCfgType, GroupLocalPlanGroupRoadmapType
 
typedef std::vector< GroupCfgTypeGroupCfgPath
 
typedef BaseType::CompositePath CompositePath
 
typedef stapl::edge_descriptor_impl< size_t > ED
 
typedef std::vector< size_t > Formation
 
- Public Types inherited from CompositeEdge< GraphType >
typedef GraphType::CfgType IndividualCfg
 
typedef GraphType::EdgeType IndividualEdge
 
typedef double EdgeWeight
 
typedef stapl::edge_descriptor_impl< size_t > ED
 
typedef CompositeState< GraphType > CompositeStateType
 
typedef CompositeGraph< CompositeStateType, CompositeEdgeGroupGraphType
 
typedef std::vector< CompositeStateTypeCompositePath
 
typedef std::vector< ED >::iterator iterator
 
typedef std::vector< ED >::const_iterator const_iterator
 

Public Member Functions

Construction
 GroupLocalPlan (GroupRoadmapType *const &_g=nullptr, const std::string &_lpLabel="", const double _w=0.0, const GroupCfgPath &_path=GroupCfgPath())
 
 GroupLocalPlan (RobotGroup *const &_g, const std::string &_lpLabel="", const double _w=0.0, const GroupCfgPath &_path=GroupCfgPath())
 
virtual ~GroupLocalPlan ()=default
 
Misc. Interface Functions
void SetGroupRoadmap (GroupRoadmapType *const &_g)
 
void SetFormation (const Formation &_indices)
 
const FormationGetFormation () const noexcept
 
void Clear () noexcept
 Reset the states of this object. More...
 
GroupCfgPathGetIntermediates () noexcept
 Get the group configuration intermediates. More...
 
const GroupCfgPathGetIntermediates () const noexcept
 Get the group configuration intermediates. More...
 
void SetIntermediates (const GroupCfgPath &_cfgs)
 Set the group configuration intermediates. More...
 
const std::string & GetLPLabel () const noexcept
 Get the string label of this current local plan. More...
 
void SetLPLabel (const std::string _label) noexcept
 
Stapl graph interface
virtual GroupLocalPlan operator+ (const GroupLocalPlan &_other) const
 
- Public Member Functions inherited from CompositeEdge< GraphType >
 CompositeEdge (GroupGraphType *const &_g=nullptr, const double _w=0.0, const CompositePath &_intermediates=CompositePath())
 
 CompositeEdge (RobotGroup *const &_g, const double _w=0.0, const CompositePath &_intermediates=CompositePath())
 
virtual bool operator== (const CompositeEdge &_w) const noexcept
 
virtual bool operator!= (const CompositeEdge &_w) const noexcept
 
virtual bool operator< (const CompositeEdge &_other) const noexcept
 
virtual EdgeWeight GetWeight () const noexcept
 Get the numeric weight for this edge. More...
 
virtual void SetWeight (const EdgeWeight _w) noexcept
 
void SetGroupGraph (GroupGraphType *const &_g)
 
CompositePathGetIntermediates () noexcept
 Get the composite state intermediates. More...
 
const CompositePathGetIntermediates () const noexcept
 Get the composite state intermediates. More...
 
const size_t GetNumIntermediates () noexcept
 Get the number of composite intermediates along this edge. More...
 
void SetIntermediates (const CompositePath &_cfgs)
 Set the composite state intermediates. More...
 
virtual void Write (std::ostream &_os) const
 
virtual void SetEdge (Robot *const _robot, const ED _ed)
 
void SetEdge (const size_t _robot, IndividualEdge &&_edge)
 
void SetEdge (Robot *const _robot, IndividualEdge &&_edge)
 
virtual IndividualEdgeGetEdge (Robot *const _robot)
 
virtual const IndividualEdgeGetEdge (Robot *const _robot) const
 
virtual IndividualEdgeGetEdge (const size_t _robotIndex)
 
virtual const IndividualEdgeGetEdge (const size_t _robotIndex) const
 
std::vector< IndividualEdge > & GetLocalEdges () noexcept
 Get a vector of local edges in the plan. More...
 
void ClearLocalEdges () noexcept
 Clear all local edges in the plan. More...
 
virtual std::vector< ED > & GetEdgeDescriptors () noexcept
 
virtual size_t GetNumRobots () const noexcept
 Get the number of robots given in this group local plan. More...
 
virtual std::unordered_set< Robot * > GetActiveRobots ()
 
virtual void SetTimeSteps (size_t _timesteps)
 Set the number of timesteps along this composite edge. More...
 
virtual size_t GetTimeSteps () const
 Get the number of timesteps along this composite edge. More...
 
virtual CompositeEdge operator+ (const CompositeEdge &_other) const
 
virtual double Weight () const noexcept
 Get the weight of the plan. More...
 
virtual iterator begin () noexcept
 
virtual iterator end () noexcept
 
virtual const_iterator begin () const noexcept
 
virtual const_iterator end () const noexcept
 

Additional Inherited Members

- Protected Attributes inherited from CompositeEdge< GraphType >
GroupGraphTypem_groupMap {nullptr}
 The composite graph that this edge is in. More...
 
RobotGroupm_group {nullptr}
 The robot group that this edge belongs to. More...
 
double m_weight {std::numeric_limits<double>::infinity()}
 The edge weight. More...
 
CompositePath m_intermediates
 Composite state intermediates. More...
 
std::vector< EDm_edges
 Descriptors of the individual edges. More...
 
std::vector< IndividualEdgem_localEdges
 Note that any edges added to m_localEdges must be valid and complete. More...
 
size_t m_timesteps
 The number of timesteps along this edge. More...
 

Detailed Description

template<typename GraphType>
class GroupLocalPlan< GraphType >

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

Member Typedef Documentation

◆ BaseType

template<typename GraphType >
typedef CompositeEdge<GraphType> GroupLocalPlan< GraphType >::BaseType

◆ CfgType

template<typename GraphType >
typedef GraphType::CfgType GroupLocalPlan< GraphType >::CfgType

◆ CompositePath

template<typename GraphType >
typedef BaseType::CompositePath GroupLocalPlan< GraphType >::CompositePath

◆ ED

template<typename GraphType >
typedef stapl::edge_descriptor_impl<size_t> GroupLocalPlan< GraphType >::ED

◆ EdgeWeight

template<typename GraphType >
typedef double GroupLocalPlan< GraphType >::EdgeWeight

◆ Formation

template<typename GraphType >
typedef std::vector<size_t> GroupLocalPlan< GraphType >::Formation

A formation represents a group of robots which are maintaining their configurations relative to a leader, such as maintaining a square or V-shape while moving. The values are robot indexes (within the group, not problem) with the first index denoting the leader robot.

◆ GroupCfgPath

template<typename GraphType >
typedef std::vector<GroupCfgType> GroupLocalPlan< GraphType >::GroupCfgPath

◆ GroupCfgType

template<typename GraphType >
typedef GroupCfg<GraphType> GroupLocalPlan< GraphType >::GroupCfgType

◆ GroupGraphType

template<typename GraphType >
typedef BaseType::GroupGraphType GroupLocalPlan< GraphType >::GroupGraphType

◆ GroupRoadmapType

template<typename GraphType >
typedef GroupRoadmap<GroupCfgType, GroupLocalPlan> GroupLocalPlan< GraphType >::GroupRoadmapType

◆ IndividualEdge

template<typename GraphType >
typedef GraphType::EdgeType GroupLocalPlan< GraphType >::IndividualEdge

Constructor & Destructor Documentation

◆ GroupLocalPlan() [1/2]

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

Constructs a GroupLocalPlan.

Parameters
_gThe group roadmap in which this edge exists.
_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().

◆ GroupLocalPlan() [2/2]

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

Constructs a GroupLocalPlan.

Parameters
_gThe robot group for which this edge exists.
_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().

◆ ~GroupLocalPlan()

template<typename GraphType >
virtual GroupLocalPlan< GraphType >::~GroupLocalPlan ( )
virtualdefault

Member Function Documentation

◆ Clear()

template<typename GraphType >
void GroupLocalPlan< GraphType >::Clear
virtualnoexcept

Reset the states of this object.

Reimplemented from CompositeEdge< GraphType >.

◆ GetFormation()

template<typename GraphType >
const GroupLocalPlan< GraphType >::Formation & GroupLocalPlan< GraphType >::GetFormation
noexcept

Get the formation of the robots. The first index is the leader.

Returns
The vector of formation robot indices.

◆ GetIntermediates() [1/2]

template<typename GraphType >
const GroupLocalPlan< GraphType >::GroupCfgPath & GroupLocalPlan< GraphType >::GetIntermediates
noexcept

Get the group configuration intermediates.

◆ GetIntermediates() [2/2]

template<typename GraphType >
GroupLocalPlan< GraphType >::GroupCfgPath & GroupLocalPlan< GraphType >::GetIntermediates
noexcept

Get the group configuration intermediates.

◆ GetLPLabel()

template<typename GraphType >
const std::string & GroupLocalPlan< GraphType >::GetLPLabel
noexcept

Get the string label of this current local plan.

◆ operator+()

template<typename GraphType >
GroupLocalPlan< GraphType > GroupLocalPlan< GraphType >::operator+ ( const GroupLocalPlan< GraphType > &  _other) const
virtual

Add two group local plans. This only adds weights, it doesn't take intermediates into account.

◆ SetFormation()

template<typename GraphType >
void GroupLocalPlan< GraphType >::SetFormation ( const Formation _indices)

Set the formation of the robots. The first index is the leader.

Parameters
_indicesThe vector of robot indices given.

◆ SetGroupRoadmap()

template<typename GraphType >
void GroupLocalPlan< GraphType >::SetGroupRoadmap ( GroupRoadmapType *const &  _g)

Set the group roadmap to which this plan belongs.

Parameters
_gThe given group roadmap.

◆ SetIntermediates()

template<typename GraphType >
void GroupLocalPlan< GraphType >::SetIntermediates ( const GroupCfgPath _cfgs)

Set the group configuration intermediates.

◆ SetLPLabel()

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

Set the string label of this current local plan.

Parameters
_labelThe desired string label.

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