Skip to content

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