Fix various bugs in vision code
- Keep outdoors on because that's used now
- Don't convert distortion coeffs to doubles
- Actually seed angles correctly when frozen
- Don't draw unused absolute centroid
Signed-off-by: Milind Upadhyay <milind.upadhyay@gmail.com>
Change-Id: I606b4d2853d04649029813eb4349f88a57791a62
diff --git a/y2022/vision/target_estimator.cc b/y2022/vision/target_estimator.cc
index ba399b7..fa807f9 100644
--- a/y2022/vision/target_estimator.cc
+++ b/y2022/vision/target_estimator.cc
@@ -200,10 +200,16 @@
// Constrain the rotation to be around the localizer's, otherwise there can be
// multiple solutions. There shouldn't be too much roll or pitch
+ if (FLAGS_freeze_roll) {
+ roll_ = roll_seed;
+ }
constexpr double kMaxRollDelta = 0.1;
SetBoundsOrFreeze(&roll_, FLAGS_freeze_roll, roll_seed - kMaxRollDelta,
roll_seed + kMaxRollDelta, &problem);
+ if (FLAGS_freeze_pitch) {
+ pitch_ = pitch_seed;
+ }
constexpr double kMaxPitchDelta = 0.15;
SetBoundsOrFreeze(&pitch_, FLAGS_freeze_pitch, pitch_seed - kMaxPitchDelta,
pitch_seed + kMaxPitchDelta, &problem);