mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Fix small bug in SplineHelper (#2061)
Also add comments for clamped cubic solution.
This commit is contained in:
@@ -129,4 +129,20 @@ class CubicHermiteSplineTest {
|
||||
|
||||
run(start, waypoints, end);
|
||||
}
|
||||
|
||||
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert")
|
||||
@Test
|
||||
void testWindyPath() {
|
||||
final var start = new Pose2d(0, 0, Rotation2d.fromDegrees(0.0));
|
||||
final ArrayList<Translation2d> waypoints = new ArrayList<>();
|
||||
waypoints.add(new Translation2d(0.5, 0.5));
|
||||
waypoints.add(new Translation2d(0.5, 0.5));
|
||||
waypoints.add(new Translation2d(1.0, 0.0));
|
||||
waypoints.add(new Translation2d(1.5, 0.5));
|
||||
waypoints.add(new Translation2d(2.0, 0.0));
|
||||
waypoints.add(new Translation2d(2.5, 0.5));
|
||||
final var end = new Pose2d(3.0, 0.0, Rotation2d.fromDegrees(0.0));
|
||||
|
||||
run(start, waypoints, end);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user