31 #ifndef DYNAMIC_PATH_H 32 #define DYNAMIC_PATH_H 35 #include <KrisLibrary/math/random.h> 45 virtual bool ConfigFeasible(
const Vector& x)=0;
46 virtual bool SegmentFeasible(
const Vector& a,
const Vector& b)=0;
59 virtual Real ObstacleDistanceNorm()
const {
return Math::Inf; }
60 virtual Real ObstacleDistance(
const Vector& x)=0;
101 virtual Real Rand() {
return Math::Rand(); }
118 void Init(
const Vector& velMax,
const Vector& accMax);
119 void SetJointLimits(
const Vector& qMin,
const Vector& qMax);
120 inline void Clear() { ramps.clear(); }
121 inline bool Empty()
const {
return ramps.empty(); }
122 inline const Vector& StartConfig()
const {
return ramps.front().x0; }
123 inline const Vector& EndConfig()
const {
return ramps.back().x1; }
124 inline const Vector& StartVelocity()
const {
return ramps.front().dx0; }
125 inline const Vector& EndVelocity()
const {
return ramps.back().dx1; }
126 Real GetTotalTime()
const;
127 int GetSegment(Real t,Real& u)
const;
128 void Evaluate(Real t,Vector& x)
const;
129 void Derivative(Real t,Vector& dx)
const;
130 void Accel(Real t,Vector& ddx)
const;
131 bool SolveMinTime(
const Vector& x0,
const Vector& dx0,
const Vector& x1,
const Vector& dx1);
132 bool SolveMinAccel(
const Vector& x0,
const Vector& dx0,
const Vector& x1,
const Vector& dx1,Real endTime);
133 bool SetMilestones(
const std::vector<Vector>& x);
134 bool SetMilestones(
const std::vector<Vector>& x,
const std::vector<Vector>& dx);
135 void GetMilestones(std::vector<Vector>& x,std::vector<Vector>& dx)
const;
136 void Append(
const Vector& x);
137 void Append(
const Vector& x,
const Vector& dx);
155 bool IsValid()
const;
158 Vector
xMin,xMax,velMax,accMax;
Solves for optimal trajectores for a velocity-bounded ND system.
Definition: ParabolicRamp.h:110
std::vector< ParabolicRampND > ramps
The path is stored as a series of ramps.
Definition: DynamicPath.h:160
A custom random number generator that can be provided to DynamicPath::Shortcut()
Definition: DynamicPath.h:98
A bounded-velocity, bounded-acceleration trajectory consisting of parabolic ramps.
Definition: DynamicPath.h:114
A base class for a distance checker. ObstacleDistance returns the radius of a L-z norm guaranteed to ...
Definition: DynamicPath.h:55
Vector xMin
The joint limits (optional), velocity bounds, and acceleration bounds.
Definition: DynamicPath.h:158
A base class for a feasibility checker.
Definition: DynamicPath.h:41
Functions for optimal acceleration-bounded trajectories.
A class that encapsulates feaibility checking of a ParabolicRampND.
Definition: DynamicPath.h:82