Files
PhotonVision/photonlib-cpp-examples/aimandrange
Jordan McMichael 44f78cb03e [Examples] Limit minimum battery voltage in sim to 0.1V (#1600)
Occasionally, the sim projects are capable of simulating current draw of
over 600A, which triggers a condition in
`BatterySim::calculateDefaultBatteryLoadedVoltage` that limits the
minimum measured battery voltage to 0V (to prevent it from going
negative).

When battery voltage measures 0, this causes NaN values to propagate
through the drivetrain model, making sim inoperable. Specifically, [this
is the
line](https://github.com/PhotonVision/photonvision/blob/master/photonlib-java-examples/aimandrange/src/main/java/frc/robot/subsystems/drivetrain/SwerveDriveSim.java#L452)
that causes the initial NaN values in simulation.

This PR is posed as a patch to ensure that simulation doesn't break.
2024-11-22 00:21:27 +00:00
..
2022-12-16 20:05:23 -05:00
2024-11-21 04:42:30 +00:00
2024-09-15 00:10:02 -04:00
2024-09-15 00:10:02 -04:00
2024-09-15 00:10:02 -04:00
2024-09-15 00:10:02 -04:00
2024-09-15 00:10:02 -04:00
2024-09-15 00:10:02 -04:00
2024-09-15 00:10:02 -04:00