8
8
from wpimath .controller import PIDController , ProfiledPIDControllerRadians
9
9
from wpimath .geometry import Pose2d , Rotation2d , Translation2d
10
10
from wpimath .trajectory import (
11
- TrajectoryConfig ,
12
- TrajectoryGenerator ,
11
+ TrajectoryConfig ,
12
+ TrajectoryGenerator ,
13
13
TrapezoidProfileRadians ,
14
14
)
15
15
from wpimath .controller import (
16
- HolonomicDriveController ,
16
+ HolonomicDriveController ,
17
17
PIDController ,
18
18
ProfiledPIDControllerRadians ,
19
19
)
@@ -99,7 +99,7 @@ def getAutonomousCommand(self) -> commands2.Command:
99
99
100
100
# Constraint for the motion profiled robot angle controller
101
101
kThetaControllerConstraints = TrapezoidProfileRadians .Constraints (
102
- AutoConstants .kMaxAngularSpeedRadiansPerSecond ,
102
+ AutoConstants .kMaxAngularSpeedRadiansPerSecond ,
103
103
AutoConstants .kMaxAngularSpeedRadiansPerSecondSquared ,
104
104
)
105
105
@@ -109,11 +109,11 @@ def getAutonomousCommand(self) -> commands2.Command:
109
109
1.0 , 0.0 , 0.0 , kThetaControllerConstraints
110
110
)
111
111
kPThetaController .enableContinuousInput (- math .pi , math .pi )
112
-
112
+
113
113
kPIDController = HolonomicDriveController (
114
114
kPXController , kPYController , kPThetaController
115
115
)
116
-
116
+
117
117
swerveControllerCommand = commands2 .SwerveControllerCommand (
118
118
exampleTrajectory ,
119
119
self .robotDrive .getPose , # Functional interface to feed supplier
0 commit comments