acmerobotics / road-runner-quickstart

FTC quickstart for https://github.com/acmerobotics/road-runner
BSD 3-Clause Clear License
168 stars 856 forks source link

Sleeps are deferred in MeepMeep #314

Closed madacker closed 7 months ago

madacker commented 7 months ago

RR FTC Version

0.1.8

Observed Behavior

We wanted to use a SleepAction() to represent the time taken by a mechanism action at a specific point in a trajectory sequence. Instead of pausing at the appropriate place, the pause happens once all of the trajectory sequences are complete. On the actual robot this sequence works as expected so this appears to be a MeepMeep-specific problem.

            myBot.runAction(myBot.getDrive().actionBuilder(new Pose2d(0, 0, 0))
                    .lineToX(30)
                    .turn(Math.toRadians(90))
                    .lineToY(30)
                    .stopAndAdd(new SleepAction(5)) // Delay like the actual mechanism would
                    .turn(Math.toRadians(90))
                    .lineToX(0)
                    .turn(Math.toRadians(90))
                    .lineToY(0)
                    .turn(Math.toRadians(90))
                    .build());

Tuning Files

No response

Robot Logs

No response