@@ -295,70 +295,26 @@ public static CommandBase HighAuto(SwerveDrivetrain swerveDrive, VROOOOM vision,
295295 //init
296296 Commands .sequence (
297297
298- Commands .race (
299- waitSeconds (5 ),
300- Commands .sequence (
301- parallel (
302- sequence (
303- claw .setPower (-0.35 ),
304- waitSeconds (0.25 ),
305- claw .setPower (-0.25 )
306- ),
307- deadline (
308- waitSeconds (2 ),
309- runOnce (() -> SmartDashboard .putString ("Stage" , "Score" )),
310- sequence (
311- runOnce (() -> arm .setTargetTicks (ArmConstants .kArmScoreCubeHigh )),
312- waitSeconds (0.5 ),
313- waitUntil (arm .atTargetPosition )
314- ),
315- sequence (
316- waitSeconds (0.5 ),
317- runOnce (() -> elevator .setTargetTicks (ElevatorConstants .kElevatorScoreHigh )),
318- waitSeconds (0.5 ),
319- waitUntil (elevator .atTargetPosition )
320- )
321- )
322- ),
323-
324- waitSeconds (0.25 ),
325- claw .setPower (0.3 ),
326- waitSeconds (0.5 ),
327- claw .setPowerZero (),
328-
329- deadline (
330- waitSeconds (0.5 ),
331- runOnce (() -> SmartDashboard .putString ("Stage" , "Stow" )),
332- sequence (
333- runOnce (() -> elevator .setTargetTicks (ElevatorConstants .kElevatorStow )),
334- waitSeconds (0.5 ),
335- waitUntil (elevator .atTargetPosition )
336- ),
337- sequence (
338- runOnce (() -> arm .setTargetTicks (ArmConstants .kArmStow )),
339- waitSeconds (0.5 ),
340- waitUntil (arm .atTargetPosition )
341- )
342- )
343- )
344- ),
298+ ChargeAutos .preloadHigh (arm , elevator , claw ),
345299
346300 //TODO confirm if we need it!!!!!!
347301 Commands .runOnce (() -> swerveDrive .resetOdometry (zoooomToCube .getInitialPose ())),
348302
349303 //trajectory to cube
350304 Commands .parallel (
351- zoooomToCubeCommand ,
352- Commands .sequence (
353- Commands .waitSeconds (1.5 ),
354- runOnce (() -> arm .setTargetTicks ((ArmConstants .kArmStow ) )) // to be safe
355- ),
356- Commands . runOnce (() -> vision . initVisionPickupOnGround ( OBJECT_TYPE . CUBE ))
305+ zoooomToCubeCommand
306+ // Commands.sequence(
307+ // Commands.waitSeconds(1.5),
308+ // runOnce(() -> arm.setTargetTicks((ArmConstants.kArmStow) )) // to be safe
309+ // ),
310+
357311 ),
358312 new TurnToAngle (179.9 , swerveDrive ),
313+ Commands .runOnce (() -> vision .initVisionPickupOnGround (OBJECT_TYPE .CUBE )),
359314
360315 Commands .race (
361- new RunCommand (() -> vision .driveToCubeOnGround (claw , 5 ), arm , elevator , claw , swerveDrive ).until (vision .cameraStatusSupplier ),
316+
317+ new RunCommand (() -> vision .driveToCubeOnGround (claw , 4 ), arm , elevator , claw , swerveDrive ).until (vision .cameraStatusSupplier ),
362318 Commands .waitSeconds (20 ) // kill this auto
363319 // TODO need add protection here!!!!!!
364320 ),
@@ -393,22 +349,22 @@ public static CommandBase HighAuto(SwerveDrivetrain swerveDrive, VROOOOM vision,
393349
394350 new TurnToAngle (0 , swerveDrive ),
395351
396- parallel (
397- Commands .race (
398- new RunCommand (() -> vision .driveToGridTag (claw , atagIdFinal ), arm , elevator , claw , swerveDrive ).until (vision .cameraStatusSupplier ),
399- Commands .waitSeconds (3 )
400- )/* ,
401-
402- //Drop arm high drop off
403- Commands.deadline( // TODO: Fix this and the other two Deadline arm Commands
404- Commands.waitSeconds(0.5),
405- sequence(
406- runOnce(() -> arm.setTargetTicks(ArmConstants.kArmScoreCubeMid)),
407- waitSeconds(0.5),
408- waitUntil(arm.atTargetPosition)
409- )
410- )*/
411- ),
352+ // parallel (
353+ // Commands.race(
354+ // new RunCommand(() -> vision.driveToGridTag(claw, atagIdFinal), arm, elevator, claw, swerveDrive).until(vision.cameraStatusSupplier),
355+ // Commands.waitSeconds(3)
356+ // )/* ,
357+
358+ // //Drop arm high drop off
359+ // Commands.deadline( // TODO: Fix this and the other two Deadline arm Commands
360+ // Commands.waitSeconds(0.5),
361+ // sequence(
362+ // runOnce(() -> arm.setTargetTicks(ArmConstants.kArmScoreCubeMid)),
363+ // waitSeconds(0.5),
364+ // waitUntil(arm.atTargetPosition)
365+ // )
366+ // )*/
367+ // ),
412368
413369 claw .setPower (0.3 )
414370
0 commit comments