The machine shown above is relatively basic. It will follow the first trajectory sequence, and when that is done, follow the second. We can make this machine more adaptive by using functions covered in Advanced Usage.
This machine will check if more than 9 seconds have elapsed in the state without completing the trajectory, and if the trajectory has not been completed, go back to the start of the trajectory to try again. This use of fallback and pointer states allows for a more adaptive autonomous that will try to compensate for disturbances or errors.
To run a machine that uses Roadrunner, you would simply add drive.update() to the loop that you are calling machine.update() in. This example also uses telemetry, so it would be necessary to add telemetry.update() to the loop as well.
Nested State Machine
Another full op-mode example is located at the end of the Nested State Machine section.