Parasol Planning Library (PPL)
Data Structures
RewireConnector Class Reference

#include <RewireConnector.h>

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

Data Structures

struct  GroupRewireTestOutput
 An aggregate for returning the results of a group rewiring check. More...
 
struct  RewireTestOutput
 An aggregate for returning the results of a rewiring check. More...
 

Public Types

Motion Planning Types
typedef MPBaseObject::GroupCfgType GroupCfgType
 
typedef MPBaseObject::WeightType WeightType
 
typedef MPBaseObject::GroupWeightType GroupWeightType
 
typedef MPBaseObject::RoadmapType RoadmapType
 
typedef MPBaseObject::GroupRoadmapType GroupRoadmapType
 
typedef RoadmapType::VID VID
 
typedef RoadmapType::VertexSet VertexSet
 
Local Types
template<typename AbstractRoadmapType >
using OutputIterator = typename ConnectorMethod::template OutputIterator< AbstractRoadmapType >
 
- Public Types inherited from ConnectorMethod
typedef MPBaseObject::GroupCfgType GroupCfgType
 
typedef MPBaseObject::RoadmapType RoadmapType
 
typedef MPBaseObject::GroupRoadmapType GroupRoadmapType
 
typedef RoadmapType::VID VID
 
typedef RoadmapType::VertexSet VertexSet
 
typedef std::pair< VID, VID > ConnectionAttempt
 
typedef std::unordered_set< ConnectionAttempt > ConnectionAttempts
 
typedef std::unordered_map< void *, ConnectionAttempts > ConnectionAttemptsCache
 
template<typename AbstractRoadmapType >
using OutputIterator = std::back_insert_iterator< std::vector< typename AbstractRoadmapType::VP > >
 
- Public Types inherited from MPBaseObject
typedef DefaultWeight< Cfg > WeightType
 
typedef GenericStateGraph< Cfg, WeightType > RoadmapType
 
typedef GroupCfg< RoadmapType > GroupCfgType
 
typedef GroupLocalPlan< RoadmapType > GroupWeightType
 
typedef GroupRoadmap< GroupCfgType, GroupWeightType > GroupRoadmapType
 

Public Member Functions

Construction
 RewireConnector ()
 
 RewireConnector (XMLNode &_node)
 
virtual ~RewireConnector ()=default
 
- Public Member Functions inherited from ConnectorMethod
 ConnectorMethod ()
 
 ConnectorMethod (XMLNode &_node)
 
virtual ~ConnectorMethod ()=default
 
virtual void Print (std::ostream &_os) const override
 
virtual void Initialize () override
 
template<typename AbstractRoadmapType >
void Connect (AbstractRoadmapType *const _r, const VertexSet *const _targetSet=nullptr, OutputIterator< AbstractRoadmapType > *const _collision=nullptr)
 
template<typename AbstractRoadmapType >
void Connect (AbstractRoadmapType *const _r, const VID _source, const VertexSet *const _targetSet=nullptr, OutputIterator< AbstractRoadmapType > *const _collision=nullptr)
 
template<typename AbstractRoadmapType , typename InputIterator >
void Connect (AbstractRoadmapType *const _r, InputIterator _sourceBegin, InputIterator _sourceEnd, const VertexSet *const _targetSet=nullptr, OutputIterator< AbstractRoadmapType > *const _collision=nullptr)
 
bool IsRewiring () const noexcept
 
- Public Member Functions inherited from MPBaseObject
 MPBaseObject (const std::string &_label="", const std::string &_name="", bool _debug=false)
 
 MPBaseObject (XMLNode &_node)
 
virtual ~MPBaseObject ()
 
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...
 
MPLibrary * GetMPLibrary () const noexcept
 Get the owning MPLibrary. More...
 
bool IsRunning () const noexcept
 Check the library's running flag. More...
 
MPProblem * GetMPProblem () const noexcept
 Get the library's current MPProblem. More...
 
Environment * GetEnvironment () const noexcept
 Get the current environment. More...
 
MPTask * GetTask () const noexcept
 Get the current task. More...
 
GroupTask * GetGroupTask () const noexcept
 Get the current group task. More...
 
MPSolutionType * GetMPSolution () const noexcept
 
RoadmapType * GetRoadmap (Robot *const _r=nullptr) const noexcept
 Get the current free-space roadmap. More...
 
GroupRoadmapType * GetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept
 Get the current free-space group roadmap. More...
 
RoadmapType * GetBlockRoadmap (Robot *const _r=nullptr) const noexcept
 Get the current obstacle-space roadmap. More...
 
Path * GetPath (Robot *const _r=nullptr) const noexcept
 
GroupPath * GetGroupPath (RobotGroup *const _g=nullptr) const noexcept
 Get the current best group path. More...
 
StatClass * GetStatClass () const noexcept
 Get the current StatClass. More...
 
LocalObstacleMap * GetLocalObstacleMap () const noexcept
 Get the local obstacle map. More...
 

ConnectorMethod Overrides

virtual void ConnectImpl (RoadmapType *const _r, const VID _source, const VertexSet *const _targetSet=nullptr, OutputIterator< RoadmapType > *const _collision=nullptr) override
 
virtual void ConnectImpl (GroupRoadmapType *const _r, const VID _source, const VertexSet *const _targetSet=nullptr, OutputIterator< GroupRoadmapType > *const _collision=nullptr) override
 
std::vector< Neighbor > m_neighborBuffer
 

Additional Inherited Members

- Protected Member Functions inherited from ConnectorMethod
template<typename AbstractRoadmapType >
void ConnectNeighbors (AbstractRoadmapType *const _r, const VID _source, const std::vector< Neighbor > &_neighbors, OutputIterator< AbstractRoadmapType > *const _collision=nullptr, const bool _earlyQuit=false)
 
bool ConnectNodes (RoadmapType *const _r, const VID _source, const VID _target, OutputIterator< RoadmapType > *const _collision=nullptr)
 
bool ConnectNodes (GroupRoadmapType *const _r, const VID _source, const VID _target, OutputIterator< GroupRoadmapType > *const _collision=nullptr)
 
template<typename AbstractRoadmapType >
bool DoNotCheck (AbstractRoadmapType *const _r, const VID _source, const VID _target) const
 
void CacheFailedConnection (void *const _map, const VID _source, const VID _target) noexcept
 
bool IsCached (void *const _map, const VID _source, const VID _target) const noexcept
 
void ClearConnectionAttempts ()
 Clear the attempts cache. More...
 
- Protected Member Functions inherited from MPBaseObject
void SetName (const std::string &_s)
 
const std::string & GetBaseFilename () const
 
- Protected Attributes inherited from ConnectorMethod
ConnectionAttemptsCache m_attemptsCache
 All failed connection attempts. More...
 
std::string m_lpLabel
 Local Planner. More...
 
bool m_skipIfSameCC {true}
 Skip connections within the same CC? More...
 
size_t m_maxFailures {0}
 Maximum allowed failures per use. More...
 
size_t m_failures {0}
 Failures in this use. More...
 
bool m_oneWay {false}
 Create one-way edges or two-way? More...
 
bool m_rewiring {false}
 Does this connector delete edges? More...
 
bool m_selfEdges {false}
 Indicates if roadmap vertices should have self-edges. More...
 
std::vector< Neighbor > m_neighborBuffer
 
- Protected Attributes inherited from MPBaseObject
bool m_debug
 Print debug info? More...
 

Detailed Description

Re-wires a tree for optimal RRT planners. This only makes sense for tree-like planners. It will change the structure of the tree; ensure that your algorithm can handle this before using.

Reference: Sertac Karaman and Emilio Frazzoli. "Sampling-based algorithms for optimal motion planning". IJRR 2011.

Member Typedef Documentation

◆ GroupCfgType

◆ GroupRoadmapType

◆ GroupWeightType

◆ OutputIterator

template<typename AbstractRoadmapType >
using RewireConnector::OutputIterator = typename ConnectorMethod::template OutputIterator<AbstractRoadmapType>

◆ RoadmapType

◆ VertexSet

◆ VID

◆ WeightType

Constructor & Destructor Documentation

◆ RewireConnector() [1/2]

RewireConnector::RewireConnector ( )

◆ RewireConnector() [2/2]

RewireConnector::RewireConnector ( XMLNode &  _node)

◆ ~RewireConnector()

virtual RewireConnector::~RewireConnector ( )
virtualdefault

Member Function Documentation

◆ ConnectImpl() [1/2]

void RewireConnector::ConnectImpl ( GroupRoadmapType *const  _r,
const VID  _source,
const VertexSet *const  _targetSet = nullptr,
OutputIterator< GroupRoadmapType > *const  _collision = nullptr 
)
overrideprotectedvirtual

Reimplemented from ConnectorMethod.

◆ ConnectImpl() [2/2]

void RewireConnector::ConnectImpl ( RoadmapType *const  _r,
const VID  _source,
const VertexSet *const  _targetSet = nullptr,
OutputIterator< RoadmapType > *const  _collision = nullptr 
)
overrideprotectedvirtual

Connect a source node to some subset of a target set. Derived classes specify how this will happen.

Parameters
_rThe owning roadmap.
_sourceThe source node to connect.
_targetSetThe candidate target nodes, or null for the whole roadmap.
_collisionAn optional output iterator for collisions.

Reimplemented from ConnectorMethod.

Field Documentation

◆ m_neighborBuffer

std::vector<Neighbor> ConnectorMethod::m_neighborBuffer
protected

This is a performance optimization which makes a big impact. The neighbor set can be as large as the roadmap, so it is important to avoid re-allocating it on every call to ConnectImpl.


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