Skip to content

Commit

Permalink
fix more auton stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
QuackingBob committed May 27, 2022
1 parent 17c01b7 commit 21dda11
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Binary file added images/swerve final.mp4
Binary file not shown.
5 changes: 3 additions & 2 deletions src/main/java/frc/robot/commands/AutonPathExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ public AutonPathExample(SwerveDrivetrain drivetrain) {
new Pose2d(0, 0, new Rotation2d(0)),
List.of(
new Translation2d(1, 2),
new Translation2d(3, 1)
new Translation2d(3, 1),
new Translation2d(5,4)
),
new Pose2d(4, 2, Rotation2d.fromDegrees(180.0)),
new Pose2d(4, 2, Rotation2d.fromDegrees(540.0)),
swerveDrivetrain.getTrajectoryConfig());

swerveDrivetrain.getField().getObject("traj").setTrajectory(trajectory);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void execute() {
ChassisSpeeds chassisSpeeds;
if (fieldOrientedFunc.get()) {
chassisSpeeds = ChassisSpeeds.fromFieldRelativeSpeeds(
vY, vX, vW, drivetrain.getSimRotation2d());
-vY, vX, vW, drivetrain.getSimRotation2d());
}
else {
chassisSpeeds = new ChassisSpeeds(vX, vY, vW);
Expand Down

0 comments on commit 21dda11

Please sign in to comment.