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

Update SwerveSetpointGenerator to handle NaN Voltages #930

Merged
merged 4 commits into from
Dec 20, 2024

Conversation

mmilunicmobile
Copy link
Contributor

Adds an option to generate a SwerveSetpoint with a specified battery voltage instead of depending on RobotController.getInputVoltage().

Additionally, by default checks if RobotController.getInputVoltage() is returning NaN and if it is, uses 12.0 as a sub in voltage.

Adds an option to generate a SwerveSetpoint with a specified battery voltage instead of depending on RobotController.getInputVoltage(). Additionally, by default checks if RobotController.getInputVoltage() is returning NaN and if it is, uses 12 as a sub in voltage.
@github-actions github-actions bot added the PathPlannerLib Changes to PathPlannerLib label Dec 15, 2024
@mmilunicmobile
Copy link
Contributor Author

mmilunicmobile commented Dec 15, 2024

This is inteded to solve: #930

@mjansen4857 mjansen4857 changed the title Update SwerveSetpointGenerator.java to avoid NaN Voltages Update SwerveSetpointGenerator to handle NaN Voltages Dec 20, 2024
@mjansen4857 mjansen4857 enabled auto-merge (squash) December 20, 2024 01:04
@mjansen4857
Copy link
Owner

mjansen4857 commented Dec 20, 2024

Updated this to add the changes to the python version, move some things around, and add overloads for the java units library

@mjansen4857 mjansen4857 merged commit 3129ac1 into mjansen4857:main Dec 20, 2024
24 checks passed
Luis-Leyva added a commit to Luis-Leyva/pathplanner that referenced this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PathPlannerLib Changes to PathPlannerLib
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SwerveSetpointGenerator returning invalid ChassisSpeeds if RobotController.getInputVoltage() is NaN.
2 participants