Exposing more swerve drive members

This commit is contained in:
Tyler Wilcox 2026-03-22 21:14:12 -04:00
parent 30421c381a
commit ad53b44e2f
1 changed files with 9 additions and 0 deletions

View File

@ -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