Skip to content

Commit b07f20b

Browse files
Update constants.py
Added the line to enable continuous inputs on the ProfiledPIDController.
1 parent 1e9c9e0 commit b07f20b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/maxswerve/constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,5 @@ class AutoConstants:
142142
kPYController = PIDController(1.0, 0.0, 0.0)
143143
kPThetaController = ProfiledPIDControllerRadians(1.0, 0.0, 0.0, kThetaControllerConstraints)
144144

145-
kPIDController = HolonomicDriveController(kPXController, kPYController, kPThetaController)
145+
kPIDController = HolonomicDriveController(kPXController, kPYController, kPThetaController)
146+
kPIDController.enableContinuousInput(-math.pi, math.pi)

0 commit comments

Comments
 (0)