Skip to content

Commit

Permalink
Changed the Align to Amp destination to be more
Browse files Browse the repository at this point in the history
accurate.
  • Loading branch information
joshuman committed Sep 19, 2024
1 parent e49f59e commit 006a929
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions src/main/java/frc/robot/config/RobotConfigPhoenix.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,29 @@ public RobotConfigPhoenix() {
new Transform3d(
new Translation3d(-Units.inchesToMeters(10.75), 0, Units.inchesToMeters(8)),
new Rotation3d(0, Units.degreesToRadians(-33), Units.degreesToRadians(180)))));
cameras.add(
new VisionCamera(
"intake",
"1184",
new Transform3d(
new Translation3d(0.3048, 0, 0.22),
new Rotation3d(0, Units.degreesToRadians(-30), Units.degreesToRadians(0)))));

cameras.add(
new VisionCamera(
"right",
"1196",
new Transform3d(
new Translation3d(-Units.inchesToMeters(5.25),-Units.inchesToMeters(11.25), Units.inchesToMeters(7)),
new Rotation3d(0, Units.degreesToRadians(-32), Units.degreesToRadians(-90)))));

cameras.add(
new VisionCamera(
"left",
"1190",
new Transform3d(
new Translation3d(-Units.inchesToMeters(5.25), Units.inchesToMeters(11.25), Units.inchesToMeters(7)),
new Rotation3d(0, Units.degreesToRadians(-32), Units.degreesToRadians(90)))));

VisionConstants.visionDistanceOffsetInMeters = -0.2;
vision = new VisionSubsystem(cameras, AprilTagFields.k2024Crescendo.loadAprilTagLayoutField());
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/frc/robot/controls/DriverControls.java
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public static void setupMainControls(CommandXboxController mainController) {
Map.entry(
true,
AutoBuilder.pathfindToPoseFlipped(
new Pose2d(1.8, 7.75, Rotation2d.fromDegrees(-90)),
new Pose2d(1.89, 7.75, Rotation2d.fromDegrees(-90)),
new PathConstraints(3.0, 2.0, 2 * Math.PI, 3 * Math.PI))),
Map.entry(
false,
Expand Down

0 comments on commit 006a929

Please sign in to comment.