From ee996b98134798178f2fa989f3533fa2cd6c00f8 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Wed, 18 Jan 2023 20:51:29 -0800 Subject: [PATCH] [wpilibjExamples] Update AprilTag field load --- .../examples/differentialdriveposeestimator/Drivetrain.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/differentialdriveposeestimator/Drivetrain.java b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/differentialdriveposeestimator/Drivetrain.java index e1b36fc0674..305805e83d3 100644 --- a/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/differentialdriveposeestimator/Drivetrain.java +++ b/wpilibjExamples/src/main/java/edu/wpi/first/wpilibj/examples/differentialdriveposeestimator/Drivetrain.java @@ -4,7 +4,6 @@ package edu.wpi.first.wpilibj.examples.differentialdriveposeestimator; -import edu.wpi.first.apriltag.AprilTagFieldLayout; import edu.wpi.first.apriltag.AprilTagFields; import edu.wpi.first.math.ComputerVisionUtil; import edu.wpi.first.math.VecBuilder; @@ -132,10 +131,7 @@ public Drivetrain(DoubleArrayTopic cameraToObjectTopic) { m_cameraToObjectEntry = cameraToObjectTopic.getEntry(m_defaultVal); try { - m_objectInField = - AprilTagFieldLayout.loadFromResource(AprilTagFields.k2022RapidReact.m_resourceFile) - .getTagPose(0) - .get(); + m_objectInField = AprilTagFields.k2022RapidReact.loadFromResourceFile().getTagPose(0).get(); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException();