Parasol Planning Library (PPL)
UniformObstacleBasedSampler Class Reference

#include <UniformObstacleBasedSampler.h>

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

Public Types

Motion Planning Types
typedef MPBaseObject::GroupCfgType GroupCfgType
 
- Public Types inherited from SamplerMethod
typedef MPBaseObject::GroupCfgType GroupCfgType
 
typedef std::vector< Cfg >::iterator InputIterator
 
typedef std::back_insert_iterator< std::vector< Cfg > > OutputIterator
 
typedef std::vector< GroupCfgType >::iterator GroupInputIterator
 
typedef std::back_insert_iterator< std::vector< GroupCfgType > > GroupOutputIterator
 
typedef std::map< Robot *, const Boundary * > BoundaryMap
 A map from robots to sampling boundaries. More...
 
- 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
 UniformObstacleBasedSampler (XMLNode &_node)
 
virtual ~UniformObstacleBasedSampler ()=default
 
 UniformObstacleBasedSampler (string _vcLabel="", string _dmLabel="", double _margin=0, bool _useBoundary=false)
 
MPBaseObject Overrides
void Print (ostream &_os) const override
 
Sampler Interface
virtual bool Sampler (Cfg &_cfg, const Boundary *const _boundary, std::vector< Cfg > &_result, std::vector< Cfg > &_invalid) override
 
virtual bool Sampler (GroupCfgType &_cfg, const Boundary *const _boundary, std::vector< GroupCfgType > &_result, std::vector< GroupCfgType > &_invalid) override
 
- Public Member Functions inherited from SamplerMethod
 SamplerMethod ()=default
 
 SamplerMethod (XMLNode &_node)
 
virtual ~SamplerMethod ()=0
 
virtual void Sample (size_t _numNodes, size_t _maxAttempts, const Boundary *const _boundary, OutputIterator _valid, OutputIterator _invalid)
 
virtual void Sample (size_t _numNodes, size_t _maxAttempts, const Boundary *const _boundary, OutputIterator _valid)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
virtual void Sample (size_t _numNodes, size_t _maxAttempts, const Boundary *const _robotBoundary, const Boundary *const _eeBoundary, OutputIterator _valid, OutputIterator _invalid)
 
virtual void Sample (size_t _numNodes, size_t _maxAttempts, const Boundary *const _robotBoundary, const Boundary *const _eeBoundary, OutputIterator _valid)
 
virtual void Filter (InputIterator _first, InputIterator _last, size_t _maxAttempts, const Boundary *const _boundary, OutputIterator _valid, OutputIterator _invalid)
 
void Filter (InputIterator _first, InputIterator _last, size_t _maxAttempts, const Boundary *const _boundary, OutputIterator _valid)
 
virtual void Sample (size_t _numNodes, size_t _maxAttempts, const Boundary *const _boundary, GroupOutputIterator _valid, GroupOutputIterator _invalid)
 
virtual void Sample (size_t _numNodes, size_t _maxAttempts, const Boundary *const _boundary, GroupOutputIterator _valid)
 
virtual void Sample (size_t _numNodes, size_t _maxAttempts, const BoundaryMap &_boundary, GroupOutputIterator _valid, GroupOutputIterator _invalid)
 
virtual void Sample (size_t _numNodes, size_t _maxAttempts, const BoundaryMap &_boundary, GroupOutputIterator _valid)
 
virtual void Filter (GroupInputIterator _first, GroupInputIterator _last, size_t _maxAttempts, const Boundary *const _boundary, GroupOutputIterator _valid, GroupOutputIterator _invalid)
 
void Filter (GroupInputIterator _first, GroupInputIterator _last, size_t _maxAttempts, const Boundary *const _boundary, GroupOutputIterator _valid)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
- 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...
 

Additional Inherited Members

- Protected Member Functions inherited from SamplerMethod
virtual bool Sampler (Cfg &_cfg, const Boundary *const _robotBoundary, const Boundary *const _eeBoundary, std::vector< Cfg > &_valid, std::vector< Cfg > &_invalid)
 
virtual bool Sampler (GroupCfgType &_cfg, const BoundaryMap &_boundaryMap, std::vector< GroupCfgType > &_valid, std::vector< GroupCfgType > &_invalid)
 
- 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

This sampler generates obstacle-based configurations that uniformly cover the contact surface. It first generates a set of uniformly distributed fixed length segments, and then tests intermediate points on the segments in order to find valid configurations adjacent to invalid configurations. Those are retained as roadmap nodes.

Reference: https://bit.ly/3P1f8dq Hsin-Yi Yeh and Shawna Thomas and David Eppstein and Nancy M. Amato. "UOBPRM: A uniformly distributed obstacle-based PRM". TRO 2012.

Member Typedef Documentation

◆ GroupCfgType

Constructor & Destructor Documentation

◆ UniformObstacleBasedSampler() [1/2]

UniformObstacleBasedSampler::UniformObstacleBasedSampler ( XMLNode _node)

◆ ~UniformObstacleBasedSampler()

virtual UniformObstacleBasedSampler::~UniformObstacleBasedSampler ( )
virtualdefault

◆ UniformObstacleBasedSampler() [2/2]

UniformObstacleBasedSampler::UniformObstacleBasedSampler ( string  _vcLabel = "",
string  _dmLabel = "",
double  _margin = 0,
bool  _useBoundary = false 
)

Member Function Documentation

◆ Print()

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

Print internal state of this object.

Parameters
_osThe std::ostream to print to.

Reimplemented from MPBaseObject.

◆ Sampler() [1/2]

bool UniformObstacleBasedSampler::Sampler ( Cfg _cfg,
const Boundary *const  _boundary,
std::vector< Cfg > &  _result,
std::vector< Cfg > &  _invalid 
)
overridevirtual

Takes the input configuration and applies the sampler rule to generate output configurations on the contact surface.

Parameters
_cfgThe input configuration.
_boundaryThe sampling boundary.
_resultThe resulting output configurations.
_invalidThe (optional) return for failed attempts.
Returns
true if a valid configuration was generated, false otherwise.

Reimplemented from SamplerMethod.

◆ Sampler() [2/2]

bool UniformObstacleBasedSampler::Sampler ( GroupCfgType _cfg,
const Boundary *const  _boundary,
std::vector< GroupCfgType > &  _valid,
std::vector< GroupCfgType > &  _invalid 
)
overridevirtual

Takes a single input configuration and applies the sampler rule to generate one or more output configurations.

Parameters
_cfgThe input group configuration.
_boundaryThe sampling boundary.
_validThe resulting output configurations.
_invalidThe (optional) return for failed attempts.
Returns
True if a valid configuration was generated, false otherwise.

Reimplemented from SamplerMethod.


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