ompl::geometric::FMT Class Reference

Asymptotically Optimal Fast Marching Tree algorithm developed by L. Janson and M. Pavone. More...

#include <ompl/geometric/planners/fmt/FMT.h>

Inheritance diagram for ompl::geometric::FMT:

Classes

class  Motion
 Representation of a motion. More...
 
struct  MotionCompare
 Comparator used to order motions in a binary heap. More...
 

Public Member Functions

 FMT (const base::SpaceInformationPtr &si)
 
virtual void setup ()
 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 base::PlannerStatus solve (const base::PlannerTerminationCondition &ptc)
 Function that can solve the motion planning problem. This function can be called multiple times on the same problem, without calling clear() in between. This allows the planner to continue work for more time on an unsolved problem, for example. If this option is used, it is assumed the problem definition is not changed (unpredictable results otherwise). The only change in the problem definition that is accounted for is the addition of starting or goal states (but not changing previously added start/goal states). The function terminates if the call to ptc returns true.
 
virtual void clear ()
 Clear all internal datastructures. Planner settings are not affected. Subsequent calls to solve() will ignore all previous work.
 
virtual void getPlannerData (base::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).
 
void setNumSamples (const unsigned int numSamples)
 Set the number of states that the planner should sample. The planner will sample this number of states in addition to the initial states. If any of the goal states are not reachable from the randomly sampled states, those goal states will also be added. The default value is 1000.
 
unsigned int getNumSamples () const
 Get the number of states that the planner will sample.
 
void setRadiusMultiplier (const double radiusMultiplier)
 The planner searches for neighbors of a node within a cost r, where r is the value described for FMT* in Section 4 of [L. Janson, A. Clark, and M. Pavone, "Fast Marching Trees: a Fast Marching Sampling-Based Method for Optimal Motion Planning in Many Dimensions," International Symposium on Robotics Research, 2013. http://arxiv.org/pdf/1306.3532v3.pdf] For guaranteed asymptotic convergence, the user should choose a constant multiplier for the search radius that is greater than one. The default value is 1.1. In general, a radius multiplier between 0.9 and 5 appears to perform the best.
 
double getRadiusMultiplier () const
 Get the multiplier used for the nearest neighbors search radius.
 
void setFreeSpaceVolume (const double freeSpaceVolume)
 Store the volume of the obstacle-free configuration space. If no value is specified, the default assumes an obstacle-free unit hypercube, freeSpaceVolume = (maximumExtent/sqrt(dimension))^(dimension)
 
double getFreeSpaceVolume () const
 Get the volume of the free configuration space that is being used by the planner.
 
- Public Member Functions inherited from ompl::base::Planner
 Planner (const SpaceInformationPtr &si, const std::string &name)
 Constructor.
 
virtual ~Planner ()
 Destructor.
 
template<class T >
T * as ()
 Cast this instance to a desired type. More...
 
template<class T >
const T * as () const
 Cast this instance to a desired type. More...
 
const SpaceInformationPtrgetSpaceInformation () const
 Get the space information this planner is using.
 
const ProblemDefinitionPtrgetProblemDefinition () const
 Get the problem definition the planner is trying to solve.
 
const PlannerInputStatesgetPlannerInputStates () const
 Get the planner input states.
 
virtual void setProblemDefinition (const ProblemDefinitionPtr &pdef)
 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().
 
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.
 
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.
 

Protected Types

typedef ompl::BinaryHeap< Motion *, MotionCompareMotionBinHeap
 A binary heap for storing explored motions in cost-to-come sorted order.
 

Protected Member Functions

double distanceFunction (const Motion *a, const Motion *b) const
 Compute the distance between two motions as the cost between their contained states. Note that for computationally intensive cost functions, the cost between motions should be stored to avoid duplicate calculations.
 
void freeMemory ()
 Free the memory allocated by this planner.
 
void sampleFree (const ompl::base::PlannerTerminationCondition &ptc)
 Sample a state from the free configuration space and save it into the nearest neighbors data structure.
 
void assureGoalIsSampled (const ompl::base::GoalSampleableRegion *goal)
 For each goal region, check to see if any of the sampled states fall within that region. If not, add a goal state from that region directly into the set of vertices. In this way, FMT is able to find a solution, if one exists. If no sampled nodes are within a goal region, there would be no way for the algorithm to successfully find a path to that region.
 
double calculateUnitBallVolume (const unsigned int dimension) const
 Compute the volume of the unit ball in a given dimension.
 
double calculateRadius (unsigned int dimension, unsigned int n) const
 Calculate the radius to use for nearest neighbor searches, using the bound given in [L. Janson, A. Clark, and M. Pavone, "Fast Marching Trees: a Fast Marching Sampling-Based Method for Optimal Motion Planning in Many Dimensions," International Journal on Robotics Research,. More...
 
void saveNeighborhood (Motion *m, const double r)
 Save the neighbors within a given radius of a state.
 
void traceSolutionPathThroughTree (Motion *goalMotion)
 Trace the path from a goal state back to the start state and save the result as a solution in the Problem Definiton.
 
bool expandTreeFromNode (Motion *&z, const double r)
 Complete one iteration of the main loop of the FMT* algorithm: Find all nodes in set W within a radius r of the node z. Attempt to connect them to their optimal cost-to-come parent in set H. Remove all newly connected nodes from W and insert them into H. Remove motion z from H, and update z to be the current lowest cost-to-come node in H.
 
- 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

MotionBinHeap H_
 A binary heap for storing explored motions in cost-to-come sorted order. The motions in H have been explored, yet are still close enough to the frontier of the explored set H to be connected to nodes in the unexplored set W.
 
std::map< Motion *, MotionBinHeap::Element * > hElements_
 A map of all of the elements stored within the MotionBinHeap H, used to convert between Motion and Element
 
std::map< Motion *, std::vector< Motion * > > neighborhoods_
 A map linking a motion to all of the motions within a distance r of that motion.
 
unsigned int numSamples_
 The number of samples to use when planning.
 
double freeSpaceVolume_
 The volume of the free configuration space.
 
double radiusMultiplier_
 This planner uses a nearest neighbor search radius proportional to the lower bound for optimality derived for FMT* in Section 4 of [L. Janson, A. Clark, and M. Pavone, "Fast Marching Trees: a Fast Marching Sampling-Based Method for Optimal Motion Planning in Many Dimensions," International Journal on Robotics Research, 2013. http://arxiv.org/pdf/1306.3532v3.pdf]. The radius multiplier is the multiplier for the lower bound. For guaranteed asymptotic convergence, the user should choose a multiplier for the search radius that is greater than one. The default value is 1.1. In general, a radius between 0.9 and 5 appears to perform the best.
 
boost::shared_ptr< NearestNeighbors< Motion * > > nn_
 A nearest-neighbor datastructure containing the set of all motions.
 
base::StateSamplerPtr sampler_
 State sampler.
 
base::OptimizationObjectivePtr opt_
 The cost objective function.
 
MotionlastGoalMotion_
 The most recent goal motion. Used for PlannerData computation.
 
- 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.
 

Additional Inherited Members

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

Detailed Description

Asymptotically Optimal Fast Marching Tree algorithm developed by L. Janson and M. Pavone.

Short description
FMT* is an asymptotically-optimal sampling-based motion planning algorithm, which is guaranteed to converge to a shortest path solution. The algorithm is specifically aimed at solving complex motion planning problems in high-dimensional configuration spaces. The FMT* algorithm essentially performs a lazy dynamic programming recursion on a set of probabilistically-drawn samples to grow a tree of paths, which moves steadily outward in cost-to-come space.
External documentation
L. Janson, A. Clark, and M. Pavone, Fast Marching Trees: a Fast Marching Sampling-Based Method for Optimal Motion Planning in Many Dimensions, International Journal on Robotics Research, 2014. Submitted. http://arxiv.org/pdf/1306.3532v3.pdf
[PDF]

Definition at line 77 of file FMT.h.

Member Function Documentation

◆ calculateRadius()

double ompl::geometric::FMT::calculateRadius ( unsigned int  dimension,
unsigned int  n 
) const
protected

Calculate the radius to use for nearest neighbor searches, using the bound given in [L. Janson, A. Clark, and M. Pavone, "Fast Marching Trees: a Fast Marching Sampling-Based Method for Optimal Motion Planning in Many Dimensions," International Journal on Robotics Research,.

  1. http://arxiv.org/pdf/1306.3532v3.pdf]. The radius depends on the radiusMultiplier parameter, the volume of the free configuration space, the volume of the unit ball in the current dimension, and the number of nodes in the graph

Definition at line 173 of file FMT.cpp.


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