diff --git a/mirror-autos.py b/mirror-autos.py index 3bf193e4..be2637a8 100644 --- a/mirror-autos.py +++ b/mirror-autos.py @@ -82,53 +82,56 @@ def replace_outpost_with_depot(obj): def main(): base_path = "src/main/deploy/pathplanner" - - # Define outpost paths to mirror (based on the original outpost files) - outpost_paths = [ - "1st outpost shoot", - "fast outpost shoot", - "outpost flex pickup", - "outpost flex bump", - "outpost flex center", - "2nd outpost cleanup", - "2nd outpost shoot", - "outpost center half neutral zone" - ] - - # Define outpost autos to mirror - outpost_autos = [ - "outpost cleanup", - "outpost fast", - "outpost shoot", - "outpost flex", - "outpost center flex" - ] - + + # Automatically find all files with "outpost" in the name + paths_dir = os.path.join(base_path, "paths") + autos_dir = os.path.join(base_path, "autos") + + outpost_paths = [] + outpost_autos = [] + + # Scan for all .path files containing "outpost" + if os.path.exists(paths_dir): + for filename in os.listdir(paths_dir): + if filename.endswith(".path") and "outpost" in filename: + # Remove the .path extension to get the path name + path_name = filename[:-5] + outpost_paths.append(path_name) + + # Scan for all .auto files containing "outpost" + if os.path.exists(autos_dir): + for filename in os.listdir(autos_dir): + if filename.endswith(".auto") and "outpost" in filename: + # Remove the .auto extension to get the auto name + auto_name = filename[:-5] + outpost_autos.append(auto_name) + + # Sort for consistent output + outpost_paths.sort() + outpost_autos.sort() + # Mirror paths print(f"Mirroring outpost paths to depot paths (field width: {FIELD_WIDTH} m)...") + print(f"Found {len(outpost_paths)} outpost path(s) to mirror") for path_name in outpost_paths: input_file = os.path.join(base_path, "paths", f"{path_name}.path") output_name = path_name.replace("outpost", "depot") output_file = os.path.join(base_path, "paths", f"{output_name}.path") - - if os.path.exists(input_file): - mirror_path(input_file, output_file) - else: - print(f"Warning: Input file not found: {input_file}") - + + mirror_path(input_file, output_file) + # Mirror autos - print("\nMirroring outpost autos to depot autos...") + print(f"\nMirroring outpost autos to depot autos...") + print(f"Found {len(outpost_autos)} outpost auto(s) to mirror") for auto_name in outpost_autos: input_file = os.path.join(base_path, "autos", f"{auto_name}.auto") output_name = auto_name.replace("outpost", "depot") output_file = os.path.join(base_path, "autos", f"{output_name}.auto") - - if os.path.exists(input_file): - mirror_auto(input_file, output_file) - else: - print(f"Warning: Input file not found: {input_file}") - + + mirror_auto(input_file, output_file) + print("\nMirroring complete!") + print(f"Total: {len(outpost_paths)} path(s) and {len(outpost_autos)} auto(s) mirrored") if __name__ == "__main__": main() diff --git a/src/main/deploy/pathplanner/autos/depot flex.auto b/src/main/deploy/pathplanner/autos/depot flex.auto index 8897b00e..defca682 100644 --- a/src/main/deploy/pathplanner/autos/depot flex.auto +++ b/src/main/deploy/pathplanner/autos/depot flex.auto @@ -27,6 +27,18 @@ "data": { "name": "snap to hub flex command" } + }, + { + "type": "path", + "data": { + "pathName": "depot flex end" + } + }, + { + "type": "named", + "data": { + "name": "pointwheelsinx" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/outpost flex.auto b/src/main/deploy/pathplanner/autos/outpost flex.auto index 08f6350d..d90da7b1 100644 --- a/src/main/deploy/pathplanner/autos/outpost flex.auto +++ b/src/main/deploy/pathplanner/autos/outpost flex.auto @@ -27,6 +27,18 @@ "data": { "name": "snap to hub flex command" } + }, + { + "type": "path", + "data": { + "pathName": "outpost flex end" + } + }, + { + "type": "named", + "data": { + "name": "pointwheelsinx" + } } ] } diff --git a/src/main/deploy/pathplanner/paths/1st depot cleanup.path b/src/main/deploy/pathplanner/paths/1st depot cleanup.path index 5037a55b..65d0d2ae 100644 --- a/src/main/deploy/pathplanner/paths/1st depot cleanup.path +++ b/src/main/deploy/pathplanner/paths/1st depot cleanup.path @@ -3,13 +3,13 @@ "waypoints": [ { "anchor": { - "x": 3.6785093315972226, - "y": 5.450531394675927 + "x": 3.679, + "y": 5.4510000000000005 }, "prevControl": null, "nextControl": { - "x": 4.678509331597217, - "y": 5.450531394675927 + "x": 4.678999999999995, + "y": 5.4510000000000005 }, "isLocked": false, "linkedName": "depot neutral zone start" @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": { - "x": 2.784650735294118, + "x": 3.2209916513480397, "y": 5.456189338235294 }, "nextControl": null, @@ -209,7 +209,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/1st depot shoot.path b/src/main/deploy/pathplanner/paths/1st depot shoot.path index 8d09a14b..ef73601a 100644 --- a/src/main/deploy/pathplanner/paths/1st depot shoot.path +++ b/src/main/deploy/pathplanner/paths/1st depot shoot.path @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": { - "x": 2.784650735294118, + "x": 3.2209916513480397, "y": 5.456189338235294 }, "nextControl": null, @@ -209,7 +209,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/1st outpost cleanup.path b/src/main/deploy/pathplanner/paths/1st outpost cleanup.path index d1fab602..3c4ec84d 100644 --- a/src/main/deploy/pathplanner/paths/1st outpost cleanup.path +++ b/src/main/deploy/pathplanner/paths/1st outpost cleanup.path @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": { - "x": 2.784650735294118, + "x": 3.2209916513480397, "y": 2.612810661764706 }, "nextControl": null, @@ -209,7 +209,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/1st outpost shoot.path b/src/main/deploy/pathplanner/paths/1st outpost shoot.path index af4cb15c..b1af8e2c 100644 --- a/src/main/deploy/pathplanner/paths/1st outpost shoot.path +++ b/src/main/deploy/pathplanner/paths/1st outpost shoot.path @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": { - "x": 2.784650735294118, + "x": 3.2209916513480397, "y": 2.612810661764706 }, "nextControl": null, @@ -209,7 +209,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/2nd depot cleanup.path b/src/main/deploy/pathplanner/paths/2nd depot cleanup.path index 3ba33aa3..34a5e9b9 100644 --- a/src/main/deploy/pathplanner/paths/2nd depot cleanup.path +++ b/src/main/deploy/pathplanner/paths/2nd depot cleanup.path @@ -3,12 +3,12 @@ "waypoints": [ { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": null, "nextControl": { - "x": 2.7995968007915564, + "x": 3.235937716845478, "y": 5.477166845316624 }, "isLocked": false, @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": { - "x": 2.499528231040933, + "x": 2.9358691470948544, "y": 5.385230633327382 }, "nextControl": null, @@ -179,8 +179,8 @@ }, { "name": "intaking", - "minWaypointRelativePos": 2.07, - "maxWaypointRelativePos": 5.02, + "minWaypointRelativePos": 2.070397418478261, + "maxWaypointRelativePos": 5.023437499999998, "constraints": { "maxVelocity": 2.75, "maxAcceleration": 3.0, @@ -216,13 +216,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "reversed": false, "folder": null, "idealStartingState": { "velocity": 0.0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/2nd depot shoot.path b/src/main/deploy/pathplanner/paths/2nd depot shoot.path index e36fc8cc..bbf2005c 100644 --- a/src/main/deploy/pathplanner/paths/2nd depot shoot.path +++ b/src/main/deploy/pathplanner/paths/2nd depot shoot.path @@ -3,12 +3,12 @@ "waypoints": [ { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": null, "nextControl": { - "x": 2.7995968007915564, + "x": 3.235937716845478, "y": 5.477166845316624 }, "isLocked": false, @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": { - "x": 2.499528231040932, + "x": 2.9358691470948535, "y": 5.385230633327382 }, "nextControl": null, @@ -217,13 +217,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "reversed": false, "folder": null, "idealStartingState": { "velocity": 0.0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/2nd outpost cleanup.path b/src/main/deploy/pathplanner/paths/2nd outpost cleanup.path index 1092bd55..02e85db3 100644 --- a/src/main/deploy/pathplanner/paths/2nd outpost cleanup.path +++ b/src/main/deploy/pathplanner/paths/2nd outpost cleanup.path @@ -3,12 +3,12 @@ "waypoints": [ { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": null, "nextControl": { - "x": 2.7995968007915564, + "x": 3.235937716845478, "y": 2.591833154683377 }, "isLocked": false, @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": { - "x": 2.499528231040933, + "x": 2.9358691470948544, "y": 2.683769366672619 }, "nextControl": null, @@ -216,13 +216,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "reversed": false, "folder": null, "idealStartingState": { "velocity": 0.0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/2nd outpost shoot.path b/src/main/deploy/pathplanner/paths/2nd outpost shoot.path index 8f75326d..8c428397 100644 --- a/src/main/deploy/pathplanner/paths/2nd outpost shoot.path +++ b/src/main/deploy/pathplanner/paths/2nd outpost shoot.path @@ -3,12 +3,12 @@ "waypoints": [ { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": null, "nextControl": { - "x": 2.7995968007915564, + "x": 3.235937716845478, "y": 2.591833154683377 }, "isLocked": false, @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": { - "x": 2.499528231040932, + "x": 2.9358691470948535, "y": 2.683769366672619 }, "nextControl": null, @@ -217,13 +217,13 @@ }, "goalEndState": { "velocity": 0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "reversed": false, "folder": null, "idealStartingState": { "velocity": 0.0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "useDefaultConstraints": true } \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/depot center half neutral zone.path b/src/main/deploy/pathplanner/paths/depot center half neutral zone.path index 7884c15f..bdd4941b 100644 --- a/src/main/deploy/pathplanner/paths/depot center half neutral zone.path +++ b/src/main/deploy/pathplanner/paths/depot center half neutral zone.path @@ -64,11 +64,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": { - "x": 1.2582072610294124, + "x": 1.694548177083334, "y": 5.450531394675927 }, "nextControl": null, @@ -103,7 +103,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/depot flex end.path b/src/main/deploy/pathplanner/paths/depot flex end.path new file mode 100644 index 00000000..8b4df297 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/depot flex end.path @@ -0,0 +1,106 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.262, + "y": 5.4510000000000005 + }, + "prevControl": null, + "nextControl": { + "x": 4.2620000000000005, + "y": 5.4510000000000005 + }, + "isLocked": false, + "linkedName": "depot close shooting point" + }, + { + "anchor": { + "x": 5.579246455439816, + "y": 5.4510000000000005 + }, + "prevControl": { + "x": 5.330279811824501, + "y": 5.473707055443743 + }, + "nextControl": { + "x": 6.062664858217593, + "y": 5.406909722222222 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 8.286861906828703, + "y": 5.000574363425927 + }, + "prevControl": { + "x": 8.326621889467594, + "y": 5.528542317708334 + }, + "nextControl": { + "x": 8.233306281551972, + "y": 4.289415755172091 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 8.286861906828703, + "y": 4.060769097222223 + }, + "prevControl": { + "x": 8.365200882523148, + "y": 4.792260923032408 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.11811879139072848, + "rotationDegrees": -0.0 + }, + { + "waypointRelativePos": 0.9937913907284766, + "rotationDegrees": -0.0 + }, + { + "waypointRelativePos": 2.0809188741721845, + "rotationDegrees": -90.0 + } + ], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [ + { + "name": "intake trigger", + "waypointRelativePos": 0.21410218917112303, + "endWaypointRelativePos": null, + "command": null + } + ], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": -0.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": -46.24 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/depot flex pickup.path b/src/main/deploy/pathplanner/paths/depot flex pickup.path index e776aa1a..b1fa8dab 100644 --- a/src/main/deploy/pathplanner/paths/depot flex pickup.path +++ b/src/main/deploy/pathplanner/paths/depot flex pickup.path @@ -16,32 +16,32 @@ }, { "anchor": { - "x": 7.407549551504631, - "y": 5.576766059027778 + "x": 8.119423828125, + "y": 5.4510000000000005 }, "prevControl": { - "x": 6.930470304294506, - "y": 5.918058125183217 + "x": 7.642344580914876, + "y": 5.79229206615544 }, "nextControl": { - "x": 7.759287615740742, - "y": 5.325140335648149 + "x": 8.471161892361113, + "y": 5.199374276620371 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 6.952868561921297, - "y": 4.385803674768519 + "x": 7.534702763310186, + "y": 3.946934823495371 }, "prevControl": { - "x": 7.832411026228868, - "y": 4.399262124437204 + "x": 8.414245227617757, + "y": 3.9603932731640556 }, "nextControl": { - "x": 5.456423538773148, - "y": 4.362905598958334 + "x": 6.038257740162037, + "y": 3.924036747685186 }, "isLocked": false, "linkedName": null @@ -52,12 +52,12 @@ "y": 5.4510000000000005 }, "prevControl": { - "x": 5.5497217158564816, - "y": 4.663795500578704 + "x": 5.730938006365741, + "y": 4.527653645833334 }, "nextControl": { - "x": 5.563800393852754, - "y": 5.7466030708936815 + "x": 5.506129009841022, + "y": 5.741686255974937 }, "isLocked": false, "linkedName": null diff --git a/src/main/deploy/pathplanner/paths/depot half neutral zone cleanup.path b/src/main/deploy/pathplanner/paths/depot half neutral zone cleanup.path index b8ec5dac..38bdc1da 100644 --- a/src/main/deploy/pathplanner/paths/depot half neutral zone cleanup.path +++ b/src/main/deploy/pathplanner/paths/depot half neutral zone cleanup.path @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": { - "x": 2.784650735294118, + "x": 3.2209916513480397, "y": 5.456189338235294 }, "nextControl": null, @@ -209,7 +209,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/depot neutral zone.path b/src/main/deploy/pathplanner/paths/depot neutral zone.path index 5d5bf4d4..c8be99dd 100644 --- a/src/main/deploy/pathplanner/paths/depot neutral zone.path +++ b/src/main/deploy/pathplanner/paths/depot neutral zone.path @@ -96,11 +96,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 5.450531394675927 }, "prevControl": { - "x": 2.5500429091775603, + "x": 2.986383825231482, "y": 5.672098162615741 }, "nextControl": null, @@ -175,7 +175,7 @@ "eventMarkers": [ { "name": "deploy intake trigger", - "waypointRelativePos": 0.0, + "waypointRelativePos": 0, "endWaypointRelativePos": null, "command": null }, @@ -202,7 +202,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/fast depot shoot.path b/src/main/deploy/pathplanner/paths/fast depot shoot.path index 423ebc14..2b3e5b15 100644 --- a/src/main/deploy/pathplanner/paths/fast depot shoot.path +++ b/src/main/deploy/pathplanner/paths/fast depot shoot.path @@ -52,8 +52,8 @@ "y": 4.698437861689815 }, "prevControl": { - "x": 8.435368383031335, - "y": 4.888773162682818 + "x": 8.435368383031337, + "y": 4.888773162682821 }, "nextControl": { "x": 7.892280164930556, @@ -112,12 +112,12 @@ }, { "anchor": { - "x": 2.2582072610294124, - "y": 5.450531394675927 + "x": 2.695, + "y": 5.4510000000000005 }, "prevControl": { - "x": 2.784650735294118, - "y": 5.456189338235294 + "x": 3.2214434742647056, + "y": 5.456657943559369 }, "nextControl": null, "isLocked": false, @@ -209,7 +209,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": -29.500000000000004 + "rotation": -36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/fast outpost shoot.path b/src/main/deploy/pathplanner/paths/fast outpost shoot.path index b33ced74..c7de8357 100644 --- a/src/main/deploy/pathplanner/paths/fast outpost shoot.path +++ b/src/main/deploy/pathplanner/paths/fast outpost shoot.path @@ -52,8 +52,8 @@ "y": 3.3705621383101856 }, "prevControl": { - "x": 8.435368383031335, - "y": 3.180226837317183 + "x": 8.435368383031337, + "y": 3.1802268373171807 }, "nextControl": { "x": 7.892280164930556, @@ -112,12 +112,12 @@ }, { "anchor": { - "x": 2.2582072610294124, - "y": 2.618468605324074 + "x": 2.695, + "y": 2.618 }, "prevControl": { - "x": 2.784650735294118, - "y": 2.612810661764706 + "x": 3.2214434742647056, + "y": 2.612342056440632 }, "nextControl": null, "isLocked": false, @@ -209,7 +209,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/outpost center half neutral zone.path b/src/main/deploy/pathplanner/paths/outpost center half neutral zone.path index 9e800ccd..c6aa7f2b 100644 --- a/src/main/deploy/pathplanner/paths/outpost center half neutral zone.path +++ b/src/main/deploy/pathplanner/paths/outpost center half neutral zone.path @@ -64,11 +64,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": { - "x": 1.2582072610294124, + "x": 1.694548177083334, "y": 2.618468605324074 }, "nextControl": null, @@ -103,7 +103,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/outpost flex end.path b/src/main/deploy/pathplanner/paths/outpost flex end.path new file mode 100644 index 00000000..54c0ee58 --- /dev/null +++ b/src/main/deploy/pathplanner/paths/outpost flex end.path @@ -0,0 +1,106 @@ +{ + "version": "2025.0", + "waypoints": [ + { + "anchor": { + "x": 3.262, + "y": 2.618 + }, + "prevControl": null, + "nextControl": { + "x": 4.2620000000000005, + "y": 2.6180000000000003 + }, + "isLocked": false, + "linkedName": "outpost close shooting point" + }, + { + "anchor": { + "x": 5.579246455439816, + "y": 2.618 + }, + "prevControl": { + "x": 5.330279811824501, + "y": 2.5952929445562574 + }, + "nextControl": { + "x": 6.062664858217593, + "y": 2.6620902777777786 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 8.286861906828703, + "y": 3.068425636574074 + }, + "prevControl": { + "x": 8.326621889467594, + "y": 2.540457682291667 + }, + "nextControl": { + "x": 8.233306281551972, + "y": 3.77958424482791 + }, + "isLocked": false, + "linkedName": null + }, + { + "anchor": { + "x": 8.286861906828703, + "y": 4.008230902777778 + }, + "prevControl": { + "x": 8.365200882523148, + "y": 3.2767390769675933 + }, + "nextControl": null, + "isLocked": false, + "linkedName": null + } + ], + "rotationTargets": [ + { + "waypointRelativePos": 0.11811879139072848, + "rotationDegrees": 0.0 + }, + { + "waypointRelativePos": 0.9937913907284766, + "rotationDegrees": 0.0 + }, + { + "waypointRelativePos": 2.0809188741721845, + "rotationDegrees": 90.0 + } + ], + "constraintZones": [], + "pointTowardsZones": [], + "eventMarkers": [ + { + "name": "intake trigger", + "waypointRelativePos": 0.21410218917112303, + "endWaypointRelativePos": null, + "command": null + } + ], + "globalConstraints": { + "maxVelocity": 3.0, + "maxAcceleration": 3.0, + "maxAngularVelocity": 540.0, + "maxAngularAcceleration": 720.0, + "nominalVoltage": 12.0, + "unlimited": false + }, + "goalEndState": { + "velocity": 0, + "rotation": 0.0 + }, + "reversed": false, + "folder": null, + "idealStartingState": { + "velocity": 0, + "rotation": 46.24 + }, + "useDefaultConstraints": true +} \ No newline at end of file diff --git a/src/main/deploy/pathplanner/paths/outpost flex pickup.path b/src/main/deploy/pathplanner/paths/outpost flex pickup.path index 3fa2752f..ea1633d1 100644 --- a/src/main/deploy/pathplanner/paths/outpost flex pickup.path +++ b/src/main/deploy/pathplanner/paths/outpost flex pickup.path @@ -16,32 +16,32 @@ }, { "anchor": { - "x": 7.407549551504631, - "y": 2.4922339409722225 + "x": 8.119423828125, + "y": 2.618 }, "prevControl": { - "x": 6.930470304294506, - "y": 2.1509418748167835 + "x": 7.642344580914876, + "y": 2.276707933844561 }, "nextControl": { - "x": 7.759287615740742, - "y": 2.7438596643518527 + "x": 8.471161892361113, + "y": 2.86962572337963 }, "isLocked": false, "linkedName": null }, { "anchor": { - "x": 6.952868561921297, - "y": 3.6831963252314814 + "x": 7.534702763310186, + "y": 4.12206517650463 }, "prevControl": { - "x": 7.832411026228868, - "y": 3.6697378755627974 + "x": 8.414245227617757, + "y": 4.108606726835945 }, "nextControl": { - "x": 5.456423538773148, - "y": 3.7060944010416668 + "x": 6.038257740162037, + "y": 4.144963252314815 }, "isLocked": false, "linkedName": null @@ -52,12 +52,12 @@ "y": 2.618 }, "prevControl": { - "x": 5.5497217158564816, - "y": 3.405204499421296 + "x": 5.730938006365741, + "y": 3.5413463541666665 }, "nextControl": { - "x": 5.563800393852754, - "y": 2.3223969291063193 + "x": 5.506129009841022, + "y": 2.3273137440250635 }, "isLocked": false, "linkedName": null diff --git a/src/main/deploy/pathplanner/paths/outpost half neutral zone cleanup.path b/src/main/deploy/pathplanner/paths/outpost half neutral zone cleanup.path index d6463e02..741016ae 100644 --- a/src/main/deploy/pathplanner/paths/outpost half neutral zone cleanup.path +++ b/src/main/deploy/pathplanner/paths/outpost half neutral zone cleanup.path @@ -112,11 +112,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": { - "x": 2.784650735294118, + "x": 3.2209916513480397, "y": 2.612810661764706 }, "nextControl": null, @@ -209,7 +209,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "reversed": false, "folder": null, diff --git a/src/main/deploy/pathplanner/paths/outpost neutral zone.path b/src/main/deploy/pathplanner/paths/outpost neutral zone.path index 7c96ba5e..cf1bacdc 100644 --- a/src/main/deploy/pathplanner/paths/outpost neutral zone.path +++ b/src/main/deploy/pathplanner/paths/outpost neutral zone.path @@ -96,11 +96,11 @@ }, { "anchor": { - "x": 2.2582072610294124, + "x": 2.694548177083334, "y": 2.618468605324074 }, "prevControl": { - "x": 2.5500429091775603, + "x": 2.986383825231482, "y": 2.39690183738426 }, "nextControl": null, @@ -202,7 +202,7 @@ }, "goalEndState": { "velocity": 0, - "rotation": 29.500000000000004 + "rotation": 36.37 }, "reversed": false, "folder": null, diff --git a/src/main/java/frc/robot/Constants.java b/src/main/java/frc/robot/Constants.java index b6abb442..60e559d8 100644 --- a/src/main/java/frc/robot/Constants.java +++ b/src/main/java/frc/robot/Constants.java @@ -360,7 +360,7 @@ public static class ColumnConstants { // Motor limits public static final int INFLUENCER_STATOR_LIMIT = 80; public static final int FOLLOWER_STATOR_LIMIT = 80; - public static final int INFLUENCER_SUPPLY_LIMIT = 35; + public static final int INFLUENCER_SUPPLY_LIMIT = 40; public static final int FOLLOWER_SUPPLY_LIMIT = INFLUENCER_SUPPLY_LIMIT; public static final boolean IS_INFLUENCER_INVERTED = false; @@ -445,7 +445,7 @@ public static class ShooterConstants { public static final int INFLUENCER_MOTOR_STATOR_LIMIT = 80; public static final int FOLLOWER_MOTOR_STATOR_LIMIT = 80; public static final int THIRD_MOTOR_STATOR_LIMIT = 80; - public static final int INFLUENCER_MOTOR_SUPPLY_LIMIT = 35; + public static final int INFLUENCER_MOTOR_SUPPLY_LIMIT = 40; public static final int FOLLOWER_MOTOR_SUPPLY_LIMIT = INFLUENCER_MOTOR_SUPPLY_LIMIT; public static final int THIRD_MOTOR_SUPPLY_LIMIT = INFLUENCER_MOTOR_SUPPLY_LIMIT; @@ -725,7 +725,7 @@ public static class SensorConstants { // placeholder constants } public static class AutoConstants { - public static final double AUTO_SHOOT_TIMEOUT = 2.53; // in seconds + public static final double AUTO_SHOOT_TIMEOUT = 2.7; // in seconds public static final double AUTO_SHOOT_CLEANUP_TIMEOUT = 5; public static final double AUTO_SHOOT_FLEX_TIMEOUT = 5; diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 1ca9709d..e1ea385c 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -187,7 +187,6 @@ private void configureBindingsCompetition() { // x (on true): intake + set scoreMode to false m_driverJoystick.x().and(m_driverJoystick.leftBumper().negate()).onTrue(m_robotCommandFactory.intakeModeCommand()); - m_driverJoystick.x().and(m_driverJoystick.leftBumper().negate()).whileTrue(m_pivot.repeatingZeroPivotCommand()); m_driverJoystick.x().and(m_driverJoystick.leftBumper().negate()).onTrue( Commands.runOnce(() -> scoreMode = false)); diff --git a/src/main/java/frc/robot/subsystems/RobotCommandFactory.java b/src/main/java/frc/robot/subsystems/RobotCommandFactory.java index 64a7411b..43770b45 100644 --- a/src/main/java/frc/robot/subsystems/RobotCommandFactory.java +++ b/src/main/java/frc/robot/subsystems/RobotCommandFactory.java @@ -391,6 +391,7 @@ public Command neutralModeCommand() { // intake mode public Command intakeModeCommand() { return Commands.parallel( + m_pivot.deployPivotCommand(), m_roller.velocityCommand(RollerConstants.INTAKE_VELOCITY), m_indexer.velocityCommand(IndexerConstants.INTAKE_VELOCITY), m_column.velocityCommand(ColumnConstants.INTAKE_VELOCITY) // will run backwards @@ -399,8 +400,10 @@ public Command intakeModeCommand() { public Command autoIntakeModeCommand() { return Commands.parallel( - intakeModeCommand(), - m_pivot.repeatingZeroPivotCommand() + m_pivot.repeatingZeroPivotCommand(), + m_roller.velocityCommand(RollerConstants.INTAKE_VELOCITY), + m_indexer.velocityCommand(IndexerConstants.INTAKE_VELOCITY), + m_column.velocityCommand(ColumnConstants.INTAKE_VELOCITY) // will run backwards ).withName("autoIntakeModeCommand"); } diff --git a/src/main/java/frc/robot/utils/ShooterLookupTable.java b/src/main/java/frc/robot/utils/ShooterLookupTable.java index 881c5811..85a01296 100644 --- a/src/main/java/frc/robot/utils/ShooterLookupTable.java +++ b/src/main/java/frc/robot/utils/ShooterLookupTable.java @@ -31,7 +31,7 @@ public class ShooterLookupTable { DISTANCE_TO_VELOCITY_MAP.put(4.5, 57.); DISTANCE_TO_VELOCITY_MAP.put(5.1, 63.); // corner DISTANCE_TO_VELOCITY_MAP.put(5.6, 65.); // bogus - DISTANCE_TO_VELOCITY_MAP.put(10.0, 65.); // bogus for shuttling + DISTANCE_TO_VELOCITY_MAP.put(10.0, 70.); // bogus for shuttling } /**