mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
[wpimath] Exit early when parameterizing malformed spline (#6827)
Currently, a max iteration heuristic is used to determine when a spline is malformed. Instead, we can report a failure immediately if dx and dy are too small, because the heading won't be accurate either. Fixes #6826.
This commit is contained in:
@@ -36,7 +36,7 @@ class CubicHermiteSplineTest {
|
||||
|
||||
var poses = new ArrayList<PoseWithCurvature>();
|
||||
|
||||
poses.add(splines[0].getPoint(0.0));
|
||||
poses.add(splines[0].getPoint(0.0).get());
|
||||
|
||||
for (var spline : splines) {
|
||||
poses.addAll(SplineParameterizer.parameterize(spline));
|
||||
|
||||
Reference in New Issue
Block a user