1 #ifndef MILESTONE_PATH_H 2 #define MILESTONE_PATH_H 5 #include "EdgePlanner.h" 24 virtual void Eval(Real u,
Config& q)
const {
Eval2(u,q); }
25 virtual Real Length()
const;
26 virtual const Config& Start()
const {
return edges.front()->Start(); }
27 virtual const Config& End()
const {
return edges.back()->End(); }
29 const Config& GetMilestone(
int milestone)
const;
30 void SetMilestone(
int milestone,
const Config& x);
34 inline CSpace* Space(
int i=0)
const { assert(!edges.empty());
return edges[i]->Space(); }
35 inline int NumMilestones()
const {
return (
int)edges.size()+1; }
36 inline int NumEdges()
const {
return (
int)edges.size(); }
76 bool Save(std::ostream& out);
78 std::vector<EdgePlannerPtr> edges;
bool IsFeasible()
Checks the feasibility of all milestones and edges, returns true if so.
Definition: Path.cpp:41
void CreateEdgesFromMilestones(CSpace *space, const std::vector< Config > &milestones)
Create the path that connects the milestones in the given workspace.
Definition: Path.cpp:32
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
void Discretize(Real h)
Definition: Path.cpp:202
void Concat(const MilestonePath &path)
Adds the path onto the end of this one.
Definition: Path.cpp:15
A sequence of locally planned paths between milestones.
Definition: planning/Path.h:18
void Splice(int start, int goal, const MilestonePath &path)
Definition: Path.cpp:350
A base class for all 1D interpolators.
Definition: Interpolator.h:10
bool Save(std::ostream &out)
Saves the intermediate milestones.
Definition: Path.cpp:378
bool CheckSetMilestone(int milestone, const Config &x)
Definition: Path.cpp:317
int DiscretizeEdge(int e, Real h)
Discretizes only the given edge. Returns the number of new segments.
Definition: Path.cpp:210
int Eval2(Real t, Config &c) const
Definition: Path.cpp:56
int Shortcut()
Definition: Path.cpp:70
bool InitializeEdgePlans()
Checks the feasibility of all edges, returns true if they all succeed.
Definition: Path.cpp:23
bool Load(std::istream &in, CSpace *space)
Loads the intermediate milestones, and creates the edges from the given space.
Definition: Path.cpp:360
int Reduce(int numIters)
Definition: Path.cpp:117
A base class for objective functionals of the form J[x,u] = sum_0^N-1 L(xi,ui) dt + Phi(xN) ...
Definition: Objective.h:18