Skip to content

Commit

Permalink
renamed the apriltag wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
MysticalApple committed Feb 13, 2024
1 parent 8839a69 commit aa8cb2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
import edu.wpi.first.wpilibj.smartdashboard.Field2d;
import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.vision.PhotonWrapper;
import frc.robot.vision.ApriltagWrapper;

import static frc.robot.Constants.SwerveConstants.*;
import static frc.robot.Constants.VisionConstants.*;
Expand Down Expand Up @@ -52,7 +52,7 @@ public class SwerveSubsystem extends BaseSwerveSubsystem{

private final SwerveDrivePoseEstimator poseEstimator;
private final SwerveDriveKinematics kinematics;
private final PhotonWrapper photonWrapper;
private final ApriltagWrapper apriltagWrapper;

private final NetworkTableInstance inst = NetworkTableInstance.getDefault();
private final NetworkTable networkTable = inst.getTable("Testing");
Expand Down Expand Up @@ -125,7 +125,7 @@ public SwerveSubsystem() {
MatBuilder.fill(Nat.N3(), Nat.N1(), 0.1, 0.1, 0.01)
);

photonWrapper = new PhotonWrapper(FRONT_CAMERA, FRONT_CAMERA_POSE);
apriltagWrapper = new ApriltagWrapper(FRONT_CAMERA, FRONT_CAMERA_POSE);
}

public void periodic() {
Expand All @@ -141,7 +141,7 @@ public void periodic() {
BRsteer.setValue(backRightModule.getSteerAmpDraws());
BRdrive.setValue(backRightModule.getDriveAmpDraws());

Optional<EstimatedRobotPose> visionEstimate = photonWrapper.getRobotPose(
Optional<EstimatedRobotPose> visionEstimate = apriltagWrapper.getRobotPose(
new Pose3d(field.getRobotPose())
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
import static frc.robot.Constants.VisionConstants.*;

/**
* The PhotonWrapper class gets robot pose estimates from a given camera and publishes robot pose estimations over
* The ApriltagWrapper class gets robot pose estimates from a given camera and publishes robot pose estimations over
* NetworkTables.
*/
public class PhotonWrapper {
public class ApriltagWrapper {
private final PhotonPoseEstimator poseEstimator;
private final String name;

Expand All @@ -41,7 +41,7 @@ public class PhotonWrapper {
* @param camera The PhotonVision camera object.
* @param cameraPose The camera's 3d transformation relative to the robot.
*/
public PhotonWrapper(PhotonCamera camera, Transform3d cameraPose) {
public ApriltagWrapper(PhotonCamera camera, Transform3d cameraPose) {
this.name = camera.getName();

/* Pose Estimation Setup */
Expand Down

0 comments on commit aa8cb2a

Please sign in to comment.