![]() |
Parasol Planning Library (PPL)
|
#include <DynamicRegionsPRM.h>
Data Structures | |
struct | EdgeCompare |
struct | EdgeIDCompare |
struct | EdgeOutput |
Output for connection attempt. More... | |
struct | ExpansionRegion |
Representation of an expansion region. More... | |
struct | LocalComponentDescriptor |
A descriptor for a local connected component. More... | |
struct | SamplerSetting |
Settings for a specific sampler. More... | |
Public Member Functions | |
Construction | |
DynamicRegionsPRM () | |
DynamicRegionsPRM (XMLNode &_node) | |
virtual | ~DynamicRegionsPRM ()=default |
MPBaseObject Overrides | |
virtual void | Print (std::ostream &_os) const override |
MPStrategyMethod Overrides | |
virtual void | Initialize () override |
virtual void | Iterate () override |
Execute one iteration of the strategy. More... | |
![]() | |
MPStrategyMethod ()=default | |
MPStrategyMethod (XMLNode &_node) | |
virtual | ~MPStrategyMethod () |
void | operator() () |
Execute the strategy by calling Initialize, Run, and Finalize. More... | |
void | EnableOutputFiles (const bool _enable=true) |
virtual void | Initialize () |
![]() | |
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 | |
VertexSet | ExpandComponent (ExpansionRegion *const _r) |
void | ConnectEdgeSegment (const SkeletonEdgeDescriptor _ed) |
void | InitializeLUnconnectedEdgeMap () |
Helpers | |
void | AddQuery () |
Add start and goals to the roadmap. More... | |
bool | CheckReachedRegion (const VID _query, const VertexSet &_component) |
Hax. More... | |
void | GrowRRT (const VID _q) |
Local Connected Components | |
void | MakeLocalComponent (const LocalComponentDescriptor &_d, const VertexSet &_vids) |
VertexSet & | GetLocalComponent (const LocalComponentDescriptor &_d) noexcept |
ExpansionRegion * | GetExpansionRegion (const LocalComponentDescriptor &_d) noexcept |
VertexSet & | GetBridge (const LocalComponentDescriptor &_d) noexcept |
LocalComponentDescriptor | FindLocalComponent (const VID _vid) const noexcept |
LocalComponentDescriptor | PromoteLocalComponent (LocalComponentDescriptor _d) |
LocalComponentDescriptor | MergeLocalComponents (const LocalComponentDescriptor &_d1, const LocalComponentDescriptor &_d2) |
void | UpdateEdgeConnectivity (const SkeletonEdgeDescriptor &_ed) |
Update the local connectivity for an edge. More... | |
bool | IsEdgeConnected (const SkeletonEdgeDescriptor &_ed) |
Check if an edge is considered locally connected. More... | |
Region Functions | |
ExpansionRegion * | SelectExpansionRegion () |
std::pair< std::vector< double >, std::vector< ExpansionRegion * > > | ComputeProbabilities () |
bool | AdvanceRegion (ExpansionRegion *const _r, const VertexSet &_newVIDs) |
bool | AreSamplesCovered (const ExpansionRegion *const _region, const VertexSet &_samples) |
General Planning | |
std::vector< Cfg > | Sample (const Boundary *_b=nullptr) |
std::vector< Neighbor > | FindNearestNeighbors (const Cfg &_cfg, const VertexSet *const _candidates) |
Return K nearest neighors from a set of candidates. More... | |
bool | AttemptConnection (const Cfg &_c1, const Cfg &_c2, LPOutput &_lpOuptut) |
std::vector< EdgeOutput > | ConnectToComponent (const Cfg &_cfg, const LocalComponentDescriptor &_d) |
VID | Extend (const VID _nearVID, const Cfg &_target, LPOutput &_lp) |
Extend a tree node towards a direction. More... | |
Workspace and Clearance | |
CSpaceBoundingSphere | MakeBoundary (const Vector3d &_v) |
double | GetRegionRadius (const Vector3d &_v) |
double | GetClearance (const Vector3d &_v) |
void | BuildSkeleton () |
Build topological skeleton. More... | |
void | InitializeLowClearanceMap () |
![]() | |
virtual void | Run () |
Call Iterate until EvaluateMap is true. More... | |
virtual bool | EvaluateMap () |
Check if we satisfied all map evaluators. More... | |
virtual void | Finalize () |
Clean-up and output results. More... | |
virtual void | ClearRoadmap () |
Pre-clear the roadmap(s) if requested. More... | |
virtual size_t | GenerateStart (const std::string &_samplerLabel="") |
virtual std::vector< size_t > | GenerateGoals (const std::string &_samplerLabel="") |
![]() | |
void | SetName (const std::string &_s) |
const std::string & | GetBaseFilename () const |
Protected Attributes | |
Internal State | |
std::vector< SamplerSetting > | m_samplers |
Samplers to generate nodes. More... | |
std::string | m_nfLabel |
The neighborhood finder label. More... | |
std::string | m_lpLabel |
The neighborhood finder label. More... | |
std::string | m_exLabel |
The extender label. More... | |
std::string | m_decompositionLabel |
The workspace decomposition label. More... | |
std::string | m_skeletonType {"reeb"} |
Type of skeleton to build. More... | |
std::string | m_skeletonFilename |
The output file for the skeleton graph. More... | |
std::string | m_skeletonIO |
Option to read or write the skeleton. More... | |
double | m_explore {.5} |
double | m_minRegionRadius {-1} |
bool | m_aggressiveBridging {true} |
![]() | |
std::string | m_querySampler |
Sampler for generating start/goal. More... | |
std::vector< std::string > | m_meLabels |
The list of map evaluators to use. More... | |
size_t | m_iterations {0} |
The number of executed iterations. More... | |
bool | m_writeOutput {true} |
Write output at the end? More... | |
bool | m_clearMap {false} |
Clear the roadmap(s) before run? More... | |
![]() | |
bool | m_debug |
Print debug info? More... | |
Static Protected Attributes | |
Shared State | |
static bool | m_initialized = false |
Is the shared state initialized? More... | |
static WorkspaceSkeleton | m_skeleton |
The workspace skeleton. More... | |
static LocalConnectivityMap | m_localComponents |
Local components in progress. More... | |
static BridgeMap | m_bridges |
Completed local components. More... | |
static RegionMap | m_regions |
Expansion regions for local components. More... | |
static LowClearanceMap | m_lowClearanceMap |
Track low-clearance edges. More... | |
static UnconnectedEdgeMap | m_unconnectedEdges |
Track unconnected edges. More... | |
Dynamic Regions PRM algorithm.
A PRM guided by a workspace skeleton.
Reference: Read Sandstrom. "Approximating Configuration Space Topology with Workspace Models". PhD Thesis, Spring 2020. -and- Read Sandstrom, Diane Uwacu, Jory Denny, and Nancy M. Amato. "Topology-Guided Roadmap Construction with Dynamic Region Sampling". Under review for RA-L @ IROS 20.
typedef std::map<Robot*, std::map<SkeletonEdgeDescriptor, std::map<VID, VertexSet>, EdgeIDCompare> > DynamicRegionsPRM::BridgeMap |
Bridges are non-directional and tied to edge IDs.
typedef std::map<Robot*, std::map<SkeletonEdgeDescriptor, std::map<VID, VertexSet>, EdgeCompare> > DynamicRegionsPRM::LocalConnectivityMap |
Map for local connected components. Maps skeleton edge to representative to vids.
typedef std::map<Robot*, std::set<size_t> > DynamicRegionsPRM::LowClearanceMap |
Map for low clearance.
typedef std::map<Robot*, std::map<SkeletonEdgeDescriptor, std::map<VID, ExpansionRegion>, EdgeCompare> > DynamicRegionsPRM::RegionMap |
Map for regions.
typedef std::map<Robot*, std::set<SkeletonEdgeDescriptor, EdgeCompare> > DynamicRegionsPRM::UnconnectedEdgeMap |
Map for regions with unconnected local components.
DynamicRegionsPRM::DynamicRegionsPRM | ( | ) |
DynamicRegionsPRM::DynamicRegionsPRM | ( | XMLNode & | _node | ) |
|
virtualdefault |
|
protected |
Add start and goals to the roadmap.
|
protected |
Advance a region along an edge.
_r | The region to advance. |
_newVIDs | The recently added VIDs from sampling in this region. |
|
protected |
Check if region still covers a subset of the given samples set
_region | The region to check. |
_samples | The newly generated samples to check. |
|
protected |
Attempt connections between a configuration and its neighbors
|
protected |
Build topological skeleton.
|
protected |
Hax.
|
protected |
Compute probabilities for selecting each expansion region.
|
protected |
Connect local components within an edge segment.
_ed | The edge segment to connect. |
|
protected |
Try to connect a configuration to a local component.
_cfg | The joining sample. |
_d | The component descriptor. |
|
protected |
Expand a component in region r
|
protected |
Extend a tree node towards a direction.
|
protectednoexcept |
Get the local component descriptor for a vertex.
|
protected |
Return K nearest neighors from a set of candidates.
|
protectednoexcept |
Get a bridge's vertex set.
_d | The descriptor for the bridge. |
|
protected |
Get clearance
|
protectednoexcept |
Get the expansion region for a local component.
_d | The descriptor for the local component. |
|
protectednoexcept |
Get a local component's vertex set.
_d | The descriptor for the local component. |
|
protected |
Get region radius return radius = robot clearance - robot radius
|
protected |
Grow a tree from a vertex q Stop when q connects to the rest of the roadmap or is within the boundary of a skeleton vertex
|
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 |
|
protected |
|
protected |
Check if an edge is considered locally connected.
|
overridevirtual |
Execute one iteration of the strategy.
Reimplemented from MPStrategyMethod.
|
protected |
Make a boundary
|
protected |
Initialize tracking for a local connected component.
_d | The descriptor for the local component. |
_vids | All roadmap vertices initially in the component. |
|
protected |
Merge two local connected components. If they are both incomplete and from the same side of the edge, the one whos region is further ahead will be preserved. If they are from different sides of the edge, a bridge will be formed.
_d1 | The descriptor for the first component. |
_d2 | The descriptor for the second component. |
|
overridevirtual |
Print internal state of this object.
_os | The std::ostream to print to. |
Reimplemented from MPStrategyMethod.
|
protected |
Promote a local connected component to a bridge.
_d | The descriptor for the local component. |
Sample and add configurations to the roadmap.
|
protected |
Select a region based weighted success probabilities
|
protected |
Update the local connectivity for an edge.
|
protected |
After extending a local component, aggressively try to bridge across to the other side from the newly added configurations.
|
staticprotected |
Completed local components.
|
protected |
The workspace decomposition label.
|
protected |
The extender label.
|
protected |
Weight of explore vs. exploit in region selection probabilities. Exploring is a uniform chance to select each region, while exploit favors successful regions.
|
staticprotected |
Is the shared state initialized?
|
staticprotected |
Local components in progress.
|
staticprotected |
Track low-clearance edges.
|
protected |
The neighborhood finder label.
|
protected |
Optional minimum radius for regions. -1 indicates no limit, allowing low-clearance regions to be pruned.
|
protected |
The neighborhood finder label.
|
staticprotected |
Expansion regions for local components.
|
protected |
Samplers to generate nodes.
|
staticprotected |
The workspace skeleton.
|
protected |
The output file for the skeleton graph.
|
protected |
Option to read or write the skeleton.
|
protected |
Type of skeleton to build.
|
staticprotected |
Track unconnected edges.