Parasol Planning Library (PPL)
SafeIntervalTool.h
Go to the documentation of this file.
1 #ifndef PMPL_SAFE_INTERVAL_TOOL_H_
2 #define PMPL_SAFE_INTERVAL_TOOL_H_
3 
5 #include "Utilities/XMLNode.h"
6 
18 class SafeIntervalTool final : public MPBaseObject {
19 
20  public:
21 
24 
27  typedef typename RoadmapType::VID VID;
28 
32 
33  typedef std::vector<Range<double>> Intervals;
34 
38 
40 
41  SafeIntervalTool(XMLNode& _node);
42 
43  virtual ~SafeIntervalTool();
44 
48 
49  virtual void Initialize() override;
50 
54 
58  Intervals ComputeIntervals(const Cfg& _cfg);
59 
66  Intervals ComputeIntervals(const WeightType& _weight, const VID _source,
67  const VID _target, RoadmapType* _roadmap);
68 
72 
76  bool ContainsTimestep(const Intervals& _intervals, const double _timestep);
77 
79 
80  private:
81 
84 
88  bool IsSafe(const Cfg& _cfg, const double _timestep);
89 
96  Intervals ComputeSafeIntervals(const std::vector<Cfg>& _cfgs);
97 
101 
102  std::string m_vcLabel;
103 
105  std::unordered_map<const Cfg*, Intervals> m_cfgIntervals;
106 
108  std::unordered_map<const WeightType*, Intervals> m_edgeIntervals;
109 
111 };
112 
113 #endif
Definition: Cfg.h:38
Definition: Weight.h:36
Definition: GenericStateGraph.h:67
STAPLGraph::vertex_descriptor VID
Definition: GenericStateGraph.h:83
Definition: MPBaseObject.h:46
Definition: SafeIntervalTool.h:18
RoadmapType::VID VID
Definition: SafeIntervalTool.h:27
virtual void Initialize() override
Definition: SafeIntervalTool.cpp:32
bool ContainsTimestep(const Intervals &_intervals, const double _timestep)
Definition: SafeIntervalTool.cpp:75
virtual ~SafeIntervalTool()
Intervals ComputeIntervals(const Cfg &_cfg)
Definition: SafeIntervalTool.cpp:42
std::vector< Range< double > > Intervals
A set of time intervals.
Definition: SafeIntervalTool.h:33
SafeIntervalTool()
Definition: SafeIntervalTool.cpp:12
MPBaseObject::WeightType WeightType
Definition: SafeIntervalTool.h:26
MPBaseObject::RoadmapType RoadmapType
Definition: SafeIntervalTool.h:25
Definition: XMLNode.h:27