From ad53b44e2fb4c06b72ff2546b30e37446ac2fb8d Mon Sep 17 00:00:00 2001 From: Tyler Wilcox Date: Sun, 22 Mar 2026 21:14:12 -0400 Subject: [PATCH] Exposing more swerve drive members --- .../robolib/drivesystems/swerve/SwerveDriveSystem.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/src/main/java/org/fairportrobotics/frc/robolib/drivesystems/swerve/SwerveDriveSystem.java b/lib/src/main/java/org/fairportrobotics/frc/robolib/drivesystems/swerve/SwerveDriveSystem.java index 784ab43..ed5b1f9 100644 --- a/lib/src/main/java/org/fairportrobotics/frc/robolib/drivesystems/swerve/SwerveDriveSystem.java +++ b/lib/src/main/java/org/fairportrobotics/frc/robolib/drivesystems/swerve/SwerveDriveSystem.java @@ -6,6 +6,7 @@ import com.ctre.phoenix6.CANBus; import com.ctre.phoenix6.Utils; import com.ctre.phoenix6.hardware.Pigeon2; +import edu.wpi.first.math.estimator.PoseEstimator; import edu.wpi.first.math.estimator.SwerveDrivePoseEstimator3d; import edu.wpi.first.math.geometry.Pose2d; import edu.wpi.first.math.geometry.Pose3d; @@ -223,6 +224,14 @@ public class SwerveDriveSystem implements Subsystem{ poseEstimator.resetPose(pose); } + /** + * Get the pose estimator instance + * @return pose estimator instance + */ + public SwerveDrivePoseEstimator3d getPoseEstimator(){ + return poseEstimator; + } + /** * Set pose estimation to a specific pose * @param pose The new pose as a Pose2d