Parasol Planning Library (PPL)
|
#include <GroupLocalPlan.h>
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, GroupLocalPlan > | GroupRoadmapType |
typedef std::vector< GroupCfgType > | GroupCfgPath |
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, CompositeEdge > | GroupGraphType |
typedef std::vector< CompositeStateType > | CompositePath |
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 Formation & | GetFormation () const noexcept |
void | Clear () noexcept |
Reset the states of this object. More... | |
GroupCfgPath & | GetIntermediates () noexcept |
Get the group configuration intermediates. More... | |
const GroupCfgPath & | GetIntermediates () 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) |
CompositePath & | GetIntermediates () noexcept |
Get the composite state intermediates. More... | |
const CompositePath & | GetIntermediates () 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 IndividualEdge * | GetEdge (Robot *const _robot) |
virtual const IndividualEdge * | GetEdge (Robot *const _robot) const |
virtual IndividualEdge * | GetEdge (const size_t _robotIndex) |
virtual const IndividualEdge * | GetEdge (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 > | |
GroupGraphType * | m_groupMap {nullptr} |
The composite graph that this edge is in. More... | |
RobotGroup * | m_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< ED > | m_edges |
Descriptors of the individual edges. More... | |
std::vector< IndividualEdge > | m_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... | |
A local plan for multiple robots. Each robot will be executing this motion simultaneously, and the total time is the same for each robot.
typedef CompositeEdge<GraphType> GroupLocalPlan< GraphType >::BaseType |
typedef GraphType::CfgType GroupLocalPlan< GraphType >::CfgType |
typedef BaseType::CompositePath GroupLocalPlan< GraphType >::CompositePath |
typedef stapl::edge_descriptor_impl<size_t> GroupLocalPlan< GraphType >::ED |
typedef double GroupLocalPlan< GraphType >::EdgeWeight |
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.
typedef std::vector<GroupCfgType> GroupLocalPlan< GraphType >::GroupCfgPath |
typedef GroupCfg<GraphType> GroupLocalPlan< GraphType >::GroupCfgType |
typedef BaseType::GroupGraphType GroupLocalPlan< GraphType >::GroupGraphType |
typedef GroupRoadmap<GroupCfgType, GroupLocalPlan> GroupLocalPlan< GraphType >::GroupRoadmapType |
typedef GraphType::EdgeType GroupLocalPlan< GraphType >::IndividualEdge |
GroupLocalPlan< GraphType >::GroupLocalPlan | ( | GroupRoadmapType *const & | _g = nullptr , |
const std::string & | _lpLabel = "" , |
||
const double | _w = 0.0 , |
||
const GroupCfgPath & | _path = GroupCfgPath() |
||
) |
Constructs a GroupLocalPlan.
_g | The group roadmap in which this edge exists. |
_lpLabel | The string label to assign to this plan. Defaults to empty string. |
_w | The weight of the plan. Defaults to 0.0. |
_path | The path to be given by the plan. Defaults to GroupCfgPath(). |
GroupLocalPlan< GraphType >::GroupLocalPlan | ( | RobotGroup *const & | _g, |
const std::string & | _lpLabel = "" , |
||
const double | _w = 0.0 , |
||
const GroupCfgPath & | _path = GroupCfgPath() |
||
) |
Constructs a GroupLocalPlan.
_g | The robot group for which this edge exists. |
_lpLabel | The string label to assign to this plan. Defaults to empty string. |
_w | The weight of the plan. Defaults to 0.0. |
_path | The path to be given by the plan. Defaults to GroupCfgPath(). |
|
virtualdefault |
|
virtualnoexcept |
Reset the states of this object.
Reimplemented from CompositeEdge< GraphType >.
|
noexcept |
Get the formation of the robots. The first index is the leader.
|
noexcept |
Get the group configuration intermediates.
|
noexcept |
Get the group configuration intermediates.
|
noexcept |
Get the string label of this current local plan.
|
virtual |
Add two group local plans. This only adds weights, it doesn't take intermediates into account.
void GroupLocalPlan< GraphType >::SetFormation | ( | const Formation & | _indices | ) |
Set the formation of the robots. The first index is the leader.
_indices | The vector of robot indices given. |
void GroupLocalPlan< GraphType >::SetGroupRoadmap | ( | GroupRoadmapType *const & | _g | ) |
Set the group roadmap to which this plan belongs.
_g | The given group roadmap. |
void GroupLocalPlan< GraphType >::SetIntermediates | ( | const GroupCfgPath & | _cfgs | ) |
Set the group configuration intermediates.
|
noexcept |
Set the string label of this current local plan.
_label | The desired string label. |