Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
Update heading control calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Apr 7, 2022
1 parent e2dfb3c commit 7d0aed7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/frc/robot/drive/DriveSubsystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ public class DriveSubsystem extends SubsystemBase {
final var maxChassisSpeedsForward = KINEMATICS.toChassisSpeeds(maxWheelSpeedsForward);
final var maxWheelSpeedsSpinning =
new MecanumDriveWheelSpeeds(
-Wheel.MAX_WHEEL_VELOCITY,
Wheel.MAX_WHEEL_VELOCITY,
-Wheel.MAX_WHEEL_VELOCITY,
Wheel.MAX_WHEEL_VELOCITY,
Wheel.MAX_WHEEL_VELOCITY);
-Wheel.MAX_WHEEL_VELOCITY);
final var maxChassisSpeedsSpinning = KINEMATICS.toChassisSpeeds(maxWheelSpeedsSpinning);

MAX_VELOCITY = maxChassisSpeedsForward.vxMetersPerSecond;
MAX_ANGULAR_VELOCITY = maxChassisSpeedsSpinning.omegaRadiansPerSecond;
MAX_VELOCITY = Math.abs(maxChassisSpeedsForward.vxMetersPerSecond);
MAX_ANGULAR_VELOCITY = Math.abs(maxChassisSpeedsSpinning.omegaRadiansPerSecond);

MAX_ACCELERATION = Wheel.MAX_ACCELERATION;
// TODO: This is the wheel's angular acceleration, do we need a different value for the robot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

public class TeleopDriveCommand extends CommandBase {
/** The maximum allowed turn rate of the robot during teleop, per second. */
public static final Rotation2d MAX_TELEOP_TURN_RATE = Rotation2d.fromDegrees(180);
public static final Rotation2d MAX_TELEOP_TURN_RATE = Rotation2d.fromDegrees(360 * 0.75);

private final DriveSubsystem driveSubsystem;
private final DriveController controller;
Expand Down

0 comments on commit 7d0aed7

Please sign in to comment.