For the second performance test, the AEV was tasked with travelling to the gate, stopping for 7 seconds, proceeding through the gate, connecting with the cargo, stopping for 5 seconds, travelling out of the loading zone with the cargo, and stopping.
// Accelerate motors to 35% power in 2 seconds.
celerate(4,0,35,2);
// Travel to the first gate.
goToAbsolutePosition(280);
// Cut all power to motors and activate the servo brake upon approaching the gate.
brake(4);
rotateServo(90);
// Wait for seven seconds and release the servo brake.
goFor(7);
rotateServo(0);
// Proceed through the gate, accelerating to 25% power in 2 seconds.
celerate(4,0,25,2);
// Travel to the loading zone.
goToAbsolutePosition(580);
// Cut all power to the motors and active the servo brake.
brake(4);
rotateServo(90);
// Wait for five seconds and release the brake.
goFor(1);
rotateServo(0);
goFor(4);
// Reverse the motors to prepare to travel in the opposite direction.
reverse(4);
// Proceed out of the loading zone with the cargo, accelerating to 25% power in 1 second, and come to a stop.
celerate(4,0,25,1);
goToAbsolutePosition(500);
brake(4);
rotateServo(90);