Loading...
Searching...
No Matches
ompl::multilevel::PathRestriction Class Reference

Representation of path restriction (union of fibers over a base path). More...

#include <ompl/multilevel/datastructures/pathrestriction/PathRestriction.h>

Public Member Functions

 PathRestriction (BundleSpaceGraph *)
 
virtual void clear ()
 
void setBasePath (base::PathPtr)
 Set base path over which restriction is defined.
 
void setBasePath (std::vector< base::State * >)
 Set base path over which restriction is defined.
 
const std::vector< base::State * > & getBasePath () const
 Return discrete states representation of base path.
 
void setFindSectionStrategy (FindSectionType type)
 Choose algorithm to find sections over restriction.
 
bool hasFeasibleSection (Configuration *const, Configuration *const)
 Check if feasible section exists between xStart and xGoal.
 
BundleSpaceGraphgetBundleSpaceGraph ()
 Return pointer to underlying bundle space graph.
 
double getLengthBasePath () const
 Length of base path.
 
unsigned int size () const
 Return number of discrete states in base path.
 
const base::StategetBaseStateAt (int k) const
 Return State at index k on base path.
 
double getLengthIntermediateBasePath (int k)
 Length between base state indices k and k+1.
 
double getLengthBasePathUntil (int k)
 Cumulative length until base state index k.
 
int getBasePathLastIndexFromLocation (double d)
 Given a position d in [0, lengthbasepath_], return the index of the nearest state on base path before d.
 
void interpolateBasePath (double t, base::State *&state) const
 Interpolate state on base path at position t in [0, lengthbasepath_] (using discrete state representation)
 
virtual void print (std::ostream &) const
 

Protected Attributes

BundleSpaceGraphbundleSpaceGraph_
 Pointer to associated bundle space.
 
std::vector< base::State * > basePath_
 Base path over which we define the restriction.
 
double lengthBasePath_ {0.0}
 Length of set base path.
 
std::vector< double > lengthsIntermediateBasePath_
 Intermediate lengths between states on base path.
 
std::vector< double > lengthsCumulativeBasePath_
 Cumulative lengths between states on base path.
 
FindSectionPtr findSection_
 Strategy to find a feasible section (between specific elements on fiber at first base path index and fiber at last base path index)
 

Friends

std::ostream & operator<< (std::ostream &out, const PathRestriction &r)
 

Detailed Description

Representation of path restriction (union of fibers over a base path).

Class represents path restriction by keeping a set of discrete base path states. To access states inbetween, we use the interpolateBasePath method. To find a feasible section over a path restriction, we use the strategy pattern FindSection, which has different implementations.

To use this class, you need to set a base path (setBasePath), then you can search for sections over this base path (using hasFeasibleSection). Internally, this calls the FindSection algorithm, which can be changed in Constructor method. Please see the class ompl::multilevel::FindSection for details on finding feasible sections.

External documentation
A. Orthey and M. Toussaint, Section Patterns: Efficiently Solving Narrow Passage Problems using Multilevel Motion Planning, arXiv:2010.14524 [cs.RO], 2020 [PDF]

Definition at line 98 of file PathRestriction.h.

Constructor & Destructor Documentation

◆ PathRestriction()

PathRestriction::PathRestriction ( BundleSpaceGraph * bundleSpaceGraph)

Definition at line 53 of file PathRestriction.cpp.

◆ ~PathRestriction()

PathRestriction::~PathRestriction ( )
virtual

Definition at line 75 of file PathRestriction.cpp.

Member Function Documentation

◆ clear()

void PathRestriction::clear ( )
virtual

Definition at line 79 of file PathRestriction.cpp.

◆ getBasePath()

const std::vector< ompl::base::State * > & PathRestriction::getBasePath ( ) const

Return discrete states representation of base path.

Definition at line 150 of file PathRestriction.cpp.

◆ getBasePathLastIndexFromLocation()

int PathRestriction::getBasePathLastIndexFromLocation ( double d)

Given a position d in [0, lengthbasepath_], return the index of the nearest state on base path before d.

Definition at line 191 of file PathRestriction.cpp.

◆ getBaseStateAt()

const ompl::base::State * PathRestriction::getBaseStateAt ( int k) const

Return State at index k on base path.

Definition at line 165 of file PathRestriction.cpp.

◆ getBundleSpaceGraph()

BundleSpaceGraph * PathRestriction::getBundleSpaceGraph ( )

Return pointer to underlying bundle space graph.

Definition at line 87 of file PathRestriction.cpp.

◆ getLengthBasePath()

double PathRestriction::getLengthBasePath ( ) const

Length of base path.

Definition at line 155 of file PathRestriction.cpp.

◆ getLengthBasePathUntil()

double PathRestriction::getLengthBasePathUntil ( int k)

Cumulative length until base state index k.

Definition at line 176 of file PathRestriction.cpp.

◆ getLengthIntermediateBasePath()

double PathRestriction::getLengthIntermediateBasePath ( int k)

Length between base state indices k and k+1.

Definition at line 171 of file PathRestriction.cpp.

◆ hasFeasibleSection()

bool PathRestriction::hasFeasibleSection ( Configuration * const xStart,
Configuration * const xGoal )

Check if feasible section exists between xStart and xGoal.

NOTE: "const ptr*" means that the pointer itself is const "ptr* const" means that the content of the pointer is const (but ptr can change)

Definition at line 205 of file PathRestriction.cpp.

◆ interpolateBasePath()

void PathRestriction::interpolateBasePath ( double t,
base::State *& state ) const

Interpolate state on base path at position t in [0, lengthbasepath_] (using discrete state representation)

Definition at line 119 of file PathRestriction.cpp.

◆ print()

void PathRestriction::print ( std::ostream & out) const
virtual

Definition at line 222 of file PathRestriction.cpp.

◆ setBasePath()

void PathRestriction::setBasePath ( std::vector< base::State * > basePath)

Set base path over which restriction is defined.

Definition at line 100 of file PathRestriction.cpp.

◆ setFindSectionStrategy()

void PathRestriction::setFindSectionStrategy ( FindSectionType type)

Choose algorithm to find sections over restriction.

Definition at line 58 of file PathRestriction.cpp.

◆ size()

unsigned int PathRestriction::size ( ) const

Return number of discrete states in base path.

Definition at line 160 of file PathRestriction.cpp.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const PathRestriction & r )
friend

Definition at line 245 of file PathRestriction.cpp.

Member Data Documentation

◆ basePath_

std::vector<base::State *> ompl::multilevel::PathRestriction::basePath_
protected

Base path over which we define the restriction.

Definition at line 163 of file PathRestriction.h.

◆ bundleSpaceGraph_

BundleSpaceGraph* ompl::multilevel::PathRestriction::bundleSpaceGraph_
protected

Pointer to associated bundle space.

Definition at line 160 of file PathRestriction.h.

◆ findSection_

FindSectionPtr ompl::multilevel::PathRestriction::findSection_
protected

Strategy to find a feasible section (between specific elements on fiber at first base path index and fiber at last base path index)

Definition at line 177 of file PathRestriction.h.

◆ lengthBasePath_

double ompl::multilevel::PathRestriction::lengthBasePath_ {0.0}
protected

Length of set base path.

Definition at line 166 of file PathRestriction.h.

◆ lengthsCumulativeBasePath_

std::vector<double> ompl::multilevel::PathRestriction::lengthsCumulativeBasePath_
protected

Cumulative lengths between states on base path.

Definition at line 172 of file PathRestriction.h.

◆ lengthsIntermediateBasePath_

std::vector<double> ompl::multilevel::PathRestriction::lengthsIntermediateBasePath_
protected

Intermediate lengths between states on base path.

Definition at line 169 of file PathRestriction.h.


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