ompl::geometric::PathGeometric Class Reference

Definition of a geometric path. More...

#include <PathGeometric.h>

Inheritance diagram for ompl::geometric::PathGeometric:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void append (const PathGeometric &path)
 Append path at the end of this path.
virtual bool check (void) const
 Check if the path is valid.
std::pair< bool, bool > checkAndRepair (unsigned int attempts)
 Check if the path is valid. If it is not, attempts are made to fix the path by sampling around invalid states. Not more than attempts samples are drawn. A pair of boolean values is returned. The first value represents the validity of the path before any change was made. The second value represents the validity of the path after changes were attempted. If no changes are attempted, the both values are true.
double clearance (void) const
 Compute the clearance of the end points along the path (no interpolation is performed). The clearance for the points is averaged.
void interpolate (void)
 Insert a number of states in a path so that the path is made up of (approximately) the states checked for validity when a discrete motion validator is used.
void interpolate (unsigned int count)
 Insert a number of states in a path so that the path is made up of exactly count states. States are inserted uniformly (more states on longer segments). Changes are performed only if a path has less than count states.
virtual double length (void) const
 Compute the length of a geometric path (sum of lengths of segments that make up the path).
PathGeometricoperator= (const PathGeometric &other)
 Assignment operator.
void overlay (const PathGeometric &over, unsigned int startIndex=0)
 Overlay the path over on top of the current path. States are added to the current path if needed (by copying the last state).
 PathGeometric (const base::SpaceInformationPtr &si, const base::State *state)
 Construct a path instance from a single state.
 PathGeometric (const PathGeometric &path)
 Copy constructor.
 PathGeometric (const base::SpaceInformationPtr &si)
 Construct a path instance for a given space information.
virtual void print (std::ostream &out) const
 Print the path to a stream.
void random (void)
 Set this path to a random segment.
bool randomValid (unsigned int attempts)
 Set this path to a random valid segment. Sample attempts times for valid segments. Returns true on success.
void reverse (void)
 Reverse the path.
double smoothness (void) const
 Compute a notion of smootheness for this path. The closer the value is to 0, the smoother the path.
void subdivide (void)
 Add a state at the middle of each segment.
virtual ~PathGeometric (void)

Public Attributes

std::vector< base::State * > states
 The list of states that make up the path.

Protected Member Functions

void copyFrom (const PathGeometric &other)
 Copy data to this path from another path instance.
void freeMemory (void)
 Free the memory corresponding to the states on this path.

Detailed Description

Definition of a geometric path.

This is the type of path computed by geometric planners.

Definition at line 55 of file PathGeometric.h.


Constructor & Destructor Documentation

ompl::geometric::PathGeometric::PathGeometric ( const base::SpaceInformationPtr si  )  [inline]

Construct a path instance for a given space information.

Definition at line 60 of file PathGeometric.h.

ompl::geometric::PathGeometric::PathGeometric ( const PathGeometric path  ) 

Copy constructor.

ompl::geometric::PathGeometric::PathGeometric ( const base::SpaceInformationPtr si,
const base::State state 
)

Construct a path instance from a single state.

virtual ompl::geometric::PathGeometric::~PathGeometric ( void   )  [inline, virtual]

Definition at line 70 of file PathGeometric.h.


Member Function Documentation

void ompl::geometric::PathGeometric::append ( const PathGeometric path  ) 

Append path at the end of this path.

Let the existing path consist of states [ s1, s2, ..., sk ]. Let path consist of states [y1, ..., yp].

If the existing path and path consist of states from the same state space, [y1, ..., yp] are added after sk. If they are not from the same state space, states [z1, ..., zp] are added, where each zi is a copy of sk that has components overwritten with ones in yi (if there are any common subspaces).

virtual bool ompl::geometric::PathGeometric::check ( void   )  const [virtual]

Check if the path is valid.

Implements ompl::base::Path.

std::pair<bool, bool> ompl::geometric::PathGeometric::checkAndRepair ( unsigned int  attempts  ) 

Check if the path is valid. If it is not, attempts are made to fix the path by sampling around invalid states. Not more than attempts samples are drawn. A pair of boolean values is returned. The first value represents the validity of the path before any change was made. The second value represents the validity of the path after changes were attempted. If no changes are attempted, the both values are true.

Note:
If repairing a path fails, the path may still be altered
double ompl::geometric::PathGeometric::clearance ( void   )  const

Compute the clearance of the end points along the path (no interpolation is performed). The clearance for the points is averaged.

void ompl::geometric::PathGeometric::copyFrom ( const PathGeometric other  )  [protected]

Copy data to this path from another path instance.

void ompl::geometric::PathGeometric::freeMemory ( void   )  [protected]

Free the memory corresponding to the states on this path.

void ompl::geometric::PathGeometric::interpolate ( void   ) 

Insert a number of states in a path so that the path is made up of (approximately) the states checked for validity when a discrete motion validator is used.

void ompl::geometric::PathGeometric::interpolate ( unsigned int  count  ) 

Insert a number of states in a path so that the path is made up of exactly count states. States are inserted uniformly (more states on longer segments). Changes are performed only if a path has less than count states.

virtual double ompl::geometric::PathGeometric::length ( void   )  const [virtual]

Compute the length of a geometric path (sum of lengths of segments that make up the path).

Implements ompl::base::Path.

PathGeometric& ompl::geometric::PathGeometric::operator= ( const PathGeometric other  ) 

Assignment operator.

void ompl::geometric::PathGeometric::overlay ( const PathGeometric over,
unsigned int  startIndex = 0 
)

Overlay the path over on top of the current path. States are added to the current path if needed (by copying the last state).

If over consists of states form a different state space than the existing path, the data from those states is copied over, for the corresponding components. If over is from the same state space as this path, and startIndex is 0, this function's result will be the same as with operator=

virtual void ompl::geometric::PathGeometric::print ( std::ostream &  out  )  const [virtual]

Print the path to a stream.

Implements ompl::base::Path.

void ompl::geometric::PathGeometric::random ( void   ) 

Set this path to a random segment.

bool ompl::geometric::PathGeometric::randomValid ( unsigned int  attempts  ) 

Set this path to a random valid segment. Sample attempts times for valid segments. Returns true on success.

void ompl::geometric::PathGeometric::reverse ( void   ) 

Reverse the path.

double ompl::geometric::PathGeometric::smoothness ( void   )  const

Compute a notion of smootheness for this path. The closer the value is to 0, the smoother the path.

void ompl::geometric::PathGeometric::subdivide ( void   ) 

Add a state at the middle of each segment.


Member Data Documentation

The list of states that make up the path.

Definition at line 159 of file PathGeometric.h.


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


ompl
Author(s): Ioan Sucan/isucan@rice.edu, Mark Moll/mmoll@rice.edu, Lydia Kavraki/kavraki@rice.edu
autogenerated on Fri Jan 11 09:34:03 2013