|
|
| 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) |
|
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) |
|
|
virtual void | Print (std::ostream &_os) const |
|
|
virtual void | Initialize () |
|
|
const std::string & | GetName () const |
| Get the class name for this object.
|
|
const std::string & | GetLabel () const |
| Get the unique label for this object.
|
|
std::string | GetNameAndLabel () const |
| Get the unique string identifier for this object "m_name::m_label".
|
|
void | SetLabel (const std::string &) |
| Set the unique label for this object.
|
|
|
void | SetMPLibrary (MPLibrary *) noexcept |
| Set the owning MPLibrary.
|
|
MPLibrary * | GetMPLibrary () const noexcept |
| Get the owning MPLibrary.
|
|
bool | IsRunning () const noexcept |
| Check the library's running flag.
|
|
DistanceMetricPointer | GetDistanceMetric (const std::string &) const noexcept |
| Get a distance metric by label from the owning MPLibrary.
|
|
ValidityCheckerPointer | GetValidityChecker (const std::string &) const noexcept |
| Get a validity checker by label from the owning MPLibrary.
|
|
NeighborhoodFinderPointer | GetNeighborhoodFinder (const std::string &) const noexcept |
| Get a neighborhood finder by label from the owning MPLibrary.
|
|
SamplerPointer | GetSampler (const std::string &) const noexcept |
| Get a sampler by label from the owning MPLibrary.
|
|
LocalPlannerPointer | GetLocalPlanner (const std::string &) const noexcept |
| Get a local planner by label from the owning MPLibrary.
|
|
ExtenderPointer | GetExtender (const std::string &) const noexcept |
| Get an extender by label from the owning MPLibrary.
|
|
PathModifierPointer | GetPathModifier (const std::string &) const noexcept |
| Get a path modifier by label from the owning MPLibrary.
|
|
ConnectorPointer | GetConnector (const std::string &) const noexcept |
| Get a connector by label from the owning MPLibrary.
|
|
MetricPointer | GetMetric (const std::string &) const noexcept |
| Get a metric by label from the owning MPLibrary.
|
|
MapEvaluatorPointer | GetMapEvaluator (const std::string &) const noexcept |
| Get a map evaluator by label from the owning MPLibrary.
|
|
MPStrategyPointer | GetMPStrategy (const std::string &) const noexcept |
| Get a strategy by label from the owning MPLibrary.
|
|
MPTraits::MPTools * | GetMPTools () const noexcept |
| Get the MPTools container from the owning MPLibrary.
|
|
|
MPProblem * | GetMPProblem () const noexcept |
| Get the library's current MPProblem.
|
|
Environment * | GetEnvironment () const noexcept |
| Get the current environment.
|
|
MPTask * | GetTask () const noexcept |
| Get the current task.
|
|
GroupTask * | GetGroupTask () const noexcept |
| Get the current group task.
|
|
|
MPSolution * | GetMPSolution () const noexcept |
|
RoadmapType * | GetRoadmap (Robot *const _r=nullptr) const noexcept |
| Get the current free-space roadmap.
|
|
GroupRoadmapType * | GetGroupRoadmap (RobotGroup *const _g=nullptr) const noexcept |
| Get the current free-space group roadmap.
|
|
RoadmapType * | GetBlockRoadmap (Robot *const _r=nullptr) const noexcept |
| Get the current obstacle-space roadmap.
|
|
Path * | GetPath (Robot *const _r=nullptr) const noexcept |
| Get the current best path.
|
|
GroupPath * | GetGroupPath (RobotGroup *const _g=nullptr) const noexcept |
| Get the current best group path.
|
|
StatClass * | GetStatClass () const noexcept |
| Get the current StatClass.
|
|
LocalObstacleMap * | GetLocalObstacleMap () const noexcept |
| Get the local obstacle map.
|
|
GoalTracker * | GetGoalTracker () const noexcept |
| Get the goal tracker.
|
|
|
|
typedef MPTraits::CfgType | CfgType |
|
typedef MPTraits::GroupCfgType | GroupCfgType |
|
|
typedef std::vector< CfgType >::iterator | InputIterator |
|
typedef std::back_insert_iterator< std::vector< CfgType > > | 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.
|
|
|
typedef MPTraits::RoadmapType | RoadmapType |
|
typedef MPTraits::GroupRoadmapType | GroupRoadmapType |
|
typedef MPTraits::LocalObstacleMap | LocalObstacleMap |
|
typedef MPTraits::Path | Path |
|
typedef MPTraits::GroupPathType | GroupPath |
|
typedef MPTraits::MPLibrary | MPLibrary |
|
typedef MPTraits::MPSolution | MPSolution |
|
typedef MPTraits::GoalTracker | GoalTracker |
|
typedef MPLibrary::SamplerPointer | SamplerPointer |
|
typedef MPLibrary::LocalPlannerPointer | LocalPlannerPointer |
|
typedef MPLibrary::ExtenderPointer | ExtenderPointer |
|
typedef MPLibrary::PathModifierPointer | PathModifierPointer |
|
typedef MPLibrary::ConnectorPointer | ConnectorPointer |
|
typedef MPLibrary::MetricPointer | MetricPointer |
|
typedef MPLibrary::MapEvaluatorPointer | MapEvaluatorPointer |
|
typedef MPLibrary::MPStrategyPointer | MPStrategyPointer |
|
typedef MPLibrary::DistanceMetricPointer | DistanceMetricPointer |
|
typedef MPLibrary::ValidityCheckerPointer | ValidityCheckerPointer |
|
typedef MPLibrary::NeighborhoodFinderPointer | NeighborhoodFinderPointer |
|
template<typename
MPTraits>
class SamplerMethod< MPTraits >
Base algorithm abstraction for Samplers.
SamplerMethod has three sets of important functions. The first two are the various public methods in the base class, Sample
and Filter
, and third is the private virtual function which the derived classes overload, Sampler
.
Sample
is called in various ways but they break down into two forms: desired number and input configurations. When specifying a desired number n
of configurations the sampler attempts a
attempts per desired sample. The output is placed on an output iterator.
- Usage:\n
size_t num, attempts;
std::vector<CfgType> valid;
s->Sample(num, attempts, bounds, std::back_inserter(valid));
Definition: Boundary.h:30
SamplerPointer GetSampler(const std::string &) const noexcept
Get a sampler by label from the owning MPLibrary.
Definition: MPBaseObject.h:363
Filter
sends a list of input configurations to apply the sampler rule to.
- Usage:\n
std::vector<CfgType> input, valid;
size_t attempts;
s->Filter(input.begin(), input.end(), attempts, bounds,
std::back_inserter(valid));
- Todo:
- The present implementation of Sample temporarily saves invalid configurations whether we will use them or not. Avoiding this extraneous retention will likely have good performance benefits in sampling-intensive applications such as proteins and manipulators where the success rate is very low.
- Todo:
- The present layout of this class is confusing since the base method is actually generating uniform random samples which are filtered by the derived class. This does not work for many derived classes as evidenced by their overriding of Sample rather than Sampler: we should rework the design so that derived classes generate and filter their own samples. The base class can then implement its functions in terms of the generate and filter helpers.