mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +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:
@@ -30,7 +30,7 @@ class CubicHermiteSplineTest : public ::testing::Test {
|
||||
SplineHelper::CubicSplinesFromControlVectors(startCV, waypoints, endCV);
|
||||
std::vector<Spline<3>::PoseWithCurvature> poses;
|
||||
|
||||
poses.push_back(splines[0].GetPoint(0.0));
|
||||
poses.push_back(splines[0].GetPoint(0.0).value());
|
||||
|
||||
for (auto&& spline : splines) {
|
||||
auto x = SplineParameterizer::Parameterize(spline);
|
||||
|
||||
Reference in New Issue
Block a user