Skip to content

Commit

Permalink
finally fix rotations
Browse files Browse the repository at this point in the history
  • Loading branch information
GearBoxFox committed Jan 18, 2025
1 parent f455d5b commit 71d31b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,5 @@ compile_commands.json

# Eclipse generated file for annotation processors
.factorypath

src/main/java/frc/robot/BuildConstants.java
19 changes: 0 additions & 19 deletions src/main/java/frc/robot/BuildConstants.java

This file was deleted.

10 changes: 4 additions & 6 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@ public Robot() {
public void robotPeriodic() {
CommandScheduler.getInstance().run();

double xMeters = Units.inchesToMeters(-2.25);
double yMeters = Units.inchesToMeters(-2.25);
double xOffset = Units.inchesToMeters(10.75);
double yOffset = Units.inchesToMeters(9.75);
double angle = 0;
double angle = -45;

Logger.recordOutput("Blank Pose 3D", new Pose3d());
Logger.recordOutput("Blank Pose 3D Array", new Pose3d(), new Pose3d());
Expand All @@ -104,10 +102,10 @@ public void robotPeriodic() {
).transformBy(
new Transform3d(
new Translation3d(
xMeters * Math.cos(Units.degreesToRadians(angle) - yMeters * Math.sin(Units.degreesToRadians(angle))),
Units.inchesToMeters(2.3),
0.0,
0.0
),
Units.inchesToMeters(9.75)
).unaryMinus(),
new Rotation3d()
)
),
Expand Down

0 comments on commit 71d31b5

Please sign in to comment.