Parasol Planning Library (PPL)
Protected Member Functions | Protected Attributes | Friends
MPBaseObject Class Reference

#include <MPBaseObject.h>

Inheritance diagram for MPBaseObject:
Inheritance graph
[legend]

Public Types

Local Types
typedef DefaultWeight< CfgWeightType
 
typedef GenericStateGraph< Cfg, WeightTypeRoadmapType
 
typedef GroupCfg< RoadmapTypeGroupCfgType
 
typedef GroupLocalPlan< RoadmapTypeGroupWeightType
 
typedef GroupRoadmap< GroupCfgType, GroupWeightTypeGroupRoadmapType
 

Public Member Functions

Construction
 MPBaseObject (const std::string &_label="", const std::string &_name="", bool _debug=false)
 
 MPBaseObject (XMLNode &_node)
 
virtual ~MPBaseObject ()
 
I/O
virtual void Print (std::ostream &_os) const
 
Initialization
virtual void Initialize ()
 
Name and Label Accessors
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...
 
MPLibrary Accessors
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...
 
Problem Accessors
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...
 
Solution Accessors
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 Member Functions

void SetName (const std::string &_s)
 
const std::string & GetBaseFilename () const
 

Protected Attributes

bool m_debug
 Print debug info? More...
 

Friends

template<typename U >
class MethodSet
 

Detailed Description

Abstract base class for all algorithm abstractions in PMPL.

The MPBaseObject carries a class name m_name and unique label m_label for each algorithm. The name refers to the class from which the object was instantiated, while the label refers to a specific instantiation of that class.

All algorithms are owned by an MPLibrary, which is referenced here as m_library. When initially created, these objects will have no knowledge of the MPProblem that they will be used on: they will only have access to parameter settings provided in their XML nodes. Derived classes that have problem-dependent internal state should override the Initialize() method to set that data: this method will be called whenever the owning MPLibrary's current MPProblem is changed.

Member Typedef Documentation

◆ GroupCfgType

◆ GroupRoadmapType

◆ GroupWeightType

◆ RoadmapType

◆ WeightType

Constructor & Destructor Documentation

◆ MPBaseObject() [1/2]

MPBaseObject::MPBaseObject ( const std::string &  _label = "",
const std::string &  _name = "",
bool  _debug = false 
)

Default constructor explicitly gives name, label, and debug.

Parameters
_labelID of the object, i.e., user defined label
_nameName of the object, i.e., derived class name
_debugTurn debug output on or off

◆ MPBaseObject() [2/2]

MPBaseObject::MPBaseObject ( XMLNode _node)

XML constructor pulls label and debug from an XML node.

Parameters
_nodeXMLNode to parse for this object

◆ ~MPBaseObject()

MPBaseObject::~MPBaseObject ( )
virtual

Member Function Documentation

◆ GetBaseFilename()

const std::string & MPBaseObject::GetBaseFilename ( ) const
protected
Returns
base file name from MPProblem

◆ GetBlockRoadmap()

MPBaseObject::RoadmapType * MPBaseObject::GetBlockRoadmap ( Robot *const  _r = nullptr) const
noexcept

Get the current obstacle-space roadmap.

◆ GetEnvironment()

Environment * MPBaseObject::GetEnvironment ( ) const
noexcept

Get the current environment.

◆ GetGroupPath()

GroupPath * MPBaseObject::GetGroupPath ( RobotGroup *const  _g = nullptr) const
noexcept

Get the current best group path.

◆ GetGroupRoadmap()

MPBaseObject::GroupRoadmapType * MPBaseObject::GetGroupRoadmap ( RobotGroup *const  _g = nullptr) const
noexcept

Get the current free-space group roadmap.

◆ GetGroupTask()

GroupTask * MPBaseObject::GetGroupTask ( ) const
noexcept

Get the current group task.

◆ GetLabel()

const std::string & MPBaseObject::GetLabel ( ) const

Get the unique label for this object.

◆ GetLocalObstacleMap()

LocalObstacleMap * MPBaseObject::GetLocalObstacleMap ( ) const
noexcept

Get the local obstacle map.

◆ GetMPLibrary()

MPLibrary * MPBaseObject::GetMPLibrary ( ) const
noexcept

Get the owning MPLibrary.

◆ GetMPProblem()

MPProblem * MPBaseObject::GetMPProblem ( ) const
noexcept

Get the library's current MPProblem.

◆ GetMPSolution()

MPSolutionType * MPBaseObject::GetMPSolution ( ) const
noexcept

◆ GetName()

const std::string & MPBaseObject::GetName ( ) const

Get the class name for this object.

◆ GetNameAndLabel()

std::string MPBaseObject::GetNameAndLabel ( ) const

Get the unique string identifier for this object "m_name::m_label".

◆ GetPath()

Path * MPBaseObject::GetPath ( Robot *const  _r = nullptr) const
noexcept

◆ GetRoadmap()

MPBaseObject::RoadmapType * MPBaseObject::GetRoadmap ( Robot *const  _r = nullptr) const
noexcept

Get the current free-space roadmap.

◆ GetStatClass()

StatClass * MPBaseObject::GetStatClass ( ) const
noexcept

Get the current StatClass.

◆ GetTask()

MPTask * MPBaseObject::GetTask ( ) const
noexcept

Get the current task.

◆ Initialize()

virtual void MPBaseObject::Initialize ( )
inlinevirtual

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 EdgeValidityCheckerMethod, ObstacleClearanceValidity, KdTreeNF, TopologicalMap, SafeIntervalTool, ReachabilityUtil, PointConstruction, ClearanceUtility, TogglePRMStrategy, Syclop, PathStrategy, GroupPRM, EET, DynamicRegionsPRM, DynamicRegionRRT, DynamicDomainRRT, BasicRRTStrategy, BasicPRM, AdaptiveRRT, TimeMetric, TimeEvaluator, SIPPMethod, QueryMethod, PathEvaluator, MinimumDistanceEvaluator, LazyQuery, GroupQuery, ComposeEvaluator, ClearanceQuery, CBSQuery, IntermediatesEdgeValidityChecker, ConnectorMethod, WrenchAccessibilityTool, MPStrategyMethod, and ModifyPath.

◆ IsRunning()

bool MPBaseObject::IsRunning ( ) const
noexcept

Check the library's running flag.

◆ Print()

void MPBaseObject::Print ( std::ostream &  _os) const
virtual

◆ SetLabel()

void MPBaseObject::SetLabel ( const std::string &  _s)

Set the unique label for this object.

◆ SetMPLibrary()

void MPBaseObject::SetMPLibrary ( MPLibrary _l)
noexcept

Set the owning MPLibrary.

◆ SetName()

void MPBaseObject::SetName ( const std::string &  _s)
inlineprotected
Parameters
_sClass name

Friends And Related Function Documentation

◆ MethodSet

template<typename U >
friend class MethodSet
friend

Field Documentation

◆ m_debug

bool MPBaseObject::m_debug
protected

Print debug info?


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