Retune interpolation table based on 1690's advice
Couple finisher and accelerator speeds too.
https://docs.google.com/spreadsheets/d/1cFcA8ncgptloiDLGW4ICp4YNkfOQLVXJi2EO5HpAJZA/edit?usp=sharing
Change-Id: I572d738de00ae7a58e8d98d7913283ffdf85da57
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
Signed-off-by: milind-u <milind.upadhyay@gmail.com>
diff --git a/y2020/control_loops/superstructure/superstructure.cc b/y2020/control_loops/superstructure/superstructure.cc
index ae79e76..4fb5c1d 100644
--- a/y2020/control_loops/superstructure/superstructure.cc
+++ b/y2020/control_loops/superstructure/superstructure.cc
@@ -75,18 +75,15 @@
aos::FlatbufferFixedAllocatorArray<ShooterGoal, 64> shooter_goal;
constants::Values::ShotParams shot_params;
- constants::Values::FlywheelShotParams flywheel_shot_params;
if (constants::GetValues().shot_interpolation_table.GetInRange(
- distance_to_goal, &shot_params) &&
- constants::GetValues().flywheel_shot_interpolation_table.GetInRange(
- shot_params.velocity_ball, &flywheel_shot_params)) {
+ distance_to_goal, &shot_params)) {
hood_goal.Finish(frc971::control_loops::
CreateStaticZeroingSingleDOFProfiledSubsystemGoal(
*hood_goal.fbb(), shot_params.hood_angle));
shooter_goal.Finish(CreateShooterGoal(
- *shooter_goal.fbb(), flywheel_shot_params.velocity_accelerator,
- flywheel_shot_params.velocity_finisher));
+ *shooter_goal.fbb(), shot_params.velocity_accelerator,
+ shot_params.velocity_finisher));
} else {
hood_goal.Finish(
frc971::control_loops::
diff --git a/y2020/control_loops/superstructure/superstructure_lib_test.cc b/y2020/control_loops/superstructure/superstructure_lib_test.cc
index 2e6ec08..f148296 100644
--- a/y2020/control_loops/superstructure/superstructure_lib_test.cc
+++ b/y2020/control_loops/superstructure/superstructure_lib_test.cc
@@ -1460,10 +1460,10 @@
->accelerator_right()
->angular_velocity_goal(),
250.0);
- EXPECT_DOUBLE_EQ(superstructure_status_fetcher_->shooter()
- ->finisher()
- ->angular_velocity_goal(),
- 350.0);
+ EXPECT_GE(superstructure_status_fetcher_->shooter()
+ ->finisher()
+ ->angular_velocity_goal(),
+ 250.0);
EXPECT_GE(superstructure_status_fetcher_->hood()->position(),
constants::Values::kHoodRange().lower);
}
diff --git a/y2020/control_loops/superstructure/turret/aiming.cc b/y2020/control_loops/superstructure/turret/aiming.cc
index cdc6181..c8f8f6e 100644
--- a/y2020/control_loops/superstructure/turret/aiming.cc
+++ b/y2020/control_loops/superstructure/turret/aiming.cc
@@ -67,12 +67,12 @@
// speed. Assuming a constant average speed over the course of the trajectory
// should be reasonable, since all we are trying to do here is calculate an
// overall time-of-flight (we don't actually care about the ball speed itself).
-constexpr double kBallSpeedOverGround = 15.0; // m/s
+constexpr double kBallSpeedOverGround = 17.0; // m/s
// Minimum distance that we must be from the inner port in order to attempt the
// shot--this is to account for the fact that if we are too close to the target,
// then we won't have a clear shot on the inner port.
-constexpr double kMinimumInnerPortShotDistance = 3.9;
+constexpr double kMinimumInnerPortShotDistance = 1.9;
// Amount of buffer, in radians, to leave to help avoid wrapping. I.e., any time
// that we are in kAvoidEdges mode, we will keep ourselves at least