Package edu.wpi.first.math.spline
Class SplineParameterizer
java.lang.Object
edu.wpi.first.math.spline.SplineParameterizer
public final class SplineParameterizer extends Object
Class used to parameterize a spline by its arc length.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SplineParameterizer.MalformedSplineException
Exception for malformed splines. -
Method Summary
Modifier and Type Method Description static List<PoseWithCurvature>
parameterize(Spline spline)
Parametrizes the spline.static List<PoseWithCurvature>
parameterize(Spline spline, double t0, double t1)
Parametrizes the spline.
-
Method Details
-
parameterize
Parametrizes the spline. This method breaks up the spline into various arcs until their dx, dy, and dtheta are within specific tolerances.- Parameters:
spline
- The spline to parameterize.- Returns:
- A list of poses and curvatures that represents various points on the spline.
- Throws:
SplineParameterizer.MalformedSplineException
- When the spline is malformed (e.g. has close adjacent points with approximately opposing headings)
-
parameterize
Parametrizes the spline. This method breaks up the spline into various arcs until their dx, dy, and dtheta are within specific tolerances.- Parameters:
spline
- The spline to parameterize.t0
- Starting internal spline parameter. It is recommended to use 0.0.t1
- Ending internal spline parameter. It is recommended to use 1.0.- Returns:
- A list of poses and curvatures that represents various points on the spline.
- Throws:
SplineParameterizer.MalformedSplineException
- When the spline is malformed (e.g. has close adjacent points with approximately opposing headings)
-