Update zeroes, constants, and robot tunings from SFR

Change-Id: Id57c3bf52c140f74df2fd8df21fb1f2f19011d9e
Signed-off-by: James Kuszmaul <jabukuszmaul+collab@gmail.com>
diff --git a/y2024/constants/971.json b/y2024/constants/971.json
index 49794be..62015a3 100644
--- a/y2024/constants/971.json
+++ b/y2024/constants/971.json
@@ -8,13 +8,13 @@
 {
   "cameras": [
     {
-      "calibration": {% include 'y2024/constants/calib_files/calibration_orin1-971-0_cam-24-05_2024-03-01_11-01-05.102438041.json' %}
+      "calibration": {% include 'y2024/constants/calib_files/calibration_orin-971-c-1_cam-24-05_2024-03-08_17-16-02.325066070.json' %}
     },
     {
-      "calibration": {% include 'y2024/constants/calib_files/calibration_orin1-971-1_cam-24-06_2024-03-01_11-01-20.409861949.json' %}
+      "calibration": {% include 'y2024/constants/calib_files/calibration_orin-971-1-0_cam-24-06_2024-03-08_17-16-02.325390283.json' %}
     },
     {
-      "calibration": {% include 'y2024/constants/calib_files/calibration_imu-971-0_cam-24-07_2024-03-01_11-01-32.895328333.json' %}
+      "calibration": {% include 'y2024/constants/calib_files/calibration_orin-971-1-1_cam-24-07_2024-03-08_17-16-02.325267121.json' %}
     },
     {
       "calibration": {% include 'y2024/constants/calib_files/calibration_imu-971-1_cam-24-08_2024-03-01_11-02-11.982641320.json' %}
@@ -23,23 +23,23 @@
   "robot": {
     {% set _ = intake_pivot_zero.update(
       {
-          "measured_absolute_position" : 3.2990161941868
+          "measured_absolute_position" : 3.26046279713726
       }
     ) %}
     "intake_constants":  {{ intake_pivot_zero | tojson(indent=2)}},
     "climber_constants": {
       {% set _ = climber_zero.update(
           {
-              "measured_absolute_position" : 0.00260967415741875
+              "measured_absolute_position" : 0.0143601265619493
           }
       ) %}
       "zeroing_constants": {{ climber_zero | tojson(indent=2)}},
-      "potentiometer_offset": {{ -0.935529777248618 + 1.83632555414775 + 0.0431080619919798 - 0.493015437796464 }}
+      "potentiometer_offset": {{ -0.935529777248618 + 1.83632555414775 + 0.0431080619919798 - 0.493015437796464 + 0.001602382648064  +0.00194716776942403 }}
     },
     "catapult_constants": {
       {% set _ = catapult_zero.update(
           {
-              "measured_absolute_position" : 0.741253220327565
+              "measured_absolute_position" : 0.72750793510745
           }
       ) %}
       "zeroing_constants": {{ catapult_zero | tojson(indent=2)}},
@@ -48,7 +48,7 @@
     "altitude_constants": {
       {% set _ = altitude_zero.update(
           {
-              "measured_absolute_position" : 0.16415931835676
+              "measured_absolute_position" : 0.1964
           }
       ) %}
       "zeroing_constants": {{ altitude_zero | tojson(indent=2)}},
@@ -57,20 +57,20 @@
     "turret_constants": {
       {% set _ = turret_zero.update(
           {
-              "measured_absolute_position" : 0.138686395993591
+              "measured_absolute_position" : 0.210464386547614
           }
       ) %}
       "zeroing_constants": {{ turret_zero | tojson(indent=2)}},
-      "potentiometer_offset": {{ -6.47164779835404 }}
+      "potentiometer_offset": {{ -6.47164779835404 - 0.0711209027239817 }}
     },
     "extend_constants": {
       {% set _ = extend_zero.update(
           {
-              "measured_absolute_position" : 0.0314256815130559
+              "measured_absolute_position" : 0.135593394632399
           }
       ) %}
       "zeroing_constants": {{ extend_zero | tojson(indent=2)}},
-      "potentiometer_offset": {{ -0.2574404033256 + 0.0170793439542 - 0.177097393974999 }}
+      "potentiometer_offset": {{ -0.2574404033256 + 0.0170793439542 - 0.177097393974999 + 0.3473623911879 }}
     }
   },
   {% include 'y2024/constants/common.json' %}
diff --git a/y2024/constants/calib_files/calibration_imu-971-0_cam-24-07_2024-03-01_11-01-32.895328333.json b/y2024/constants/calib_files/calibration_imu-971-0_cam-24-07_2024-03-01_11-01-32.895328333.json
deleted file mode 100755
index d013e2a..0000000
--- a/y2024/constants/calib_files/calibration_imu-971-0_cam-24-07_2024-03-01_11-01-32.895328333.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "node_name": "imu",
- "team_number": 971,
- "intrinsics": [
-  647.822815,
-  0.0,
-  715.37616,
-  0.0,
-  647.799316,
-  494.638641,
-  0.0,
-  0.0,
-  1.0
- ],
- "fixed_extrinsics": {
-  "data": [
-   1.0,
-   -0.0,
-   0.0,
-   0.111049,
-   0.0,
-   0.258819,
-   0.965926,
-   0.263806,
-   -0.0,
-   -0.965926,
-   0.258819,
-   0.347685,
-   0.0,
-   0.0,
-   0.0,
-   1.0
-  ]
- },
- "dist_coeffs": [
-  -0.2423,
-  0.057169,
-  0.000302,
-  0.000016,
-  -0.005638
- ],
- "calibration_timestamp": 1708833147338466592,
- "camera_id": "24-07",
- "camera_number": 0,
- "reprojection_error": 1.362672
-}
\ No newline at end of file
diff --git a/y2024/constants/calib_files/calibration_imu-971-1_cam-24-08_2024-03-01_11-02-11.982641320.json b/y2024/constants/calib_files/calibration_imu-971-1_cam-24-08_2024-03-01_11-02-11.982641320.json
index fbe79d5..c0ec0d8 100755
--- a/y2024/constants/calib_files/calibration_imu-971-1_cam-24-08_2024-03-01_11-02-11.982641320.json
+++ b/y2024/constants/calib_files/calibration_imu-971-1_cam-24-08_2024-03-01_11-02-11.982641320.json
@@ -41,6 +41,6 @@
  ],
  "calibration_timestamp": 1708820514420797344,
  "camera_id": "24-08",
- "camera_number": 1,
+ "camera_number": 0,
  "reprojection_error": 1.591953
-}
\ No newline at end of file
+}
diff --git a/y2024/constants/calib_files/calibration_orin1-971-1_cam-24-06_2024-03-01_11-01-20.409861949.json b/y2024/constants/calib_files/calibration_orin-971-1-0_cam-24-06_2024-03-08_17-16-02.325390283.json
similarity index 61%
rename from y2024/constants/calib_files/calibration_orin1-971-1_cam-24-06_2024-03-01_11-01-20.409861949.json
rename to y2024/constants/calib_files/calibration_orin-971-1-0_cam-24-06_2024-03-08_17-16-02.325390283.json
index 0eb10db..48da468 100755
--- a/y2024/constants/calib_files/calibration_orin1-971-1_cam-24-06_2024-03-01_11-01-20.409861949.json
+++ b/y2024/constants/calib_files/calibration_orin-971-1-0_cam-24-06_2024-03-08_17-16-02.325390283.json
@@ -14,18 +14,18 @@
  ],
  "fixed_extrinsics": {
   "data": [
-   -1.0,
-   0.0,
-   0.0,
-   0.111049,
-   -0.0,
-   -0.258819,
-   -0.965926,
-   -0.263806,
-   0.0,
-   -0.965926,
-   0.258819,
-   0.347685,
+   -0.997807,
+   0.015704,
+   -0.064302,
+   0.134715,
+   0.058111,
+   -0.25731,
+   -0.96458,
+   -0.273849,
+   -0.031694,
+   -0.966201,
+   0.255833,
+   0.295681,
    0.0,
    0.0,
    0.0,
@@ -39,8 +39,8 @@
   0.000005,
   -0.006342
  ],
- "calibration_timestamp": 409229245444672,
+ "calibration_timestamp": 1709946962325390283,
  "camera_id": "24-06",
- "camera_number": 1,
+ "camera_number": 0,
  "reprojection_error": 1.344104
 }
\ No newline at end of file
diff --git a/y2024/constants/calib_files/calibration_orin-971-1-1_cam-24-07_2024-03-08_17-16-02.325267121.json b/y2024/constants/calib_files/calibration_orin-971-1-1_cam-24-07_2024-03-08_17-16-02.325267121.json
new file mode 100755
index 0000000..56072d4
--- /dev/null
+++ b/y2024/constants/calib_files/calibration_orin-971-1-1_cam-24-07_2024-03-08_17-16-02.325267121.json
@@ -0,0 +1,46 @@
+{
+ "node_name": "orin1",
+ "team_number": 971,
+ "intrinsics": [
+  647.822815,
+  0.0,
+  715.37616,
+  0.0,
+  647.799316,
+  494.638641,
+  0.0,
+  0.0,
+  1.0
+ ],
+ "fixed_extrinsics": {
+  "data": [
+   0.016995,
+   0.002328,
+   0.999853,
+   0.35278,
+   0.999839,
+   -0.005785,
+   -0.016981,
+   0.237526,
+   0.005745,
+   0.999981,
+   -0.002426,
+   0.387276,
+   0.0,
+   0.0,
+   0.0,
+   1.0
+  ]
+ },
+ "dist_coeffs": [
+  -0.2423,
+  0.057169,
+  0.000302,
+  0.000016,
+  -0.005638
+ ],
+ "calibration_timestamp": 1709946962325267121,
+ "camera_id": "24-07",
+ "camera_number": 1,
+ "reprojection_error": 1.362672
+}
\ No newline at end of file
diff --git a/y2024/constants/calib_files/calibration_orin-971-c-1_cam-24-05_2024-03-08_17-16-02.325066070.json b/y2024/constants/calib_files/calibration_orin-971-c-1_cam-24-05_2024-03-08_17-16-02.325066070.json
new file mode 100755
index 0000000..c1d4e60
--- /dev/null
+++ b/y2024/constants/calib_files/calibration_orin-971-c-1_cam-24-05_2024-03-08_17-16-02.325066070.json
@@ -0,0 +1,46 @@
+{
+ "node_name": "imu",
+ "team_number": 971,
+ "intrinsics": [
+  648.360168,
+  0.0,
+  729.818665,
+  0.0,
+  648.210327,
+  641.988037,
+  0.0,
+  0.0,
+  1.0
+ ],
+ "fixed_extrinsics": {
+  "data": [
+   0.999556,
+   -0.026613,
+   0.013428,
+   0.146979,
+   -0.006922,
+   0.230925,
+   0.972947,
+   0.30388,
+   -0.028994,
+   -0.972608,
+   0.230638,
+   0.32572,
+   0.0,
+   0.0,
+   0.0,
+   1.0
+  ]
+ },
+ "dist_coeffs": [
+  -0.255473,
+  0.068444,
+  0.000028,
+  -0.000078,
+  -0.008004
+ ],
+ "calibration_timestamp": 1709946962325066070,
+ "camera_id": "24-05",
+ "camera_number": 1,
+ "reprojection_error": 1.058851
+}
\ No newline at end of file
diff --git a/y2024/constants/calib_files/calibration_orin1-971-0_cam-24-05_2024-03-01_11-01-05.102438041.json b/y2024/constants/calib_files/calibration_orin1-971-0_cam-24-05_2024-03-01_11-01-05.102438041.json
deleted file mode 100755
index 317e453..0000000
--- a/y2024/constants/calib_files/calibration_orin1-971-0_cam-24-05_2024-03-01_11-01-05.102438041.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "node_name": "orin1",
- "team_number": 971,
- "intrinsics": [
-  648.360168,
-  0.0,
-  729.818665,
-  0.0,
-  648.210327,
-  641.988037,
-  0.0,
-  0.0,
-  1.0
- ],
- "fixed_extrinsics": {
-  "data": [
-   0.0,
-   0.0,
-   1.0,
-   0.284397,
-   -1.0,
-   0.0,
-   0.0,
-   0.226771,
-   0.0,
-   -1.0,
-   0.0,
-   0.442951,
-   0.0,
-   0.0,
-   0.0,
-   1.0
-  ]
- },
- "dist_coeffs": [
-  -0.255473,
-  0.068444,
-  0.000028,
-  -0.000078,
-  -0.008004
- ],
- "calibration_timestamp": 409227793683328,
- "camera_id": "24-05",
- "camera_number": 0,
- "reprojection_error": 1.058851
-}
\ No newline at end of file
diff --git a/y2024/constants/common.json b/y2024/constants/common.json
index 972e373..a36844b 100644
--- a/y2024/constants/common.json
+++ b/y2024/constants/common.json
@@ -4,30 +4,55 @@
   "target_map": {% include 'y2024/vision/maps/target_map.json' %},
   "shooter_interpolation_table": [
     {
-        "distance_from_goal": 5.0,
+        "distance_from_goal": 0.8,
         "shot_params": {
-            "shot_velocity": 0.0,
-            "shot_altitude_angle": 0.0,
-            "shot_catapult_angle": 0.0,
-            "shot_speed_over_ground": 2.0
+            "shot_altitude_angle": 0.85,
+            "shot_speed_over_ground": 4.0
         }
     },
     {
-      "distance_from_goal": 10.0,
+      "distance_from_goal": 1.34,
       "shot_params": {
-          "shot_velocity": 0.0,
-          "shot_altitude_angle": 0.0,
-          "shot_catapult_angle": 0.0,
+          "shot_altitude_angle": 0.85,
+          "shot_speed_over_ground": 4.0
+      }
+    },
+    {
+      "distance_from_goal": 2.004,
+      "shot_params": {
+          "shot_altitude_angle": 0.73,
+          "shot_speed_over_ground": 4.0
+      }
+    },
+    // 2.2 -> high.
+    {
+      "distance_from_goal": 2.844,
+      "shot_params": {
+          "shot_altitude_angle": 0.62,
+          "shot_speed_over_ground": 4.0
+      }
+    },
+    {
+      "distance_from_goal": 3.374,
+      "shot_params": {
+          "shot_altitude_angle": 0.58,
+          "shot_speed_over_ground": 4.0
+      }
+    },
+    {
+      "distance_from_goal": 4.10,
+      "shot_params": {
+          "shot_altitude_angle": 0.54,
           "shot_speed_over_ground": 4.0
       }
     }
   ],
   "intake_roller_voltages": {
-    "spitting": -4.0,
+    "spitting": -6.0,
     "intaking": 9.0
   },
   "intake_pivot_set_points": {
-    "extended": -0.03,
+    "extended": 0.045,
     "retracted": 1.73
   },
   "intake_pivot": {
@@ -56,7 +81,7 @@
     "intake_pivot_supply_current_limit": 40,
     "intake_pivot_stator_current_limit": 100,
     "intake_roller_supply_current_limit": 20,
-    "intake_roller_stator_current_limit": 50,
+    "intake_roller_stator_current_limit": 100,
     "transfer_roller_supply_current_limit": 20,
     "transfer_roller_stator_current_limit": 50,
     "drivetrain_supply_current_limit": 50,
@@ -64,11 +89,11 @@
     "climber_supply_current_limit": 30,
     "climber_stator_current_limit": 100,
     "extend_supply_current_limit": 30,
-    "extend_stator_current_limit": 150,
+    "extend_stator_current_limit": 180,
     "extend_roller_supply_current_limit": 50,
-    "extend_roller_stator_current_limit": 150,
-    "turret_supply_current_limit": 20,
-    "turret_stator_current_limit": 40,
+    "extend_roller_stator_current_limit": 180,
+    "turret_supply_current_limit": 30,
+    "turret_stator_current_limit": 80,
     "altitude_supply_current_limit": 30,
     "altitude_stator_current_limit": 150,
     "catapult_supply_current_limit": 60,
@@ -84,13 +109,13 @@
     "extend_moving": 4.0
   },
   "extend_roller_voltages": {
-    "scoring": 7.0,
+    "scoring": 6.0,
     "reversing": -4.0
   },
   "climber_set_points": {
     "full_extend": -0.005,
-    "stowed": -0.478,
-    "retract": -0.478
+    "stowed": -0.442,
+    "retract": -0.472
   },
   "climber": {
     "zeroing_voltage": 3.0,
@@ -104,9 +129,9 @@
       "max_acceleration": 3.0
     },
     "range": {
-        "lower_hard": -0.488,
+        "lower_hard": -0.495,
         "upper_hard": 0.005,
-        "lower": -0.478,
+        "lower": -0.492,
         "upper": -0.005
     },
     "loop": {% include 'y2024/control_loops/superstructure/climber/integral_climber_plant.json' %}
@@ -158,7 +183,7 @@
       "max_acceleration": 3.0
     },
     "default_profile_params":{
-      "max_velocity": 3.0,
+      "max_velocity": 12.0,
       "max_acceleration": 30.0
     },
     "range": {
@@ -196,7 +221,7 @@
             "storage_order": "ColMajor",
             // The data field contains the x, y and z
             // coordinates of the speaker on the red alliance
-            "data": [8.0645, 1.4435, 2.0705]
+            "data": [8.309, 1.4435, 2.0705]
         },
         "theta": 0.0
     },
@@ -207,7 +232,7 @@
             "storage_order": "ColMajor",
             // The data field contains the x, y and z
             // coordinates of the speaker on the blue alliance
-            "data": [-8.0645, 1.4435, 2.0705]
+            "data": [-8.309, 1.4435, 2.0705]
         },
         "theta": 0.0
     }
@@ -215,7 +240,7 @@
   "altitude_loading_position": 0.02,
   "turret_loading_position": 0.58,
   "catapult_return_position": 0.0,
-  "min_altitude_shooting_angle": 0.55,
+  "min_altitude_shooting_angle": 0.4,
   "max_altitude_shooting_angle": 0.89,
   "retention_roller_voltages": {
     "retaining": 1.5,
@@ -223,8 +248,8 @@
   },
   // TODO(Filip): Update the speaker and amp shooter setpoints
   "shooter_speaker_set_point": {
-    "turret_position": 0.0,
-    "altitude_position": 0.75,
+    "turret_position": 0.22,
+    "altitude_position": 0.85,
     "shot_velocity": 0.0
   },
   "shooter_podium_set_point":{
@@ -233,10 +258,15 @@
     "shot_velocity": 0.0
   },
   "extend_set_points": {
-    "trap": 0.46,
+    "trap": 0.40,
     "amp": 0.35,
     "catapult": 0.017,
     "retracted": 0.017
   },
-  "turret_avoid_extend_collision_position": 0.0
+  "turret_avoid_extend_collision_position": 0.0,
+  "autonomous_mode": "FOUR_PIECE",
+  "ignore_targets": {
+    "red": [1, 2, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16],
+    "blue": [1, 2, 5, 6, 9, 10, 11, 12, 13, 14, 15, 16]
+  }
 }