Parasol Planning Library (PPL)
ExtenderMethod Class Referenceabstract

#include <ExtenderMethod.h>

Inheritance diagram for ExtenderMethod:
Inheritance graph
[legend]
Collaboration diagram for ExtenderMethod:
Collaboration graph
[legend]

Public Types

Motion Planning Types
typedef MPBaseObject::RoadmapType RoadmapType
 
typedef MPBaseObject::GroupCfgType GroupCfgType
 
typedef GroupLocalPlan< RoadmapTypeGroupWeightType
 
- Public Types inherited from MPBaseObject
typedef DefaultWeight< CfgWeightType
 
typedef GenericStateGraph< Cfg, WeightTypeRoadmapType
 
typedef GroupCfg< RoadmapTypeGroupCfgType
 
typedef GroupLocalPlan< RoadmapTypeGroupWeightType
 
typedef GroupRoadmap< GroupCfgType, GroupWeightTypeGroupRoadmapType
 

Public Member Functions

Construction
 ExtenderMethod ()=default
 
 ExtenderMethod (XMLNode &_node)
 
virtual ~ExtenderMethod ()=default
 
MPBaseObject Overrides
virtual void Print (std::ostream &_os) const override
 
Required Interface
virtual double GetMinDistance () const
 Get the minimum extension distance. More...
 
virtual double GetMaxDistance () const
 Get the maximum extension distance. More...
 
virtual bool Extend (const Cfg &_start, const Cfg &_end, Cfg &_new, LPOutput &_lp)=0
 
virtual bool Extend (const Cfg &_start, const Cfg &_end, Cfg &_new, LPOutput &_lp, CDInfo &_cdInfo)
 An optional version if CDInfo is desired. Not required to implement. More...
 
virtual bool Extend (const GroupCfgType &_start, const GroupCfgType &_end, GroupCfgType &_new, GroupLPOutput &_lp, const std::vector< size_t > &_robotIndexes={})
 
virtual bool Extend (const GroupCfgType &_start, const GroupCfgType &_end, GroupCfgType &_new, GroupLPOutput &_lp, CDInfo &_cdInfo, const std::vector< size_t > &_robotIndexes={})
 
- Public Member Functions inherited from MPBaseObject
 MPBaseObject (const std::string &_label="", const std::string &_name="", bool _debug=false)
 
 MPBaseObject (XMLNode &_node)
 
virtual ~MPBaseObject ()
 
virtual void Initialize ()
 
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...
 
MPLibraryGetMPLibrary () const noexcept
 Get the owning MPLibrary. More...
 
bool IsRunning () const noexcept
 Check the library's running flag. More...
 
MPProblemGetMPProblem () const noexcept
 Get the library's current MPProblem. More...
 
EnvironmentGetEnvironment () const noexcept
 Get the current environment. More...
 
MPTaskGetTask () const noexcept
 Get the current task. More...
 
GroupTaskGetGroupTask () const noexcept
 Get the current group task. More...
 
MPSolutionTypeGetMPSolution () const noexcept
 
RoadmapTypeGetRoadmap (Robot *const _r=nullptr) const noexcept
 Get the current free-space roadmap. More...
 
GroupRoadmapTypeGetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept
 Get the current free-space group roadmap. More...
 
RoadmapTypeGetBlockRoadmap (Robot *const _r=nullptr) const noexcept
 Get the current obstacle-space roadmap. More...
 
PathGetPath (Robot *const _r=nullptr) const noexcept
 
GroupPathGetGroupPath (RobotGroup *const _g=nullptr) const noexcept
 Get the current best group path. More...
 
StatClassGetStatClass () const noexcept
 Get the current StatClass. More...
 
LocalObstacleMapGetLocalObstacleMap () const noexcept
 Get the local obstacle map. More...
 

Protected Attributes

Extender Properties
double m_minDist {.1}
 The minimum valid extension distance. More...
 
double m_maxDist {1.}
 The maximum valid extension distance. More...
 
- Protected Attributes inherited from MPBaseObject
bool m_debug
 Print debug info? More...
 

Additional Inherited Members

- Protected Member Functions inherited from MPBaseObject
void SetName (const std::string &_s)
 
const std::string & GetBaseFilename () const
 

Detailed Description

Base algorithm abstraction for Extenders.

ExtenderMethod has one main method, Extend, to grow a simple path from a starting node in some input direction - note that not all expansion methods go in straight lines through @cspace.

@usage

ExtenderPointer e = this->GetExtender(m_exLabel);
CfgType start, goal, new;
bool pass = e->Extend(start, goal, new, lp);
Definition: LPOutput.h:24
Todo:
Local planners and Extenders represent the same concepts and should be merged into a single class with both an Extend and LocalPlan function. This will help simplify several other objects within PMPL as well, such as bi-directional RRT.

Member Typedef Documentation

◆ GroupCfgType

◆ GroupWeightType

◆ RoadmapType

Constructor & Destructor Documentation

◆ ExtenderMethod() [1/2]

ExtenderMethod::ExtenderMethod ( )
default

◆ ExtenderMethod() [2/2]

ExtenderMethod::ExtenderMethod ( XMLNode _node)

◆ ~ExtenderMethod()

virtual ExtenderMethod::~ExtenderMethod ( )
virtualdefault

Member Function Documentation

◆ Extend() [1/4]

virtual bool ExtenderMethod::Extend ( const Cfg _start,
const Cfg _end,
Cfg _new,
LPOutput _lp 
)
pure virtual

Extends a local plan from a starting configuration towards a target configuration.

Parameters
_startInitial configuration to grow from.
_endTarget configuration to grow towards.
_newPlaceholder for resulting configuration.
_lpPlaceholder for polygonal chain configurations for non-straight-line extention operations and associated weight.
Returns
True if the extension produced a valid configuration that was at least the minimum distance away from the starting point.

Implemented in RotationThenTranslation, and BasicExtender.

◆ Extend() [2/4]

bool ExtenderMethod::Extend ( const Cfg _start,
const Cfg _end,
Cfg _new,
LPOutput _lp,
CDInfo _cdInfo 
)
virtual

An optional version if CDInfo is desired. Not required to implement.

Reimplemented in BasicExtender.

◆ Extend() [3/4]

bool ExtenderMethod::Extend ( const GroupCfgType _start,
const GroupCfgType _end,
GroupCfgType _new,
GroupLPOutput _lp,
CDInfo _cdInfo,
const std::vector< size_t > &  _robotIndexes = {} 
)
virtual

For groups, with CD info. @override

Parameters
_robotIndexesThe indexes of the robots which should move (empty for all).

Reimplemented in BasicExtender.

◆ Extend() [4/4]

bool ExtenderMethod::Extend ( const GroupCfgType _start,
const GroupCfgType _end,
GroupCfgType _new,
GroupLPOutput _lp,
const std::vector< size_t > &  _robotIndexes = {} 
)
virtual

For groups. @override

Parameters
_robotIndexesThe indexes of the robots which should move (empty for all).

Reimplemented in BasicExtender.

◆ GetMaxDistance()

double ExtenderMethod::GetMaxDistance ( ) const
virtual

Get the maximum extension distance.

◆ GetMinDistance()

double ExtenderMethod::GetMinDistance ( ) const
virtual

Get the minimum extension distance.

◆ Print()

void ExtenderMethod::Print ( std::ostream &  _os) const
overridevirtual

Print internal state of this object.

Parameters
_osThe std::ostream to print to.

Reimplemented from MPBaseObject.

Reimplemented in BasicExtender.

Field Documentation

◆ m_maxDist

double ExtenderMethod::m_maxDist {1.}
protected

The maximum valid extension distance.

◆ m_minDist

double ExtenderMethod::m_minDist {.1}
protected

The minimum valid extension distance.


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