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

Tries to produce a path between a start node and a goal space. Does so via goal sampling / reinitializing. More...

Inheritance diagram for PointToSetMotionPlannerAdaptor:
MotionPlannerInterface

Public Member Functions

 PointToSetMotionPlannerAdaptor (const MotionPlannerFactory &factory, CSpace *space, const Config &qstart, CSet *goalSpace)
 
virtual int PlanMore ()
 Performs a planning unit and returns the added milestone.
 
virtual int NumIterations () const
 Returns the number of elaped planning units.
 
virtual int NumMilestones () const
 Returns the number of milestones stored by the planner.
 
virtual int NumComponents () const
 Returns the number of connected components stored by the planner.
 
virtual bool CanAddMilestone () const
 Returns true if a milestone can currently be added.
 
virtual int AddMilestone (const Config &q)
 Adds a milestone, if possible. Returns an id of the milestone.
 
virtual void GetMilestone (int i, Config &q)
 For the id of a milestone previously added, returns its configuration.
 
virtual bool IsConnected (int ma, int mb) const
 Returns true if the two milestones are connected with a feasible path.
 
virtual bool IsPointToPoint () const
 
virtual bool IsOptimizing () const
 Returns true if this planner can optimize the path after the first solution.
 
virtual bool CanUseObjective () const
 
virtual void SetObjective (shared_ptr< ObjectiveFunctionalBase > obj)
 
virtual bool IsLazy () const
 Returns true if this planner has lazy semantics.
 
virtual bool IsLazyConnected (int ma, int mb) const
 
virtual bool CheckPath (int ma, int mb)
 
virtual int GetClosestMilestone (const Config &q)
 Retrieve the index of a close milestone.
 
virtual void GetPath (int ma, int mb, MilestonePath &path)
 
virtual Real GetOptimalPath (int ma, const std::vector< int > &mb, MilestonePath &path)
 
virtual void GetRoadmap (Roadmap &roadmap) const
 Returns a full-blown roadmap representation of the roadmap.
 
virtual bool IsSolved ()
 For single-query planners, returns true if the start and goal are connected.
 
virtual void GetSolution (MilestonePath &path)
 
virtual void GetStats (PropertyMap &stats) const
 Returns some named statistics about the planner, implementation-dependent.
 
pair< int, int > MilestoneToPlanner (int m) const
 
- Public Member Functions inherited from MotionPlannerInterface
virtual std::string Plan (MilestonePath &path, const HaltingCondition &cond)
 
virtual void PlanMore (int numIters)
 Performs numIters planning units.
 
virtual void ConnectHint (int m)
 Manual indication that the milestone is a good candidate for connecting.
 
virtual bool ConnectHint (int ma, int mb)
 Manual indication that the milestones are good candidates for connecting.
 
virtual void SetObjective (std::shared_ptr< ObjectiveFunctionalBase > obj)
 Must be implemented if CanUseObjective() = true.
 

Public Attributes

MotionPlannerFactory factory
 
CSpacespace
 
Config qstart
 
CSetgoalSpace
 
shared_ptr< ObjectiveFunctionalBaseobjective
 
int sampleGoalPeriod
 Setting: the planner samples a new goal configuration every n*|goalNodes| iterations.
 
int numIters
 Number of total iterations.
 
int sampleGoalCounter
 Incremented each iteration, when it hits sampleGoalPeriod a goal should be sampled.
 
vector< shared_ptr< MotionPlannerInterface > > goalPlanners
 These are plans from qstart to each goal node.
 
vector< Real > goalCosts
 The costs of the path to each planner's goal, or Inf if no solution has been found.
 

Additional Inherited Members

- Public Types inherited from MotionPlannerInterface
typedef Graph::UndirectedGraph< Config, std::shared_ptr< EdgePlanner > > Roadmap
 

Detailed Description

Tries to produce a path between a start node and a goal space. Does so via goal sampling / reinitializing.

Member Function Documentation

virtual bool PointToSetMotionPlannerAdaptor::CanUseObjective ( ) const
inlinevirtual
bool PointToSetMotionPlannerAdaptor::CheckPath ( int  ma,
int  mb 
)
virtual

If lazy semantics are used, this will check for a feasible path between two lazy-connected milestones

Must be implemented if IsLazy()=true

Reimplemented from MotionPlannerInterface.

Real PointToSetMotionPlannerAdaptor::GetOptimalPath ( int  ma,
const std::vector< int > &  mb,
MilestonePath path 
)
virtual

Calculates a feasible, minimum cost path, starting at ma and terminating at some node in the mb set. If SetObjective was called before, the objective function is used as the cost. Otherwise, the cost is up to the planner, but is typically path length. The cost is returned.

Must be implemented if CanUseObjective() = true.

Reimplemented from MotionPlannerInterface.

void PointToSetMotionPlannerAdaptor::GetPath ( int  ma,
int  mb,
MilestonePath path 
)
virtual

Returns a feasible path between two connected milestones. If IsConnected(ma,mb)=false, this will abort.

Must be implemented if IsLazy()=true

Implements MotionPlannerInterface.

void PointToSetMotionPlannerAdaptor::GetSolution ( MilestonePath path)
virtual

For single-query planners (IsPointToPoint()=true), returns the solution path.

For multi-query planners, returns the optimal solution path.

Reimplemented from MotionPlannerInterface.

bool PointToSetMotionPlannerAdaptor::IsLazyConnected ( int  ma,
int  mb 
) const
virtual

If lazy semantics are used, returns true if the two milestones are connected by a likely feasible path

Must be implemented if IsLazy()=true

Reimplemented from MotionPlannerInterface.

virtual bool PointToSetMotionPlannerAdaptor::IsPointToPoint ( ) const
inlinevirtual

Returns true if this planner is exclusively point-to-point, i.e., cannot accept additional goal nodes via AddMilestone()

Reimplemented from MotionPlannerInterface.


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