Add distortion factor to TargetMap
Tells us how much each detection was effected by distortion so we can
filter this in the localizer.
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
Change-Id: I3d1ffd3cddad9ec1949c1378558f71a48c534f03
diff --git a/frc971/vision/target_map.fbs b/frc971/vision/target_map.fbs
index 7017e7f..3ad0bd8 100644
--- a/frc971/vision/target_map.fbs
+++ b/frc971/vision/target_map.fbs
@@ -39,6 +39,15 @@
// NOTE: not filtered by aprilrobotics.cc so that we can log
// more detections.
pose_error:double (id: 4);
+
+ // A measure of how much distortion affected this detection.
+ // Only filled out if this pose represents a live detection.
+ // This is computed as the average distance between the distorted
+ // corners and undistorted corners, normalized by the image size
+ // to be between 0-1.
+ // NOTE: not filtered by aprilrobotics.cc so that we can log
+ // more detections.
+ distortion_factor:double (id: 5);
}
// Map of all target poses on a field.