Loading...
Searching...
No Matches

A single Bundle-space. More...

#include <ompl/multilevel/datastructures/BundleSpace.h>

Inheritance diagram for ompl::multilevel::BundleSpace:

Public Member Functions

 BundleSpace (const ompl::base::SpaceInformationPtr &si, BundleSpace *baseSpace_=nullptr)
 Bundle Space contains three primary characters, the bundle space, the base space and the projection.
 
const ompl::base::SpaceInformationPtrgetBundle () const
 Get SpaceInformationPtr for Bundle.
 
const ompl::base::SpaceInformationPtrgetBase () const
 Get SpaceInformationPtr for Base.
 
ProjectionPtr getProjection () const
 Get ProjectionPtr from Bundle to Base.
 
bool makeProjection ()
 Given bundle space and base space, try to guess the right.
 
void setProjection (ProjectionPtr projection)
 Set explicit projection (so that we do not need to guess.
 
virtual void setProblemDefinition (const ompl::base::ProblemDefinitionPtr &pdef) override
 Set the problem definition for the planner. The problem needs to be set before calling solve(). Note: If this problem definition replaces a previous one, it may also be necessary to call clear() or clearQuery().
 
virtual void grow ()=0
 Perform an iteration of the planner.
 
virtual bool getSolution (ompl::base::PathPtr &solution)=0
 Return best solution.
 
virtual void setMetric (const std::string &sMetric)=0
 
virtual void setPropagator (const std::string &sPropagator)=0
 
virtual void sampleFromDatastructure (ompl::base::State *xBase)=0
 
virtual void sampleBundle (ompl::base::State *xRandom)
 
bool sampleBundleValid (ompl::base::State *xRandom)
 
virtual bool hasSolution ()
 
virtual bool isInfeasible ()
 Check if any infeasibility guarantees are fulfilled.
 
virtual bool hasConverged ()
 Check if the current space can still be sampled.
 
virtual void clear () override
 Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() will ignore all previous work.
 
virtual void setup () override
 Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceInformation::setup() if needed. This must be called before solving.
 
virtual double getImportance () const =0
 Compute importance of bundle space (to decide where to.
 
ompl::base::StateallocIdentityStateBundle () const
 Allocate State, set entries to Identity/Zero.
 
ompl::base::StateallocIdentityStateBase () const
 
ompl::base::StateallocIdentityState (ompl::base::StateSpacePtr) const
 
void allocIdentityState (ompl::base::State *, ompl::base::StateSpacePtr) const
 
unsigned int getBaseDimension () const
 Dimension of Base Space.
 
unsigned int getBundleDimension () const
 Dimension of Bundle Space.
 
unsigned int getCoDimension () const
 Dimension of Bundle Space - Dimension of Base Space.
 
const ompl::base::StateSamplerPtrgetBundleSamplerPtr () const
 
const ompl::base::StateSamplerPtrgetBaseSamplerPtr () const
 
BundleSpacegetChild () const
 Return k-1 th bundle space (locally the base space)
 
void setChild (BundleSpace *child)
 Pointer to k-1 th bundle space (locally the base space)
 
BundleSpacegetParent () const
 Return k+1 th bundle space (locally the total space)
 
void setParent (BundleSpace *parent)
 Pointer to k+1 th bundle space (locally the total space)
 
bool hasParent () const
 Return if has parent space pointer.
 
bool hasBaseSpace () const
 Return if has base space pointer.
 
unsigned int getLevel () const
 Level in hierarchy of Bundle-spaces.
 
void setLevel (unsigned int)
 Change level in hierarchy.
 
void project (const ompl::base::State *xBundle, ompl::base::State *xBase) const
 Bundle Space Projection Operator onto first component ProjectBase: Bundle \rightarrow Base.
 
void lift (const ompl::base::State *xBase, ompl::base::State *xBundle) const
 Lift a state from Base to Bundle.
 
ompl::base::OptimizationObjectivePtr getOptimizationObjectivePtr () const
 
bool isDynamic () const
 
base::GoalSampleableRegiongetGoalPtr () const
 
- Public Member Functions inherited from ompl::base::Planner
 Planner (const Planner &)=delete
 
Planneroperator= (const Planner &)=delete
 
 Planner (SpaceInformationPtr si, std::string name)
 Constructor.
 
virtual ~Planner ()=default
 Destructor.
 
template<class T>
T * as ()
 Cast this instance to a desired type.
 
template<class T>
const T * as () const
 Cast this instance to a desired type.
 
const SpaceInformationPtrgetSpaceInformation () const
 Get the space information this planner is using.
 
const ProblemDefinitionPtrgetProblemDefinition () const
 Get the problem definition the planner is trying to solve.
 
ProblemDefinitionPtrgetProblemDefinition ()
 Get the problem definition the planner is trying to solve.
 
const PlannerInputStatesgetPlannerInputStates () const
 Get the planner input states.
 
PlannerStatus solve (const PlannerTerminationConditionFn &ptc, double checkInterval)
 Same as above except the termination condition is only evaluated at a specified interval.
 
PlannerStatus solve (double solveTime)
 Same as above except the termination condition is solely a time limit: the number of seconds the algorithm is allowed to spend planning.
 
virtual void clearQuery ()
 Clears internal datastructures of any query-specific information from the previous query. Planner settings are not affected. The planner, if able, should retain all datastructures generated from previous queries that can be used to help solve the next query. Note that clear() should also clear all query-specific information along with all other datastructures in the planner. By default clearQuery() calls clear().
 
virtual void getPlannerData (PlannerData &data) const
 Get information about the current run of the motion planner. Repeated calls to this function will update data (only additions are made). This is useful to see what changed in the exploration datastructure, between calls to solve(), for example (without calling clear() in between).
 
const std::string & getName () const
 Get the name of the planner.
 
void setName (const std::string &name)
 Set the name of the planner.
 
const PlannerSpecsgetSpecs () const
 Return the specifications (capabilities of this planner)
 
virtual void checkValidity ()
 Check to see if the planner is in a working state (setup has been called, a goal was set, the input states seem to be in order). In case of error, this function throws an exception.
 
bool isSetup () const
 Check if setup() was called for this planner.
 
ParamSetparams ()
 Get the parameters for this planner.
 
const ParamSetparams () const
 Get the parameters for this planner.
 
const PlannerProgressPropertiesgetPlannerProgressProperties () const
 Retrieve a planner's planner progress property map.
 
virtual void printProperties (std::ostream &out) const
 Print properties of the motion planner.
 
virtual void printSettings (std::ostream &out) const
 Print information about the motion planner's settings.
 

Static Public Member Functions

static void resetCounter ()
 reset counter for number of levels
 

Protected Member Functions

void checkBundleSpaceMeasure (std::string name, const ompl::base::StateSpacePtr space) const
 Check if Bundle-space is bounded.
 
void sanityChecks () const
 Check if Bundle-space has correct structure.
 
virtual void print (std::ostream &out) const
 Internal function implementing actual printing to stream.
 
- Protected Member Functions inherited from ompl::base::Planner
template<typename T, typename PlannerType, typename SetterType, typename GetterType>
void declareParam (const std::string &name, const PlannerType &planner, const SetterType &setter, const GetterType &getter, const std::string &rangeSuggestion="")
 This function declares a parameter for this planner instance, and specifies the setter and getter functions.
 
template<typename T, typename PlannerType, typename SetterType>
void declareParam (const std::string &name, const PlannerType &planner, const SetterType &setter, const std::string &rangeSuggestion="")
 This function declares a parameter for this planner instance, and specifies the setter function.
 
void addPlannerProgressProperty (const std::string &progressPropertyName, const PlannerProgressProperty &prop)
 Add a planner progress property called progressPropertyName with a property querying function prop to this planner's progress property map.
 

Protected Attributes

ompl::base::StatexBaseTmp_ {nullptr}
 A temporary state on Base.
 
ompl::base::StatexBundleTmp_ {nullptr}
 A temporary state on Bundle.
 
unsigned int id_ {0}
 Identity of space (to keep track of number of Bundle-spaces created)
 
bool hasSolution_ {false}
 If there exists a solution.
 
bool firstRun_ {true}
 Variable to check if this bundle space planner has been run at.
 
bool isDynamic_ {false}
 If the problem is dynamic or geometric.
 
BundleSpaceMetricPtr metric_
 Metric on bundle space.
 
BundleSpacePropagatorPtr propagator_
 Propagator (steering or interpolation) on bundle space. Note: currently just a stub for base::StatePropagator.
 
- Protected Attributes inherited from ompl::base::Planner
SpaceInformationPtr si_
 The space information for which planning is done.
 
ProblemDefinitionPtr pdef_
 The user set problem definition.
 
PlannerInputStates pis_
 Utility class to extract valid input states.
 
std::string name_
 The name of this planner.
 
PlannerSpecs specs_
 The specifications of the planner (its capabilities)
 
ParamSet params_
 A map from parameter names to parameter instances for this planner. This field is populated by the declareParam() function.
 
PlannerProgressProperties plannerProgressProperties_
 A mapping between this planner's progress property names and the functions used for querying those progress properties.
 
bool setup_
 Flag indicating whether setup() has been called.
 

Static Protected Attributes

static unsigned int counter_ = 0
 Internal counter to track multiple bundle spaces.
 

Friends

std::ostream & operator<< (std::ostream &out, const BundleSpace &bundleSpace)
 Write class to stream (use as std::cout << *this << std::endl)
 

Additional Inherited Members

- Public Types inherited from ompl::base::Planner
using PlannerProgressProperty = std::function<std::string()>
 Definition of a function which returns a property about the planner's progress that can be queried by a benchmarking routine.
 
using PlannerProgressProperties = std::map<std::string, PlannerProgressProperty>
 A dictionary which maps the name of a progress property to the function to be used for querying that property.
 

Detailed Description

A single Bundle-space.

Definition at line 63 of file BundleSpace.h.

Constructor & Destructor Documentation

◆ BundleSpace()

BundleSpace::BundleSpace ( const ompl::base::SpaceInformationPtr & si,
BundleSpace * baseSpace_ = nullptr )

Bundle Space contains three primary characters, the bundle space, the base space and the projection.

  • Bundle is (locally) a product space of Base and Fiber
  • Base is a pointer to the next lower-dimensional Bundle-space (if any)
  • Projection is a mapping from Bundle to Base

You can provide Bundle and Base space (as ompl::base::SpaceInformationPtr) and let the class compute the projection automatically or provide an explicit projection

Definition at line 60 of file BundleSpace.cpp.

◆ ~BundleSpace()

BundleSpace::~BundleSpace ( )
virtual

Definition at line 86 of file BundleSpace.cpp.

Member Function Documentation

◆ allocIdentityState() [1/2]

void BundleSpace::allocIdentityState ( ompl::base::State * s,
ompl::base::StateSpacePtr space ) const

Definition at line 231 of file BundleSpace.cpp.

◆ allocIdentityState() [2/2]

State * BundleSpace::allocIdentityState ( ompl::base::StateSpacePtr space) const

Definition at line 299 of file BundleSpace.cpp.

◆ allocIdentityStateBase()

State * BundleSpace::allocIdentityStateBase ( ) const

Definition at line 318 of file BundleSpace.cpp.

◆ allocIdentityStateBundle()

State * BundleSpace::allocIdentityStateBundle ( ) const

Allocate State, set entries to Identity/Zero.

Definition at line 313 of file BundleSpace.cpp.

◆ checkBundleSpaceMeasure()

void BundleSpace::checkBundleSpaceMeasure ( std::string name,
const ompl::base::StateSpacePtr space ) const
protected

Check if Bundle-space is bounded.

Definition at line 190 of file BundleSpace.cpp.

◆ clear()

void BundleSpace::clear ( )
overridevirtual

Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() will ignore all previous work.

Reimplemented from ompl::base::Planner.

Reimplemented in ompl::multilevel::BundleSpaceGraph, and ompl::multilevel::QMPImpl.

Definition at line 164 of file BundleSpace.cpp.

◆ getBase()

const SpaceInformationPtr & BundleSpace::getBase ( ) const

Get SpaceInformationPtr for Base.

Definition at line 328 of file BundleSpace.cpp.

◆ getBaseDimension()

unsigned int BundleSpace::getBaseDimension ( ) const

Dimension of Base Space.

Definition at line 333 of file BundleSpace.cpp.

◆ getBaseSamplerPtr()

const StateSamplerPtr & BundleSpace::getBaseSamplerPtr ( ) const

Definition at line 351 of file BundleSpace.cpp.

◆ getBundle()

const SpaceInformationPtr & BundleSpace::getBundle ( ) const

Get SpaceInformationPtr for Bundle.

Definition at line 323 of file BundleSpace.cpp.

◆ getBundleDimension()

unsigned int BundleSpace::getBundleDimension ( ) const

Dimension of Bundle Space.

Definition at line 341 of file BundleSpace.cpp.

◆ getBundleSamplerPtr()

const StateSamplerPtr & BundleSpace::getBundleSamplerPtr ( ) const

Definition at line 364 of file BundleSpace.cpp.

◆ getChild()

BundleSpace * BundleSpace::getChild ( ) const

Return k-1 th bundle space (locally the base space)

Definition at line 389 of file BundleSpace.cpp.

◆ getCoDimension()

unsigned int BundleSpace::getCoDimension ( ) const

Dimension of Bundle Space - Dimension of Base Space.

Definition at line 346 of file BundleSpace.cpp.

◆ getGoalPtr()

GoalSampleableRegion * BundleSpace::getGoalPtr ( ) const

Definition at line 158 of file BundleSpace.cpp.

◆ getImportance()

virtual double ompl::multilevel::BundleSpace::getImportance ( ) const
pure virtual

Compute importance of bundle space (to decide where to.

Implemented in ompl::multilevel::BundleSpaceGraph.

◆ getLevel()

unsigned int BundleSpace::getLevel ( ) const

Level in hierarchy of Bundle-spaces.

Definition at line 409 of file BundleSpace.cpp.

◆ getOptimizationObjectivePtr()

OptimizationObjectivePtr BundleSpace::getOptimizationObjectivePtr ( ) const

Definition at line 419 of file BundleSpace.cpp.

◆ getParent()

BundleSpace * BundleSpace::getParent ( ) const

Return k+1 th bundle space (locally the total space)

Definition at line 399 of file BundleSpace.cpp.

◆ getProjection()

ProjectionPtr BundleSpace::getProjection ( ) const

Get ProjectionPtr from Bundle to Base.

Definition at line 226 of file BundleSpace.cpp.

◆ getSolution()

virtual bool ompl::multilevel::BundleSpace::getSolution ( ompl::base::PathPtr & solution)
pure virtual

Return best solution.

Implemented in ompl::multilevel::BundleSpaceGraph.

◆ grow()

virtual void ompl::multilevel::BundleSpace::grow ( )
pure virtual

◆ hasBaseSpace()

bool BundleSpace::hasBaseSpace ( ) const

Return if has base space pointer.

Definition at line 114 of file BundleSpace.cpp.

◆ hasConverged()

bool BundleSpace::hasConverged ( )
virtual

Check if the current space can still be sampled.

Definition at line 374 of file BundleSpace.cpp.

◆ hasParent()

bool BundleSpace::hasParent ( ) const

Return if has parent space pointer.

Definition at line 124 of file BundleSpace.cpp.

◆ hasSolution()

bool BundleSpace::hasSolution ( )
virtual

Definition at line 379 of file BundleSpace.cpp.

◆ isDynamic()

bool BundleSpace::isDynamic ( ) const

Definition at line 129 of file BundleSpace.cpp.

◆ isInfeasible()

bool BundleSpace::isInfeasible ( )
virtual

Check if any infeasibility guarantees are fulfilled.

Definition at line 369 of file BundleSpace.cpp.

◆ lift()

void BundleSpace::lift ( const ompl::base::State * xBase,
ompl::base::State * xBundle ) const

Lift a state from Base to Bundle.

Definition at line 459 of file BundleSpace.cpp.

◆ makeProjection()

bool BundleSpace::makeProjection ( )

Given bundle space and base space, try to guess the right.

Definition at line 101 of file BundleSpace.cpp.

◆ print()

void BundleSpace::print ( std::ostream & out) const
protectedvirtual

Internal function implementing actual printing to stream.

Reimplemented in ompl::multilevel::BundleSpaceGraph.

Definition at line 469 of file BundleSpace.cpp.

◆ project()

void BundleSpace::project ( const ompl::base::State * xBundle,
ompl::base::State * xBase ) const

Bundle Space Projection Operator onto first component ProjectBase: Bundle \rightarrow Base.

Definition at line 464 of file BundleSpace.cpp.

◆ resetCounter()

void BundleSpace::resetCounter ( )
static

reset counter for number of levels

Definition at line 211 of file BundleSpace.cpp.

◆ sampleBundle()

void BundleSpace::sampleBundle ( ompl::base::State * xRandom)
virtual

Definition at line 438 of file BundleSpace.cpp.

◆ sampleBundleValid()

bool BundleSpace::sampleBundleValid ( ompl::base::State * xRandom)

Definition at line 424 of file BundleSpace.cpp.

◆ sanityChecks()

void BundleSpace::sanityChecks ( ) const
protected

Check if Bundle-space has correct structure.

Definition at line 174 of file BundleSpace.cpp.

◆ setChild()

void BundleSpace::setChild ( BundleSpace * child)

Pointer to k-1 th bundle space (locally the base space)

Definition at line 394 of file BundleSpace.cpp.

◆ setLevel()

void BundleSpace::setLevel ( unsigned int level)

Change level in hierarchy.

Definition at line 414 of file BundleSpace.cpp.

◆ setParent()

void BundleSpace::setParent ( BundleSpace * parent)

Pointer to k+1 th bundle space (locally the total space)

Definition at line 404 of file BundleSpace.cpp.

◆ setProblemDefinition()

void BundleSpace::setProblemDefinition ( const ompl::base::ProblemDefinitionPtr & pdef)
overridevirtual

Set the problem definition for the planner. The problem needs to be set before calling solve(). Note: If this problem definition replaces a previous one, it may also be necessary to call clear() or clearQuery().

Reimplemented from ompl::base::Planner.

Definition at line 206 of file BundleSpace.cpp.

◆ setProjection()

void BundleSpace::setProjection ( ProjectionPtr projection)

Set explicit projection (so that we do not need to guess.

Definition at line 216 of file BundleSpace.cpp.

◆ setup()

void BundleSpace::setup ( )
overridevirtual

Perform extra configuration steps, if needed. This call will also issue a call to ompl::base::SpaceInformation::setup() if needed. This must be called before solving.

Reimplemented from ompl::base::Planner.

Reimplemented in ompl::multilevel::BundleSpaceGraph.

Definition at line 134 of file BundleSpace.cpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const BundleSpace & bundleSpace )
friend

Write class to stream (use as std::cout << *this << std::endl)

Definition at line 478 of file BundleSpace.cpp.

Member Data Documentation

◆ counter_

unsigned int BundleSpace::counter_ = 0
staticprotected

Internal counter to track multiple bundle spaces.

Definition at line 255 of file BundleSpace.h.

◆ firstRun_

bool ompl::multilevel::BundleSpace::firstRun_ {true}
protected

Variable to check if this bundle space planner has been run at.

Definition at line 265 of file BundleSpace.h.

◆ hasSolution_

bool ompl::multilevel::BundleSpace::hasSolution_ {false}
protected

If there exists a solution.

Definition at line 261 of file BundleSpace.h.

◆ id_

unsigned int ompl::multilevel::BundleSpace::id_ {0}
protected

Identity of space (to keep track of number of Bundle-spaces created)

Definition at line 258 of file BundleSpace.h.

◆ isDynamic_

bool ompl::multilevel::BundleSpace::isDynamic_ {false}
protected

If the problem is dynamic or geometric.

Definition at line 268 of file BundleSpace.h.

◆ metric_

BundleSpaceMetricPtr ompl::multilevel::BundleSpace::metric_
protected

Metric on bundle space.

Definition at line 271 of file BundleSpace.h.

◆ propagator_

BundleSpacePropagatorPtr ompl::multilevel::BundleSpace::propagator_
protected

Propagator (steering or interpolation) on bundle space. Note: currently just a stub for base::StatePropagator.

Definition at line 275 of file BundleSpace.h.

◆ xBaseTmp_

ompl::base::State* ompl::multilevel::BundleSpace::xBaseTmp_ {nullptr}
protected

A temporary state on Base.

Definition at line 250 of file BundleSpace.h.

◆ xBundleTmp_

ompl::base::State* ompl::multilevel::BundleSpace::xBundleTmp_ {nullptr}
protected

A temporary state on Bundle.

Definition at line 252 of file BundleSpace.h.


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