Parasol Planning Library (PPL)
GroupLPOutput.h
Go to the documentation of this file.
1 #ifndef PMPL_GROUP_LP_OUTPUT_H_
2 #define PMPL_GROUP_LP_OUTPUT_H_
3 
4 #include <string>
5 #include <utility>
6 #include <vector>
7 
15 
16 
29 struct GroupLPOutput {
30 
33 
39  typedef std::vector<GroupCfgType> GroupCfgPath;
40 
44 
45  typedef std::pair<GroupWeightType, GroupWeightType> LPEdge;
46 
50 
51  GroupRoadmapType* m_groupRoadmap{nullptr}; // Group this local plan is for.
52 
53  GroupCfgPath m_path; // Path found by local planner.
55 
56  LPEdge m_edge; // Contains weights of edges defined in path.
57 
61 
62  GroupLPOutput(GroupRoadmapType* const _map = nullptr,
63  GroupCfgPath _path = GroupCfgPath(),
64  GroupCfgPath _intermediates = GroupCfgPath());
65 
66  // Copies _edge in to both members of the edge pair, then reverses the
67  // m_intermediates vector of the second element.
68  GroupLPOutput(GroupRoadmapType* const _map, const GroupWeightType& _edge);
69 
73 
74  void Clear();
75 
76  void SetLPLabel(const std::string& _label);
77 
78  void AddIntermediatesToWeights(const bool _saveIntermediates);
79 
80  void SetFormation(const std::vector<size_t>& _formation);
81 
82  void SetIndividualEdges(const std::vector<size_t>& _formation);
83 
84  std::vector<size_t> GetFormation() {return m_edge.first.GetFormation();}
85 
86  // void SetSkipEdge();
87 
88  void SetEdgeWeights(const double _weight);
89 
91 
92 };
93 
94 #endif
Definition: Weight.h:36
Definition: GenericStateGraph.h:67
Definition: GroupCfg.h:39
Definition: GroupLocalPlan.h:24
Definition: GroupRoadmap.h:25
Definition: GroupLPOutput.h:29
GroupRoadmapType * m_groupRoadmap
Definition: GroupLPOutput.h:51
void AddIntermediatesToWeights(const bool _saveIntermediates)
Definition: GroupLPOutput.cpp:46
void SetIndividualEdges(const std::vector< size_t > &_formation)
Definition: GroupLPOutput.cpp:72
GroupLPOutput(GroupRoadmapType *const _map=nullptr, GroupCfgPath _path=GroupCfgPath(), GroupCfgPath _intermediates=GroupCfgPath())
Definition: GroupLPOutput.cpp:10
void Clear()
Definition: GroupLPOutput.cpp:28
GenericStateGraph< Cfg, IndividualEdge > RoadmapType
Definition: GroupLPOutput.h:35
std::pair< GroupWeightType, GroupWeightType > LPEdge
Definition: GroupLPOutput.h:45
void SetEdgeWeights(const double _weight)
Definition: GroupLPOutput.cpp:110
GroupRoadmap< GroupCfgType, GroupWeightType > GroupRoadmapType
Definition: GroupLPOutput.h:38
LPEdge m_edge
Definition: GroupLPOutput.h:56
GroupLocalPlan< RoadmapType > GroupWeightType
Definition: GroupLPOutput.h:37
std::vector< size_t > GetFormation()
Definition: GroupLPOutput.h:84
void SetLPLabel(const std::string &_label)
Definition: GroupLPOutput.cpp:38
DefaultWeight< Cfg > IndividualEdge
Definition: GroupLPOutput.h:34
GroupCfgPath m_path
Definition: GroupLPOutput.h:53
void SetFormation(const std::vector< size_t > &_formation)
Definition: GroupLPOutput.cpp:64
std::vector< GroupCfgType > GroupCfgPath
Definition: GroupLPOutput.h:39
GroupCfgPath m_intermediates
Definition: GroupLPOutput.h:54
GroupCfg< RoadmapType > GroupCfgType
Definition: GroupLPOutput.h:36