From b09a6d6a2d159ff05b26371ebbc3763ade473f9c Mon Sep 17 00:00:00 2001 From: drew-struensee <55564500+1337-haxxor@users.noreply.github.com> Date: Thu, 20 Jan 2022 21:36:54 -0600 Subject: [PATCH] Added Support for 3D tracking of the 2022 Cargo Balls (#408) * added cargo ball 2022 * added cargoball2022. tested on pi.. it works * spotlessapply * made list more consistant --- .../src/views/PipelineViews/PnPTab.vue | 2 +- .../vision/target/TargetModel.java | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/photon-client/src/views/PipelineViews/PnPTab.vue b/photon-client/src/views/PipelineViews/PnPTab.vue index 629e853de..f888e018c 100644 --- a/photon-client/src/views/PipelineViews/PnPTab.vue +++ b/photon-client/src/views/PipelineViews/PnPTab.vue @@ -60,7 +60,7 @@ }, data() { return { - targetList: ['2020 High Goal Outer', '2020 High Goal Inner', '2019 Dual Target', 'Power Cell (7in)', '2016 High Goal'], //Keep in sync with TargetModel.java + targetList: ['2020 High Goal Outer', '2020 High Goal Inner', '2019 Dual Target', '2020 Power Cell (7in)','2022 Cargo Ball (9.5in)', '2016 High Goal'], //Keep in sync with TargetModel.java snackbar: { color: "Success", text: "" diff --git a/photon-core/src/main/java/org/photonvision/vision/target/TargetModel.java b/photon-core/src/main/java/org/photonvision/vision/target/TargetModel.java index 7b0ac40df..205488afd 100644 --- a/photon-core/src/main/java/org/photonvision/vision/target/TargetModel.java +++ b/photon-core/src/main/java/org/photonvision/vision/target/TargetModel.java @@ -73,6 +73,25 @@ public enum TargetModel implements Releasable { -Units.inchesToMeters(7) / 2, -Units.inchesToMeters(7) / 2)), 0), + k2022CircularCargoBall( + List.of( + new Point3( + -Units.inchesToMeters(9.5) / 2, + -Units.inchesToMeters(9.5) / 2, + -Units.inchesToMeters(9.5) / 2), + new Point3( + -Units.inchesToMeters(9.5) / 2, + Units.inchesToMeters(9.5) / 2, + -Units.inchesToMeters(9.5) / 2), + new Point3( + Units.inchesToMeters(9.5) / 2, + Units.inchesToMeters(9.5) / 2, + -Units.inchesToMeters(9.5) / 2), + new Point3( + Units.inchesToMeters(9.5) / 2, + -Units.inchesToMeters(9.5) / 2, + -Units.inchesToMeters(9.5) / 2)), + 0), k2016HighGoal( List.of( new Point3(Units.inchesToMeters(-10), Units.inchesToMeters(12), 0),