Add/modify tests to check collision handling while disabled.
Change-Id: I335f2fa644d2f567dc7c7e188e23906f247df161
diff --git a/y2016/control_loops/superstructure/superstructure.cc b/y2016/control_loops/superstructure/superstructure.cc
index 7c370bd..759c5ca 100644
--- a/y2016/control_loops/superstructure/superstructure.cc
+++ b/y2016/control_loops/superstructure/superstructure.cc
@@ -15,6 +15,8 @@
namespace {
constexpr double kZeroingVoltage = 4.0;
+constexpr double kOperatingVoltage = 12.0;
+constexpr double kLandingShoulderDownVoltage = -2.0;
// The maximum voltage the intake roller will be allowed to use.
constexpr float kMaxIntakeVoltage = 8.0;
@@ -537,8 +539,9 @@
}
// Set the voltage limits.
- const double max_voltage =
- (state_ == RUNNING || state_ == LANDING_RUNNING) ? 12.0 : kZeroingVoltage;
+ const double max_voltage = (state_ == RUNNING || state_ == LANDING_RUNNING)
+ ? kOperatingVoltage
+ : kZeroingVoltage;
arm_.set_max_voltage(max_voltage, max_voltage);
intake_.set_max_voltage(max_voltage);
@@ -549,7 +552,8 @@
// point? Maybe just put the goal slightly below the bellypan and call that
// good enough.
if (arm_.goal(0, 0) <= kShoulderTransitionToLanded + 1e-4) {
- arm_.set_shoulder_asymetric_limits(-2.0, max_voltage);
+ arm_.set_shoulder_asymetric_limits(kLandingShoulderDownVoltage,
+ max_voltage);
}
}