Open drewwhis opened 4 years ago
If the set drive to 0,0,0 doesn't work, we just need a public method on the DriveSubsystem class (zeroWheels()
, for example), that will give all four modules the same state (speedMs = 0
and angle = new Rotation2d(0)
, most likely).
If 0,0,0 doesn't work like planned, adding this to DriveSubsystem could.
public void zeroModules() {
SwerveModuleState zero = new SwerveModuleState(0, new Rotation2d(0));
frontLeft.setState(zero);
frontRight.setState(zero);
rearLeft.setState(zero);
rearRight.setState(zero);
}
oof, looks like we have to tackle #69
There are two possible ways to handle this.
I think we can just call DriveSubsystem.drive(0,0,0) in the initialize method of any drive commands. This should zero the wheels before running the command (but not while the command runs).
If that doesn't do the trick, we can add a method onto the drive subsystem class to zero the wheels that we can call in the initialize method.