Merge branch 'main' of https://git.demerso.net/pls5618/2024/robot
This commit is contained in:
		
							
								
								
									
										13
									
								
								.gitlab-ci.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								.gitlab-ci.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | |||||||
|  | default: | ||||||
|  |   image: gradle:jdk17 | ||||||
|  |   tags: | ||||||
|  |     - robot | ||||||
|  |  | ||||||
|  | stages:          # List of stages for jobs, and their order of execution | ||||||
|  |   - build | ||||||
|  |  | ||||||
|  | build-job:       # This job runs in the build stage, which runs first. | ||||||
|  |   stage: build | ||||||
|  |   script: | ||||||
|  |     - chmod +x gradlew | ||||||
|  |     - ./gradlew build | ||||||
							
								
								
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							| @@ -25,5 +25,6 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|   ], |   ], | ||||||
|   "java.test.defaultConfig": "WPIlibUnitTests" |   "java.test.defaultConfig": "WPIlibUnitTests", | ||||||
|  |   "java.debug.settings.onBuildFailureProceed": true | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								networktables.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								networktables.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | [] | ||||||
							
								
								
									
										92
									
								
								simgui-ds.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								simgui-ds.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,92 @@ | |||||||
|  | { | ||||||
|  |   "keyboardJoysticks": [ | ||||||
|  |     { | ||||||
|  |       "axisConfig": [ | ||||||
|  |         { | ||||||
|  |           "decKey": 65, | ||||||
|  |           "incKey": 68 | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "decKey": 87, | ||||||
|  |           "incKey": 83 | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "decKey": 69, | ||||||
|  |           "decayRate": 0.0, | ||||||
|  |           "incKey": 82, | ||||||
|  |           "keyRate": 0.009999999776482582 | ||||||
|  |         } | ||||||
|  |       ], | ||||||
|  |       "axisCount": 3, | ||||||
|  |       "buttonCount": 4, | ||||||
|  |       "buttonKeys": [ | ||||||
|  |         90, | ||||||
|  |         88, | ||||||
|  |         67, | ||||||
|  |         86 | ||||||
|  |       ], | ||||||
|  |       "povConfig": [ | ||||||
|  |         { | ||||||
|  |           "key0": 328, | ||||||
|  |           "key135": 323, | ||||||
|  |           "key180": 322, | ||||||
|  |           "key225": 321, | ||||||
|  |           "key270": 324, | ||||||
|  |           "key315": 327, | ||||||
|  |           "key45": 329, | ||||||
|  |           "key90": 326 | ||||||
|  |         } | ||||||
|  |       ], | ||||||
|  |       "povCount": 1 | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "axisConfig": [ | ||||||
|  |         { | ||||||
|  |           "decKey": 74, | ||||||
|  |           "incKey": 76 | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "decKey": 73, | ||||||
|  |           "incKey": 75 | ||||||
|  |         } | ||||||
|  |       ], | ||||||
|  |       "axisCount": 2, | ||||||
|  |       "buttonCount": 4, | ||||||
|  |       "buttonKeys": [ | ||||||
|  |         77, | ||||||
|  |         44, | ||||||
|  |         46, | ||||||
|  |         47 | ||||||
|  |       ], | ||||||
|  |       "povCount": 0 | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "axisConfig": [ | ||||||
|  |         { | ||||||
|  |           "decKey": 263, | ||||||
|  |           "incKey": 262 | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "decKey": 265, | ||||||
|  |           "incKey": 264 | ||||||
|  |         } | ||||||
|  |       ], | ||||||
|  |       "axisCount": 2, | ||||||
|  |       "buttonCount": 6, | ||||||
|  |       "buttonKeys": [ | ||||||
|  |         260, | ||||||
|  |         268, | ||||||
|  |         266, | ||||||
|  |         261, | ||||||
|  |         269, | ||||||
|  |         267 | ||||||
|  |       ], | ||||||
|  |       "povCount": 0 | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       "axisCount": 0, | ||||||
|  |       "buttonCount": 0, | ||||||
|  |       "povCount": 0 | ||||||
|  |     } | ||||||
|  |   ] | ||||||
|  | } | ||||||
							
								
								
									
										12
									
								
								simgui.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								simgui.json
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | |||||||
|  | { | ||||||
|  |   "NTProvider": { | ||||||
|  |     "types": { | ||||||
|  |       "/FMSInfo": "FMSInfo", | ||||||
|  |       "/SmartDashboard/Field": "Field2d", | ||||||
|  |       "/SmartDashboard/Pigeon IMU [0]": "Gyro" | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "NetworkTables Info": { | ||||||
|  |     "visible": true | ||||||
|  |   } | ||||||
|  | } | ||||||
| @@ -12,9 +12,22 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "1.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|   | |||||||
| @@ -12,15 +12,28 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "1.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "path", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "1.2" |             "pathName": "1.1" | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
							
								
								
									
										63
									
								
								src/main/deploy/pathplanner/autos/1.3.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/main/deploy/pathplanner/autos/1.3.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 1.3, | ||||||
|  |       "y": 5.55 | ||||||
|  |     }, | ||||||
|  |     "rotation": 180.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "1.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "1", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										69
									
								
								src/main/deploy/pathplanner/autos/1.4.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								src/main/deploy/pathplanner/autos/1.4.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 1.3, | ||||||
|  |       "y": 5.55 | ||||||
|  |     }, | ||||||
|  |     "rotation": 180.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "1.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "1.2" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "1", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										88
									
								
								src/main/deploy/pathplanner/autos/1.5.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								src/main/deploy/pathplanner/autos/1.5.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,88 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 1.3, | ||||||
|  |       "y": 5.55 | ||||||
|  |     }, | ||||||
|  |     "rotation": 180.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "1.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "1.2" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "1", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
| @@ -12,9 +12,22 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "2.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|   | |||||||
| @@ -12,15 +12,28 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "2.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "path", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "2.2" |             "pathName": "2.1" | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
							
								
								
									
										63
									
								
								src/main/deploy/pathplanner/autos/2.3.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/main/deploy/pathplanner/autos/2.3.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 0.7, | ||||||
|  |       "y": 4.4 | ||||||
|  |     }, | ||||||
|  |     "rotation": 120.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "2.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "2", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										69
									
								
								src/main/deploy/pathplanner/autos/2.4.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								src/main/deploy/pathplanner/autos/2.4.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 0.7, | ||||||
|  |       "y": 4.4 | ||||||
|  |     }, | ||||||
|  |     "rotation": 120.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "2.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "2.2" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "2", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										88
									
								
								src/main/deploy/pathplanner/autos/2.5.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								src/main/deploy/pathplanner/autos/2.5.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,88 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 0.7, | ||||||
|  |       "y": 4.4 | ||||||
|  |     }, | ||||||
|  |     "rotation": 120.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "2.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "2.2" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "2", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
| @@ -12,9 +12,22 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "3.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|   | |||||||
| @@ -12,15 +12,28 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "3.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "path", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "3.2" |             "pathName": "3.1" | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
							
								
								
									
										63
									
								
								src/main/deploy/pathplanner/autos/3.3.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/main/deploy/pathplanner/autos/3.3.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 0.7, | ||||||
|  |       "y": 6.7 | ||||||
|  |     }, | ||||||
|  |     "rotation": -120.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "3.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "3", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										69
									
								
								src/main/deploy/pathplanner/autos/3.4.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								src/main/deploy/pathplanner/autos/3.4.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 0.7, | ||||||
|  |       "y": 6.7 | ||||||
|  |     }, | ||||||
|  |     "rotation": -120.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "3.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "3.2" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "3", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										88
									
								
								src/main/deploy/pathplanner/autos/3.5.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								src/main/deploy/pathplanner/autos/3.5.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,88 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 0.7, | ||||||
|  |       "y": 6.7 | ||||||
|  |     }, | ||||||
|  |     "rotation": -120.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "3.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "3.2" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "3", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
| @@ -12,9 +12,22 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "4.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|   | |||||||
| @@ -12,15 +12,28 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "4.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "path", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "4.2" |             "pathName": "4.1" | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
							
								
								
									
										63
									
								
								src/main/deploy/pathplanner/autos/4.3.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/main/deploy/pathplanner/autos/4.3.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.2, | ||||||
|  |       "y": 5.55 | ||||||
|  |     }, | ||||||
|  |     "rotation": 0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "4.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "4", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										69
									
								
								src/main/deploy/pathplanner/autos/4.4.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								src/main/deploy/pathplanner/autos/4.4.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.2, | ||||||
|  |       "y": 5.55 | ||||||
|  |     }, | ||||||
|  |     "rotation": 0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "4.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "4.2" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "4", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										88
									
								
								src/main/deploy/pathplanner/autos/4.5.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								src/main/deploy/pathplanner/autos/4.5.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,88 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.2, | ||||||
|  |       "y": 5.55 | ||||||
|  |     }, | ||||||
|  |     "rotation": 0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "4.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "4.2" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "4", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
| @@ -12,9 +12,29 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "5.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "deadline", | ||||||
|  |                 "data": { | ||||||
|  |                   "commands": [ | ||||||
|  |                     { | ||||||
|  |                       "type": "named", | ||||||
|  |                       "data": { | ||||||
|  |                         "name": "lancer" | ||||||
|  |                       } | ||||||
|  |                     } | ||||||
|  |                   ] | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|   | |||||||
							
								
								
									
										51
									
								
								src/main/deploy/pathplanner/autos/5.2.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								src/main/deploy/pathplanner/autos/5.2.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,51 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.85, | ||||||
|  |       "y": 4.4 | ||||||
|  |     }, | ||||||
|  |     "rotation": 60.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "deadline", | ||||||
|  |                 "data": { | ||||||
|  |                   "commands": [ | ||||||
|  |                     { | ||||||
|  |                       "type": "named", | ||||||
|  |                       "data": { | ||||||
|  |                         "name": "lancer" | ||||||
|  |                       } | ||||||
|  |                     } | ||||||
|  |                   ] | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "5.1" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "5", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										70
									
								
								src/main/deploy/pathplanner/autos/5.3.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								src/main/deploy/pathplanner/autos/5.3.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,70 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.85, | ||||||
|  |       "y": 4.4 | ||||||
|  |     }, | ||||||
|  |     "rotation": 60.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "deadline", | ||||||
|  |                 "data": { | ||||||
|  |                   "commands": [ | ||||||
|  |                     { | ||||||
|  |                       "type": "named", | ||||||
|  |                       "data": { | ||||||
|  |                         "name": "lancer" | ||||||
|  |                       } | ||||||
|  |                     } | ||||||
|  |                   ] | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "5.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "5", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										76
									
								
								src/main/deploy/pathplanner/autos/5.4.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										76
									
								
								src/main/deploy/pathplanner/autos/5.4.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,76 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.85, | ||||||
|  |       "y": 4.4 | ||||||
|  |     }, | ||||||
|  |     "rotation": 60.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "deadline", | ||||||
|  |                 "data": { | ||||||
|  |                   "commands": [ | ||||||
|  |                     { | ||||||
|  |                       "type": "named", | ||||||
|  |                       "data": { | ||||||
|  |                         "name": "lancer" | ||||||
|  |                       } | ||||||
|  |                     } | ||||||
|  |                   ] | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "5.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "5.2" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "5", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										95
									
								
								src/main/deploy/pathplanner/autos/5.5.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										95
									
								
								src/main/deploy/pathplanner/autos/5.5.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,95 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.85, | ||||||
|  |       "y": 4.4 | ||||||
|  |     }, | ||||||
|  |     "rotation": 60.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "deadline", | ||||||
|  |                 "data": { | ||||||
|  |                   "commands": [ | ||||||
|  |                     { | ||||||
|  |                       "type": "named", | ||||||
|  |                       "data": { | ||||||
|  |                         "name": "lancer" | ||||||
|  |                       } | ||||||
|  |                     } | ||||||
|  |                   ] | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "5.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "5.2" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "5", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
| @@ -1,31 +0,0 @@ | |||||||
| { |  | ||||||
|   "version": 1.0, |  | ||||||
|   "startingPose": { |  | ||||||
|     "position": { |  | ||||||
|       "x": 15.85, |  | ||||||
|       "y": 4.4 |  | ||||||
|     }, |  | ||||||
|     "rotation": 60.0 |  | ||||||
|   }, |  | ||||||
|   "command": { |  | ||||||
|     "type": "sequential", |  | ||||||
|     "data": { |  | ||||||
|       "commands": [ |  | ||||||
|         { |  | ||||||
|           "type": "path", |  | ||||||
|           "data": { |  | ||||||
|             "pathName": "5.1" |  | ||||||
|           } |  | ||||||
|         }, |  | ||||||
|         { |  | ||||||
|           "type": "path", |  | ||||||
|           "data": { |  | ||||||
|             "pathName": "5.2" |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       ] |  | ||||||
|     } |  | ||||||
|   }, |  | ||||||
|   "folder": "5", |  | ||||||
|   "choreoAuto": false |  | ||||||
| } |  | ||||||
| @@ -12,9 +12,22 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "6.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|   | |||||||
| @@ -12,15 +12,28 @@ | |||||||
|     "data": { |     "data": { | ||||||
|       "commands": [ |       "commands": [ | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "deadline", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "6.1" |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|           } |           } | ||||||
|         }, |         }, | ||||||
|         { |         { | ||||||
|           "type": "path", |           "type": "path", | ||||||
|           "data": { |           "data": { | ||||||
|             "pathName": "6.2" |             "pathName": "6.1" | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
							
								
								
									
										63
									
								
								src/main/deploy/pathplanner/autos/6.3.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										63
									
								
								src/main/deploy/pathplanner/autos/6.3.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,63 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.8, | ||||||
|  |       "y": 6.65 | ||||||
|  |     }, | ||||||
|  |     "rotation": -60.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "6.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "6", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										69
									
								
								src/main/deploy/pathplanner/autos/6.4.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								src/main/deploy/pathplanner/autos/6.4.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,69 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.8, | ||||||
|  |       "y": 6.65 | ||||||
|  |     }, | ||||||
|  |     "rotation": -60.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "6.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "6.2" | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "6", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
							
								
								
									
										88
									
								
								src/main/deploy/pathplanner/autos/6.5.auto
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								src/main/deploy/pathplanner/autos/6.5.auto
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,88 @@ | |||||||
|  | { | ||||||
|  |   "version": 1.0, | ||||||
|  |   "startingPose": { | ||||||
|  |     "position": { | ||||||
|  |       "x": 15.8, | ||||||
|  |       "y": 6.65 | ||||||
|  |     }, | ||||||
|  |     "rotation": -60.0 | ||||||
|  |   }, | ||||||
|  |   "command": { | ||||||
|  |     "type": "sequential", | ||||||
|  |     "data": { | ||||||
|  |       "commands": [ | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "6.1" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "balyer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "path", | ||||||
|  |           "data": { | ||||||
|  |             "pathName": "6.2" | ||||||
|  |           } | ||||||
|  |         }, | ||||||
|  |         { | ||||||
|  |           "type": "deadline", | ||||||
|  |           "data": { | ||||||
|  |             "commands": [ | ||||||
|  |               { | ||||||
|  |                 "type": "named", | ||||||
|  |                 "data": { | ||||||
|  |                   "name": "lancer" | ||||||
|  |                 } | ||||||
|  |               }, | ||||||
|  |               { | ||||||
|  |                 "type": "wait", | ||||||
|  |                 "data": { | ||||||
|  |                   "waitTime": 3.0 | ||||||
|  |                 } | ||||||
|  |               } | ||||||
|  |             ] | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       ] | ||||||
|  |     } | ||||||
|  |   }, | ||||||
|  |   "folder": "6", | ||||||
|  |   "choreoAuto": false | ||||||
|  | } | ||||||
| @@ -43,16 +43,16 @@ public class Constants { | |||||||
|     public static int ArriereGauche = 7; |     public static int ArriereGauche = 7; | ||||||
|  |  | ||||||
|     // Limit switch |     // Limit switch | ||||||
|     public static int guideurhaut = 23; |     public static int guideurhaut = 0; | ||||||
|     public static int guideurbas = 24; |     public static int guideurbas = 1; | ||||||
|     public static int limitacc = 25; |     public static int limitacc = 2; | ||||||
|     public static int limitacc2 = 76; |     public static int limitacc2 = 3; | ||||||
|     public static int limithaut = 28; |     public static int limithaut = 4; | ||||||
|     public static int limitbas = 29; |     public static int limitbas = 5; | ||||||
|  |  | ||||||
|     //piston |     //piston | ||||||
|     public static int pistondroiteouvre= 30; |     public static int pistondroiteouvre= 0; | ||||||
|     public static int pistondroiteferme= 31; |     public static int pistondroiteferme= 1; | ||||||
|     public static int pistondgaucheouvre= 32; |     public static int pistondgaucheouvre= 2; | ||||||
|     public static int pistondgauchferme= 32; |     public static int pistondgauchferme= 3; | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										8
									
								
								src/main/java/frc/robot/PixyException.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								src/main/java/frc/robot/PixyException.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | |||||||
|  | package frc.robot; | ||||||
|  |  | ||||||
|  | public class PixyException extends Exception { | ||||||
|  | 	public PixyException(String message){ | ||||||
|  | 		super(message); | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | } | ||||||
							
								
								
									
										9
									
								
								src/main/java/frc/robot/PixyPacket.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/main/java/frc/robot/PixyPacket.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | |||||||
|  | package frc.robot; | ||||||
|  |  | ||||||
|  | public class PixyPacket { | ||||||
|  | 	public int X; | ||||||
|  | 	public int Y; | ||||||
|  | 	public int Width; | ||||||
|  | 	public int Height; | ||||||
|  |  | ||||||
|  | } | ||||||
| @@ -4,54 +4,88 @@ | |||||||
|  |  | ||||||
| package frc.robot; | package frc.robot; | ||||||
|  |  | ||||||
|  | import com.pathplanner.lib.auto.AutoBuilder; | ||||||
|  | import com.pathplanner.lib.auto.NamedCommands; | ||||||
|  | import com.pathplanner.lib.commands.PathPlannerAuto; | ||||||
|  |  | ||||||
| import edu.wpi.first.cameraserver.CameraServer; | import edu.wpi.first.cameraserver.CameraServer; | ||||||
| import edu.wpi.first.math.MathUtil; | import edu.wpi.first.math.MathUtil; | ||||||
|  | import edu.wpi.first.wpilibj.smartdashboard.SendableChooser; | ||||||
| import edu.wpi.first.wpilibj2.command.Command; | import edu.wpi.first.wpilibj2.command.Command; | ||||||
| import edu.wpi.first.wpilibj2.command.Commands; |  | ||||||
| import edu.wpi.first.wpilibj2.command.RunCommand; | import edu.wpi.first.wpilibj2.command.RunCommand; | ||||||
|  | import edu.wpi.first.wpilibj2.command.SequentialCommandGroup; | ||||||
| // Manette | // Manette | ||||||
|  |  | ||||||
|  | // Manettes | ||||||
| import edu.wpi.first.wpilibj2.command.button.CommandJoystick; | import edu.wpi.first.wpilibj2.command.button.CommandJoystick; | ||||||
| import edu.wpi.first.wpilibj2.command.button.CommandXboxController; | import edu.wpi.first.wpilibj2.command.button.CommandXboxController; | ||||||
|  | import frc.robot.command.AllumeLED; | ||||||
| // Subsystem | // Commands | ||||||
|  | import frc.robot.command.Balayer; | ||||||
|  | import frc.robot.command.GrimpeurDroit; | ||||||
|  | import frc.robot.command.GrimpeurGauche; | ||||||
|  | import frc.robot.command.GuiderBas; | ||||||
|  | import frc.robot.command.GuiderHaut; | ||||||
|  | import frc.robot.command.Lancer; | ||||||
|  | import frc.robot.command.LancerNote; | ||||||
|  | import frc.robot.command.Lancerampli; | ||||||
|  | // Subsystems | ||||||
| import frc.robot.subsystem.Accumulateur; | import frc.robot.subsystem.Accumulateur; | ||||||
| import frc.robot.subsystem.Balayeuse; | import frc.robot.subsystem.Balayeuse; | ||||||
| import frc.robot.subsystem.Drive; | import frc.robot.subsystem.Drive; | ||||||
| import frc.robot.subsystem.Grimpeur; | import frc.robot.subsystem.Grimpeur; | ||||||
| import frc.robot.subsystem.Guideur; | import frc.robot.subsystem.Guideur; | ||||||
|  | import frc.robot.subsystem.LED; | ||||||
| import frc.robot.subsystem.Lanceur; | import frc.robot.subsystem.Lanceur; | ||||||
|  | import frc.robot.subsystem.Pixy; | ||||||
|  |  | ||||||
|  |  | ||||||
| public class RobotContainer { | public class RobotContainer { | ||||||
|    |   private final SendableChooser<Command> autoChooser; | ||||||
|   Drive drive = new Drive(); |   Drive drive = new Drive(); | ||||||
|   Accumulateur accumulateur = new Accumulateur(); |   Accumulateur accumulateur = new Accumulateur(); | ||||||
|   Balayeuse balayeuse = new Balayeuse(); |   Balayeuse balayeuse = new Balayeuse(); | ||||||
|   Grimpeur grimpeur = new Grimpeur(); |   Grimpeur grimpeur = new Grimpeur(); | ||||||
|   Guideur guideur = new Guideur(); |   Guideur guideur = new Guideur(); | ||||||
|   Lanceur lanceur = new Lanceur(); |   Lanceur lanceur = new Lanceur(); | ||||||
|  |   Balayer balayer = new Balayer(balayeuse, accumulateur); | ||||||
|  |   GuiderHaut guiderHaut = new GuiderHaut(guideur); | ||||||
|  |   GuiderBas guiderBas = new GuiderBas(guideur); | ||||||
|  |   Lancer lancer = new Lancer(lanceur); | ||||||
|  |   LancerNote lancernote = new LancerNote(lanceur, accumulateur); | ||||||
|  |   Lancerampli lancerampli = new Lancerampli(lanceur); | ||||||
|    CommandJoystick joystick = new CommandJoystick(0); |    CommandJoystick joystick = new CommandJoystick(0); | ||||||
|    CommandXboxController manette = new CommandXboxController(1); |    CommandXboxController manette = new CommandXboxController(1); | ||||||
|    |    GrimpeurDroit grimpeurDroit = new GrimpeurDroit(grimpeur, manette::getLeftX); | ||||||
|  |   GrimpeurGauche grimpeurGauche = new GrimpeurGauche(grimpeur, manette::getLeftY); | ||||||
|  |   LED LED = new LED(); | ||||||
|  |   AllumeLED allumeLED = new AllumeLED(LED); | ||||||
|  |   Pixy pixy = new Pixy(); | ||||||
|   public RobotContainer() { |   public RobotContainer() { | ||||||
|  |     NamedCommands.registerCommand("balayer",new Balayer(balayeuse, accumulateur)); | ||||||
|  |     NamedCommands.registerCommand("lancer", new LancerNote(lanceur, accumulateur)); | ||||||
|  |     autoChooser = AutoBuilder.buildAutoChooser(); | ||||||
|  |  | ||||||
|     CameraServer.startAutomaticCapture(); |     CameraServer.startAutomaticCapture(); | ||||||
|  |     manette.a().whileTrue(guiderBas); | ||||||
|  |     manette.b().whileTrue(guiderHaut); | ||||||
|  |     joystick.button(3).toggleOnTrue(balayer); | ||||||
|      |      | ||||||
|     configureBindings(); |     configureBindings(); | ||||||
|      drive.setDefaultCommand(new RunCommand(()->{ |      drive.setDefaultCommand(new RunCommand(()->{ | ||||||
|      drive.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2)); |      drive.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2)); | ||||||
|     },drive)); |     },drive)); | ||||||
|  |     grimpeur.setDefaultCommand(new RunCommand(()->{ | ||||||
|  |       grimpeur.droit(manette.getLeftX());} | ||||||
|  |       ,grimpeur)); | ||||||
|  |       LED.setDefaultCommand(allumeLED); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   private void configureBindings() { |   private void configureBindings() { | ||||||
|    |    | ||||||
|      |  | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   public Command getAutonomousCommand() { |   public Command getAutonomousCommand(){ | ||||||
|     return Commands.print("No autonomous command configured"); |     return autoChooser.getSelected(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|   | |||||||
| @@ -5,42 +5,39 @@ | |||||||
| package frc.robot.command; | package frc.robot.command; | ||||||
| 
 | 
 | ||||||
| import edu.wpi.first.wpilibj2.command.Command; | import edu.wpi.first.wpilibj2.command.Command; | ||||||
| import frc.robot.subsystem.Grimpeur; | import frc.robot.subsystem.Accumulateur; | ||||||
|  | import frc.robot.subsystem.LED; | ||||||
| 
 | 
 | ||||||
| public class GrimpeurBas extends Command { | public class AllumeLED extends Command { | ||||||
|   private Grimpeur grimpeur; |   private LED led; | ||||||
|   /** Creates a new GrimpeurBas. */ |   private Accumulateur accumulateur; | ||||||
|   public GrimpeurBas(Grimpeur grimpeur) { |   /** Creates a new AllumeLED. */ | ||||||
|     this.grimpeur = grimpeur; |   public AllumeLED(LED led) { | ||||||
|     addRequirements(grimpeur); |     this.accumulateur = accumulateur; | ||||||
|  |     this.led = led; | ||||||
|  |     addRequirements(led); | ||||||
|     // Use addRequirements() here to declare subsystem dependencies. |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Called when the command is initially scheduled. |   // Called when the command is initially scheduled. | ||||||
|   @Override |   @Override | ||||||
|   public void initialize() { |   public void initialize() {} | ||||||
|     grimpeur.resetencodeurd(); |  | ||||||
|     grimpeur.resetencodeurg(); |  | ||||||
|   } |  | ||||||
| 
 | 
 | ||||||
|   // Called every time the scheduler runs while the command is scheduled. |   // Called every time the scheduler runs while the command is scheduled. | ||||||
|   @Override |   @Override | ||||||
|   public void execute() { |   public void execute() { | ||||||
|     if(grimpeur.droite()){ |    if(accumulateur.limitswitch()){ | ||||||
|       grimpeur.resetencodeurd(); |     led.couleur(0, 255, 0); | ||||||
|       grimpeur.gauche(0); |    } | ||||||
|     } |    else{ | ||||||
|     if(grimpeur.gauche()){ |     led.couleur(255, 0, 0); | ||||||
|       grimpeur.resetencodeurg(); |    } | ||||||
|       grimpeur.gauche(0); |  | ||||||
|     } |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Called once the command ends or is interrupted. |   // Called once the command ends or is interrupted. | ||||||
|   @Override |   @Override | ||||||
|   public void end(boolean interrupted) { |   public void end(boolean interrupted) { | ||||||
|     grimpeur.droit(0); |     led.couleur(255, 0, 0); | ||||||
|     grimpeur.gauche(0); |  | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Returns true when the command should end. |   // Returns true when the command should end. | ||||||
| @@ -14,6 +14,7 @@ public class Balayer extends Command { | |||||||
|   /** Creates a new Balayer. */ |   /** Creates a new Balayer. */ | ||||||
|   public Balayer(Balayeuse balayeuse, Accumulateur accumulateur) { |   public Balayer(Balayeuse balayeuse, Accumulateur accumulateur) { | ||||||
|     this.balayeuse = balayeuse;  |     this.balayeuse = balayeuse;  | ||||||
|  |     this.accumulateur = accumulateur; | ||||||
|     addRequirements(balayeuse, accumulateur);} |     addRequirements(balayeuse, accumulateur);} | ||||||
|     // Use addRequirements() here to declare subsystem dependencies. |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
|   // Called when the command is initially scheduled. |   // Called when the command is initially scheduled. | ||||||
| @@ -25,11 +26,11 @@ public class Balayer extends Command { | |||||||
|   public void execute() { |   public void execute() { | ||||||
|     if(accumulateur.limitswitch()){ |     if(accumulateur.limitswitch()){ | ||||||
|     balayeuse.balaye(0); |     balayeuse.balaye(0); | ||||||
|     accumulateur.Accumuler(0); |     accumulateur.Accumuler(); | ||||||
|   } |   } | ||||||
|   else{ |   else{ | ||||||
|     balayeuse.balaye(0.6); |     balayeuse.balaye(0.6); | ||||||
|     accumulateur.Accumuler(0.6); |     accumulateur.Accumuler(); | ||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -4,13 +4,17 @@ | |||||||
| 
 | 
 | ||||||
| package frc.robot.command; | package frc.robot.command; | ||||||
| 
 | 
 | ||||||
|  | import java.util.function.DoubleSupplier; | ||||||
|  | 
 | ||||||
| import edu.wpi.first.wpilibj2.command.Command; | import edu.wpi.first.wpilibj2.command.Command; | ||||||
| import frc.robot.subsystem.Grimpeur; | import frc.robot.subsystem.Grimpeur; | ||||||
| 
 | 
 | ||||||
| public class GrimpeurHautDroit extends Command { | public class GrimpeurDroit extends Command { | ||||||
|  |   private DoubleSupplier doubleSupplier; | ||||||
|   private Grimpeur grimpeur; |   private Grimpeur grimpeur; | ||||||
|   /** Creates a new GrimpeurHaut. */ |   /** Creates a new GrimpeurHaut. */ | ||||||
|   public GrimpeurHautDroit(Grimpeur grimpeur) { |   public GrimpeurDroit(Grimpeur grimpeur, DoubleSupplier doubleSupplier) { | ||||||
|  |     this.doubleSupplier = doubleSupplier; | ||||||
|     this.grimpeur = grimpeur; |     this.grimpeur = grimpeur; | ||||||
|     addRequirements(grimpeur); |     addRequirements(grimpeur); | ||||||
|     // Use addRequirements() here to declare subsystem dependencies. |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
| @@ -20,26 +24,32 @@ public class GrimpeurHautDroit extends Command { | |||||||
|   @Override |   @Override | ||||||
|   public void initialize() { |   public void initialize() { | ||||||
|     grimpeur.resetencodeurd(); |     grimpeur.resetencodeurd(); | ||||||
|     grimpeur.resetencodeurg(); |     grimpeur.pistonferme(); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Called every time the scheduler runs while the command is scheduled. |   // Called every time the scheduler runs while the command is scheduled. | ||||||
|   @Override |   @Override | ||||||
|   public void execute() { |   public void execute() { | ||||||
|      |     grimpeur.droit(doubleSupplier.getAsDouble()); | ||||||
|   if(grimpeur.encoderd()>261 ){ |   if(grimpeur.encoderd()>261){ | ||||||
|     grimpeur.droit(0); |     grimpeur.droit(0); | ||||||
|  |      | ||||||
|   } |   } | ||||||
|   else if(grimpeur.getpitch()<-15){ |   else if(grimpeur.getpitch()<-15){ | ||||||
|     grimpeur.droit(-0.6); |     grimpeur.droit(-doubleSupplier.getAsDouble()); | ||||||
|      |      | ||||||
|   } |   } | ||||||
|   else if(grimpeur.getpitch()>15){ |   else if(grimpeur.getpitch()>15){ | ||||||
|     grimpeur.droit(0.6); |     grimpeur.droit(doubleSupplier.getAsDouble()); | ||||||
|   } |   } | ||||||
|   else{ |   else{ | ||||||
|     grimpeur.droit(0); |     grimpeur.droit(0); | ||||||
|   } |   } | ||||||
|  |   if(grimpeur.encoderd()>0){ | ||||||
|  |     grimpeur.resetencodeurd(); | ||||||
|  |     grimpeur.droit(0); | ||||||
|  |      | ||||||
|  |   } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Called once the command ends or is interrupted. |   // Called once the command ends or is interrupted. | ||||||
| @@ -4,13 +4,17 @@ | |||||||
| 
 | 
 | ||||||
| package frc.robot.command; | package frc.robot.command; | ||||||
| 
 | 
 | ||||||
|  | import java.util.function.DoubleSupplier; | ||||||
|  | 
 | ||||||
| import edu.wpi.first.wpilibj2.command.Command; | import edu.wpi.first.wpilibj2.command.Command; | ||||||
| import frc.robot.subsystem.Grimpeur; | import frc.robot.subsystem.Grimpeur; | ||||||
| 
 | 
 | ||||||
| public class GrimpeurHautGauche extends Command { | public class GrimpeurGauche extends Command { | ||||||
|  |   private DoubleSupplier doubleSupplier; | ||||||
|   private Grimpeur grimpeur; |   private Grimpeur grimpeur; | ||||||
|   /** Creates a new GrimpeurHautGauche. */ |   /** Creates a new GrimpeurHautGauche. */ | ||||||
|   public GrimpeurHautGauche(Grimpeur grimpeur) { |   public GrimpeurGauche(Grimpeur grimpeur,DoubleSupplier doubleSupplier) { | ||||||
|  |     this.doubleSupplier = doubleSupplier; | ||||||
|     this.grimpeur = grimpeur; |     this.grimpeur = grimpeur; | ||||||
|     addRequirements(grimpeur); |     addRequirements(grimpeur); | ||||||
|     // Use addRequirements() here to declare subsystem dependencies. |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
| @@ -26,19 +30,25 @@ public class GrimpeurHautGauche extends Command { | |||||||
|   // Called every time the scheduler runs while the command is scheduled. |   // Called every time the scheduler runs while the command is scheduled. | ||||||
|   @Override |   @Override | ||||||
|   public void execute() { |   public void execute() { | ||||||
|     if(grimpeur.encoderg()>261 ){ |     grimpeur.gauche(doubleSupplier.getAsDouble()); | ||||||
|  |     if(grimpeur.encoderg()>261){ | ||||||
|       grimpeur.gauche(0); |       grimpeur.gauche(0); | ||||||
|     } |     } | ||||||
|     else if(grimpeur.getpitch()<-15){ |     else if(grimpeur.getpitch()<-15){ | ||||||
|       grimpeur.gauche(0.6); |       grimpeur.gauche(doubleSupplier.getAsDouble()); | ||||||
|        |        | ||||||
|     } |     } | ||||||
|     else if(grimpeur.getpitch()>15){ |     else if(grimpeur.getpitch()>15){ | ||||||
|       grimpeur.gauche(-0.6); |       grimpeur.gauche(-doubleSupplier.getAsDouble()); | ||||||
|     } |     } | ||||||
|     else{ |     else{ | ||||||
|       grimpeur.gauche(0); |       grimpeur.gauche(0); | ||||||
|     } |     } | ||||||
|  |     if(grimpeur.encoderd()>0){ | ||||||
|  |       grimpeur.resetencodeurg(); | ||||||
|  |       grimpeur.gauche(0); | ||||||
|  |        | ||||||
|  |     } | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   // Called once the command ends or is interrupted. |   // Called once the command ends or is interrupted. | ||||||
| @@ -10,7 +10,7 @@ import frc.robot.subsystem.Guideur; | |||||||
| public class GuiderHaut extends Command { | public class GuiderHaut extends Command { | ||||||
|   private Guideur guideur; |   private Guideur guideur; | ||||||
|   /** Creates a new GuiderHaut. */ |   /** Creates a new GuiderHaut. */ | ||||||
|   public GuiderHaut() { |   public GuiderHaut(Guideur guideur) { | ||||||
|     this.guideur = guideur; |     this.guideur = guideur; | ||||||
|     addRequirements(guideur); |     addRequirements(guideur); | ||||||
|     // Use addRequirements() here to declare subsystem dependencies. |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
|   | |||||||
| @@ -4,22 +4,19 @@ | |||||||
|  |  | ||||||
| package frc.robot.command; | package frc.robot.command; | ||||||
|  |  | ||||||
| import com.revrobotics.CANSparkMax; |  | ||||||
|  |  | ||||||
| import edu.wpi.first.wpilibj2.command.Command; | import edu.wpi.first.wpilibj2.command.Command; | ||||||
| import frc.robot.subsystem.Accumulateur; |  | ||||||
| import frc.robot.subsystem.Lanceur; | import frc.robot.subsystem.Lanceur; | ||||||
|  |  | ||||||
| public class Lancer extends Command { | public class Lancer extends Command { | ||||||
|   /** Creates a new Lanceur. */ |   /** Creates a new Lanceur. */ | ||||||
|  |   private Lanceur lanceur; | ||||||
|   private Lanceur lancer; |   public Lancer(Lanceur lanceur) { | ||||||
|   private Lanceur lancer2; |     this.lanceur = lanceur; | ||||||
|   private Lanceur lancer3; |  | ||||||
|   private Lanceur lancer4; |  | ||||||
|   public Lancer() { |  | ||||||
|     // Use addRequirements() here to declare subsystem dependencies. |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
|     addRequirements(lancer,lancer2,lancer3,lancer4); |     addRequirements(lanceur); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   // Called when the command is initially scheduled. |   // Called when the command is initially scheduled. | ||||||
| @@ -29,13 +26,13 @@ public class Lancer extends Command { | |||||||
|   // Called every time the scheduler runs while the command is scheduled. |   // Called every time the scheduler runs while the command is scheduled. | ||||||
|   @Override |   @Override | ||||||
|   public void execute() { |   public void execute() { | ||||||
|     lancer.lancer(0.3); |     lanceur.lancerspeaker(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   // Called once the command ends or is interrupted. |   // Called once the command ends or is interrupted. | ||||||
|   @Override |   @Override | ||||||
|   public void end(boolean interrupted) { |   public void end(boolean interrupted) { | ||||||
|     lancer.lancer(0); |     lanceur.lancer(0); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   // Returns true when the command should end. |   // Returns true when the command should end. | ||||||
|   | |||||||
							
								
								
									
										44
									
								
								src/main/java/frc/robot/command/LancerNote.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								src/main/java/frc/robot/command/LancerNote.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,44 @@ | |||||||
|  | // Copyright (c) FIRST and other WPILib contributors. | ||||||
|  | // Open Source Software; you can modify and/or share it under the terms of | ||||||
|  | // the WPILib BSD license file in the root directory of this project. | ||||||
|  |  | ||||||
|  | package frc.robot.command; | ||||||
|  |  | ||||||
|  | import edu.wpi.first.wpilibj2.command.Command; | ||||||
|  | import frc.robot.subsystem.Accumulateur; | ||||||
|  | import frc.robot.subsystem.Lanceur; | ||||||
|  |  | ||||||
|  | public class LancerNote extends Command { | ||||||
|  |   private Lanceur lancer; | ||||||
|  |   private Accumulateur accumulateur; | ||||||
|  |   /** Creates a new LancerNote. */ | ||||||
|  |   public LancerNote(Lanceur lancer, Accumulateur accumulateur) { | ||||||
|  |     this.lancer = lancer; | ||||||
|  |     this.accumulateur = accumulateur; | ||||||
|  |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // Called when the command is initially scheduled. | ||||||
|  |   @Override | ||||||
|  |   public void initialize() {} | ||||||
|  |  | ||||||
|  |   // Called every time the scheduler runs while the command is scheduled. | ||||||
|  |   @Override | ||||||
|  |   public void execute() { | ||||||
|  |     double vitesse = 100; | ||||||
|  |     lancer.lancerspeaker(); | ||||||
|  |     if(lancer.vitesse(vitesse)>vitesse){ | ||||||
|  |       accumulateur.Accumuler(0.6); | ||||||
|  |     } | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // Called once the command ends or is interrupted. | ||||||
|  |   @Override | ||||||
|  |   public void end(boolean interrupted) {} | ||||||
|  |  | ||||||
|  |   // Returns true when the command should end. | ||||||
|  |   @Override | ||||||
|  |   public boolean isFinished() { | ||||||
|  |     return false; | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										45
									
								
								src/main/java/frc/robot/command/Lancerampli.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								src/main/java/frc/robot/command/Lancerampli.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,45 @@ | |||||||
|  | // Copyright (c) FIRST and other WPILib contributors. | ||||||
|  | // Open Source Software; you can modify and/or share it under the terms of | ||||||
|  | // the WPILib BSD license file in the root directory of this project. | ||||||
|  |  | ||||||
|  | package frc.robot.command; | ||||||
|  |  | ||||||
|  |  | ||||||
|  |  | ||||||
|  | import edu.wpi.first.wpilibj2.command.Command; | ||||||
|  |  | ||||||
|  | import frc.robot.subsystem.Lanceur; | ||||||
|  |  | ||||||
|  | public class Lancerampli extends Command { | ||||||
|  |   /** Creates a new Lanceur. */ | ||||||
|  |  | ||||||
|  |   private Lanceur lanceur; | ||||||
|  |    | ||||||
|  |   public Lancerampli(Lanceur lanceur) { | ||||||
|  |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
|  |     addRequirements(lanceur); | ||||||
|  |     this.lanceur = lanceur; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // Called when the command is initially scheduled. | ||||||
|  |   @Override | ||||||
|  |   public void initialize() {} | ||||||
|  |  | ||||||
|  |   // Called every time the scheduler runs while the command is scheduled. | ||||||
|  |   @Override | ||||||
|  |   public void execute() { | ||||||
|  |     lanceur.lanceramp(); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // Called once the command ends or is interrupted. | ||||||
|  |   @Override | ||||||
|  |   public void end(boolean interrupted) { | ||||||
|  |     lanceur.lancer(0); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // Returns true when the command should end. | ||||||
|  |   @Override | ||||||
|  |   public boolean isFinished() { | ||||||
|  |     return false; | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										40
									
								
								src/main/java/frc/robot/command/RobotPixy.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								src/main/java/frc/robot/command/RobotPixy.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,40 @@ | |||||||
|  | // Copyright (c) FIRST and other WPILib contributors. | ||||||
|  | // Open Source Software; you can modify and/or share it under the terms of | ||||||
|  | // the WPILib BSD license file in the root directory of this project. | ||||||
|  |  | ||||||
|  | package frc.robot.command; | ||||||
|  |  | ||||||
|  | import edu.wpi.first.wpilibj2.command.Command; | ||||||
|  | import frc.robot.subsystem.Drive; | ||||||
|  | import frc.robot.subsystem.Pixy; | ||||||
|  |  | ||||||
|  | public class RobotPixy extends Command { | ||||||
|  |   private Pixy pixy; | ||||||
|  |   private Drive drive; | ||||||
|  |   /** Creates a new RobotPixy. */ | ||||||
|  |   public RobotPixy(Pixy pixy,Drive drive) { | ||||||
|  |     this.drive = drive; | ||||||
|  |     this.pixy = pixy; | ||||||
|  |     addRequirements(drive,pixy); | ||||||
|  |     // Use addRequirements() here to declare subsystem dependencies. | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // Called when the command is initially scheduled. | ||||||
|  |   @Override | ||||||
|  |   public void initialize() {} | ||||||
|  |  | ||||||
|  |   // Called every time the scheduler runs while the command is scheduled. | ||||||
|  |   @Override | ||||||
|  |   public void execute() { | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   // Called once the command ends or is interrupted. | ||||||
|  |   @Override | ||||||
|  |   public void end(boolean interrupted) {} | ||||||
|  |  | ||||||
|  |   // Returns true when the command should end. | ||||||
|  |   @Override | ||||||
|  |   public boolean isFinished() { | ||||||
|  |     return false; | ||||||
|  |   } | ||||||
|  | } | ||||||
| @@ -6,10 +6,12 @@ package frc.robot.subsystem; | |||||||
|  |  | ||||||
| import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; | import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; | ||||||
|  |  | ||||||
|  | import edu.wpi.first.networktables.GenericEntry; | ||||||
| import edu.wpi.first.wpilibj.DigitalInput; | import edu.wpi.first.wpilibj.DigitalInput; | ||||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||||
| import frc.robot.Constants; | import frc.robot.Constants; | ||||||
| import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; | import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; | ||||||
|  | import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; | ||||||
| import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts; | import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts; | ||||||
| import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; | import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; | ||||||
|  |  | ||||||
| @@ -17,6 +19,9 @@ public class Accumulateur extends SubsystemBase { | |||||||
|   /** Creates a new Accumulateur. */ |   /** Creates a new Accumulateur. */ | ||||||
|   |   | ||||||
|   ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard"); |   ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard"); | ||||||
|  |    private GenericEntry vitesse = | ||||||
|  |       dashboard.add("vitesseacc", 1) | ||||||
|  |          .getEntry();  | ||||||
|   final WPI_TalonSRX Moteuracc2 = new WPI_TalonSRX(Constants.Moteuracc2); |   final WPI_TalonSRX Moteuracc2 = new WPI_TalonSRX(Constants.Moteuracc2); | ||||||
|   final WPI_TalonSRX Moteuracc = new WPI_TalonSRX(Constants.Moteuracc); |   final WPI_TalonSRX Moteuracc = new WPI_TalonSRX(Constants.Moteuracc); | ||||||
|   final DigitalInput limitacc = new DigitalInput(Constants.limitacc); |   final DigitalInput limitacc = new DigitalInput(Constants.limitacc); | ||||||
| @@ -32,12 +37,16 @@ public class Accumulateur extends SubsystemBase { | |||||||
|     return limitacc.get(); |     return limitacc.get(); | ||||||
|   } |   } | ||||||
|   public Accumulateur() { |   public Accumulateur() { | ||||||
|  |      | ||||||
|     dashboard.addBoolean("limitacc", this::limitswitch); |     dashboard.addBoolean("limitacc", this::limitswitch); | ||||||
|   } |   } | ||||||
|   public void Accumuler(double vitesse){ |   public void Accumuler(double vitesse){ | ||||||
|     Moteuracc.set(vitesse); |     Moteuracc.set(vitesse); | ||||||
|     Moteuracc2.set(vitesse); |     Moteuracc2.set(vitesse); | ||||||
|   } |   } | ||||||
|  |   public void Accumuler(){ | ||||||
|  |     Accumuler(vitesse.getDouble(0.1)); | ||||||
|  |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|   public void periodic() { |   public void periodic() { | ||||||
|   | |||||||
| @@ -4,7 +4,7 @@ | |||||||
|  |  | ||||||
| package frc.robot.subsystem; | package frc.robot.subsystem; | ||||||
|  |  | ||||||
| import com.ctre.phoenix.motorcontrol.can.TalonSRX; |  | ||||||
| import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; | import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; | ||||||
|  |  | ||||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||||
|   | |||||||
| @@ -6,8 +6,15 @@ package frc.robot.subsystem; | |||||||
|  |  | ||||||
| import java.io.File; | import java.io.File; | ||||||
| import java.io.IOException; | import java.io.IOException; | ||||||
|  |  | ||||||
|  | import com.pathplanner.lib.auto.AutoBuilder; | ||||||
|  | import com.pathplanner.lib.util.HolonomicPathFollowerConfig; | ||||||
|  | import com.pathplanner.lib.util.PIDConstants; | ||||||
|  | import com.pathplanner.lib.util.ReplanningConfig; | ||||||
|  |  | ||||||
| import edu.wpi.first.math.geometry.Translation2d; | import edu.wpi.first.math.geometry.Translation2d; | ||||||
| import edu.wpi.first.math.kinematics.SwerveModulePosition; | import edu.wpi.first.math.kinematics.SwerveModulePosition; | ||||||
|  | import edu.wpi.first.wpilibj.DriverStation; | ||||||
| import edu.wpi.first.wpilibj.Filesystem; | import edu.wpi.first.wpilibj.Filesystem; | ||||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||||
| import swervelib.SwerveDrive; | import swervelib.SwerveDrive; | ||||||
| @@ -25,7 +32,17 @@ public class Drive extends SubsystemBase { | |||||||
|   } |   } | ||||||
|    |    | ||||||
|   public Drive() { |   public Drive() { | ||||||
|  |     AutoBuilder.configureHolonomic(swerveDrive::getPose, swerveDrive::resetOdometry, swerveDrive::getRobotVelocity, swerveDrive::setChassisSpeeds, new HolonomicPathFollowerConfig( | ||||||
|  |       new PIDConstants(5,0,0), new PIDConstants(5,0,0), 4.5, | ||||||
|  |       0.275, | ||||||
|  |       new ReplanningConfig() | ||||||
|  |       ), ()->{ | ||||||
|  |         var alliance = DriverStation.getAlliance(); | ||||||
|  |         if(alliance.isPresent()){ | ||||||
|  |           return alliance.get() == DriverStation.Alliance.Red; | ||||||
|  |         } | ||||||
|  |         return false; | ||||||
|  |          }, this); | ||||||
|      try { |      try { | ||||||
|       this.swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive(2); |       this.swerveDrive = new SwerveParser(swerveJsonDirectory).createSwerveDrive(2); | ||||||
|     } catch (IOException e) { |     } catch (IOException e) { | ||||||
|   | |||||||
| @@ -16,7 +16,7 @@ public class Guideur extends SubsystemBase { | |||||||
|    |    | ||||||
|     final WPI_TalonSRX guideur = new WPI_TalonSRX(Constants.guideur); |     final WPI_TalonSRX guideur = new WPI_TalonSRX(Constants.guideur); | ||||||
|     final DigitalInput guideurhaut = new DigitalInput(Constants.guideurhaut); |     final DigitalInput guideurhaut = new DigitalInput(Constants.guideurhaut); | ||||||
|     final DigitalInput guideurbas = new DigitalInput(Constants.guideurhaut); |     final DigitalInput guideurbas = new DigitalInput(Constants.guideurbas); | ||||||
|  |  | ||||||
|       public void guider(double vitesse){ |       public void guider(double vitesse){ | ||||||
|         guideur.set(vitesse); |         guideur.set(vitesse); | ||||||
|   | |||||||
							
								
								
									
										27
									
								
								src/main/java/frc/robot/subsystem/LED.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								src/main/java/frc/robot/subsystem/LED.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | |||||||
|  | // Copyright (c) FIRST and other WPILib contributors. | ||||||
|  | // Open Source Software; you can modify and/or share it under the terms of | ||||||
|  | // the WPILib BSD license file in the root directory of this project. | ||||||
|  |  | ||||||
|  | package frc.robot.subsystem; | ||||||
|  |  | ||||||
|  | import edu.wpi.first.wpilibj.AddressableLED; | ||||||
|  | import edu.wpi.first.wpilibj.AddressableLEDBuffer; | ||||||
|  | import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||||
|  |  | ||||||
|  | public class LED extends SubsystemBase { | ||||||
|  |   /** Creates a new LED. */ | ||||||
|  |   public LED() {} | ||||||
|  |    AddressableLED led = new AddressableLED(9); | ||||||
|  |    AddressableLEDBuffer ledBuffer = new AddressableLEDBuffer(60); | ||||||
|  |    public void led(){ | ||||||
|  |     led.setData(ledBuffer); | ||||||
|  |     led.start(); | ||||||
|  |    } | ||||||
|  |    public void couleur(int R, int G, int B){ | ||||||
|  |     ledBuffer.setRGB(0, R, G, B); | ||||||
|  |    } | ||||||
|  |   @Override | ||||||
|  |   public void periodic() { | ||||||
|  |     // This method will be called once per scheduler run | ||||||
|  |   } | ||||||
|  | } | ||||||
| @@ -7,29 +7,49 @@ package frc.robot.subsystem; | |||||||
| import com.revrobotics.CANSparkMax; | import com.revrobotics.CANSparkMax; | ||||||
| import com.revrobotics.CANSparkLowLevel.MotorType; | import com.revrobotics.CANSparkLowLevel.MotorType; | ||||||
|  |  | ||||||
|  | import edu.wpi.first.networktables.GenericEntry; | ||||||
|  | import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; | ||||||
|  | import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; | ||||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||||
| import frc.robot.Constants; | import frc.robot.Constants; | ||||||
|  |  | ||||||
| public class Lanceur extends SubsystemBase { | public class Lanceur extends SubsystemBase { | ||||||
|   /** Creates a new Lanceur. */ |   /** Creates a new Lanceur. */ | ||||||
|  |   ShuffleboardTab dashboard = Shuffleboard.getTab("dashboard"); | ||||||
|  |    private GenericEntry vitesse = | ||||||
|  |       dashboard.add("vitesse", 1) | ||||||
|  |          .getEntry(); | ||||||
|  |          private GenericEntry vitesseamp = | ||||||
|  |             dashboard.add("vitesseamp", 1) | ||||||
|  |                .getEntry(); | ||||||
|  |   public Lanceur() { | ||||||
|      |      | ||||||
|  |   } | ||||||
|   public Lanceur() {} |   final CANSparkMax lanceur1 = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); | ||||||
|   final CANSparkMax lancer = new CANSparkMax(Constants.lanceur, MotorType.kBrushless); |   final CANSparkMax lanceur2 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless); | ||||||
|   final CANSparkMax lancer2 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless); |   final CANSparkMax lanceur3 = new CANSparkMax(Constants.lancer3, MotorType.kBrushless); | ||||||
|   final CANSparkMax lancer3 = new CANSparkMax(Constants.lancer3, MotorType.kBrushless); |   final CANSparkMax lanceur4 = new CANSparkMax(Constants.lancer4, MotorType.kBrushless); | ||||||
|   final CANSparkMax lancer4 = new CANSparkMax(Constants.lancer4, MotorType.kBrushless); |   public void pid(){ | ||||||
|  |     lanceur1.getPIDController(); | ||||||
|  |   } | ||||||
|   public void lancer(double vitesse){ |   public void lancer(double vitesse){ | ||||||
|     lancer.set(vitesse); |     lanceur1.set(vitesse); | ||||||
|  |   } | ||||||
|  |   public void lancerspeaker(){ | ||||||
|  |     lancer(vitesse.getDouble(0.1)); | ||||||
|  |   } | ||||||
|  |   public void lanceramp(){ | ||||||
|  |     lancer(vitesseamp.getDouble(0.5)); | ||||||
|  |   } | ||||||
|  |   public double vitesse(double vitesse){ | ||||||
|  |     return lanceur1.getEncoder().getVelocity(); | ||||||
|   } |   } | ||||||
|     public void lanceur(){ |     public void lanceur(){ | ||||||
|     lancer2.follow(lancer); |     lanceur2.follow(lanceur1); | ||||||
|     lancer3.follow(lancer); |     lanceur3.follow(lanceur1); | ||||||
|     lancer4.follow(lancer); |     lanceur4.follow(lanceur1); | ||||||
|     lancer3.setInverted(true); |     lanceur3.setInverted(true); | ||||||
|     lancer4.setInverted(true); |     lanceur4.setInverted(true); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|   | |||||||
| @@ -1,18 +1,75 @@ | |||||||
| // Copyright (c) FIRST and other WPILib contributors. |  | ||||||
| // Open Source Software; you can modify and/or share it under the terms of |  | ||||||
| // the WPILib BSD license file in the root directory of this project. |  | ||||||
|  |  | ||||||
| package frc.robot.subsystem; | package frc.robot.subsystem; | ||||||
|  |  | ||||||
| import edu.wpi.first.wpilibj2.command.SubsystemBase; | import edu.wpi.first.wpilibj2.command.SubsystemBase; | ||||||
|  | import frc.robot.PixyException; | ||||||
|  | import frc.robot.PixyPacket; | ||||||
|  | import edu.wpi.first.wpilibj.SerialPort; | ||||||
|  | import edu.wpi.first.wpilibj.SerialPort.Port; | ||||||
|  | //Warning: if the pixy is plugged in through mini usb, this code WILL NOT WORK b/c the pixy is smart and detects where it should send data | ||||||
| public class Pixy extends SubsystemBase { | public class Pixy extends SubsystemBase { | ||||||
|  | 	SerialPort pixy; | ||||||
|  | 	Port port = Port.kMXP; | ||||||
|  | 	PixyPacket[] packets; | ||||||
|  | 	PixyException pExc; | ||||||
|  | 	String print; | ||||||
|  |  | ||||||
|   /** Creates a new Pixy. */ | 	public Pixy() { | ||||||
|   public Pixy() {} | 		pixy = new SerialPort(19200, port); | ||||||
|  | 		pixy.setReadBufferSize(14); | ||||||
|  | 		packets = new PixyPacket[7]; | ||||||
|  | 		pExc = new PixyException(print); | ||||||
|  | 	} | ||||||
|  | 	//This method parses raw data from the pixy into readable integers | ||||||
|  | 	public int cvt(byte upper, byte lower) { | ||||||
|  | 		return (((int)upper & 0xff) << 8) | ((int)lower & 0xff); | ||||||
|  | 	} | ||||||
|  | 	public void pixyReset(){ | ||||||
|  | 		pixy.reset(); | ||||||
|  | 	} | ||||||
|  | 	//This method gathers data, then parses that data, and assigns the ints to global variables | ||||||
|  | 	public PixyPacket readPacket(int Signature) throws PixyException { | ||||||
|  | 		int Checksum; | ||||||
|  | 		int Sig; | ||||||
|  | 		byte[] rawData = new byte[32]; | ||||||
|  | 		try{ | ||||||
|  | 			rawData = pixy.read(32); | ||||||
|  | 		} catch (RuntimeException e){ | ||||||
| 			 | 			 | ||||||
|   @Override | 		} | ||||||
|   public void periodic() { | 		if(rawData.length < 32){ | ||||||
|     // This method will be called once per scheduler run | 			return null; | ||||||
|   } | 		} | ||||||
|  | 		for (int i = 0; i <= 16; i++) { | ||||||
|  | 			int syncWord = cvt(rawData[i+1], rawData[i+0]); //Parse first 2 bytes | ||||||
|  | 			if (syncWord == 0xaa55) {   //Check is first 2 bytes equal a "sync word", which indicates the start of a packet of valid data | ||||||
|  | 				syncWord = cvt(rawData[i+3], rawData[i+2]); //Parse the next 2 bytes | ||||||
|  | 				 | ||||||
|  | 				if (syncWord != 0xaa55){ //Shifts everything in the case that one syncword is sent | ||||||
|  | 					i -= 2;               | ||||||
|  | 				} | ||||||
|  | 				//This next block parses the rest of the data | ||||||
|  | 					Checksum = cvt(rawData[i+5], rawData[i+4]);					 | ||||||
|  | 					Sig = cvt(rawData[i+7], rawData[i+6]); | ||||||
|  | 					if(Sig <= 0 || Sig > packets.length){ | ||||||
|  | 						break; | ||||||
|  | 					} | ||||||
|  | 					packets[Sig - 1] = new PixyPacket(); | ||||||
|  | 					packets[Sig - 1].X = cvt(rawData[i+9], rawData[i+8]); | ||||||
|  | 					packets[Sig - 1].Y = cvt(rawData[i+11], rawData[i+10]); | ||||||
|  | 					packets[Sig - 1].Width = cvt(rawData[i+13], rawData[i+12]); | ||||||
|  | 					packets[Sig - 1].Height = cvt(rawData[i+15], rawData[i+14]); | ||||||
|  | 					//Checks whether the data is valid using the checksum *This if block should never be entered* | ||||||
|  | 					if (Checksum != Sig + packets[Sig - 1].X + packets[Sig - 1].Y + packets[Sig - 1].Width + packets[Sig - 1].Height) { | ||||||
|  | 						packets[Sig - 1] = null; | ||||||
|  | 						throw pExc; | ||||||
|  | 					} | ||||||
|  | 					break; | ||||||
|  | 			} | ||||||
|  | 		} | ||||||
|  | 		//Assigns our packet to a temp packet, then deletes data so that we dont return old data | ||||||
|  | 		 | ||||||
|  | 		PixyPacket pkt = packets[Signature - 1]; | ||||||
|  | 		packets[Signature - 1] = null; | ||||||
|  | 		return pkt; | ||||||
|  | 	} | ||||||
| }  | }  | ||||||
		Reference in New Issue
	
	Block a user