commit | 9ff4f307f3f0862da1d4a6e12adfe09773bce365 | [log] [tgz] |
---|---|---|
author | Austin Schuh <austin.linux@gmail.com> | Mon Sep 02 13:15:21 2024 -0700 |
committer | Austin Schuh <austin.linux@gmail.com> | Mon Sep 02 22:46:48 2024 -0700 |
tree | 14f144eaa1b2c87f07fc7d876e097e921b65feb0 | |
parent | 3aa49abc55df0f9d4d1a46f5296f151cc0600a4f [diff] |
Reduce RK steps in swerve mpc We had more steps than needed, and it was causing expensive iterations. This saves like 30% of the runtime. Change-Id: Ic41f40b3e545bdce121b3c77036a2dddfea69273 Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/frc971/control_loops/swerve/casadi_velocity_mpc.py b/frc971/control_loops/swerve/casadi_velocity_mpc.py index fc4a4c6..d108931 100644 --- a/frc971/control_loops/swerve/casadi_velocity_mpc.py +++ b/frc971/control_loops/swerve/casadi_velocity_mpc.py
@@ -176,7 +176,7 @@ U = casadi.MX.sym('U', 8) X = X0 - M = 4 # RK4 steps per interval + M = 2 # RK4 steps per interval DT = self.dt / M for j in range(M):