Improve robustness of spline planning
Previously, there were corner cases in the spline math that we handled
poorly due to laziness in how we handled certain constraints.
This patch should make it so that we can correctly plan any spline that
we actually produce--although due to the fact that it is now more
properly following the actual physical constraints of the splines, it
actually forced me to increase slightly the tolerances in the tests.
This has yet to be tested on a real robot.
Change-Id: I63f68eede9d0fbe6d41bf3caea8aca19ece9fa1f
diff --git a/frc971/control_loops/drivetrain/splinedrivetrain.cc b/frc971/control_loops/drivetrain/splinedrivetrain.cc
index c467e1f..bfd0c96 100644
--- a/frc971/control_loops/drivetrain/splinedrivetrain.cc
+++ b/frc971/control_loops/drivetrain/splinedrivetrain.cc
@@ -73,7 +73,7 @@
case frc971::ConstraintType_CONSTRAINT_TYPE_UNDEFINED:
break;
case frc971::ConstraintType_LONGITUDINAL_ACCELERATION:
- future_trajectory_->set_longitudal_acceleration(constraint.value);
+ future_trajectory_->set_longitudinal_acceleration(constraint.value);
break;
case frc971::ConstraintType_LATERAL_ACCELERATION:
future_trajectory_->set_lateral_acceleration(constraint.value);