Skip to content

Commit

Permalink
Adjusted placement of vision function.
Browse files Browse the repository at this point in the history
Signed-off-by: thenetworkgrinch <thenetworkgrinch@users.noreply.github.com>
  • Loading branch information
thenetworkgrinch committed Aug 25, 2024
1 parent 4ca98cf commit fc5973d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/main/java/frc/robot/subsystems/swervedrive/SwerveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ public void updatePoseWithVision()
vision.updatePoseEstimation(swerveDrive);
}

/**
* Get the pose while updating with vision readings.
*
* @return The robots pose with the vision estimates in place.
*/
public Pose2d getVisionPose()
{
vision.updatePoseEstimation(swerveDrive);
return swerveDrive.getPose();
}

/**
* Setup AutoBuilder for PathPlanner.
*/
Expand Down Expand Up @@ -439,17 +450,6 @@ public Pose2d getPose()
return swerveDrive.getPose();
}

/**
* Get the pose while updating with vision readings.
*
* @return The robots pose with the vision estimates in place.
*/
public Pose2d getVisionPose()
{
vision.updatePoseEstimation(swerveDrive);
return swerveDrive.getPose();
}

/**
* Set chassis speeds with closed-loop velocity control.
*
Expand Down

0 comments on commit fc5973d

Please sign in to comment.