RaidZeroLib
Coroutine robot framework for VEX V5
Loading...
Searching...
No Matches
ParametricPath.hpp
1#pragma once
2#include "RaidZeroLib/api/Pathing/DiscretePath.hpp"
3#include "RaidZeroLib/api/Units/Units.hpp"
4
5namespace rz {
6
27 public:
29 virtual ~ParametricPath() = default;
30
39 virtual Point getPoint(double t) const noexcept = 0;
40
51 virtual Point getVelocity(double t) const noexcept = 0;
52
61 virtual Point getAcceleration(double t) const noexcept = 0;
62
75 virtual Angle getTheta(double t) const noexcept;
76
89 virtual Curvature getCurvature(double t) const noexcept;
90
103 virtual Length getLength(double tStart = 0, double tEnd = 1) const noexcept;
104
118 virtual double stepT(double t, Length distance) const noexcept;
119
120 virtual DiscretePath toDiscrete(Length distance, bool includeEnd = true) const;
121};
122
123} // namespace rz
Immutable sequence of 2D waypoints with unit-safe geometry.
Definition DiscretePath.hpp:25
Differentiable 2D path over a unit-interval parameter t ∈ [0, 1].
Definition ParametricPath.hpp:26
virtual Point getVelocity(double t) const noexcept=0
First derivative dP/dt at parameter t (w.r.t. path parameter).
virtual Length getLength(double tStart=0, double tEnd=1) const noexcept
Arclength along the path between parameters tStart and tEnd.
virtual Curvature getCurvature(double t) const noexcept
Signed curvature κ(t) = wedge(dP/dt, d²P/dt²) / |dP/dt|³.
virtual Point getPoint(double t) const noexcept=0
Position on the path at parameter t.
virtual ~ParametricPath()=default
Virtual destructor.
virtual Point getAcceleration(double t) const noexcept=0
Second derivative d²P/dt² at parameter t (w.r.t. path parameter).
virtual double stepT(double t, Length distance) const noexcept
Advance the parameter by a target arclength measured along the path.
virtual DiscretePath toDiscrete(Length distance, bool includeEnd=true) const
virtual Angle getTheta(double t) const noexcept
Path heading: orientation of the tangent dP/dt.
Immutable 2D point / vector with unit-safe Cartesian coordinates.
Definition Point.hpp:21
au::QuantityD< au::Inverse< au::Meters > > Curvature
Definition Units.hpp:11
au::QuantityD< au::Radians > Angle
Definition Units.hpp:13
au::QuantityD< au::Meters > Length
Definition Units.hpp:9
Definition DriverControl.hpp:11