Skip to content

Commit

Permalink
Fixed drive commands to be based off of pose estimator.
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 Jan 25, 2024
1 parent f3ff57b commit 37e9c5e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public Command driveCommand(DoubleSupplier translationX, DoubleSupplier translat
driveFieldOriented(swerveDrive.swerveController.getTargetSpeeds(xInput, yInput,
headingX.getAsDouble(),
headingY.getAsDouble(),
swerveDrive.getYaw().getRadians(),
swerveDrive.getOdometryHeading().getRadians(),
swerveDrive.getMaximumVelocity()));
});
}
Expand All @@ -211,7 +211,7 @@ public Command simDriveCommand(DoubleSupplier translationX, DoubleSupplier trans
driveFieldOriented(swerveDrive.swerveController.getTargetSpeeds(translationX.getAsDouble(),
translationY.getAsDouble(),
rotation.getAsDouble() * Math.PI,
swerveDrive.getYaw().getRadians(),
swerveDrive.getOdometryHeading().getRadians(),
swerveDrive.getMaximumVelocity()));
});
}
Expand Down

0 comments on commit 37e9c5e

Please sign in to comment.