@@ -260,56 +260,122 @@ void autonomous() {
260
260
// // Leg 6: Driving forward to reach the wall and scoring the autonomous win point.
261
261
// addTask(Q, R);
262
262
263
- // This is a trajectory that we can use for either positive or negative
264
- // corner, we will choose based on game strategy before a match
265
- //
266
- // We will use the single ring trajectory if our alliance member has a similar
267
- // ~3-point scoring auton
268
- auto singleRingRootTask = make_shared<WaitMillisecondsTask>(0 );
269
- auto driveBackward = make_shared<DriveStraightTask>(-20 , prototype);
270
- auto clampTask = make_shared<MobileGoalIntakeTask>(prototype, true );
271
- auto intakeTask = make_shared <IntakeMillisecondsTask>(prototype, 1000 , -1 );
272
-
273
- // This trajectory will be used when our alliance partner either has a
274
- // full-blown 12 point auton or no auton at all, also will depend on the other
275
- // team's history of auton points
276
- //
277
- // This trajectory works only on the positive corner
278
- auto goalRushRootTask = make_shared<WaitMillisecondsTask>(0 );
279
- auto A = make_shared<DriveStraightTask>(105 , prototype);
280
- auto B = make_shared<DeployDoinkerTask>(prototype, true );
281
- auto C = make_shared<WaitMillisecondsTask>(500 );
282
- auto D = make_shared<DriveStraightTask>(-105 , prototype);
283
- auto E = make_shared<DeployDoinkerTask>(prototype, false );
284
- auto F = make_shared<GoodTurnTask>(80 , prototype);
285
- auto G = make_shared<DriveStraightTask>(-45 , prototype);
286
- auto H = make_shared<MobileGoalIntakeTask>(prototype, true );
287
- auto I = make_shared<IntakeMillisecondsTask>(prototype, 1000 , -1 );
263
+ // This trajectory works only on the red negative corner
264
+ auto REDNegative = make_shared<WaitMillisecondsTask>(0 );
265
+ auto A1 = make_shared<DriveStraightTask>(-80 , prototype);
266
+ auto B1 = make_shared<MobileGoalIntakeTask>(prototype, true );
267
+ auto C1 = make_shared<IntakeMillisecondsTask>(prototype, 5000 , -1 );
268
+ auto D1 = make_shared<GoodTurnTask>(45 , prototype);
269
+ auto E1 = make_shared<DriveStraightTask>(50 , prototype);
270
+ auto F1 = make_shared<GoodTurnTask>(190 , prototype);
271
+ auto G1 = make_shared<DriveStraightTask>(100 , prototype);
272
+
273
+ auto BLUENegative = make_shared<WaitMillisecondsTask>(0 );
274
+ auto A3 = make_shared<DriveStraightTask>(-80 , prototype);
275
+ auto B3 = make_shared<MobileGoalIntakeTask>(prototype, true );
276
+ auto C3 = make_shared<IntakeMillisecondsTask>(prototype, 7000 , -1 );
277
+ auto D3 = make_shared<GoodTurnTask>(-45 , prototype);
278
+ auto E3 = make_shared<DriveStraightTask>(50 , prototype);
279
+ auto F3 = make_shared<GoodTurnTask>(-190 , prototype);
280
+ auto G3 = make_shared<DriveStraightTask>(100 , prototype);
281
+
282
+ // This trajectory works only on the red positive corner
283
+ auto REDgoalRushPositiveRootTask = make_shared<WaitMillisecondsTask>(0 );
284
+ auto A = make_shared<DriveStraightTask>(65 , prototype);
285
+ auto B = make_shared<IntakeMillisecondsTask>(prototype, 600 , -1 );
286
+ auto C = make_shared<DriveStraightTask>(60 , prototype);
287
+ auto D = make_shared<DriveStraightTask>(-30 , prototype);
288
+ auto E = make_shared<GoodTurnTask>(-33 , prototype);
289
+ auto F = make_shared<DriveStraightTask>(37 , prototype);
290
+ auto G = make_shared<DeployDoinkerTask>(prototype, true );
291
+ auto H = make_shared<WaitMillisecondsTask>(100 );
292
+ auto I = make_shared<DriveStraightTask>(-60 , prototype);
293
+ auto J = make_shared<GoodTurnTask>(60 , prototype);
294
+ auto K = make_shared<DeployDoinkerTask>(prototype, false );
295
+ auto L = make_shared<GoodTurnTask>(40 , prototype);
296
+ auto M = make_shared<DriveStraightTask>(-80 , prototype);
297
+ auto N = make_shared<MobileGoalIntakeTask>(prototype, true );
298
+ auto O = make_shared<IntakeMillisecondsTask>(prototype, 2500 , -1 );
299
+ auto P = make_shared<DriveStraightTask>(70 , prototype);
300
+
301
+ auto BLUEgoalRushPositiveRootTask = make_shared<WaitMillisecondsTask>(0 );
302
+ auto A2 = make_shared<DriveStraightTask>(60 , prototype);
303
+ auto B2 = make_shared<IntakeMillisecondsTask>(prototype, 500 , -1 );
304
+ auto C2 = make_shared<DriveStraightTask>(60 , prototype);
305
+ auto D2 = make_shared<DeployDoinkerTask>(prototype, true );
306
+ auto E2 = make_shared<WaitMillisecondsTask>(100 );
307
+ auto F2 = make_shared<DriveStraightTask>(-90 , prototype);
308
+ auto G2 = make_shared<GoodTurnTask>(-120 , prototype);
309
+ auto H2 = make_shared<DeployDoinkerTask>(prototype, false );
310
+ auto I2 = make_shared<GoodTurnTask>(-40 , prototype);
311
+ auto J2 = make_shared<DriveStraightTask>(-70 , prototype);
312
+ auto K2 = make_shared<MobileGoalIntakeTask>(prototype, true );
313
+ auto L2 = make_shared<IntakeMillisecondsTask>(prototype, 4500 , -1 );
314
+ auto M2 = make_shared<GoodTurnTask>(-100 , prototype);
315
+ auto N2 = make_shared<DriveStraightTask>(40 , prototype);
316
+
317
+
288
318
// auto intakeTask = make_shared <IntakeMillisecondsTask>(prototype, 1000, 1);
289
319
// auto driveBack = make_shared<DriveStraightTask>(10, prototype);
290
320
291
321
auto testRootTask = make_shared<WaitMillisecondsTask>(0 );
292
322
auto testTurn = make_shared<GoodTurnTask>(90 , prototype);
293
323
294
- addTask (singleRingRootTask, driveBackward);
295
- addTask (driveBackward, clampTask);
296
- addTask (clampTask, intakeTask);
297
-
298
- addTask (goalRushRootTask, A);
324
+ addTask (REDNegative, A1);
325
+ addTask (A1, B1);
326
+ addTask (B1, C1);
327
+ addTask (B1, D1);
328
+ addTask (D1, E1 );
329
+ addTask (E1 , F1);
330
+ addTask (F1, G1);
331
+
332
+ addTask (BLUENegative, A3);
333
+ addTask (A3, B3);
334
+ addTask (B3, C3);
335
+ addTask (B3, D3);
336
+ addTask (D3, E3 );
337
+ addTask (E3 , F3);
338
+ addTask (F3, G3);
339
+
340
+ addTask (REDgoalRushPositiveRootTask, A);
299
341
addTask (A, B);
300
- addTask (B , C);
342
+ addTask (A , C);
301
343
addTask (C, D);
302
344
addTask (D, E);
303
345
addTask (E, F);
304
346
addTask (F, G);
305
347
addTask (G, H);
306
348
addTask (H, I);
349
+ addTask (I, J);
350
+ addTask (J, K);
351
+ addTask (J, L);
352
+ addTask (L, M);
353
+ addTask (M, N);
354
+ addTask (M, O);
355
+
356
+ addTask (BLUEgoalRushPositiveRootTask, A2);
357
+ addTask (A2, B2);
358
+ addTask (A2, C2);
359
+ addTask (C2, D2);
360
+ addTask (D2, E2 );
361
+ addTask (E2 , F2);
362
+ addTask (F2, G2);
363
+ addTask (G2, H2);
364
+ addTask (G2, I2);
365
+ addTask (I2, J2);
366
+ addTask (J2, K2);
367
+ addTask (K2, L2);
368
+ addTask (K2, M2);
369
+ addTask (M2, N2);
370
+
307
371
308
372
addTask (testRootTask, testTurn);
309
373
310
374
// execute(fullAutonRootTask);
311
- execute (goalRushRootTask);
312
- // execute(singleRingRootTask);
375
+ execute (REDgoalRushPositiveRootTask);
376
+ // execute(BLUEgoalRushPositiveRootTask);
377
+ // execute(REDNegative); //Michal Look Here
378
+ // execute(BLUENegative);
313
379
// execute(testRootTask);
314
380
}
315
381
0 commit comments