ompl::geometric::AnytimePathShortening Class Reference

#include <ompl/geometric/planners/AnytimePathShortening.h>

Inheritance diagram for ompl::geometric::AnytimePathShortening:

List of all members.

Public Member Functions

 AnytimePathShortening (const base::SpaceInformationPtr &si)
 Constructor requires the space information to plan in.
virtual ~AnytimePathShortening (void)
 Destructor.
void addPlanner (base::PlannerPtr &planner)
 Adds the given planner to the set of planners used to compute candidate paths.
virtual void setProblemDefinition (const base::ProblemDefinitionPtr &pdef)
 Set the problem definition for the planners. 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().
virtual base::PlannerStatus solve (const base::PlannerTerminationCondition &ptc)
 Method that solves the motion planning problem. This method terminates under just two conditions, the given argument condition, or when the maximum path length in the optimization objective is met.
virtual void clear (void)
 Clear all internal planning 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 most recent run of the motion planner.
virtual void getPlannerData (ompl::base::PlannerData &data, unsigned int idx) const
 Get information about the most recent run of the idxth motion planner.
virtual void setup (void)
 Perform any necessary configuration steps. This method also invokes ompl::base::SpaceInformation::setup() if needed. This must be called before solving.
virtual void checkValidity (void)
 Check to see if the planners are 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.
unsigned int getNumPlanners (void) const
 Retrieve the number of planners added.
base::PlannerPtr getPlanner (unsigned int i) const
 Retrieve a pointer to the ith planner instance.
bool isShortcutting (void) const
 Return whether the anytime planner will perform shortcutting on paths.
void setShortcut (bool shortcut)
 Enable/disable shortcutting on paths.
bool isHybridizing (void) const
 Return whether the anytime planner will extract a hybrid path from the set of solution paths.
void setHybridize (bool hybridize)
 Enable/disable path hybridization on the set of solution paths.
unsigned int maxHybridizationPaths (void) const
 Return the maximum number of paths that will be hybridized.
void setMaxHybridizationPath (unsigned int maxPathCount)
 Set the maximum number of paths that will be hybridized.
void setDefaultNumPlanners (unsigned int numPlanners)
 Set default number of planners to use if none are specified.
unsigned int getDefaultNumPlanners () const
 Get default number of planners used if none are specified.
std::string getBestCost () const
 Return best cost found so far by algorithm.

Protected Member Functions

virtual void threadSolve (base::Planner *planner, const base::PlannerTerminationCondition &ptc)
 The function that the planning threads execute when solving a motion planning problem.

Protected Attributes

std::vector< base::PlannerPtrplanners_
 The list of planners used for solving the problem.
bool shortcut_
 Flag indicating whether to shortcut paths.
bool hybridize_
 Flag indicating whether to hybridize the set of solution paths.
unsigned int maxHybridPaths_
 The maximum number of paths that will be hybridized. This prohibits hybridization of a very large path set, which may take significant time.
unsigned int defaultNumPlanners_
 The number of planners to use if none are specified. This defaults to the number of cores. This parameter has no effect if planners have already been added.

Detailed Description

Short description
Anytime path shortening is a generic wrapper around one or more geometric motion planners that repeatedly applies shortcutting (ompl::geometric::PathSimplifier) and hybridization (ompl::geometric::PathHybridization) to a set of solution paths with the goal of rapidly converging to a solution with minimal length. Any number and combination of planners can be specified, each is run in a separate thread. A path length objective may be set, otherwise the tool will run until the termination condition is met. The purpose of this tool is to add anytime properties to motion planners that are not typically viewed as optimal/optimizing algorithms.
External documentation
R. Luna, I.A. Şucan, M. Moll, and L.E. Kavraki, Anytime Solution Optimization for Sampling-Based Motion Planning, in Proc. 2013 IEEE Intl. Conf. on Robotics and Automation, pp. 5053-5059, May. 2013. DOI: [ICRA.2013.6631301](http://dx.doi.org/10.1109/ICRA.2013.6631301)
[[PDF]](http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6631301)

Definition at line 65 of file AnytimePathShortening.h.


Member Function Documentation

Get information about the most recent run of the motion planner.

Remarks:
This call is ambiguous in this tool. By default, the planner data for the first planner in the planner list is returned.

Reimplemented from base::Planner.

ompl::base::PlannerStatus ompl::geometric::AnytimePathShortening::solve ( const base::PlannerTerminationCondition ptc) [virtual]

Method that solves the motion planning problem. This method terminates under just two conditions, the given argument condition, or when the maximum path length in the optimization objective is met.

Remarks:
This method spawns a separate thread for each planner employed, and applies a series of optimization methods to the set of paths generated by each planning thread.

Implements base::Planner.

Definition at line 97 of file AnytimePathShortening.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines