Merge changes I32fad1f0,I781d3396
* changes:
Be more accepting of blobs at larger distances
Tune new shot table with final battery compensation turned off
diff --git a/y2022/constants.cc b/y2022/constants.cc
index 9d27780..fb91cc5 100644
--- a/y2022/constants.cc
+++ b/y2022/constants.cc
@@ -139,21 +139,23 @@
// Interpolation table for comp and practice robots
r.shot_interpolation_table = InterpolationTable<Values::ShotParams>({
- {1.0, {0.0, 19.0}},
- {1.6, {0.0, 19.0}},
- {1.9, {0.1, 19.0}},
- {2.12, {0.15, 18.8}},
- {2.9, {0.25, 19.2}},
- {3.2, {0.28, 20.3}},
+ {1.0, {0.05, 19.4}},
+ {1.6, {0.05, 19.4}},
+ {1.9, {0.1, 19.4}},
+ {2.12, {0.13, 19.4}},
+ {2.9, {0.24, 19.9}},
- {3.60, {0.33, 20.3}},
- {4.9, {0.4, 21.9}},
+ {3.2, {0.26, 20.7}},
+
+ {3.60, {0.33, 20.9}},
+ {4.50, {0.38, 22.5}},
+ {4.9, {0.4, 22.9}},
{5.4, {0.4, 23.9}},
- {6.0, {0.40, 25.0}},
- {7.0, {0.37, 27.1}},
- {7.8, {0.35, 28.0}},
- {10.0, {0.35, 28.0}},
+ {6.0, {0.40, 25.4}},
+ {7.0, {0.37, 28.1}},
+
+ {10.0, {0.37, 28.1}},
});
if (false) {
diff --git a/y2022/control_loops/superstructure/catapult/catapult.cc b/y2022/control_loops/superstructure/catapult/catapult.cc
index a04d8c9..612a17a 100644
--- a/y2022/control_loops/superstructure/catapult/catapult.cc
+++ b/y2022/control_loops/superstructure/catapult/catapult.cc
@@ -390,6 +390,9 @@
} else {
// TODO(austin): Voltage error?
CHECK_NOTNULL(catapult_voltage);
+ if (current_horizon_ == 1) {
+ battery_voltage = 12.0;
+ }
*catapult_voltage = std::max(
0.0, std::min(12.0, (*solution - 0.0 * next_X(2, 0)) * 12.0 /
std::max(battery_voltage, 8.0)));
diff --git a/y2022/vision/blob_detector.cc b/y2022/vision/blob_detector.cc
index 93c72d7..2f90513 100644
--- a/y2022/vision/blob_detector.cc
+++ b/y2022/vision/blob_detector.cc
@@ -133,7 +133,7 @@
}
// Threshold for mean distance from a blob centroid to a circle.
- constexpr double kCircleDistanceThreshold = 1.0;
+ constexpr double kCircleDistanceThreshold = 2.0;
// We should only expect to see blobs between these angles on a circle.
constexpr double kDegToRad = M_PI / 180.0;
constexpr double kMinBlobAngle = 50.0 * kDegToRad;