Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]-MAXSwerve Module preset warns it is "abnormal" #70

Closed
nab138 opened this issue Dec 21, 2024 · 2 comments
Closed

[BUG]-MAXSwerve Module preset warns it is "abnormal" #70

nab138 opened this issue Dec 21, 2024 · 2 comments

Comments

@nab138
Copy link

nab138 commented Dec 21, 2024

Bug Description

When using COTS.ofMAXSwerve(driveGearbox, turnGearbox, wheelCOF, gearRatioLevel), the robot code produces the following warnings (though the actual simulation seems to work fine):

Error at org.ironmaple.simulation.drivesims.configs.BoundingCheck.check(BoundingCheck.java:10): The provided "steer gear ratio" is 46.0times reduction, which seems abnormal, please check its correctness
        at org.ironmaple.simulation.drivesims.configs.BoundingCheck.check(BoundingCheck.java:10)
        at org.ironmaple.simulation.drivesims.SwerveModuleSimulation.<init>(SwerveModuleSimulation.java:111)
        at org.ironmaple.simulation.drivesims.COTS.lambda$ofMAXSwerve$8(COTS.java:302)
        ...
Error at org.ironmaple.simulation.drivesims.configs.BoundingCheck.check(BoundingCheck.java:10): The provided "drive wheel radius" is 1.4999999999999998inches, which seems abnormal, please check its correctness
        at org.ironmaple.simulation.drivesims.configs.BoundingCheck.check(BoundingCheck.java:10)
        at org.ironmaple.simulation.drivesims.SwerveModuleSimulation.<init>(SwerveModuleSimulation.java:114)
        at org.ironmaple.simulation.drivesims.COTS.lambda$ofMAXSwerve$8(COTS.java:302)
        ...

Steps to Reproduce

Construct a DriveTrainSimulationConfig with a MAXSwerve module. E.x:

public static final DriveTrainSimulationConfig mapleSimConfig = DriveTrainSimulationConfig.Default()
  .withCustomModuleTranslations(moduleTranslations)
  .withRobotMass(robotMassKg)
  .withGyro(COTS.ofNav2X())
  .withTrackLengthTrackWidth(Meters.of(wheelBase), Meters.of(trackWidth))
  .withSwerveModule(COTS.ofMAXSwerve(driveGearbox, turnGearbox, wheelCOF, 2));
@catr1xLiu
Copy link
Contributor

This should fix it #73.
I'll make a release before kick-off.

@catr1xLiu
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants