Parasol Planning Library (PPL)
CCsConnector Class Reference

#include <CCsConnector.h>

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

Public Types

Motion Planning Types
typedef MPBaseObject::RoadmapType RoadmapType
 
typedef RoadmapType::VID VID
 
typedef RoadmapType::VertexSet VertexSet
 
typedef MPBaseObject::GroupRoadmapType GroupRoadmapType
 
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, VIDConnectionAttempt
 
typedef std::unordered_set< ConnectionAttemptConnectionAttempts
 
typedef std::unordered_map< void *, ConnectionAttemptsConnectionAttemptsCache
 
template<typename AbstractRoadmapType >
using OutputIterator = std::back_insert_iterator< std::vector< typename AbstractRoadmapType::VP > >
 
- 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
 CCsConnector ()
 
 CCsConnector (XMLNode &_node)
 
virtual ~CCsConnector ()=default
 
MPBaseObject Overrides
virtual void Print (std::ostream &_os) const override
 
- Public Member Functions inherited from ConnectorMethod
 ConnectorMethod ()
 
 ConnectorMethod (XMLNode &_node)
 
virtual ~ConnectorMethod ()=default
 
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...
 
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...
 

ConnectorMethod Overrides

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

Additional Inherited Members

- Protected Member Functions inherited from ConnectorMethod
virtual void ConnectImpl (RoadmapType *const _r, const VID _source, const VertexSet *const _targetSet=nullptr, OutputIterator< RoadmapType > *const _collision=nullptr)
 
virtual void ConnectImpl (GroupRoadmapType *const _r, const VID _source, const VertexSet *const _targetSet=nullptr, OutputIterator< GroupRoadmapType > *const _collision=nullptr)
 
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< Neighborm_neighborBuffer
 
- Protected Attributes inherited from MPBaseObject
bool m_debug
 Print debug info? More...
 

Detailed Description

Tries to connect the source vertices to targets in other CCs.

Note
If the skip same CC option is set, it will forgo checking the remainder of the targets in a target CC after the first success.

Member Typedef Documentation

◆ GroupRoadmapType

◆ OutputIterator

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

◆ RoadmapType

◆ VertexSet

◆ VID

Constructor & Destructor Documentation

◆ CCsConnector() [1/2]

CCsConnector::CCsConnector ( )

◆ CCsConnector() [2/2]

CCsConnector::CCsConnector ( XMLNode _node)

◆ ~CCsConnector()

virtual CCsConnector::~CCsConnector ( )
virtualdefault

Member Function Documentation

◆ ConnectImpl()

void CCsConnector::ConnectImpl ( RoadmapType *const  _r,
const VID  _source,
const VertexSet *const  _targetSet = nullptr,
OutputIterator< RoadmapType > *const  _collision = nullptr 
)
overrideprotectedvirtual
Note
If a target set is provided, we only attempt to connect to CCs containing at least one of its members. Generate edges with single vertex as source
Parameters
_rRoadmap to connect
_sourceSource vertex to connect
_targetSetThe set of target vertices, set to null for full roadmap
_collisionOutput iterator for collisons

◆ Print()

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

Print internal state of this object.

Parameters
_osThe std::ostream to print to.

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: