Tune speaker & shuttle shots
Includes ability to have more "stable" auto-aim shuttle shot that does
not rely on x/y of localizer.
Change-Id: I6b76cd8f8436b61bb2f40966dfa8e28a44e85297
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/y2024/control_loops/superstructure/aiming.h b/y2024/control_loops/superstructure/aiming.h
index 808a175..95e5840 100644
--- a/y2024/control_loops/superstructure/aiming.h
+++ b/y2024/control_loops/superstructure/aiming.h
@@ -67,7 +67,8 @@
y2024::constants::Values::ShotParams> *>
interpolation_tables_ = {
{AutoAimMode::SPEAKER, &interpolation_table_},
- {AutoAimMode::SHUTTLE, &interpolation_table_shuttle_}};
+ {AutoAimMode::SHUTTLE, &interpolation_table_shuttle_},
+ {AutoAimMode::TURRET_SHUTTLE, &interpolation_table_shuttle_}};
std::map<AutoAimMode, frc971::control_loops::Pose> red_alliance_goals_ = {
{AutoAimMode::SPEAKER,
@@ -91,6 +92,18 @@
->shooter_shuttle_targets()
->red_alliance()
->theta()),
+ },
+ {
+ AutoAimMode::TURRET_SHUTTLE,
+ frc971::control_loops::Pose(
+ frc971::ToEigenOrDie<3, 1>(*robot_constants_->common()
+ ->shooter_shuttle_targets()
+ ->red_alliance()
+ ->pos()),
+ robot_constants_->common()
+ ->shooter_shuttle_targets()
+ ->red_alliance()
+ ->theta()),
}};
std::map<AutoAimMode, frc971::control_loops::Pose> blue_alliance_goals_ = {
@@ -115,6 +128,18 @@
->shooter_shuttle_targets()
->blue_alliance()
->theta()),
+ },
+ {
+ AutoAimMode::TURRET_SHUTTLE,
+ frc971::control_loops::Pose(
+ frc971::ToEigenOrDie<3, 1>(*robot_constants_->common()
+ ->shooter_shuttle_targets()
+ ->blue_alliance()
+ ->pos()),
+ robot_constants_->common()
+ ->shooter_shuttle_targets()
+ ->blue_alliance()
+ ->theta()),
}};
aos::Fetcher<aos::JoystickState> joystick_state_fetcher_;