@@ -260,22 +260,42 @@ 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
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
264
268
auto singleRingRootTask = make_shared<WaitMillisecondsTask>(0 );
265
269
auto driveBackward = make_shared<DriveStraightTask>(-20 , prototype);
266
270
auto clampTask = make_shared<MobileGoalIntakeTask>(prototype, true );
267
- auto intakeTask = make_shared <IntakeMillisecondsTask>(prototype, 1000 , 1 );
271
+ auto intakeTask = make_shared <IntakeMillisecondsTask>(prototype, 1000 , - 1 );
268
272
269
- // This trajectory's purpose is to do something else
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
270
278
auto goalRushRootTask = make_shared<WaitMillisecondsTask>(0 );
271
- auto driveForward = make_shared<DriveStraightTask>(20 , prototype);
279
+ auto driveForward = make_shared<DriveStraightTask>(85 , prototype);
272
280
auto doinkerDown = make_shared<DeployDoinkerTask>(prototype, true );
281
+ auto waitTask = make_shared<WaitMillisecondsTask>(500 );
282
+ auto driveBack = make_shared<DriveStraightTask>(-85 , prototype);
283
+ // auto doinkerUp = make_shared<DeployDoinkerTask>(prototype, false);
273
284
// auto intakeTask = make_shared <IntakeMillisecondsTask>(prototype, 1000, 1);
274
285
// auto driveBack = make_shared<DriveStraightTask>(10, prototype);
275
286
287
+ addTask (singleRingRootTask, driveBackward);
288
+ addTask (driveBackward, clampTask);
289
+ addTask (clampTask, intakeTask);
290
+
291
+ addTask (goalRushRootTask, driveForward);
292
+ addTask (driveForward, doinkerDown);
293
+ addTask (doinkerDown, waitTask);
294
+ addTask (waitTask, driveBack);
276
295
277
296
// execute(fullAutonRootTask);
278
- execute (singleRingRootTask);
297
+ execute (goalRushRootTask);
298
+ // execute(singleRingRootTask);
279
299
}
280
300
281
301
/* *
0 commit comments