Support both the new intake and old intake
The gear ratio is like 2% different, not worth stressing about. The mag
encoder moved though, so it has 2 different ratios.
Calibrate the bot since everything got replaced...
Change-Id: I79b3b01b7bf829bd12a77911f9484b9ccb896205
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2023/control_loops/python/wrist.py b/y2023/control_loops/python/wrist.py
index 60ae8a6..fe2fcf6 100644
--- a/y2023/control_loops/python/wrist.py
+++ b/y2023/control_loops/python/wrist.py
@@ -20,7 +20,7 @@
kWrist = angular_system.AngularSystemParams(
name='Wrist',
motor=control_loop.BAG(),
- G=(6.0 / 48.0) * (20.0 / 100.0) * (24.0 / 36.0) * (36.0 / 60.0),
+ G=(6.0 / 48.0) * (20.0 / 100.0) * (18.0 / 24.0) * (24.0 / 44.0),
# Use parallel axis theorem to get the moment of inertia around
# the joint (I = I_cm + mh^2 = 0.001877 + 0.8332 * 0.0407162^2)
J=0.003258,
diff --git a/y2023/control_loops/superstructure/superstructure_lib_test.cc b/y2023/control_loops/superstructure/superstructure_lib_test.cc
index 4eeb0f6..ee440ed 100644
--- a/y2023/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2023/control_loops/superstructure/superstructure_lib_test.cc
@@ -181,7 +181,7 @@
PositionSensorSimulator(
values->wrist.subsystem_params.zeroing_constants
.one_revolution_distance),
- values->wrist, constants::Values::kWristRange(),
+ values->wrist, constants::Values::kCompWristRange(),
values->wrist.subsystem_params.zeroing_constants
.measured_absolute_position,
dt_),
@@ -449,7 +449,7 @@
flatbuffers::Offset<StaticZeroingSingleDOFProfiledSubsystemGoal>
wrist_offset = CreateStaticZeroingSingleDOFProfiledSubsystemGoal(
- *builder.fbb(), constants::Values::kWristRange().middle());
+ *builder.fbb(), constants::Values::kCompWristRange().middle());
Goal::Builder goal_builder = builder.MakeBuilder<Goal>();
goal_builder.add_arm_goal_position(arm::NeutralIndex());
@@ -474,7 +474,7 @@
flatbuffers::Offset<StaticZeroingSingleDOFProfiledSubsystemGoal>
wrist_offset = CreateStaticZeroingSingleDOFProfiledSubsystemGoal(
- *builder.fbb(), constants::Values::kWristRange().upper);
+ *builder.fbb(), constants::Values::kCompWristRange().upper);
Goal::Builder goal_builder = builder.MakeBuilder<Goal>();
@@ -505,7 +505,7 @@
flatbuffers::Offset<StaticZeroingSingleDOFProfiledSubsystemGoal>
wrist_offset = CreateStaticZeroingSingleDOFProfiledSubsystemGoal(
- *builder.fbb(), constants::Values::kWristRange().upper);
+ *builder.fbb(), constants::Values::kCompWristRange().upper);
Goal::Builder goal_builder = builder.MakeBuilder<Goal>();
@@ -524,7 +524,7 @@
flatbuffers::Offset<StaticZeroingSingleDOFProfiledSubsystemGoal>
wrist_offset = CreateStaticZeroingSingleDOFProfiledSubsystemGoal(
- *builder.fbb(), constants::Values::kWristRange().lower,
+ *builder.fbb(), constants::Values::kCompWristRange().lower,
CreateProfileParameters(*builder.fbb(), 20.0, 0.1));
Goal::Builder goal_builder = builder.MakeBuilder<Goal>();