Tune shooter control loop
It converges much faster now. To plot live, use:
web_proxy_main.stripped --buffer_size 10000
Change-Id: I499b8cdac176e26b33fd6cbef2bc0b2a3b5e0c9a
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2020/control_loops/superstructure/shooter/flywheel_controller.cc b/y2020/control_loops/superstructure/shooter/flywheel_controller.cc
index d94573b..f7ab223 100644
--- a/y2020/control_loops/superstructure/shooter/flywheel_controller.cc
+++ b/y2020/control_loops/superstructure/shooter/flywheel_controller.cc
@@ -41,7 +41,7 @@
// And we have a quadratic!
const double a = 1;
const double b = -bemf_voltage;
- const double c = -60.0 * 12.0 * resistance_;
+ const double c = -70.0 * 12.0 * resistance_;
// Root is always positive.
const double root = std::sqrt(b * b - 4.0 * a * c);
diff --git a/y2020/control_loops/superstructure/shooter/shooter.cc b/y2020/control_loops/superstructure/shooter/shooter.cc
index 9db79b0..900d0f1 100644
--- a/y2020/control_loops/superstructure/shooter/shooter.cc
+++ b/y2020/control_loops/superstructure/shooter/shooter.cc
@@ -12,7 +12,7 @@
namespace shooter {
namespace {
-const double kVelocityTolerance = 20.0;
+const double kVelocityTolerance = 2.0;
} // namespace
Shooter::Shooter()
@@ -86,6 +86,7 @@
status_builder.add_finisher(finisher_status_offset);
status_builder.add_accelerator_left(accelerator_left_status_offset);
status_builder.add_accelerator_right(accelerator_right_status_offset);
+ status_builder.add_ready(ready());
if (output) {
output->finisher_voltage = finisher_.voltage();