34 float x = 0.0f,
y = 0.0f;
35 float dx = 0.0f,
dy = 0.0f;
70 explicit Spline(
const std::vector<Waypoint>& wps);
73 bool valid()
const {
return !segs_.empty(); }
108 std::vector<HermiteSegment> segs_;
109 std::vector<std::array<float, 65>> segArcTables_;
110 std::vector<float> segLens_;
111 float totalLen_ = 0.0f;
113 void sToSegU(
float s,
int& segIdx,
float& u)
const;
Concatenated quintic Hermite spline with arc-length parameterization.
Spline(const std::vector< Waypoint > &wps)
Build a spline from waypoints.
float totalArcLen() const
size_t segmentCount() const
float headingAt(float s) const
Heading at arc length s, in radians.
SplineSample sampleAt(float s) const
Sample pose / derivatives at arc length s.
float curvatureAt(float s) const
Signed curvature at arc length s.
Public LightLib odometry / pose-estimation API.
One segment of a quintic Hermite spline.
float a1y
End position, velocity, acceleration.
float a0y
Start position, velocity, acceleration.
SplineSample eval(float u) const
Evaluate the segment at parameter u.
Pose / velocity / acceleration sample produced by spline evaluation.
float dy
First derivative w.r.t. parameter u.
float ddy
Second derivative w.r.t. parameter u.
Single 2-D waypoint with optional heading and per-point speed cap.
float x
X position, inches.
std::optional< float > headingRad
If absent, tangent taken from adjacent chord.
std::optional< float > speed
Optional per-waypoint speed cap (not used yet).
float y
Y position, inches.