PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members | Protected Member Functions | Protected Attributes
GroupStrategyMethod< MPTraits > Class Template Reference

Public Member Functions

Construction
 GroupStrategyMethod ()=default
 
 GroupStrategyMethod (XMLNode &_node)
 
virtual ~GroupStrategyMethod ()=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)
 
Initialization
virtual void Initialize ()
 
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.
 
MPLibraryGetMPLibrary () 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::MPToolsGetMPTools () const noexcept
 Get the MPTools container from the owning MPLibrary.
 
Problem Accessors
MPProblemGetMPProblem () const noexcept
 Get the library's current MPProblem.
 
EnvironmentGetEnvironment () const noexcept
 Get the current environment.
 
MPTaskGetTask () const noexcept
 Get the current task.
 
GroupTaskGetGroupTask () const noexcept
 Get the current group task.
 
Solution Accessors
MPSolutionGetMPSolution () const noexcept
 
RoadmapTypeGetRoadmap (Robot *const _r=nullptr) const noexcept
 Get the current free-space roadmap.
 
GroupRoadmapTypeGetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept
 Get the current free-space group roadmap.
 
RoadmapTypeGetBlockRoadmap (Robot *const _r=nullptr) const noexcept
 Get the current obstacle-space roadmap.
 
PathGetPath (Robot *const _r=nullptr) const noexcept
 Get the current best path.
 
GroupPathGetGroupPath (RobotGroup *const _g=nullptr) const noexcept
 Get the current best group path.
 
StatClassGetStatClass () const noexcept
 Get the current StatClass.
 
LocalObstacleMapGetLocalObstacleMap () const noexcept
 Get the local obstacle map.
 
GoalTrackerGetGoalTracker () const noexcept
 Get the goal tracker.
 

Public Types

Motion Planning Types
typedef MPTraits::CfgType CfgType
 
typedef MPTraits::GroupCfgType GroupCfgType
 
typedef MPTraits::GroupPathType GroupPath
 
typedef MPTraits::GroupRoadmapType GroupRoadmapType
 
typedef GroupRoadmapType::VID VID
 
typedef SamplerMethod< MPTraits >::BoundaryMap BoundaryMap
 
Motion Planning Types
typedef MPTraits::RoadmapType RoadmapType
 
Local Types
typedef MPTraits::LocalObstacleMap LocalObstacleMap
 
typedef MPTraits::Path Path
 
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 Finalize () override
 Clean-up and output results. More...
 
virtual size_t GenerateStart (const std::string &_samplerLabel) override
 
virtual std::vector< size_t > GenerateGoals (const std::string &_samplerLabel) override
 
Helpers
BoundaryMap GetStartBoundaryMap () const noexcept
 
std::vector< BoundaryMap > GetGoalBoundaryMaps () const noexcept
 
Helpers
virtual void Run ()
 Call Iterate until EvaluateMap is true. More...
 
virtual bool EvaluateMap ()
 Check if we satisfied all map evaluators.
 
virtual void Iterate ()
 Execute one iteration of the strategy. More...
 
virtual void ClearRoadmap ()
 Pre-clear the roadmap(s) if requested.
 

Protected Attributes

bool m_debug
 Print debug info?
 
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?
 

Detailed Description

template<typename MPTraits>
class GroupStrategyMethod< MPTraits >

Base algorithm abstraction for MPStrategies that plan for robot groups.

Todo:
Incorporate path constraints when generating the start and goal.

Member Function Documentation

◆ Finalize()

template<typename MPTraits >
void GroupStrategyMethod< MPTraits >::Finalize
overrideprotectedvirtual

Clean-up and output results.

Reimplemented from MPStrategyMethod< MPTraits >.

Reimplemented in GroupDecoupledStrategy< MPTraits >.

◆ GenerateStart()

template<typename MPTraits >
size_t GroupStrategyMethod< MPTraits >::GenerateStart ( const std::string &  _samplerLabel)
overrideprotectedvirtual

Generate a 'start' node for the task and add it to the roadmap.

Parameters
_samplerLabelThe label for the sampler to use if no query sampler was provided, or empty to require a query sampler.
Returns
The VID of the generated configuration.
Note
This returns size_t so that it will work for both individual and group strategies (all VID types are typedefs for size_t).

Reimplemented from MPStrategyMethod< MPTraits >.

◆ GenerateGoals()

template<typename MPTraits >
std::vector< size_t > GroupStrategyMethod< MPTraits >::GenerateGoals ( const std::string &  _samplerLabel)
overrideprotectedvirtual

Generate 'goal' node(s) for the task and add it(them) to the roadmap.

Parameters
_samplerLabelThe label for the sampler to use if no query sampler was provided, or empty to require a query sampler.
Returns
The VIDs of the generated configurations.
Note
This returns size_t so that it will work for both individual and group strategies (all VID types are typedefs for size_t).

Reimplemented from MPStrategyMethod< MPTraits >.

◆ GetStartBoundaryMap()

template<typename MPTraits >
GroupStrategyMethod< MPTraits >::BoundaryMap GroupStrategyMethod< MPTraits >::GetStartBoundaryMap
protectednoexcept

Get a map from robot -> boundary for the current group task's start constraints.

◆ GetGoalBoundaryMaps()

template<typename MPTraits >
std::vector< typename GroupStrategyMethod< MPTraits >::BoundaryMap > GroupStrategyMethod< MPTraits >::GetGoalBoundaryMaps
protectednoexcept

Get a map from robot -> boundary for each of the current group task's goal constraints.

◆ Print()

template<typename MPTraits >
void MPStrategyMethod< MPTraits >::Print ( std::ostream &  _os) const
overridevirtualinherited

Print internal state of this object.

Parameters
_osThe std::ostream to print to.

Reimplemented from MPBaseObject< MPTraits >.

Reimplemented in AdaptiveRRT< MPTraits >, BasicRRTStrategy< MPTraits >, BasicPRM< MPTraits >, GroupDecoupledStrategy< MPTraits >, and TogglePRMStrategy< MPTraits >.

◆ EnableOutputFiles()

template<typename MPTraits >
void MPStrategyMethod< MPTraits >::EnableOutputFiles ( const bool  _enable = true)
inherited

Set output file writing to on or off (on by default). This is used to suppress generation of roadmap, path, and stat files.

Parameters
_enableTrue to enable, false to disable.

◆ Run()

template<typename MPTraits >
void MPStrategyMethod< MPTraits >::Run
protectedvirtualinherited

Call Iterate until EvaluateMap is true.

Reimplemented in ValidationStrategy< MPTraits >.

◆ Iterate()

template<typename MPTraits >
virtual void MPStrategyMethod< MPTraits >::Iterate ( )
protectedvirtualinherited

◆ Initialize()

template<typename MPTraits >
virtual void MPBaseObject< MPTraits >::Initialize ( )
virtualinherited

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.

Warning
This member will be called for every compiled algorithm in the planning library - even those that will not be used. If an algorithm needs to do expenisve setup, then this method should only set a flag that tells it to do so on first use. The only exceptions are the MPStrategies, which will only have their initialize called on first use.

Reimplemented in ConnectorMethod< MPTraits >, CBSQuery< MPTraits >, ComposeEvaluator< MPTraits >, LazyQuery< MPTraits >, QueryMethod< MPTraits >, SIPPMethod< MPTraits >, TimeEvaluator< MPTraits >, TimeMetric< MPTraits >, AdaptiveRRT< MPTraits >, BasicPRM< MPTraits >, BasicRRTStrategy< MPTraits >, TogglePRMStrategy< MPTraits >, ValidationStrategy< MPTraits >, LKHSearch< MPTraits >, ClearanceUtility< MPTraits >, ReachabilityUtil< MPTraits >, SafeIntervalTool< MPTraits >, and TopologicalMap< MPTraits >.

◆ SetName()

template<typename MPTraits >
void MPBaseObject< MPTraits >::SetName ( const std::string &  _s)
protectedinherited
Parameters
_sClass name

◆ GetBaseFilename()

template<typename MPTraits >
const std::string & MPBaseObject< MPTraits >::GetBaseFilename ( ) const
protectedinherited
Returns
base file name from MPProblem

The documentation for this class was generated from the following file: