1 #ifndef ANY_MOTION_PLANNER_H 2 #define ANY_MOTION_PLANNER_H 5 #include "MotionPlanner.h" 28 bool LoadJSON(
const std::string& str);
42 Real costImprovementThreshold;
78 virtual int PlanMore()=0;
82 virtual int NumIterations()
const=0;
84 virtual int NumMilestones()
const=0;
86 virtual int NumComponents()
const=0;
90 virtual int AddMilestone(
const Config& q)=0;
92 virtual void GetMilestone(
int,
Config& q)=0;
98 virtual bool IsConnected(
int ma,
int mb)
const=0;
108 virtual void SetObjective(std::shared_ptr<ObjectiveFunctionalBase> obj) {}
110 virtual bool IsLazy()
const {
return false; }
122 virtual int GetClosestMilestone(
const Config& q);
136 virtual bool IsSolved() {
return IsConnected(0,1); }
279 bool LoadJSON(
const std::string& str);
287 bool ignoreConnectedComponents;
std::shared_ptr< ObjectiveFunctionalBase > objective
Non-NULL if you'd like to optimize some objective function.
Definition: AnyMotionPlanner.h:170
bool useGrid
for SBL, SBLPRT (default true): for SBL, uses grid-based random point selection
Definition: AnyMotionPlanner.h:291
virtual bool IsPointToPoint() const
Definition: AnyMotionPlanner.h:101
bool restart
true if you wish to restart the planner to get better paths with the remaining time (default false) ...
Definition: AnyMotionPlanner.h:297
virtual bool IsLazyConnected(int ma, int mb) const
Definition: AnyMotionPlanner.h:115
int perturbationIters
for SBL (default 5)
Definition: AnyMotionPlanner.h:289
virtual void ConnectHint(int m)
Manual indication that the milestone is a good candidate for connecting.
Definition: AnyMotionPlanner.h:94
std::string restartTermCond
used if restart is true, JSON string defining termination condition (default "{foundSolution:1;maxIte...
Definition: AnyMotionPlanner.h:298
virtual bool IsLazy() const
Returns true if this planner has lazy semantics.
Definition: AnyMotionPlanner.h:110
Vector Config
an alias for Vector
Definition: RobotKinematics3D.h:14
Motion planning configuration space base class. The configuration space implements an interpolation s...
Definition: CSpace.h:39
int randomizeFrequency
for SBL, SBLPRT (default 50): how often the grid projection is randomly perturbed ...
Definition: AnyMotionPlanner.h:293
virtual void SetObjective(std::shared_ptr< ObjectiveFunctionalBase > obj)
Must be implemented if CanUseObjective() = true.
Definition: AnyMotionPlanner.h:108
Real suboptimalityFactor
for RRT*, LazyPRM*, LazyRRG* (default 0)
Definition: AnyMotionPlanner.h:286
bool bidirectional
for RRT (default true)
Definition: AnyMotionPlanner.h:290
bool shortcut
true if you wish to perform shortcutting afterwards (default false)
Definition: AnyMotionPlanner.h:296
virtual bool IsOptimizing() const
Returns true if this planner can optimize the path after the first solution.
Definition: AnyMotionPlanner.h:103
A sequence of locally planned paths between milestones.
Definition: planning/Path.h:18
std::string SaveJSON() const
Save settings to JSON string.
Definition: AnyMotionPlanner.cpp:275
virtual void PlanMore(int numIters)
Performs numIters planning units.
Definition: AnyMotionPlanner.h:80
Config qstart
Non-empty if the start/end point is given.
Definition: AnyMotionPlanner.h:166
Real connectionThreshold
for PRM,RRT,SBL,SBLPRT,RRT*,PRM*,LazyPRM*,LazyRRG* (default Inf)
Definition: AnyMotionPlanner.h:285
A motion planner creator.
Definition: AnyMotionPlanner.h:257
Real perturbationRadius
for Perturbation,EST,RRT,SBL,SBLPRT (default 0.1)
Definition: AnyMotionPlanner.h:288
int knn
for PRM (default 10)
Definition: AnyMotionPlanner.h:284
virtual Real GetOptimalPath(int ma, const std::vector< int > &mb, MilestonePath &path)
Definition: AnyMotionPlanner.h:134
int maxIters
Stop when this number of iterations have been computed (default 1000)
Definition: AnyMotionPlanner.h:35
An abstract class for a sample-based motion planner.
Definition: AnyMotionPlanner.h:66
virtual bool IsSolved()
For single-query planners, returns true if the start and goal are connected.
Definition: AnyMotionPlanner.h:136
A structure to specify the space, endpoints, and cost function of a motion planning problem...
Definition: AnyMotionPlanner.h:151
CSet * startSet
Non-NULL if the start/end point must be in a given set.
Definition: AnyMotionPlanner.h:168
virtual bool CanAddMilestone() const
Returns true if a milestone can currently be added.
Definition: AnyMotionPlanner.h:88
A termination condition for a planner. Supports max iteration count, time limit, absolute cost...
Definition: AnyMotionPlanner.h:23
The logging system used in KrisLibrary.
Real gridResolution
for SBL, SBLPRT, FMM, FMM* (default 0): if nonzero, for SBL, specifies point selection grid size (def...
Definition: AnyMotionPlanner.h:292
virtual bool CheckPath(int ma, int mb)
Definition: AnyMotionPlanner.h:120
std::string pointLocation
for PRM, RRT*, PRM*, LazyPRM*, LazyRRG* (default ""): specifies a point location data structure ("ran...
Definition: AnyMotionPlanner.h:294
Real timeLimit
Stop when this time limit (in seconds) has expired (default Inf)
Definition: AnyMotionPlanner.h:37
virtual void GetRoadmap(Roadmap &roadmap) const
Returns a full-blown roadmap representation of the roadmap.
Definition: AnyMotionPlanner.h:142
virtual void GetSolution(MilestonePath &path)
Definition: AnyMotionPlanner.h:140
A simple map from keys to values.
Definition: PropertyMap.h:27
Real costImprovementPeriod
Stop when the solution cost improvement over the given period of time decreases below costImprovement...
Definition: AnyMotionPlanner.h:41
virtual bool CanUseObjective() const
Definition: AnyMotionPlanner.h:106
virtual bool ConnectHint(int ma, int mb)
Manual indication that the milestones are good candidates for connecting.
Definition: AnyMotionPlanner.h:96
Real costThreshold
Stop when the solution cost decreases below the threshold (default 0)
Definition: AnyMotionPlanner.h:39
bool storeEdges
true if local planner data is stored during planning (false may save memory, default) ...
Definition: AnyMotionPlanner.h:295
A subset of a CSpace, which establishes a constraint for a configuration must meet. Mathematically, this is a set S which imposes the constraint [q in S].
Definition: CSet.h:20
bool foundSolution
Stop on the first solution found.
Definition: AnyMotionPlanner.h:33
Definition: PropertyMap.cpp:9
bool LoadJSON(const std::string &str)
Load settings from JSON string.
Definition: AnyMotionPlanner.cpp:262
A specialization of a Graph to be an undirected graph.
Definition: UndirectedGraph.h:17