![]() |
Parasol Planning Library (PPL)
|
#include <SIPPMethod.h>
Public Types | |
Local Types | |
typedef std::unordered_set< size_t > | VIDSet |
typedef MPBaseObject::RoadmapType | RoadmapType |
typedef MPBaseObject::GroupRoadmapType | GroupRoadmapType |
typedef MPBaseObject::GroupCfgType | GroupCfgType |
typedef MPBaseObject::GroupWeightType | GroupWeightType |
typedef std::map< std::pair< size_t, size_t >, std::vector< Range< size_t > > > | EdgeIntervalMap |
typedef std::map< size_t, std::vector< Range< size_t > > > | VertexIntervalMap |
typedef GenericStateGraph< SIPPVertex, SIPPEdge > | SIPPGraph |
![]() | |
typedef std::unordered_map< size_t, std::unordered_map< size_t, std::vector< Range< double > > > > | EdgeIntervals |
![]() | |
typedef DefaultWeight< Cfg > | WeightType |
typedef GenericStateGraph< Cfg, WeightType > | RoadmapType |
typedef GroupCfg< RoadmapType > | GroupCfgType |
typedef GroupLocalPlan< RoadmapType > | GroupWeightType |
typedef GroupRoadmap< GroupCfgType, GroupWeightType > | GroupRoadmapType |
Public Member Functions | |
Construction | |
SIPPMethod () | |
SIPPMethod (XMLNode &_node) | |
virtual | ~SIPPMethod ()=default |
MPBaseObject Overrides | |
virtual void | Print (std::ostream &_os) const override |
virtual void | Initialize () override |
MapEvaluator Interface | |
virtual bool | operator() () override |
Query Interface | |
std::pair< std::vector< size_t >, std::vector< size_t > > | GeneratePath (const size_t _start, const std::vector< size_t > _goals) |
void | SetDMLabel (const std::string &_dmLabel) |
Set the distance metric to use. More... | |
void | SetStartTime (size_t _start) |
Set the start time of the query. More... | |
void | SetMinEndTime (size_t _end) |
Set the end time of the query. More... | |
void | SetEdgeIntervals (EdgeIntervalMap _edgeIntervals) |
Set the edge intervals to use to generate a path. More... | |
void | SetVertexIntervals (VertexIntervalMap _vertexIntervals) |
Set the edge intervals to use to generate a path. More... | |
bool | SatisfyConstraints (Range< size_t > _interval) |
Check if the path satisfies all constraints. More... | |
![]() | |
virtual void | SetEdgeIntervals (EdgeIntervals _edgeIntervals) |
Set the edge intervals of a roadmap. More... | |
virtual void | SetMinEndtime (double _minEndtime) |
Set the minimum end time of a path. More... | |
void | SetActiveRobots (const std::vector< size_t > &_activeRobots) |
Set the active robots. More... | |
std::vector< size_t > | GetActiveRobots () const |
Get the active robots. More... | |
MapEvaluatorMethod ()=default | |
MapEvaluatorMethod (XMLNode &_node) | |
virtual | ~MapEvaluatorMethod ()=default |
![]() | |
MPBaseObject (const std::string &_label="", const std::string &_name="", bool _debug=false) | |
MPBaseObject (XMLNode &_node) | |
virtual | ~MPBaseObject () |
const std::string & | GetName () const |
Get the class name for this object. More... | |
const std::string & | GetLabel () const |
Get the unique label for this object. More... | |
std::string | GetNameAndLabel () const |
Get the unique string identifier for this object "m_name::m_label". More... | |
void | SetLabel (const std::string &) |
Set the unique label for this object. More... | |
void | SetMPLibrary (MPLibrary *) noexcept |
Set the owning MPLibrary. More... | |
MPLibrary * | GetMPLibrary () const noexcept |
Get the owning MPLibrary. More... | |
bool | IsRunning () const noexcept |
Check the library's running flag. More... | |
MPProblem * | GetMPProblem () const noexcept |
Get the library's current MPProblem. More... | |
Environment * | GetEnvironment () const noexcept |
Get the current environment. More... | |
MPTask * | GetTask () const noexcept |
Get the current task. More... | |
GroupTask * | GetGroupTask () const noexcept |
Get the current group task. More... | |
MPSolutionType * | GetMPSolution () const noexcept |
RoadmapType * | GetRoadmap (Robot *const _r=nullptr) const noexcept |
Get the current free-space roadmap. More... | |
GroupRoadmapType * | GetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept |
Get the current free-space group roadmap. More... | |
RoadmapType * | GetBlockRoadmap (Robot *const _r=nullptr) const noexcept |
Get the current obstacle-space roadmap. More... | |
Path * | GetPath (Robot *const _r=nullptr) const noexcept |
GroupPath * | GetGroupPath (RobotGroup *const _g=nullptr) const noexcept |
Get the current best group path. More... | |
StatClass * | GetStatClass () const noexcept |
Get the current StatClass. More... | |
LocalObstacleMap * | GetLocalObstacleMap () const noexcept |
Get the local obstacle map. More... | |
Protected Member Functions | |
Helpers | |
virtual void | Reset () |
virtual bool | PerformSubQuery (const size_t _start, const std::vector< size_t > _goals) |
virtual double | PathWeight (typename SIPPGraph::adj_edge_iterator &_ei, const double _sourceDistance, const double _targetDistance) |
double | SIPPHeuristic (const SIPPGraph *_g, typename SIPPGraph::vertex_descriptor _source, typename SIPPGraph::vertex_descriptor _target) |
void | SIPPNeighbors (SIPPGraph *_g, typename SIPPGraph::vertex_descriptor _vid) |
Neighbors function for Safe interval path planning. More... | |
template<typename AbstractRoadmap > | |
void | SIPPNeighbors (SIPPGraph *_g, typename SIPPGraph::vertex_descriptor _vid, AbstractRoadmap *_rm) |
template<typename AbstractRoadmap > | |
void | BuildNeighbors (typename SIPPGraph::vertex_descriptor _sippSource, size_t _rmTarget, AbstractRoadmap *_rm) |
Construct the SIPP neighbors for roadmap edge. More... | |
void | InitializeCostToGo (const std::vector< size_t > _goal) |
Initialize the cost to go from the start point to the goal. More... | |
![]() | |
void | SetName (const std::string &_s) |
const std::string & | GetBaseFilename () const |
Protected Attributes | |
Internal State | |
SIPPGraph * | m_sippGraph {nullptr} |
The graph representing the time-interval extended state space. More... | |
size_t | m_goalIndex {0} |
Index of the current goal to extend the path to. More... | |
size_t | m_startVID {SIZE_MAX} |
The start vid in the sipp graph. More... | |
std::unordered_map< size_t, double > | m_costToGoMap |
Cost-to-go map used for heuristic values. More... | |
EdgeIntervalMap | m_edgeIntervals |
Set of safe edge intervals. More... | |
VertexIntervalMap | m_vertexIntervals |
Set of safe vertex intervals. More... | |
std::unordered_map< size_t, std::unordered_map< size_t, size_t > > | m_waitTimesteps |
Compute wait timesteps at each vertex during the search process. More... | |
size_t | m_startTime {0} |
The start time of the path. More... | |
size_t | m_minEndTime {0} |
The minimum end time of the path. More... | |
bool | m_initialized {false} |
Flag indicating if the object has been initialized. More... | |
bool | m_minTime {true} |
Flag indiciating if search is minimizing time or distance metric. More... | |
std::string | m_safeIntervalLabel |
Label of the SI Tool to use. More... | |
std::string | m_dmLabel |
Distance metric label. More... | |
![]() | |
std::vector< size_t > | m_activeRobots |
![]() | |
bool | m_debug |
Print debug info? More... | |
typedef std::map<std::pair<size_t,size_t>, std::vector<Range<size_t> > > SIPPMethod::EdgeIntervalMap |
typedef std::map<size_t,std::vector<Range<size_t> > > SIPPMethod::VertexIntervalMap |
typedef std::unordered_set<size_t> SIPPMethod::VIDSet |
SIPPMethod::SIPPMethod | ( | ) |
SIPPMethod::SIPPMethod | ( | XMLNode & | _node | ) |
|
virtualdefault |
|
protected |
Construct the SIPP neighbors for roadmap edge.
std::pair< std::vector< size_t >, std::vector< size_t > > SIPPMethod::GeneratePath | ( | const size_t | _start, |
const std::vector< size_t > | _goals | ||
) |
Generate a path from a start point to a goal point
_start | The start coordinate. |
_goal | The goal coordinate. |
|
overridevirtual |
Initialize this object for the current MPProblem. This should reset any internal state of the algorithms so that they are ready for execution. It is also the place to initialize any state that depends on the current problem.
Reimplemented from MPBaseObject.
|
protected |
Initialize the cost to go from the start point to the goal.
|
overridevirtual |
Evaluate a roadmap.
Implements MapEvaluatorMethod.
|
protectedvirtual |
Define a function for computing path weights w.r.t. dynamic obstacles. Here the metric is the number of time steps, and we return the distance with a wait time if taking an edge would result in a collision with a dynamic obstacle. If waiting cannot fix, return infinity.
_ei | An iterator to the edge we are checking. |
_sourceDistance | The shortest time to the source node. |
_targetDistance | The best known time to the target node. |
|
protectedvirtual |
Check whether a path connecting a start to one of several goals exists in the roadmap using safe intervals.
_start | The start VID to use. |
_goals | The goal VIDs to use. |
|
overridevirtual |
Print internal state of this object.
_os | The std::ostream to print to. |
Reimplemented from MPBaseObject.
|
protectedvirtual |
Reset the path and list of undiscovered goals. Also resets wait times and cached safe intervals.
bool SIPPMethod::SatisfyConstraints | ( | Range< size_t > | _interval | ) |
Check if the path satisfies all constraints.
void SIPPMethod::SetDMLabel | ( | const std::string & | _dmLabel | ) |
Set the distance metric to use.
void SIPPMethod::SetEdgeIntervals | ( | EdgeIntervalMap | _edgeIntervals | ) |
Set the edge intervals to use to generate a path.
void SIPPMethod::SetMinEndTime | ( | size_t | _end | ) |
Set the end time of the query.
void SIPPMethod::SetStartTime | ( | size_t | _start | ) |
Set the start time of the query.
void SIPPMethod::SetVertexIntervals | ( | VertexIntervalMap | _vertexIntervals | ) |
Set the edge intervals to use to generate a path.
|
protected |
Heuristic function for Safe interval path planning. Calls Dijkstra's from goal node to find shortest path to all nodes in roadmap.
_g | |
_source | |
_target |
|
protected |
Neighbors function for Safe interval path planning.
|
protected |
|
protected |
Cost-to-go map used for heuristic values.
|
protected |
Distance metric label.
|
protected |
Set of safe edge intervals.
|
protected |
Index of the current goal to extend the path to.
|
protected |
Flag indicating if the object has been initialized.
|
protected |
The minimum end time of the path.
|
protected |
Flag indiciating if search is minimizing time or distance metric.
|
protected |
Label of the SI Tool to use.
|
protected |
The graph representing the time-interval extended state space.
|
protected |
The start time of the path.
|
protected |
The start vid in the sipp graph.
|
protected |
Set of safe vertex intervals.
|
protected |
Compute wait timesteps at each vertex during the search process.