From ad8911e3ab1228ac05605d8dd1a4764ee667dea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=8F=E3=82=A4=E3=83=89=E3=83=A9=E3=83=B3=E3=83=88?= Date: Mon, 30 Dec 2024 20:58:24 -0600 Subject: [PATCH] Raise kEpsilon from 1e-8 to 1e-6 This prevents an extremely rare but still possible warning from Rotation2d about x and y being 0, as Rotation2d uses 1e-6 as its epsilon for 0 checking. --- .../pathplanner/lib/util/swerve/SwerveSetpointGenerator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pathplannerlib/src/main/java/com/pathplanner/lib/util/swerve/SwerveSetpointGenerator.java b/pathplannerlib/src/main/java/com/pathplanner/lib/util/swerve/SwerveSetpointGenerator.java index 107cc266..857693e3 100644 --- a/pathplannerlib/src/main/java/com/pathplanner/lib/util/swerve/SwerveSetpointGenerator.java +++ b/pathplannerlib/src/main/java/com/pathplanner/lib/util/swerve/SwerveSetpointGenerator.java @@ -25,7 +25,7 @@ * forces acting on a module's wheel from exceeding the force of friction. */ public class SwerveSetpointGenerator { - private static final double kEpsilon = 1E-8; + private static final double kEpsilon = 1E-6; private final RobotConfig config; private final double maxSteerVelocityRadsPerSec;