Parasol Planning Library (PPL)
PathModifierMethod Class Referenceabstract

Base algorithm abstraction for PathModifiers. More...

#include <PathModifierMethod.h>

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

Public Types

Motion Planning Types
typedef MPBaseObject::RoadmapType RoadmapType
 
typedef RoadmapType::VID VID
 
- 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
 PathModifierMethod ()=default
 
 PathModifierMethod (XMLNode &_node)
 
virtual ~PathModifierMethod ()=default
 
MPBaseObject Overrides
virtual void Print (ostream &_os) const override
 
- 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...
 

PathModifier Interface

virtual void Modify (vector< Cfg > &_path, vector< Cfg > &_newPath)
 
virtual void Modify (RoadmapType *_graph, vector< Cfg > &_path, vector< Cfg > &_newPath)
 
virtual bool ModifyImpl (RoadmapType *_graph, vector< Cfg > &_path, vector< Cfg > &_newPath)=0
 
void AddToPath (vector< Cfg > &_path, LPOutput *_lpOutput, Cfg &_end)
 
vector< VIDGetPathVIDs (vector< Cfg > &_path, RoadmapType *_graph)
 
void RemoveBranches (const string &_dmLabel, vector< Cfg > &_path, vector< Cfg > &_newPath)
 @TODO Figure out what this does and document it. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MPBaseObject
void SetName (const std::string &_s)
 
const std::string & GetBaseFilename () const
 
- Protected Attributes inherited from MPBaseObject
bool m_debug
 Print debug info? More...
 

Detailed Description

Base algorithm abstraction for PathModifiers.

PathModifierMethod has one main method, Modify, which takes an input path and produces a valid output path.

Member Typedef Documentation

◆ RoadmapType

◆ VID

Constructor & Destructor Documentation

◆ PathModifierMethod() [1/2]

PathModifierMethod::PathModifierMethod ( )
default

◆ PathModifierMethod() [2/2]

PathModifierMethod::PathModifierMethod ( XMLNode _node)

◆ ~PathModifierMethod()

virtual PathModifierMethod::~PathModifierMethod ( )
virtualdefault

Member Function Documentation

◆ AddToPath()

void PathModifierMethod::AddToPath ( vector< Cfg > &  _path,
LPOutput _lpOutput,
Cfg _end 
)
protected

Appends local plan to path

Parameters
_pathPath to append local plan to
_lpOutputLocal plan output
_endEnd Cfg of local plan

◆ GetPathVIDs()

std::vector< size_t > PathModifierMethod::GetPathVIDs ( vector< Cfg > &  _path,
RoadmapType _graph 
)
protected

Extract path VIDs in roadmap from path

Parameters
_pathPath to extract VIDs from
_graphRoadmapGraph containing path nodes
Returns
Path VIDs

◆ Modify() [1/2]

void PathModifierMethod::Modify ( RoadmapType _graph,
vector< Cfg > &  _path,
vector< Cfg > &  _newPath 
)
virtual

◆ Modify() [2/2]

void PathModifierMethod::Modify ( vector< Cfg > &  _path,
vector< Cfg > &  _newPath 
)
virtual

Modifies the input path to a new valid path

Parameters
_pathA path of configurations within a resolution distance of each other
_newPathAn empty vector to place the resulting modified path

@usage

PathModifierPointer pm = this->GetPathModifier(m_pmLabel);
vector<Cfg> inputPath, outputPath;
pm->Modify(inputPath, outputPath);

◆ ModifyImpl()

virtual bool PathModifierMethod::ModifyImpl ( RoadmapType _graph,
vector< Cfg > &  _path,
vector< Cfg > &  _newPath 
)
protectedpure virtual

Modifies the input path to a new valid path

Parameters
_pathA path of configurations within a resolution distance of each other
_newPathAn empty vector to place the resulting modified path
Returns
Success/failed modification

Implemented in ShortcuttingPathModifier.

◆ Print()

void PathModifierMethod::Print ( ostream &  _os) const
overridevirtual

Print internal state of this object.

Parameters
_osThe std::ostream to print to.

Reimplemented from MPBaseObject.

Reimplemented in ShortcuttingPathModifier.

◆ RemoveBranches()

void PathModifierMethod::RemoveBranches ( const string &  _dmLabel,
vector< Cfg > &  _path,
vector< Cfg > &  _newPath 
)
protected

@TODO Figure out what this does and document it.


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