PPL API Reference |
|
---|
Classes | |
struct | SamplerSetting |
Settings for a specific sampler. More... | |
Public Member Functions | |
Construction | |
BasicPRM () | |
BasicPRM (XMLNode &_node) | |
virtual | ~BasicPRM ()=default |
MPBaseObject Overrides | |
virtual void | Print (std::ostream &_os) const override |
Interface | |
void | operator() () |
Execute the strategy by calling Initialize, Run, and Finalize. | |
void | EnableOutputFiles (const bool _enable=true) |
Name and Label Accessors | |
const std::string & | GetName () const |
Get the class name for this object. | |
const std::string & | GetLabel () const |
Get the unique label for this object. | |
std::string | GetNameAndLabel () const |
Get the unique string identifier for this object "m_name::m_label". | |
void | SetLabel (const std::string &) |
Set the unique label for this object. | |
MPLibrary Accessors | |
void | SetMPLibrary (MPLibrary *) noexcept |
Set the owning MPLibrary. | |
MPLibrary * | GetMPLibrary () const noexcept |
Get the owning MPLibrary. | |
bool | IsRunning () const noexcept |
Check the library's running flag. | |
DistanceMetricPointer | GetDistanceMetric (const std::string &) const noexcept |
Get a distance metric by label from the owning MPLibrary. | |
ValidityCheckerPointer | GetValidityChecker (const std::string &) const noexcept |
Get a validity checker by label from the owning MPLibrary. | |
NeighborhoodFinderPointer | GetNeighborhoodFinder (const std::string &) const noexcept |
Get a neighborhood finder by label from the owning MPLibrary. | |
SamplerPointer | GetSampler (const std::string &) const noexcept |
Get a sampler by label from the owning MPLibrary. | |
LocalPlannerPointer | GetLocalPlanner (const std::string &) const noexcept |
Get a local planner by label from the owning MPLibrary. | |
ExtenderPointer | GetExtender (const std::string &) const noexcept |
Get an extender by label from the owning MPLibrary. | |
PathModifierPointer | GetPathModifier (const std::string &) const noexcept |
Get a path modifier by label from the owning MPLibrary. | |
ConnectorPointer | GetConnector (const std::string &) const noexcept |
Get a connector by label from the owning MPLibrary. | |
MetricPointer | GetMetric (const std::string &) const noexcept |
Get a metric by label from the owning MPLibrary. | |
MapEvaluatorPointer | GetMapEvaluator (const std::string &) const noexcept |
Get a map evaluator by label from the owning MPLibrary. | |
MPStrategyPointer | GetMPStrategy (const std::string &) const noexcept |
Get a strategy by label from the owning MPLibrary. | |
MPTraits::MPTools * | GetMPTools () const noexcept |
Get the MPTools container from the owning MPLibrary. | |
Problem Accessors | |
MPProblem * | GetMPProblem () const noexcept |
Get the library's current MPProblem. | |
Environment * | GetEnvironment () const noexcept |
Get the current environment. | |
MPTask * | GetTask () const noexcept |
Get the current task. | |
GroupTask * | GetGroupTask () const noexcept |
Get the current group task. | |
Solution Accessors | |
MPSolution * | GetMPSolution () const noexcept |
RoadmapType * | GetRoadmap (Robot *const _r=nullptr) const noexcept |
Get the current free-space roadmap. | |
GroupRoadmapType * | GetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept |
Get the current free-space group roadmap. | |
RoadmapType * | GetBlockRoadmap (Robot *const _r=nullptr) const noexcept |
Get the current obstacle-space roadmap. | |
Path * | GetPath (Robot *const _r=nullptr) const noexcept |
Get the current best path. | |
GroupPath * | GetGroupPath (RobotGroup *const _g=nullptr) const noexcept |
Get the current best group path. | |
StatClass * | GetStatClass () const noexcept |
Get the current StatClass. | |
LocalObstacleMap * | GetLocalObstacleMap () const noexcept |
Get the local obstacle map. | |
GoalTracker * | GetGoalTracker () const noexcept |
Get the goal tracker. | |
Public Types | |
Motion Planning Types | |
typedef MPTraits::CfgType | CfgType |
typedef MPTraits::RoadmapType | RoadmapType |
typedef RoadmapType::VID | VID |
Local Types | |
typedef MPTraits::GroupRoadmapType | GroupRoadmapType |
typedef MPTraits::LocalObstacleMap | LocalObstacleMap |
typedef MPTraits::Path | Path |
typedef MPTraits::GroupPathType | GroupPath |
typedef MPTraits::MPLibrary | MPLibrary |
typedef MPTraits::MPSolution | MPSolution |
typedef MPTraits::GoalTracker | GoalTracker |
typedef MPLibrary::SamplerPointer | SamplerPointer |
typedef MPLibrary::LocalPlannerPointer | LocalPlannerPointer |
typedef MPLibrary::ExtenderPointer | ExtenderPointer |
typedef MPLibrary::PathModifierPointer | PathModifierPointer |
typedef MPLibrary::ConnectorPointer | ConnectorPointer |
typedef MPLibrary::MetricPointer | MetricPointer |
typedef MPLibrary::MapEvaluatorPointer | MapEvaluatorPointer |
typedef MPLibrary::MPStrategyPointer | MPStrategyPointer |
typedef MPLibrary::DistanceMetricPointer | DistanceMetricPointer |
typedef MPLibrary::ValidityCheckerPointer | ValidityCheckerPointer |
typedef MPLibrary::NeighborhoodFinderPointer | NeighborhoodFinderPointer |
Protected Member Functions | |
void | SetName (const std::string &_s) |
const std::string & | GetBaseFilename () const |
MPStrategyMethod Overrides | |
virtual void | Initialize () override |
virtual void | Iterate () override |
Execute one iteration of the strategy. More... | |
Helpers | |
std::vector< VID > | Sample () |
void | Connect (const std::vector< VID > &_vids) |
Helpers | |
virtual void | Run () |
Call Iterate until EvaluateMap is true. More... | |
virtual bool | EvaluateMap () |
Check if we satisfied all map evaluators. | |
virtual void | Finalize () |
Clean-up and output results. More... | |
virtual void | ClearRoadmap () |
Pre-clear the roadmap(s) if requested. | |
Start/Goal Generation | |
virtual size_t | GenerateStart (const std::string &_samplerLabel="") |
virtual std::vector< size_t > | GenerateGoals (const std::string &_samplerLabel="") |
Protected Attributes | |
bool | m_debug |
Print debug info? | |
Internal State | |
std::vector< SamplerSetting > | m_samplers |
Sampler labels with number and attempts of sampler. | |
std::vector< std::string > | m_connectorLabels |
Connector labels for node-to-node. | |
std::string | m_inputMapFilename |
Input roadmap to initialize map. | |
Fix-base hacks | |
To be removed when we properly implement path constraints or perhaps a sampler-method option. | |
bool | m_fixBase {false} |
std::unique_ptr< Boundary > | m_samplingBoundary |
An optional sampling boundary for fixing the base. | |
Internal State | |
std::string | m_querySampler |
Sampler for generating start/goal. | |
std::vector< std::string > | m_meLabels |
The list of map evaluators to use. | |
size_t | m_iterations {0} |
The number of executed iterations. | |
bool | m_writeOutput {true} |
Write output at the end? | |
bool | m_clearMap {false} |
Clear the roadmap(s) before run? | |
Basic PRM algorithm.
Reference: Lydia E. Kavraki and Petr Svestka and Jean-Claude Latombe and Mark H. Overmars. "Probabilistic Roadmaps for Path Planning in High-Dimensional Configuration Spaces". TRO 1996.
|
overridevirtual |
Print internal state of this object.
_os | The std::ostream to print to. |
Reimplemented from MPStrategyMethod< MPTraits >.
Reimplemented in TogglePRMStrategy< MPTraits >.
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< MPTraits >.
Reimplemented in TogglePRMStrategy< MPTraits >.
Execute one iteration of the strategy.
Reimplemented from MPStrategyMethod< MPTraits >.
Reimplemented in TogglePRMStrategy< MPTraits >.
|
protected |
Sample and add configurations to the roadmap.
|
protected |
Connect nodes in the roadmap.
_vids | A set of node VIDs to connect to the rest of the roadmap. |
|
inherited |
Set output file writing to on or off (on by default). This is used to suppress generation of roadmap, path, and stat files.
_enable | True to enable, false to disable. |
|
protectedvirtualinherited |
Call Iterate until EvaluateMap is true.
Reimplemented in ValidationStrategy< MPTraits >.
|
protectedvirtualinherited |
Clean-up and output results.
Reimplemented in GroupDecoupledStrategy< MPTraits >, GroupStrategyMethod< MPTraits >, and ValidationStrategy< MPTraits >.
|
protectedvirtualinherited |
Generate a 'start' node for the task and add it to the roadmap.
_samplerLabel | The label for the sampler to use if no query sampler was provided, or empty to require a query sampler. |
Reimplemented in GroupStrategyMethod< MPTraits >.
|
protectedvirtualinherited |
Generate 'goal' node(s) for the task and add it(them) to the roadmap.
_samplerLabel | The label for the sampler to use if no query sampler was provided, or empty to require a query sampler. |
Reimplemented in GroupStrategyMethod< MPTraits >.
|
protectedinherited |
_s | Class name |
|
protectedinherited |
Keep the base fixed to the start cfg?