1 #ifndef GENERALIZED_BEZIER_CURVE_H 2 #define GENERALIZED_BEZIER_CURVE_H 5 #include "GeodesicSpace.h" 46 void MidpointDeriv(
Vector& v)
const;
47 void MidpointTimeDeriv(Real duration,
Vector& v)
const;
65 int ParamToSegment(Real u,Real* segparam=NULL)
const;
69 Real TotalTime()
const;
70 const Config& Start()
const {
return segments.front().x0; }
71 const Config& End()
const {
return segments.back().x3; }
74 void TimeScale(Real scale);
76 void GetPiecewiseLinear(std::vector<Real>& times,std::vector<Config>& milestones)
const;
80 void Bisect(
int seg,Real u=0.5);
81 bool Save(std::ostream& out)
const;
82 bool Load(std::istream& in);
84 std::vector<GeneralizedCubicBezierCurve> segments;
85 std::vector<Real> durations;
A space with geodesics and (optionally) geodesic derivatives.
Definition: GeodesicSpace.h:31
void GetBounds(Vector &xmin, Vector &xmax) const
These work only with cartesian spaces.
Definition: GeneralizedBezierCurve.cpp:298
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:34
A generalized Bezier curve that uses the CSpace's Interpolate routine to generate the smooth interpol...
Definition: GeneralizedBezierCurve.h:16
void Eval(Real u, Config &x) const
Evaluate the bezizer curve at point u.
Definition: GeneralizedBezierCurve.cpp:147
Real OuterLength() const
Evaluates the length of the "frame" from x0->x1->x2->x3.
Definition: GeneralizedBezierCurve.cpp:405
void Accel(Real u, Config &ddx) const
Only works properly if the space is cartesian.
Definition: GeneralizedBezierCurve.cpp:265
A Bezier spline with segment durations.
Definition: GeneralizedBezierCurve.h:62
void SetSmoothTangents(const Config *prev=NULL, const Config *next=NULL)
Helper: sets x1 and x2 to smoothly interpolate from previous/next configs.
Definition: GeneralizedBezierCurve.cpp:58
void Deriv(Real u, Config &dx) const
Only works properly if the space is cartesian or manifold is set.
Definition: GeneralizedBezierCurve.cpp:193
A vector over the field T.
Definition: function.h:9
void SetNaturalTangents(const Vector &dx0, const Vector &dx1)
Definition: GeneralizedBezierCurve.cpp:11
void Midpoint(Vector &x) const
These may be slightly cheaper than Eval(0.5) and Deriv(0.5) for cartesian spaces. ...
Definition: GeneralizedBezierCurve.cpp:413
void Bisect(GeneralizedCubicBezierCurve &c1, GeneralizedCubicBezierCurve &c2) const
Definition: GeneralizedBezierCurve.cpp:439