Parasol Planning Library (PPL)
Public Member Functions | Protected Member Functions | Protected Attributes
MixSampler Class Reference

#include <MixSampler.h>

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

Public Member Functions

 MixSampler ()
 
 MixSampler (XMLNode &_node)
 
void ParseXML (XMLNode &_node)
 
virtual void Print (ostream &_os) const
 
- 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...
 

Protected Member Functions

virtual bool Sampler (Cfg &_cfg, const Boundary *const _boundary, vector< Cfg > &_result, vector< Cfg > &_collision)
 
- 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 Boundary *const _boundary, std::vector< GroupCfgType > &_valid, std::vector< GroupCfgType > &_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

std::vector< pair< string, double > > m_samplers
 
pair< string, int > m_samplerLabels
 
- Protected Attributes inherited from MPBaseObject
bool m_debug
 Print debug info? More...
 

Additional Inherited Members

- 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
 

Detailed Description

Samples from multiple samplers given a probability distribution.

Constructor & Destructor Documentation

◆ MixSampler() [1/2]

MixSampler::MixSampler ( )

◆ MixSampler() [2/2]

MixSampler::MixSampler ( XMLNode _node)

Member Function Documentation

◆ ParseXML()

void MixSampler::ParseXML ( XMLNode _node)

◆ Print()

void MixSampler::Print ( ostream &  _os) const
virtual

Print internal state of this object.

Parameters
_osThe std::ostream to print to.

Reimplemented from MPBaseObject.

◆ Sampler()

bool MixSampler::Sampler ( Cfg _cfg,
const Boundary *const  _boundary,
std::vector< Cfg > &  _valid,
std::vector< Cfg > &  _invalid 
)
protectedvirtual

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

Parameters
_cfgThe input 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.

Field Documentation

◆ m_samplerLabels

pair<string, int> MixSampler::m_samplerLabels
protected

◆ m_samplers

std::vector<pair <string, double> > MixSampler::m_samplers
protected

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