Add catapult debouncing and tuning
Changes taken from unreviewed/austin/sequencing_bringup_2024_2_26 with
extra changes to superstructure_lib_test to make them pass.
Signed-off-by: Maxwell Henderson <mxwhenderson@gmail.com>
Change-Id: I2bed5a39fce12cac08a7fe005ab60866c513962f
diff --git a/y2024/control_loops/python/catapult.py b/y2024/control_loops/python/catapult.py
index f7b76e6..49c6305 100644
--- a/y2024/control_loops/python/catapult.py
+++ b/y2024/control_loops/python/catapult.py
@@ -29,10 +29,10 @@
name='Catapult',
# Add the battery series resistance to make it better match.
motor=AddResistance(control_loop.NMotor(control_loop.KrakenFOC(), 2),
- 0.03),
+ 0.00),
G=(14.0 / 60.0) * (12.0 / 24.0),
# 208.7328 in^2 lb
- J=0.065,
+ J=0.065 + 0.04,
q_pos=0.80,
q_vel=15.0,
kalman_q_pos=0.12,
@@ -46,10 +46,10 @@
name='Catapult',
# Add the battery series resistance to make it better match.
motor=AddResistance(control_loop.NMotor(control_loop.KrakenFOC(), 2),
- 0.03),
+ 0.00),
G=(14.0 / 60.0) * (12.0 / 24.0),
# 135.2928 in^2 lb
- J=0.04,
+ J=0.06,
q_pos=0.80,
q_vel=15.0,
kalman_q_pos=0.12,
@@ -75,7 +75,7 @@
else:
namespaces = ['y2024', 'control_loops', 'superstructure', 'catapult']
angular_system.WriteAngularSystem(
- [kCatapultWithGamePiece, kCatapultWithoutGamePiece], argv[1:4],
+ [kCatapultWithoutGamePiece, kCatapultWithGamePiece], argv[1:4],
argv[4:7], namespaces)
diff --git a/y2024/control_loops/python/intake_pivot.py b/y2024/control_loops/python/intake_pivot.py
index 5e60311..fad5020 100644
--- a/y2024/control_loops/python/intake_pivot.py
+++ b/y2024/control_loops/python/intake_pivot.py
@@ -21,12 +21,12 @@
name='IntakePivot',
motor=control_loop.KrakenFOC(),
G=(16. / 60.) * (18. / 62.) * (18. / 62.) * (15. / 24.),
- J=0.25,
- q_pos=0.80,
- q_vel=30.0,
+ J=0.4,
+ q_pos=1.0,
+ q_vel=800.0,
kalman_q_pos=0.12,
kalman_q_vel=2.0,
- kalman_q_voltage=2.0,
+ kalman_q_voltage=1.5,
kalman_r_position=0.05,
radius=6.85 * 0.0254)