diff --git a/book/odometry/CombinedTest.html b/book/odometry/CombinedTest.html new file mode 100644 index 0000000..078edae --- /dev/null +++ b/book/odometry/CombinedTest.html @@ -0,0 +1,333 @@ + + + + + + Combined Test - Seattle Solvers Docs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
+

Combined Test

+
// Combined Test
+.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0))
+
+.strafeTo(new Vector2d(-24, 24 * Math.sqrt(3)))
+.setTangent(0)
+
+.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2)
+
+.strafeToSplineHeading(new Vector2d(-48, 48), Math.toRadians(270))
+
+.turnTo(Math.toRadians(315))
+
+.splineTo(new Vector2d(-48, 12), Math.PI / 6)
+
+.splineToSplineHeading(new Pose2d(48, -6, Math.toRadians(215)), Math.PI / 3)
+
+.setReversed(true)
+
+.splineToSplineHeading(new Pose2d(6, -48, Math.toRadians(215)), Math.PI / 4)
+.splineTo(new Vector2d(36, -18), Math.PI / 2)
+
+.strafeToLinearHeading(new Vector2d(24, 24), Math.toRadians(0))
+
+.turnTo(Math.toRadians(45))
+.lineToX(0)
+.turn(Math.toRadians(-45))
+
+.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0))
+
+.strafeTo(new Vector2d(-24, 24 * Math.sqrt(3)))
+.setTangent(0)
+
+.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2)
+
+.strafeToSplineHeading(new Vector2d(-48, 48), Math.toRadians(270))
+
+.turnTo(Math.toRadians(315))
+
+.splineTo(new Vector2d(-48, 12), Math.PI / 6)
+
+.splineToSplineHeading(new Pose2d(48, -6, Math.toRadians(215)), Math.PI / 3)
+
+.setReversed(true)
+
+.splineToSplineHeading(new Pose2d(6, -48, Math.toRadians(215)), Math.PI / 4)
+.splineTo(new Vector2d(36, -18), Math.PI / 2)
+
+.strafeToLinearHeading(new Vector2d(24, 24), Math.toRadians(0))
+
+.turnTo(Math.toRadians(45))
+.lineToX(0)
+.turn(Math.toRadians(-45))
+
+.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0))
+
+.strafeTo(new Vector2d(-24, 24 * Math.sqrt(3)))
+.setTangent(0)
+
+.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2)
+
+.strafeToSplineHeading(new Vector2d(-48, 48), Math.toRadians(270))
+
+.turnTo(Math.toRadians(315))
+
+.splineTo(new Vector2d(-48, 12), Math.PI / 6)
+
+.splineToSplineHeading(new Pose2d(48, -6, Math.toRadians(215)), Math.PI / 3)
+
+.setReversed(true)
+
+.splineToSplineHeading(new Pose2d(6, -48, Math.toRadians(215)), Math.PI / 4)
+.splineTo(new Vector2d(36, -18), Math.PI / 2)
+
+.strafeToLinearHeading(new Vector2d(24, 24), Math.toRadians(0))
+
+.turnTo(Math.toRadians(45))
+.lineToX(0)
+.turn(Math.toRadians(-45))
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/book/odometry/CombinedTest.java b/book/odometry/CombinedTest.java new file mode 100644 index 0000000..7be1c49 --- /dev/null +++ b/book/odometry/CombinedTest.java @@ -0,0 +1,78 @@ +// Combined Test +.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0)) + +.strafeTo(new Vector2d(-24, 24 * Math.sqrt(3))) +.setTangent(0) + +.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2) + +.strafeToSplineHeading(new Vector2d(-48, 48), Math.toRadians(270)) + +.turnTo(Math.toRadians(315)) + +.splineTo(new Vector2d(-48, 12), Math.PI / 6) + +.splineToSplineHeading(new Pose2d(48, -6, Math.toRadians(215)), Math.PI / 3) + +.setReversed(true) + +.splineToSplineHeading(new Pose2d(6, -48, Math.toRadians(215)), Math.PI / 4) +.splineTo(new Vector2d(36, -18), Math.PI / 2) + +.strafeToLinearHeading(new Vector2d(24, 24), Math.toRadians(0)) + +.turnTo(Math.toRadians(45)) +.lineToX(0) +.turn(Math.toRadians(-45)) + +.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0)) + +.strafeTo(new Vector2d(-24, 24 * Math.sqrt(3))) +.setTangent(0) + +.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2) + +.strafeToSplineHeading(new Vector2d(-48, 48), Math.toRadians(270)) + +.turnTo(Math.toRadians(315)) + +.splineTo(new Vector2d(-48, 12), Math.PI / 6) + +.splineToSplineHeading(new Pose2d(48, -6, Math.toRadians(215)), Math.PI / 3) + +.setReversed(true) + +.splineToSplineHeading(new Pose2d(6, -48, Math.toRadians(215)), Math.PI / 4) +.splineTo(new Vector2d(36, -18), Math.PI / 2) + +.strafeToLinearHeading(new Vector2d(24, 24), Math.toRadians(0)) + +.turnTo(Math.toRadians(45)) +.lineToX(0) +.turn(Math.toRadians(-45)) + +.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0)) + +.strafeTo(new Vector2d(-24, 24 * Math.sqrt(3))) +.setTangent(0) + +.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2) + +.strafeToSplineHeading(new Vector2d(-48, 48), Math.toRadians(270)) + +.turnTo(Math.toRadians(315)) + +.splineTo(new Vector2d(-48, 12), Math.PI / 6) + +.splineToSplineHeading(new Pose2d(48, -6, Math.toRadians(215)), Math.PI / 3) + +.setReversed(true) + +.splineToSplineHeading(new Pose2d(6, -48, Math.toRadians(215)), Math.PI / 4) +.splineTo(new Vector2d(36, -18), Math.PI / 2) + +.strafeToLinearHeading(new Vector2d(24, 24), Math.toRadians(0)) + +.turnTo(Math.toRadians(45)) +.lineToX(0) +.turn(Math.toRadians(-45)) \ No newline at end of file diff --git a/book/odometry/SplineTest.html b/book/odometry/SplineTest.html new file mode 100644 index 0000000..c60206a --- /dev/null +++ b/book/odometry/SplineTest.html @@ -0,0 +1,330 @@ + + + + + + Spline Test - Seattle Solvers Docs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
+

Spline Test

+
// Spline Test
+.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0))
+
+.setTangent(0)
+.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2)
+
+.setTangent(0)
+.setReversed(true)
+.splineTo(new Vector2d(24, 24), Math.PI / 2)
+
+.setTangent(0)
+.setReversed(false)
+.splineToConstantHeading(new Vector2d(0, 36), Math.PI / 2)
+
+.turnTo(Math.toRadians(180))
+
+.splineTo(new Vector2d(-48, 48), Math.PI / 2)
+
+.splineTo(new Vector2d(0, 0), Math.PI / 2)
+
+.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0))
+
+.setTangent(0)
+.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2)
+
+.setTangent(0)
+.setReversed(true)
+.splineTo(new Vector2d(24, 24), Math.PI / 2)
+
+.setTangent(0)
+.setReversed(false)
+.splineToConstantHeading(new Vector2d(0, 36), Math.PI / 2)
+
+.turnTo(Math.toRadians(180))
+
+.splineTo(new Vector2d(-48, 48), Math.PI / 2)
+
+.splineTo(new Vector2d(0, 0), Math.PI / 2)
+
+.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0))
+
+.setTangent(0)
+.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2)
+
+.setTangent(0)
+.setReversed(true)
+.splineTo(new Vector2d(24, 24), Math.PI / 2)
+
+.setTangent(0)
+.setReversed(false)
+.splineToConstantHeading(new Vector2d(0, 36), Math.PI / 2)
+
+.turnTo(Math.toRadians(180))
+
+.splineTo(new Vector2d(-48, 48), Math.PI / 2)
+
+.splineTo(new Vector2d(0, 0), Math.PI / 2)
+
+.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0))
+
+.setTangent(0)
+.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2)
+
+.setTangent(0)
+.setReversed(true)
+.splineTo(new Vector2d(24, 24), Math.PI / 2)
+
+.setTangent(0)
+.setReversed(false)
+.splineToConstantHeading(new Vector2d(0, 36), Math.PI / 2)
+
+.turnTo(Math.toRadians(180))
+
+.splineTo(new Vector2d(-48, 48), Math.PI / 2)
+
+.splineTo(new Vector2d(0, 0), Math.PI / 2)
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/book/odometry/SplineTest.java b/book/odometry/SplineTest.java new file mode 100644 index 0000000..41acbda --- /dev/null +++ b/book/odometry/SplineTest.java @@ -0,0 +1,76 @@ +// Spline Test +.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0)) + +.setTangent(0) +.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2) + +.setTangent(0) +.setReversed(true) +.splineTo(new Vector2d(24, 24), Math.PI / 2) + +.setTangent(0) +.setReversed(false) +.splineToConstantHeading(new Vector2d(0, 36), Math.PI / 2) + +.turnTo(Math.toRadians(180)) + +.splineTo(new Vector2d(-48, 48), Math.PI / 2) + +.splineTo(new Vector2d(0, 0), Math.PI / 2) + +.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0)) + +.setTangent(0) +.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2) + +.setTangent(0) +.setReversed(true) +.splineTo(new Vector2d(24, 24), Math.PI / 2) + +.setTangent(0) +.setReversed(false) +.splineToConstantHeading(new Vector2d(0, 36), Math.PI / 2) + +.turnTo(Math.toRadians(180)) + +.splineTo(new Vector2d(-48, 48), Math.PI / 2) + +.splineTo(new Vector2d(0, 0), Math.PI / 2) + +.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0)) + +.setTangent(0) +.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2) + +.setTangent(0) +.setReversed(true) +.splineTo(new Vector2d(24, 24), Math.PI / 2) + +.setTangent(0) +.setReversed(false) +.splineToConstantHeading(new Vector2d(0, 36), Math.PI / 2) + +.turnTo(Math.toRadians(180)) + +.splineTo(new Vector2d(-48, 48), Math.PI / 2) + +.splineTo(new Vector2d(0, 0), Math.PI / 2) + +.strafeToSplineHeading(new Vector2d(-48, -48), Math.toRadians(0)) + +.setTangent(0) +.splineToSplineHeading(new Pose2d(48, 48, Math.toRadians(90)), Math.PI / 2) + +.setTangent(0) +.setReversed(true) +.splineTo(new Vector2d(24, 24), Math.PI / 2) + +.setTangent(0) +.setReversed(false) +.splineToConstantHeading(new Vector2d(0, 36), Math.PI / 2) + +.turnTo(Math.toRadians(180)) + +.splineTo(new Vector2d(-48, 48), Math.PI / 2) + +.splineTo(new Vector2d(0, 0), Math.PI / 2) \ No newline at end of file diff --git a/book/odometry/StraightTest.html b/book/odometry/StraightTest.html new file mode 100644 index 0000000..32deb70 --- /dev/null +++ b/book/odometry/StraightTest.html @@ -0,0 +1,291 @@ + + + + + + Straight Test - Seattle Solvers Docs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+
+

Straight Test

+
// Straight Test
+.strafeTo(new Vector2d(0, 48))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(24, 24 * Math.sqrt(3)))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(24 * Math.sqrt(3), 24))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(48, 0))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(24 * Math.sqrt(3), -24))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(24, -24 * Math.sqrt(3)))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(0, -48))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(-24, -24 * Math.sqrt(3)))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(-24 * Math.sqrt(3), -24))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(-48, 0))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(-24 * Math.sqrt(3), 24))
+.strafeTo(new Vector2d(0, 0))
+
+.strafeTo(new Vector2d(-24, 24 * Math.sqrt(3)))
+.strafeTo(new Vector2d(0, 0))
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + +
+ + diff --git a/book/odometry/StraightTest.java b/book/odometry/StraightTest.java new file mode 100644 index 0000000..93a5807 --- /dev/null +++ b/book/odometry/StraightTest.java @@ -0,0 +1,36 @@ +// Straight Test +.strafeTo(new Vector2d(0, 48)) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(24, 24 * Math.sqrt(3))) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(24 * Math.sqrt(3), 24)) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(48, 0)) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(24 * Math.sqrt(3), -24)) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(24, -24 * Math.sqrt(3))) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(0, -48)) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(-24, -24 * Math.sqrt(3))) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(-24 * Math.sqrt(3), -24)) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(-48, 0)) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(-24 * Math.sqrt(3), 24)) +.strafeTo(new Vector2d(0, 0)) + +.strafeTo(new Vector2d(-24, 24 * Math.sqrt(3))) +.strafeTo(new Vector2d(0, 0)) \ No newline at end of file