set up constants for the comp bot
diff --git a/frc971/constants.cc b/frc971/constants.cc
index 91fd1d0..bb6e391 100755
--- a/frc971/constants.cc
+++ b/frc971/constants.cc
@@ -19,6 +19,9 @@
namespace constants {
namespace {
+const uint16_t kCompTeamNumber = 971;
+const uint16_t kPracticeTeamNumber = 8971;
+
const double kCompDrivetrainEncoderRatio =
(15.0 / 50.0) /*output reduction*/ * (36.0 / 24.0) /*encoder gears*/;
const double kCompLowGearRatio = 14.0 / 60.0 * 15.0 / 50.0;
@@ -29,11 +32,12 @@
const double kPracticeLowGearRatio = 16.0 / 60.0 * 19.0 / 50.0;
const double kPracticeHighGearRatio = 28.0 / 48.0 * 19.0 / 50.0;
-const ShifterHallEffect kCompRightDriveShifter{525, 635, 603, 529, 0.3, 0.7};
-const ShifterHallEffect kCompLeftDriveShifter{525, 645, 620, 533, 0.3, 0.7};
+const ShifterHallEffect kCompRightDriveShifter{555, 657, 660, 560, 0.2, 0.7};
+const ShifterHallEffect kCompLeftDriveShifter{555, 660, 644, 552, 0.2, 0.7};
const ShifterHallEffect kPracticeRightDriveShifter{550, 640, 635, 550, 0.2, 0.7};
const ShifterHallEffect kPracticeLeftDriveShifter{540, 620, 640, 550, 0.2, 0.7};
+
const double shooter_zeroing_speed = 0.05;
const double shooter_unload_speed = 0.08;
@@ -85,24 +89,31 @@
control_loops::MakeVelocityDrivetrainLoop,
control_loops::MakeDrivetrainLoop,
// ShooterLimits
- // TODO(ben): make these real numbers
- {-0.00127, 0.298196, -0.001524, 0.305054, 0.0149098,
- {-0.001778, 0.000762, 0, 0}, {-0.001778, 0.009906, 0, 0}, {0.006096, 0.026416, 0, 0},
+ {-0.001041, 0.296019, -0.001488, 0.302717, 0.0149098,
+ {-0.002, 0.000446, -0.002, 0.000446},
+ {-0.002, 0.009078, -0.002, 0.009078},
+ {0.003870, 0.026194, 0.003869, 0.026343},
shooter_zeroing_speed,
shooter_unload_speed
},
- {0.5,
- 0.1,
- 0.1,
- 0.0,
- 1.57,
- 0,
- 0,
- {0.0, 2.05, 0.02, 2.02, {-0.1, 0.05, 0, 0}, {1.0, 1.1, 0, 0}, {2.0, 2.1, 0, 0}},
- {0.0, 2.05, 0.02, 2.02, {-0.1, 0.05, 0, 0}, {1.0, 1.1, 0, 0}, {2.0, 2.1, 0, 0}},
- 0.01, // claw_unimportant_epsilon
- 0.9, // start_fine_tune_pos
- 4.0,
+ {0.800000,
+ 0.400000,
+ 0.000000,
+ -1.220821,
+ 1.822142,
+ -0.849484,
+ 1.42309,
+ {-3.328397, 2.091668, -3.166136, 1.95,
+ {-3.4, -3.092051, -3.4, -3.093414},
+ {-0.249073, -0.035452, -0.251800, -0.033179},
+ {1.889410, 2.2, 1.883956, 2.2}},
+ {-2.453460, 3.082960, -2.453460, 3.082960,
+ {-2.6, -2.185752, -2.6, -2.184843},
+ {-0.280434, -0.049087, -0.277707, -0.047724},
+ {2.892065, 3.2, 2.888429, 3.2}},
+ 0.040000, // claw_unimportant_epsilon
+ -0.400000, // start_fine_tune_pos
+ 4.000000,
},
//TODO(james): Get realer numbers for shooter_action.
{0.07, 0.15}, // shooter_action
@@ -135,8 +146,14 @@
0.912207 * 2.0,
-0.849484,
1.42308,
- {-3.364758, 2.086668, -3.166136, 1.95, {-1.7 * 2.0, -1.544662 * 2.0, -1.7 * 2.0, -1.547616 * 2.0}, {-0.130218 * 2.0, -0.019771 * 2.0, -0.132036 * 2.0, -0.018862 * 2.0}, {0.935842 * 2.0, 1.1 * 2.0, 0.932660 * 2.0, 1.1 * 2.0}},
- {-2.451642, 3.107504, -2.273474, 2.750, {-1.3 * 2.0, -1.088331 * 2.0, -1.3 * 2.0, -1.088331 * 2.0}, {-0.134536 * 2.0, -0.018408 * 2.0, -0.136127 * 2.0, -0.019771 * 2.0}, {1.447396 * 2.0, 1.6 * 2.0, 1.443987 * 2.0, 1.6 * 2.0}},
+ {-3.364758, 2.086668, -3.166136, 1.95,
+ {-1.7 * 2.0, -1.544662 * 2.0, -1.7 * 2.0, -1.547616 * 2.0},
+ {-0.130218 * 2.0, -0.019771 * 2.0, -0.132036 * 2.0, -0.018862 * 2.0},
+ {0.935842 * 2.0, 1.1 * 2.0, 0.932660 * 2.0, 1.1 * 2.0}},
+ {-2.451642, 3.107504, -2.273474, 2.750,
+ {-1.3 * 2.0, -1.088331 * 2.0, -1.3 * 2.0, -1.088331 * 2.0},
+ {-0.134536 * 2.0, -0.018408 * 2.0, -0.136127 * 2.0, -0.019771 * 2.0},
+ {1.447396 * 2.0, 1.6 * 2.0, 1.443987 * 2.0, 1.6 * 2.0}},
0.020000 * 2.0, // claw_unimportant_epsilon
-0.200000 * 2.0, // start_fine_tune_pos
4.000000,
diff --git a/frc971/constants.h b/frc971/constants.h
index 75e7e0c..3a37aa7 100755
--- a/frc971/constants.h
+++ b/frc971/constants.h
@@ -11,9 +11,6 @@
// Has all of the numbers that change for both robots and makes it easy to
// retrieve the values for the current one.
-const uint16_t kCompTeamNumber = 8971;
-const uint16_t kPracticeTeamNumber = 971;
-
// Contains the voltages for an analog hall effect sensor on a shifter.
struct ShifterHallEffect {
// The numbers to use for scaling raw voltages to 0-1.