Parasol Planning Library (PPL)
StraightLine.h
Go to the documentation of this file.
1 #ifndef PMPL_STRAIGHT_LINE_H_
2 #define PMPL_STRAIGHT_LINE_H_
3 
5 
6 #include "GroupLPOutput.h"
7 #include "LPOutput.h"
8 #include "LocalPlannerMethod.h"
9 
17 class StraightLine : virtual public LocalPlannerMethod {
18  public:
21 
26 
30 
31  StraightLine(const std::string& _vcLabel = "",
32  bool _binary = false,
33  bool _saveIntermediates = false);
34 
35  StraightLine(XMLNode& _node);
36 
37  virtual ~StraightLine() = default;
38 
42 
43  virtual void Print(std::ostream& _os) const override;
44 
48 
49  virtual bool IsConnected(const Cfg& _c1,
50  const Cfg& _c2,
51  Cfg& _col,
52  LPOutput* _lpOutput,
53  double _positionRes,
54  double _orientationRes,
55  bool _checkCollision = true,
56  bool _savePath = false) override;
57 
58  virtual bool IsConnected(
59  const GroupCfgType& _c1,
60  const GroupCfgType& _c2,
61  GroupCfgType& _col,
62  GroupLPOutput* _lpOutput,
63  double _positionRes,
64  double _orientationRes,
65  bool _checkCollision = true,
66  bool _savePath = false,
67  const Formation& _robotIndexes = Formation()) override;
68 
70 
71  protected:
74 
76  bool IsConnectedFunc(const Cfg& _c1,
77  const Cfg& _c2,
78  Cfg& _col,
79  LPOutput* _lpOutput,
80  double _positionRes,
81  double _orientationRes,
82  bool _checkCollision = true,
83  bool _savePath = false);
84 
90  virtual bool IsConnectedEqualVelocities(const GroupCfgType& _c1,
91  const GroupCfgType& _c2,
92  GroupCfgType& _col,
93  GroupLPOutput* _lpOutput,
94  double _positionRes,
95  double _orientationRes,
96  bool _checkCollision,
97  bool _savePath,
98  const Formation& _robotIndexes);
99 
105  virtual bool IsConnectedSLSequential(const Cfg& _c1,
106  const Cfg& _c2,
107  Cfg& _col,
108  LPOutput* _lpOutput,
109  int& _cdCounter,
110  double _positionRes,
111  double _orientationRes,
112  bool _checkCollision = true,
113  bool _savePath = false);
114 
118  virtual bool IsConnectedSLBinary(const Cfg& _c1,
119  const Cfg& _c2,
120  Cfg& _col,
121  LPOutput* _lpOutput,
122  int& _cdCounter,
123  double _positionRes,
124  double _orientationRes,
125  bool _checkCollision = true,
126  bool _savePath = false);
127 
131 
132  std::string m_dmLabel;
133  std::string m_vcLabel;
134  bool m_binaryEvaluation{false};
135  bool m_equalVelocity{false};
136 
137  double m_selfEdgeSteps{1};
138 
140 };
141 
142 #endif
Definition: Cfg.h:38
Definition: Weight.h:36
Definition: GroupCfg.h:39
std::vector< size_t > Formation
Definition: GroupCfg.h:58
Definition: GroupRoadmap.h:25
Definition: LocalPlannerMethod.h:32
GroupCfgType::Formation Formation
Definition: LocalPlannerMethod.h:40
Definition: StraightLine.h:17
bool m_binaryEvaluation
Use binary search?
Definition: StraightLine.h:134
virtual bool IsConnectedSLBinary(const Cfg &_c1, const Cfg &_c2, Cfg &_col, LPOutput *_lpOutput, int &_cdCounter, double _positionRes, double _orientationRes, bool _checkCollision=true, bool _savePath=false)
Definition: StraightLine.cpp:546
virtual bool IsConnected(const Cfg &_c1, const Cfg &_c2, Cfg &_col, LPOutput *_lpOutput, double _positionRes, double _orientationRes, bool _checkCollision=true, bool _savePath=false) override
Definition: StraightLine.cpp:54
GroupCfgType::Formation Formation
Definition: StraightLine.h:25
StraightLine(const std::string &_vcLabel="", bool _binary=false, bool _saveIntermediates=false)
Definition: StraightLine.cpp:14
bool IsConnectedFunc(const Cfg &_c1, const Cfg &_c2, Cfg &_col, LPOutput *_lpOutput, double _positionRes, double _orientationRes, bool _checkCollision=true, bool _savePath=false)
Default for non closed chains.
Definition: StraightLine.cpp:407
std::string m_vcLabel
The validity checker.
Definition: StraightLine.h:133
virtual bool IsConnectedSLSequential(const Cfg &_c1, const Cfg &_c2, Cfg &_col, LPOutput *_lpOutput, int &_cdCounter, double _positionRes, double _orientationRes, bool _checkCollision=true, bool _savePath=false)
Definition: StraightLine.cpp:430
virtual void Print(std::ostream &_os) const override
Definition: StraightLine.cpp:45
MPBaseObject::WeightType WeightType
Definition: StraightLine.h:22
double m_selfEdgeSteps
Definition: StraightLine.h:137
MPBaseObject::GroupRoadmapType GroupRoadmapType
Definition: StraightLine.h:24
virtual ~StraightLine()=default
virtual bool IsConnectedEqualVelocities(const GroupCfgType &_c1, const GroupCfgType &_c2, GroupCfgType &_col, GroupLPOutput *_lpOutput, double _positionRes, double _orientationRes, bool _checkCollision, bool _savePath, const Formation &_robotIndexes)
Definition: StraightLine.cpp:237
bool m_equalVelocity
decides if multi-robots move at same speed
Definition: StraightLine.h:135
MPBaseObject::GroupCfgType GroupCfgType
Definition: StraightLine.h:23
std::string m_dmLabel
The metric for measuring edge length.
Definition: StraightLine.h:132
Definition: XMLNode.h:27
Definition: GroupLPOutput.h:29
Definition: LPOutput.h:24