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