KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
MilestonePath Class Reference

A sequence of locally planned paths between milestones. More...

#include <Path.h>

Inheritance diagram for MilestonePath:
Interpolator

Public Member Functions

virtual void Eval (Real u, Config &q) const
 
virtual Real Length () const
 
virtual const ConfigStart () const
 
virtual const ConfigEnd () const
 
const ConfigGetMilestone (int milestone) const
 
void SetMilestone (int milestone, const Config &x)
 
bool CheckSetMilestone (int milestone, const Config &x)
 
CSpaceSpace (int i=0) const
 
int NumMilestones () const
 
int NumEdges () const
 
bool IsValid ()
 
void Concat (const MilestonePath &path)
 Adds the path onto the end of this one.
 
void CreateEdgesFromMilestones (CSpace *space, const std::vector< Config > &milestones)
 Create the path that connects the milestones in the given workspace.
 
bool InitializeEdgePlans ()
 Checks the feasibility of all edges, returns true if they all succeed.
 
bool IsFeasible ()
 Checks the feasibility of all milestones and edges, returns true if so.
 
int Eval2 (Real t, Config &c) const
 
int Shortcut ()
 
int Reduce (int numIters)
 
void Splice (int start, int goal, const MilestonePath &path)
 
void Discretize (Real h)
 
int DiscretizeEdge (int e, Real h)
 Discretizes only the given edge. Returns the number of new segments.
 
void DiscretizeEdge (int e, const std::vector< Real > &u)
 Discretizes the given edge with the specified interpolation.
 
bool Load (std::istream &in, CSpace *space)
 Loads the intermediate milestones, and creates the edges from the given space.
 
bool Save (std::ostream &out)
 Saves the intermediate milestones.
 
- Public Member Functions inherited from Interpolator
virtual Real ParamStart () const
 
virtual Real ParamEnd () const
 

Public Attributes

std::vector< EdgePlannerPtr > edges
 

Detailed Description

A sequence of locally planned paths between milestones.

Milestones are indexed M0...Mn+1, such that segment k goes from Mk to Mk+1

Note that the parameterization of the path is uniform on the range [0,1].

Member Function Documentation

bool MilestonePath::CheckSetMilestone ( int  milestone,
const Config x 
)

Sets the milestone to x only if x and the paths to adjoining milestones are feasible

void MilestonePath::Discretize ( Real  h)

Discretizes the path such that each edge is no longer than h. Assumes straight-line path segments.

int MilestonePath::Eval2 ( Real  t,
Config c 
) const

Supposing all milestones have equal time spacings, evaluates the point on the path at time t in [0,1]. Returns the edge of time t.

int MilestonePath::Reduce ( int  numIters)

Tries to shorten the path by connecting random points with a shortcut, for numIters iterations. Returns # of shortcuts

References Math::Rand().

Referenced by ShortcutMotionPlanner::Plan().

int MilestonePath::Shortcut ( )

Tries to shorten the path by connecting subsequent milestones. Returns # of shortcuts made.

void MilestonePath::Splice ( int  start,
int  goal,
const MilestonePath path 
)

Replaces the section of the path between milestones start and goal with a new path. If the index is negative, erases the corresponding start/goal milestones too.


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