From 96de176ba2a8765083b55b1614436bbc832ebb6c Mon Sep 17 00:00:00 2001 From: Drew Williams Date: Tue, 2 Jan 2024 10:09:32 -0500 Subject: [PATCH] Changes sim to use 36h11 tags (#1056) Fixes #1041 --------- Co-authored-by: Drew Williams Co-authored-by: Matt --- build.gradle | 2 +- .../vision/camera/FileVisionSource.java | 2 +- .../vision/camera/LibcameraGpuSettables.java | 50 ++++----- .../vision/camera/LibcameraGpuSource.java | 1 + .../vision/camera/USBCameraSource.java | 33 +++--- .../frame/consumer/MJPGFrameConsumer.java | 7 +- .../simulation/PhotonCameraSim.java | 6 +- .../photonvision/simulation/VideoSimUtil.java | 99 ++++++------------ .../simulation/VisionSystemSim.java | 2 +- .../include/photon/simulation/VideoSimUtil.h | 50 ++++----- .../photon/simulation/VisionSystemSim.h | 2 +- .../images/apriltags/tag16_05_00000.png | Bin 99 -> 0 bytes .../images/apriltags/tag16_05_00001.png | Bin 97 -> 0 bytes .../images/apriltags/tag16_05_00002.png | Bin 99 -> 0 bytes .../images/apriltags/tag16_05_00003.png | Bin 97 -> 0 bytes .../images/apriltags/tag16_05_00004.png | Bin 97 -> 0 bytes .../images/apriltags/tag16_05_00005.png | Bin 100 -> 0 bytes .../images/apriltags/tag16_05_00006.png | Bin 101 -> 0 bytes .../images/apriltags/tag16_05_00007.png | Bin 98 -> 0 bytes .../images/apriltags/tag16_05_00008.png | Bin 97 -> 0 bytes .../images/apriltags/tag16_05_00009.png | Bin 100 -> 0 bytes .../images/apriltags/tag16_05_00010.png | Bin 99 -> 0 bytes .../images/apriltags/tag16_05_00011.png | Bin 98 -> 0 bytes .../images/apriltags/tag16_05_00012.png | Bin 95 -> 0 bytes .../images/apriltags/tag16_05_00013.png | Bin 99 -> 0 bytes .../images/apriltags/tag16_05_00014.png | Bin 102 -> 0 bytes .../images/apriltags/tag16_05_00015.png | Bin 97 -> 0 bytes .../images/apriltags/tag16_05_00016.png | Bin 97 -> 0 bytes .../images/apriltags/tag16_05_00017.png | Bin 101 -> 0 bytes .../images/apriltags/tag16_05_00018.png | Bin 99 -> 0 bytes .../images/apriltags/tag16_05_00019.png | Bin 99 -> 0 bytes .../images/apriltags/tag16_05_00020.png | Bin 98 -> 0 bytes .../images/apriltags/tag16_05_00021.png | Bin 100 -> 0 bytes .../images/apriltags/tag16_05_00022.png | Bin 101 -> 0 bytes .../images/apriltags/tag16_05_00023.png | Bin 97 -> 0 bytes .../images/apriltags/tag16_05_00024.png | Bin 97 -> 0 bytes .../images/apriltags/tag16_05_00025.png | Bin 99 -> 0 bytes .../images/apriltags/tag16_05_00026.png | Bin 99 -> 0 bytes .../images/apriltags/tag16_05_00027.png | Bin 98 -> 0 bytes .../images/apriltags/tag16_05_00028.png | Bin 95 -> 0 bytes .../images/apriltags/tag16_05_00029.png | Bin 97 -> 0 bytes .../swervedriveposeestsim/build.gradle | 9 +- .../swervedriveposeestsim/build.gradle | 5 + 43 files changed, 116 insertions(+), 152 deletions(-) delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00000.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00001.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00002.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00003.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00004.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00005.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00006.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00007.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00008.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00009.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00010.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00011.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00012.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00013.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00014.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00015.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00016.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00017.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00018.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00019.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00020.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00021.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00022.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00023.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00024.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00025.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00026.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00027.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00028.png delete mode 100644 photon-lib/src/main/resources/images/apriltags/tag16_05_00029.png diff --git a/build.gradle b/build.gradle index 1f066ba997..27081e4186 100644 --- a/build.gradle +++ b/build.gradle @@ -21,7 +21,7 @@ allprojects { apply from: "versioningHelper.gradle" ext { - wpilibVersion = "2024.1.1-beta-4" + wpilibVersion = "2024.1.1-beta-4-35-g141241d" wpimathVersion = wpilibVersion openCVversion = "4.8.0-2" joglVersion = "2.4.0-rc-20200307" diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/FileVisionSource.java b/photon-core/src/main/java/org/photonvision/vision/camera/FileVisionSource.java index 951135fcf4..b50be3dd94 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/FileVisionSource.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/FileVisionSource.java @@ -18,7 +18,7 @@ package org.photonvision.vision.camera; import edu.wpi.first.cscore.VideoMode; -import edu.wpi.first.cscore.VideoMode.PixelFormat; +import edu.wpi.first.util.PixelFormat; import java.nio.file.Path; import java.util.HashMap; import org.photonvision.common.configuration.CameraConfiguration; diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/LibcameraGpuSettables.java b/photon-core/src/main/java/org/photonvision/vision/camera/LibcameraGpuSettables.java index 45aefb5fc0..5c32be296a 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/LibcameraGpuSettables.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/LibcameraGpuSettables.java @@ -19,6 +19,7 @@ import edu.wpi.first.cscore.VideoMode; import edu.wpi.first.math.Pair; +import edu.wpi.first.util.PixelFormat; import java.util.HashMap; import org.photonvision.common.configuration.CameraConfiguration; import org.photonvision.common.util.math.MathUtils; @@ -59,30 +60,19 @@ public LibcameraGpuSettables(CameraConfiguration configuration) { if (sensorModel == LibCameraJNI.SensorModel.IMX219) { // Settings for the IMX219 sensor, which is used on the Pi Camera Module v2 - videoModes.put( - 0, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 320, 240, 120, 120, .39)); - videoModes.put( - 1, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 320, 240, 30, 30, .39)); - videoModes.put( - 2, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 640, 480, 65, 90, .39)); - videoModes.put( - 3, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 640, 480, 30, 30, .39)); + videoModes.put(0, new FPSRatedVideoMode(PixelFormat.kUnknown, 320, 240, 120, 120, .39)); + videoModes.put(1, new FPSRatedVideoMode(PixelFormat.kUnknown, 320, 240, 30, 30, .39)); + videoModes.put(2, new FPSRatedVideoMode(PixelFormat.kUnknown, 640, 480, 65, 90, .39)); + videoModes.put(3, new FPSRatedVideoMode(PixelFormat.kUnknown, 640, 480, 30, 30, .39)); // TODO: fix 1280x720 in the native code and re-add it - videoModes.put( - 4, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 1920, 1080, 15, 20, .53)); - videoModes.put( - 5, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 3280 / 2, 2464 / 2, 15, 20, 1)); - videoModes.put( - 6, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 3280 / 4, 2464 / 4, 15, 20, 1)); + videoModes.put(4, new FPSRatedVideoMode(PixelFormat.kUnknown, 1920, 1080, 15, 20, .53)); + videoModes.put(5, new FPSRatedVideoMode(PixelFormat.kUnknown, 3280 / 2, 2464 / 2, 15, 20, 1)); + videoModes.put(6, new FPSRatedVideoMode(PixelFormat.kUnknown, 3280 / 4, 2464 / 4, 15, 20, 1)); } else if (sensorModel == LibCameraJNI.SensorModel.OV9281) { - videoModes.put( - 0, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 320, 240, 30, 30, .39)); - videoModes.put( - 1, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 1280 / 2, 800 / 2, 60, 60, 1)); - videoModes.put( - 2, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 640, 480, 65, 90, .39)); - videoModes.put( - 3, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 1280, 800, 60, 60, 1)); + videoModes.put(0, new FPSRatedVideoMode(PixelFormat.kUnknown, 320, 240, 30, 30, .39)); + videoModes.put(1, new FPSRatedVideoMode(PixelFormat.kUnknown, 1280 / 2, 800 / 2, 60, 60, 1)); + videoModes.put(2, new FPSRatedVideoMode(PixelFormat.kUnknown, 640, 480, 65, 90, .39)); + videoModes.put(3, new FPSRatedVideoMode(PixelFormat.kUnknown, 1280, 800, 60, 60, 1)); } else { if (sensorModel == LibCameraJNI.SensorModel.IMX477) { @@ -97,17 +87,13 @@ public LibcameraGpuSettables(CameraConfiguration configuration) { } // Settings for the OV5647 sensor, which is used by the Pi Camera Module v1 - videoModes.put(0, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 320, 240, 90, 90, 1)); - videoModes.put(1, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 640, 480, 85, 90, 1)); - videoModes.put( - 2, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 960, 720, 45, 49, 0.74)); + videoModes.put(0, new FPSRatedVideoMode(PixelFormat.kUnknown, 320, 240, 90, 90, 1)); + videoModes.put(1, new FPSRatedVideoMode(PixelFormat.kUnknown, 640, 480, 85, 90, 1)); + videoModes.put(2, new FPSRatedVideoMode(PixelFormat.kUnknown, 960, 720, 45, 49, 0.74)); // Half the size of the active areas on the OV5647 - videoModes.put( - 3, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 2592 / 2, 1944 / 2, 20, 20, 1)); - videoModes.put( - 4, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 1280, 720, 30, 45, 0.91)); - videoModes.put( - 5, new FPSRatedVideoMode(VideoMode.PixelFormat.kUnknown, 1920, 1080, 15, 20, 0.72)); + videoModes.put(3, new FPSRatedVideoMode(PixelFormat.kUnknown, 2592 / 2, 1944 / 2, 20, 20, 1)); + videoModes.put(4, new FPSRatedVideoMode(PixelFormat.kUnknown, 1280, 720, 30, 45, 0.91)); + videoModes.put(5, new FPSRatedVideoMode(PixelFormat.kUnknown, 1920, 1080, 15, 20, 0.72)); } // TODO need to add more video modes for new sensors here diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/LibcameraGpuSource.java b/photon-core/src/main/java/org/photonvision/vision/camera/LibcameraGpuSource.java index 7e4330e4d7..f8dc87d82c 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/LibcameraGpuSource.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/LibcameraGpuSource.java @@ -18,6 +18,7 @@ package org.photonvision.vision.camera; import edu.wpi.first.cscore.VideoMode; +import edu.wpi.first.util.PixelFormat; import org.photonvision.common.configuration.CameraConfiguration; import org.photonvision.common.configuration.ConfigManager; import org.photonvision.common.logging.LogGroup; diff --git a/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java b/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java index 66b0a4fff7..ec2501049a 100644 --- a/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java +++ b/photon-core/src/main/java/org/photonvision/vision/camera/USBCameraSource.java @@ -23,6 +23,7 @@ import edu.wpi.first.cscore.VideoException; import edu.wpi.first.cscore.VideoMode; import edu.wpi.first.cscore.VideoProperty.Kind; +import edu.wpi.first.util.PixelFormat; import java.util.*; import java.util.stream.Collectors; import org.photonvision.common.configuration.CameraConfiguration; @@ -280,33 +281,33 @@ public HashMap getAllVideoModes() { if (cameraQuirks.hasQuirk(CameraQuirk.PiCam)) { modes = new VideoMode[] { - new VideoMode(VideoMode.PixelFormat.kBGR, 320, 240, 90), - new VideoMode(VideoMode.PixelFormat.kBGR, 320, 240, 30), - new VideoMode(VideoMode.PixelFormat.kBGR, 320, 240, 15), - new VideoMode(VideoMode.PixelFormat.kBGR, 320, 240, 10), - new VideoMode(VideoMode.PixelFormat.kBGR, 640, 480, 90), - new VideoMode(VideoMode.PixelFormat.kBGR, 640, 480, 45), - new VideoMode(VideoMode.PixelFormat.kBGR, 640, 480, 30), - new VideoMode(VideoMode.PixelFormat.kBGR, 640, 480, 15), - new VideoMode(VideoMode.PixelFormat.kBGR, 640, 480, 10), - new VideoMode(VideoMode.PixelFormat.kBGR, 960, 720, 60), - new VideoMode(VideoMode.PixelFormat.kBGR, 960, 720, 10), - new VideoMode(VideoMode.PixelFormat.kBGR, 1280, 720, 45), - new VideoMode(VideoMode.PixelFormat.kBGR, 1920, 1080, 20), + new VideoMode(PixelFormat.kBGR, 320, 240, 90), + new VideoMode(PixelFormat.kBGR, 320, 240, 30), + new VideoMode(PixelFormat.kBGR, 320, 240, 15), + new VideoMode(PixelFormat.kBGR, 320, 240, 10), + new VideoMode(PixelFormat.kBGR, 640, 480, 90), + new VideoMode(PixelFormat.kBGR, 640, 480, 45), + new VideoMode(PixelFormat.kBGR, 640, 480, 30), + new VideoMode(PixelFormat.kBGR, 640, 480, 15), + new VideoMode(PixelFormat.kBGR, 640, 480, 10), + new VideoMode(PixelFormat.kBGR, 960, 720, 60), + new VideoMode(PixelFormat.kBGR, 960, 720, 10), + new VideoMode(PixelFormat.kBGR, 1280, 720, 45), + new VideoMode(PixelFormat.kBGR, 1920, 1080, 20), }; } else { modes = camera.enumerateVideoModes(); } for (VideoMode videoMode : modes) { // Filter grey modes - if (videoMode.pixelFormat == VideoMode.PixelFormat.kGray - || videoMode.pixelFormat == VideoMode.PixelFormat.kUnknown) { + if (videoMode.pixelFormat == PixelFormat.kGray + || videoMode.pixelFormat == PixelFormat.kUnknown) { continue; } // On picam, filter non-bgr modes for performance if (cameraQuirks.hasQuirk(CameraQuirk.PiCam)) { - if (videoMode.pixelFormat != VideoMode.PixelFormat.kBGR) { + if (videoMode.pixelFormat != PixelFormat.kBGR) { continue; } } diff --git a/photon-core/src/main/java/org/photonvision/vision/frame/consumer/MJPGFrameConsumer.java b/photon-core/src/main/java/org/photonvision/vision/frame/consumer/MJPGFrameConsumer.java index aa6727e4e4..3f3a2962d9 100644 --- a/photon-core/src/main/java/org/photonvision/vision/frame/consumer/MJPGFrameConsumer.java +++ b/photon-core/src/main/java/org/photonvision/vision/frame/consumer/MJPGFrameConsumer.java @@ -20,6 +20,7 @@ import edu.wpi.first.cscore.*; import edu.wpi.first.networktables.NetworkTable; import edu.wpi.first.networktables.NetworkTableInstance; +import edu.wpi.first.util.PixelFormat; import java.awt.*; import java.util.ArrayList; import org.opencv.core.CvType; @@ -118,7 +119,7 @@ public class MJPGFrameConsumer implements AutoCloseable { boolean isDisabled = false; public MJPGFrameConsumer(String sourceName, int width, int height, int port) { - this.cvSource = new CvSource(sourceName, VideoMode.PixelFormat.kMJPEG, width, height, 30); + this.cvSource = new CvSource(sourceName, PixelFormat.kMJPEG, width, height, 30); this.table = NetworkTableInstance.getDefault().getTable("/CameraPublisher").getSubTable(sourceName); @@ -188,7 +189,7 @@ public void accept(CVMat image) { public void disabledTick() { if (!isDisabled) { - cvSource.setVideoMode(VideoMode.PixelFormat.kMJPEG, EMPTY_MAT.width(), EMPTY_MAT.height(), 0); + cvSource.setVideoMode(PixelFormat.kMJPEG, EMPTY_MAT.width(), EMPTY_MAT.height(), 0); isDisabled = true; } @@ -227,7 +228,7 @@ private static String videoModeToString(VideoMode mode) { + " fps"; } - private static String pixelFormatToString(VideoMode.PixelFormat pixelFormat) { + private static String pixelFormatToString(PixelFormat pixelFormat) { switch (pixelFormat) { case kMJPEG: return "MJPEG"; diff --git a/photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java b/photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java index e3efe971ca..a7b3d44ef0 100644 --- a/photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java +++ b/photon-lib/src/main/java/org/photonvision/simulation/PhotonCameraSim.java @@ -28,11 +28,11 @@ import edu.wpi.first.apriltag.AprilTagFields; import edu.wpi.first.cameraserver.CameraServer; import edu.wpi.first.cscore.CvSource; -import edu.wpi.first.cscore.VideoMode.PixelFormat; import edu.wpi.first.cscore.VideoSource.ConnectionStrategy; import edu.wpi.first.math.MathUtil; import edu.wpi.first.math.Pair; import edu.wpi.first.math.geometry.Pose3d; +import edu.wpi.first.util.PixelFormat; import edu.wpi.first.util.WPIUtilJNI; import java.util.ArrayList; import java.util.List; @@ -464,7 +464,7 @@ public PhotonPipelineResult process( var corn = pair.getSecond(); if (tgt.fiducialID >= 0) { // apriltags - VideoSimUtil.warp16h5TagImage(tgt.fiducialID, corn, true, videoSimFrameRaw); + VideoSimUtil.warp36h11TagImage(tgt.fiducialID, corn, true, videoSimFrameRaw); } else if (!tgt.getModel().isSpherical) { // non-spherical targets var contour = corn; if (!tgt.getModel() @@ -529,7 +529,7 @@ public PhotonPipelineResult process( prop.getDistCoeffs(), detectableTgts, tagLayout, - TargetModel.kAprilTag16h5); + TargetModel.kAprilTag36h11); multitagResult = new MultiTargetPNPResult(pnpResult, usedIDs); } diff --git a/photon-lib/src/main/java/org/photonvision/simulation/VideoSimUtil.java b/photon-lib/src/main/java/org/photonvision/simulation/VideoSimUtil.java index 8b5c787b78..92bcf4c1ce 100644 --- a/photon-lib/src/main/java/org/photonvision/simulation/VideoSimUtil.java +++ b/photon-lib/src/main/java/org/photonvision/simulation/VideoSimUtil.java @@ -24,18 +24,17 @@ package org.photonvision.simulation; +import edu.wpi.first.apriltag.AprilTag; import edu.wpi.first.cscore.CvSource; import edu.wpi.first.math.geometry.Pose3d; import edu.wpi.first.math.geometry.Translation3d; import edu.wpi.first.math.util.Units; -import java.awt.image.BufferedImage; -import java.io.IOException; +import edu.wpi.first.util.RawFrame; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -import javax.imageio.ImageIO; import org.opencv.core.Core; import org.opencv.core.CvType; import org.opencv.core.Mat; @@ -45,21 +44,17 @@ import org.opencv.core.Rect; import org.opencv.core.Scalar; import org.opencv.core.Size; -import org.opencv.imgcodecs.Imgcodecs; import org.opencv.imgproc.Imgproc; import org.photonvision.estimation.OpenCVHelp; import org.photonvision.estimation.RotTrlTransform3d; public class VideoSimUtil { - public static final String kLocalTagImagesPath = "./src/main/resources/images/apriltags/"; - public static final String kResourceTagImagesPath = "/images/apriltags/"; - public static final String kTag16h5ImageName = "tag16_05_00000"; - public static final int kNumTags16h5 = 30; + public static final int kNumTags36h11 = 30; - // All 16h5 tag images - private static final Map kTag16h5Images = new HashMap<>(); - // Points corresponding to marker(black square) corners of 8x8 16h5 tag images - public static final Point[] kTag16h5MarkerPts; + // All 36h11 tag images + private static final Map kTag36h11Images = new HashMap<>(); + // Points corresponding to marker(black square) corners of 10x10 36h11 tag images + public static final Point[] kTag36h11MarkerPts; // field dimensions for wireframe private static double fieldLength = 16.54175; @@ -68,13 +63,13 @@ public class VideoSimUtil { static { OpenCVHelp.forceLoadOpenCV(); - // create Mats of 8x8 apriltag images - for (int i = 0; i < VideoSimUtil.kNumTags16h5; i++) { - Mat tagImage = VideoSimUtil.get16h5TagImage(i); - kTag16h5Images.put(i, tagImage); + // create Mats of 10x10 apriltag images + for (int i = 0; i < VideoSimUtil.kNumTags36h11; i++) { + Mat tagImage = VideoSimUtil.get36h11TagImage(i); + kTag36h11Images.put(i, tagImage); } - kTag16h5MarkerPts = get16h5MarkerPts(); + kTag36h11MarkerPts = get36h11MarkerPts(); } /** Updates the properties of this CvSource video stream with the given camera properties. */ @@ -100,69 +95,43 @@ public static Point[] getImageCorners(Size size) { } /** - * Gets the 8x8 (grayscale) image of a specific 16h5 AprilTag. + * Gets the 10x10 (grayscale) image of a specific 36h11 AprilTag. * * @param id The fiducial id of the desired tag */ - public static Mat get16h5TagImage(int id) { - String name = kTag16h5ImageName; - String idString = String.valueOf(id); - name = name.substring(0, name.length() - idString.length()) + idString; - - var resource = VideoSimUtil.class.getResource(kResourceTagImagesPath + name + ".png"); - - Mat result = new Mat(); - // reading jar file - if (resource != null && resource.getPath().startsWith("file")) { - BufferedImage buf; - try { - buf = ImageIO.read(resource); - } catch (IOException e) { - System.err.println("Couldn't read tag image!"); - return result; - } - - result = new Mat(buf.getHeight(), buf.getWidth(), CvType.CV_8UC1); - - byte[] px = new byte[1]; - for (int y = 0; y < result.height(); y++) { - for (int x = 0; x < result.width(); x++) { - px[0] = (byte) (buf.getRGB(x, y) & 0xFF); - result.put(y, x, px); - } - } - } - // local IDE tests - else result = Imgcodecs.imread(kLocalTagImagesPath + name + ".png", Imgcodecs.IMREAD_GRAYSCALE); + public static Mat get36h11TagImage(int id) { + RawFrame frame = AprilTag.generate36h11AprilTagImage(id); + Mat result = new Mat(10, 10, CvType.CV_8UC1, frame.getData(), frame.getStride()).clone(); + frame.close(); return result; } /** Gets the points representing the marker(black square) corners. */ - public static Point[] get16h5MarkerPts() { - return get16h5MarkerPts(1); + public static Point[] get36h11MarkerPts() { + return get36h11MarkerPts(1); } /** * Gets the points representing the marker(black square) corners. * - * @param scale The scale of the tag image (8*scale x 8*scale image) + * @param scale The scale of the tag image (10*scale x 10*scale image) */ - public static Point[] get16h5MarkerPts(int scale) { - var roi16h5 = new Rect(new Point(1, 1), new Size(6, 6)); - roi16h5.x *= scale; - roi16h5.y *= scale; - roi16h5.width *= scale; - roi16h5.height *= scale; - var pts = getImageCorners(roi16h5.size()); + public static Point[] get36h11MarkerPts(int scale) { + var roi36h11 = new Rect(new Point(1, 1), new Size(8, 8)); + roi36h11.x *= scale; + roi36h11.y *= scale; + roi36h11.width *= scale; + roi36h11.height *= scale; + var pts = getImageCorners(roi36h11.size()); for (int i = 0; i < pts.length; i++) { var pt = pts[i]; - pts[i] = new Point(roi16h5.tl().x + pt.x, roi16h5.tl().y + pt.y); + pts[i] = new Point(roi36h11.tl().x + pt.x, roi36h11.tl().y + pt.y); } return pts; } /** - * Warps the image of a specific 16h5 AprilTag onto the destination image at the given points. + * Warps the image of a specific 36h11 AprilTag onto the destination image at the given points. * * @param tagId The id of the specific tag to warp onto the destination image * @param dstPoints Points(4) in destination image where the tag marker(black square) corners @@ -172,11 +141,11 @@ public static Point[] get16h5MarkerPts(int scale) { * is desired or target detection is being done on the stream, but can hurt performance. * @param destination The destination image to place the warped tag image onto. */ - public static void warp16h5TagImage( + public static void warp36h11TagImage( int tagId, Point[] dstPoints, boolean antialiasing, Mat destination) { - Mat tagImage = kTag16h5Images.get(tagId); + Mat tagImage = kTag36h11Images.get(tagId); if (tagImage == null || tagImage.empty()) return; - var tagPoints = new MatOfPoint2f(kTag16h5MarkerPts); + var tagPoints = new MatOfPoint2f(kTag36h11MarkerPts); // points of tag image corners var tagImageCorners = new MatOfPoint2f(getImageCorners(tagImage.size())); var dstPointMat = new MatOfPoint2f(dstPoints); @@ -206,7 +175,7 @@ public static void warp16h5TagImage( */ int supersampling = 6; supersampling = (int) Math.ceil(supersampling / warpedTagUpscale); - supersampling = Math.max(Math.min(supersampling, 8), 1); + supersampling = Math.max(Math.min(supersampling, 10), 1); Mat scaledTagImage = new Mat(); if (warpedTagUpscale > 2.0) { @@ -216,7 +185,7 @@ public static void warp16h5TagImage( scaleFactor *= supersampling; Imgproc.resize( tagImage, scaledTagImage, new Size(), scaleFactor, scaleFactor, Imgproc.INTER_NEAREST); - tagPoints.fromArray(get16h5MarkerPts(scaleFactor)); + tagPoints.fromArray(get36h11MarkerPts(scaleFactor)); } else tagImage.assignTo(scaledTagImage); // constrain the bounding rect inside of the destination image diff --git a/photon-lib/src/main/java/org/photonvision/simulation/VisionSystemSim.java b/photon-lib/src/main/java/org/photonvision/simulation/VisionSystemSim.java index eb4720a21a..b61b939465 100644 --- a/photon-lib/src/main/java/org/photonvision/simulation/VisionSystemSim.java +++ b/photon-lib/src/main/java/org/photonvision/simulation/VisionSystemSim.java @@ -256,7 +256,7 @@ public void addAprilTags(AprilTagFieldLayout tagLayout) { "apriltag", new VisionTargetSim( tagLayout.getTagPose(tag.ID).get(), // preserve alliance rotation - TargetModel.kAprilTag16h5, + TargetModel.kAprilTag36h11, tag.ID)); } } diff --git a/photon-lib/src/main/native/include/photon/simulation/VideoSimUtil.h b/photon-lib/src/main/native/include/photon/simulation/VideoSimUtil.h index bb2c453a88..9f86e1ca7a 100644 --- a/photon-lib/src/main/native/include/photon/simulation/VideoSimUtil.h +++ b/photon-lib/src/main/native/include/photon/simulation/VideoSimUtil.h @@ -51,22 +51,24 @@ int sgn(T val) { namespace photon { namespace VideoSimUtil { -static constexpr int kNumTags16h5 = 30; +static constexpr int kNumTags36h11 = 30; static constexpr units::meter_t fieldLength{16.54175_m}; static constexpr units::meter_t fieldWidth{8.0137_m}; -static cv::Mat Get16h5TagImage(int id) { - wpi::RawFrame frame = frc::AprilTag::Generate16h5AprilTagImage(id); - cv::Mat markerImage{frame.height, frame.width, CV_8UC1, frame.data}; - cv::Mat markerClone = markerImage.colRange(0, frame.dataLength).clone(); +static cv::Mat Get36h11TagImage(int id) { + wpi::RawFrame frame; + frc::AprilTag::Generate36h11AprilTagImage(&frame, id); + cv::Mat markerImage{frame.height, frame.width, CV_8UC1, frame.data, + static_cast(frame.stride)}; + cv::Mat markerClone = markerImage.clone(); return markerClone; } static std::unordered_map LoadAprilTagImages() { std::unordered_map retVal{}; - for (int i = 0; i < kNumTags16h5; i++) { - cv::Mat tagImage = Get16h5TagImage(i); + for (int i = 0; i < kNumTags36h11; i++) { + cv::Mat tagImage = Get36h11TagImage(i); retVal[i] = tagImage; } return retVal; @@ -81,27 +83,27 @@ static std::vector GetImageCorners(const cv::Size& size) { return retVal; } -static std::vector Get16h5MarkerPts(int scale) { - cv::Rect2f roi16h5{cv::Point2f{1, 1}, cv::Point2f{6, 6}}; - roi16h5.x *= scale; - roi16h5.y *= scale; - roi16h5.width *= scale; - roi16h5.height *= scale; - std::vector pts = GetImageCorners(roi16h5.size()); +static std::vector Get36h11MarkerPts(int scale) { + cv::Rect2f roi36h11{cv::Point2f{1, 1}, cv::Point2f{8, 8}}; + roi36h11.x *= scale; + roi36h11.y *= scale; + roi36h11.width *= scale; + roi36h11.height *= scale; + std::vector pts = GetImageCorners(roi36h11.size()); for (size_t i = 0; i < pts.size(); i++) { cv::Point2f pt = pts[i]; - pts[i] = cv::Point2f{roi16h5.tl().x + pt.x, roi16h5.tl().y + pt.y}; + pts[i] = cv::Point2f{roi36h11.tl().x + pt.x, roi36h11.tl().y + pt.y}; } return pts; } -static std::vector Get16h5MarkerPts() { - return Get16h5MarkerPts(1); +static std::vector Get36h11MarkerPts() { + return Get36h11MarkerPts(1); } -static const std::unordered_map kTag16h5Images = +static const std::unordered_map kTag36h11Images = LoadAprilTagImages(); -static const std::vector kTag16h5MarkPts = Get16h5MarkerPts(); +static const std::vector kTag36h11MarkPts = Get36h11MarkerPts(); [[maybe_unused]] static void UpdateVideoProp(cs::CvSource& video, const SimCameraProperties& prop) { @@ -112,11 +114,11 @@ static const std::vector kTag16h5MarkPts = Get16h5MarkerPts(); [[maybe_unused]] static void Warp165h5TagImage( int tagId, const std::vector& dstPoints, bool antialiasing, cv::Mat& destination) { - if (!kTag16h5Images.contains(tagId)) { + if (!kTag36h11Images.contains(tagId)) { return; } - cv::Mat tagImage = kTag16h5Images.at(tagId); - std::vector tagPoints{kTag16h5MarkPts}; + cv::Mat tagImage = kTag36h11Images.at(tagId); + std::vector tagPoints{kTag36h11MarkPts}; std::vector tagImageCorners{GetImageCorners(tagImage.size())}; std::vector dstPointMat = dstPoints; cv::Rect boundingRect = cv::boundingRect(dstPointMat); @@ -132,7 +134,7 @@ static const std::vector kTag16h5MarkPts = Get16h5MarkerPts(); int supersampling = 6; supersampling = static_cast(std::ceil(supersampling / warpedTagUpscale)); - supersampling = std::max(std::min(supersampling, 8), 1); + supersampling = std::max(std::min(supersampling, 10), 1); cv::Mat scaledTagImage{}; if (warpedTagUpscale > 2.0) { @@ -142,7 +144,7 @@ static const std::vector kTag16h5MarkPts = Get16h5MarkerPts(); scaleFactor *= supersampling; cv::resize(tagImage, scaledTagImage, cv::Size{}, scaleFactor, scaleFactor, cv::INTER_NEAREST); - tagPoints = Get16h5MarkerPts(scaleFactor); + tagPoints = Get36h11MarkerPts(scaleFactor); } else { scaledTagImage = tagImage; } diff --git a/photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h b/photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h index 55988bc32f..aca9e3d91b 100644 --- a/photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h +++ b/photon-lib/src/main/native/include/photon/simulation/VisionSystemSim.h @@ -173,7 +173,7 @@ class VisionSystemSim { std::vector targets; for (const frc::AprilTag& tag : layout.GetTags()) { targets.emplace_back(VisionTargetSim{layout.GetTagPose(tag.ID).value(), - photon::kAprilTag16h5, tag.ID}); + photon::kAprilTag36h11, tag.ID}); } AddVisionTargets("apriltag", targets); } diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00000.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00000.png deleted file mode 100644 index f6f22a9c9782ddb1b16b7833b0ff6cba3ca662a2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqTAnVBAr*1SKl~XC8aUb5)<~>o wO0n}}H85PmHNn?0u)!xew1M}q=mTbkYKs*SuD9D~0Ch2Vy85}Sb4q9e02tC4MF0Q* diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00001.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00001.png deleted file mode 100644 index 9b66b7d59b034d5245135dc3009bcbab41661ee7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq8lEnWAr*1SKl~XC8aUb5)<~>o uO0nx=N@)mYj1%6Vc_^Tv?;+O*Mut0|R)=n?ZgK+ZVeoYIb6Mw<&;$S&HX3yR diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00002.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00002.png deleted file mode 100644 index 856d4f163ffd2252c1d622335c341dfe461f0cde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqTAnVBAr*1SKl~XC8aUb5)<~>o w+ToYOwL$Y(K*PCqZHMKCA_<2JSbs1u6a=n_SgD|A1k}ag>FVdQ&MBb@08$Sc9RL6T diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00003.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00003.png deleted file mode 100644 index df0cc4ab3cadc90fd1d330bcfb8fad9232cc4832..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq8lEnWAr*1SKl~XC8aUb5)<`%r u?n;`&6_AnBR3W-R+ifG0>|xOd%nV7nt3xZgV!ii@3vc;pZMT3=F<&)&-@N@H__UVeoYIb6Mw<&;$VYQW)m| diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00005.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00005.png deleted file mode 100644 index 13574f8d5e736635083decd39fb05995f7d8c17d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq+MX_sAr*1SKl~XC8aUb5)<`%r x8XX8|;4=_W&_0yKYSgR5_Bi2i0qYM2hIP%`JAr*1SKl~XC8aUb5)=0QA v8XZ{0Fk5L2S3y+c8irQ4>#bK=Y8V(cc&-cj$h^4+sENVT)z4*}Q$iB}EEpP6 diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00008.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00008.png deleted file mode 100644 index 30827b6f94a7f4bcdab8788a5f41ff6f5517e48c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq8lEnWAr*1SKl~XC8aUb5)=0QA uS{+!;u$r@gu|z6XU^!Ec#5x9f1_ra=TYTj7uQCJmFnGH9xvXU|L>xoGkCOyr(heaPSGkiX~IyCf)Lmp5YgQu&X%Q~loCIDfr8%6*C diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00010.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00010.png deleted file mode 100644 index 71beaa9626d727a1f4fc58be25bddeddf3ac2f90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqTAnVBAr*1SKl~XC8aUb5)<~>o w+TmBi`hv?)B;jy`Zv!I_>kWe#Mmq+EH9wX{|7WN<4b;Wp>FVdQ&MBb@04kvwsQ>@~ diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00011.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00011.png deleted file mode 100644 index 06e0c94a3f6b6de56ccaf636498d93959dc192bc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqnw~C>Ar*1SKl~XC8aUb5)=0QA vS{(>z;9acYu>7NzgJ5&vhQu9AH4F^jzN`yc@^^O#P!ofvtDnm{r-UW|Jy9EO diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00012.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00012.png deleted file mode 100644 index 11a9a0016c750ac6717642aa703f49e5907d88b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqYMw5RAr*1SKl~XC8aUb5*32+r sHDH*2U>U=D&Kn|$8V<(`Sbs1u)JQLi+x9mdKI;Vst0Nm;sNB{r; diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00013.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00013.png deleted file mode 100644 index 7443d8030fc3e9850a6d022ed0c3437ae8ad2ac1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqTAnVBAr*1SKl~XC8aUb5)<`%r w?n+w2mB6r?DaAEHRKYtbw4v`I*9S(1wMwf)ZQHJ919dTYy85}Sb4q9e03hfYb^rhX diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00014.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00014.png deleted file mode 100644 index bad5efedc9d2b1a667f92954bb7caed157ac716c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 102 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqx}GkMAr*1SKl~XC8aUb5)=0QA ynzc%BT@YQU;Sk0md^n&XPc)2GqU)fF90Nm#<%$R%#` diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00016.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00016.png deleted file mode 100644 index cf5fa68c27db46d3839c47a8331c6625c76b6c18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq8lEnWAr*1SKl~XC8aUb5*32+r uJ;4=tS)m3{4}+(xpUXO@geCwn%Nn)- diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00017.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00017.png deleted file mode 100644 index 13ed6b2cc7c71188b4f2de31774fdb076f9d83e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 101 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqI-V|$Ar*1SKl~XC8aUb5)=0QA yZgLVaED=s%aAq{>4Q1SA8X>wMc?VMs14CW>>d-gQKMaBT7(8A5T-G@yGywo6=otb4 diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00018.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00018.png deleted file mode 100644 index 27ccc3324f39344fb86583b6384484deb758c38b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqTAnVBAr*1SKl~XC8aUb5)=0QA wTJn+a diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00019.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00019.png deleted file mode 100644 index 97a521c47c38e423ea2355c2d641a23fac6cd52d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqTAnVBAr*1SKl~XC8aUb5)<`%r v?n+w2b>U|L>j@zXQ3Ylm)*A*fjCKqR2N_m}x_LB$j9~C|^>bP0l+XkK3fC8j diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00020.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00020.png deleted file mode 100644 index f7c1f0d4ed4d731ba91d224df6ca7acdf476c3c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqnw~C>Ar*1SKl~XC8aUb5)=0QA r8XZ{0;H<94YS0i0X3HKHeZb6+(!MTe<<0+^Kurvuu6{1-oD!M<^rIN; diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00021.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00021.png deleted file mode 100644 index aade7b33205b3575d882d7b9896d9aea991a448d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 100 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq+MX_sAr*1SKl~XC8aUb5)<`%r x_VhX})^1?rVKtbwfK$R`6H^IKcmqEJ!*P{$L9hD`!~?Z4c)I$ztaD0e0st5&7`p%f diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00022.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00022.png deleted file mode 100644 index ae9c0be5e84397b2f449e7a465c60c425b75b5ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 101 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqI-V|$Ar*1SKl~XC8aUb5)=0QA y#<2S^O=prg5YVtjc(v#ak;Kr3g%UoG7#SMd)&;SDOj`@o$KdJe=d#Wzp$Py?(;74Y diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00023.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00023.png deleted file mode 100644 index d4122e60012e71592c85ab99c8aadc2642e3d7e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq8lEnWAr*1SKl~XC8aUb5)<`U8 unjz7}Byk|1L(gLhXM||N;R4nl3=FF|Rz&Q5xoay>4}+(xpUXO@geCw2L>bBe diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00024.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00024.png deleted file mode 100644 index 46f9c981211d577c9169742c45dda4fc393f29ff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq8lEnWAr*1SKl~XC8aUb5)=0QA u8XZ{4;L0?cNrbb8YeQ5c?_tpg%nbK5H~OD#@cahU!{F)a=d#Wzp$P!q&KRoz diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00025.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00025.png deleted file mode 100644 index 29d3bf8aa7ff109241f66a7117bbf780d5916023..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqTAnVBAr*1SKl~XC8aUb5)<`%r w8XZ{05GmNkR3f#Ssl-)-YeV7=rWytY<0~8ezh7Iw0;r3@)78&qol`;+02z51$p8QV diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00026.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00026.png deleted file mode 100644 index 4e86541296974b698c8c805e5d96075ad8889d90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 99 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqTAnVBAr*1SKl~XC8aUb5)=0QA wTJ?r9?otwAl@NNtb%C*sDMw-*gFFMnbA>HF+m?Ra2h_#j>FVdQ&MBb@0QFKBk^lez diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00027.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00027.png deleted file mode 100644 index a14c4a733195646f1747ea9b417537dfa0fee09c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 98 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqnw~C>Ar*1SKl~XC8aUb5)=0QA v#<2S^#WJ?Bn6XCqI)yi^n_JnixD?{an^LB{Ts5(BT*4 diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00028.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00028.png deleted file mode 100644 index 5adc09082b6a27c4f4f1d84bbe2a84e43f207262..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqYMw5RAr*1SKl~XC8aUb5*32kj sJ;C72xQQi9_(CQR>kWe#Mmq+ELmyT|7+jlN0o1|Z>FVdQ&MBb@0K#V&F8}}l diff --git a/photon-lib/src/main/resources/images/apriltags/tag16_05_00029.png b/photon-lib/src/main/resources/images/apriltags/tag16_05_00029.png deleted file mode 100644 index 9639d1cec31b01bee373794883e26f3483512bb1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 97 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFq8lEnWAr*1SKl~XC8aUb5)=0QA uTJ?r98XX8|Skyg%GeR`sZ~^NN28QG%8~qPP&Xxq~VeoYIb6Mw<&;$VbPZ=5j diff --git a/photonlib-cpp-examples/swervedriveposeestsim/build.gradle b/photonlib-cpp-examples/swervedriveposeestsim/build.gradle index 8eeef20126..8e35dcc6fa 100644 --- a/photonlib-cpp-examples/swervedriveposeestsim/build.gradle +++ b/photonlib-cpp-examples/swervedriveposeestsim/build.gradle @@ -6,16 +6,15 @@ plugins { id "com.dorongold.task-tree" version "2.1.0" } -wpi.maven.useLocal = false -wpi.maven.useDevelopment = true -wpi.versions.wpilibVersion = '2024.1.1-beta-3-53-g31cd015' -wpi.versions.wpimathVersion = '2024.1.1-beta-3-53-g31cd015' - repositories { mavenLocal() jcenter() } +wpi.maven.useDevelopment = true +wpi.versions.wpilibVersion = "2024.1.1-beta-4-35-g141241d" +wpi.versions.wpimathVersion = "2024.1.1-beta-4-35-g141241d" + apply from: "${rootDir}/../shared/examples_common.gradle" // Define my targets (RoboRIO) and artifacts (deployable files) diff --git a/photonlib-java-examples/swervedriveposeestsim/build.gradle b/photonlib-java-examples/swervedriveposeestsim/build.gradle index a4d1b60579..a352156f63 100644 --- a/photonlib-java-examples/swervedriveposeestsim/build.gradle +++ b/photonlib-java-examples/swervedriveposeestsim/build.gradle @@ -10,6 +10,11 @@ apply from: "${rootDir}/../shared/examples_common.gradle" def ROBOT_MAIN_CLASS = "frc.robot.Main" +wpi.maven.useDevelopment = true +wpi.versions.wpilibVersion = "2024.1.1-beta-4-35-g141241d" +wpi.versions.wpimathVersion = "2024.1.1-beta-4-35-g141241d" + + // Define my targets (RoboRIO) and artifacts (deployable files) // This is added by GradleRIO's backing project DeployUtils. deploy {