Skip to content

Commit

Permalink
Janky Boi
Browse files Browse the repository at this point in the history
  • Loading branch information
TimB-87 committed Feb 22, 2025
1 parent ed4e470 commit 3bbdc69
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/frc/robot/subsystems/Drive.java
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,12 @@ private void periodicMove(final double xSpeed, final double ySpeed, final double
Transform2d reefLocation = vision.pickBestReefLocation(visionData.targets);
Transform2d robotToBranch = vision
.adjustTranslationForBranch(reefLocation, Branch.LEFT_BRANCH);
Logger.recordOutput("Reef Location Transform2d", estimator.getEstimatedPosition().plus(reefLocation));
Pose2d robotPose = new Pose2d(estimator.getEstimatedPosition().getTranslation(),
robotToBranch.getRotation().minus(Rotation2d.fromDegrees(180)));
Logger.recordOutput("Reef Location Transform2d", robotPose.plus(reefLocation));
Logger.recordOutput("Robot To Branch Transform2d",
estimator.getEstimatedPosition().plus(robotToBranch));
robotPose.plus(robotToBranch));
Logger.recordOutput("Robot Pose", robotPose);
targetPose = estimator.getEstimatedPosition().plus(robotToBranch);
}
if (targetBranch != Branch.NONE) {
Expand Down

0 comments on commit 3bbdc69

Please sign in to comment.