task main()
{
	forward(2*12/WHEEL_CIRCUM);
	doNothing(1000);
	turnLeft(0.8);
	doNothing(1000);
	forward(2.5*12/WHEEL_CIRCUM);
	doNothing(1000);
	turnRight(0.9);
	doNothing(1000);
	forward(1.5*12/WHEEL_CIRCUM);
	doNothing(1000);
	turnRight(0.8);
	doNothing(1000);
	openClaw();
	doNothing(1000);
	forward(12/WHEEL_CIRCUM);
	doNothing(1000);
	closeClaw();
	doNothing(1000);
	moveArmUp(900);
	doNothing(1000);
	turnLeft(1.6);
	forward(12/WHEEL_CIRCUM);
	turnLeft(0.8);
	forward(1.5*12/WHEEL_CIRCUM);
	turnLeft(0.8);
	forward(2.5*12/WHEEL_CIRCUM);
	turnLeft(0.8);
	forward(2*12/WHEEL_CIRCUM);
	moveArmDown(900);
	openClaw();
	backward(4*12/WHEEL_CIRCUM);
}
task main()
{
	//ALWAYS START CHALLENGE WITH CLAW CLOSED!!!
	forward((2 * 12 - 0.5) / WHEEL_CIRCUM);
	doNothing(1000);
	turnLeft(0.8);
	doNothing(1000);
	forward((2.4 * 12 + 1) / WHEEL_CIRCUM);
	doNothing(1000);
	turnLeft(0.75);
	doNothing(1000);
	openClaw();
	doNothing(1000);
	forward(13.25 / WHEEL_CIRCUM);
	doNothing(1000);
	closeClaw();
	doNothing(1000);
	moveArmUp(900);
	doNothing(1000);
	turnLeft(1.5);
	doNothing(1000);
	forward((2.7 * 12 + 3) / WHEEL_CIRCUM);
	doNothing(1000);
	turnRight(0.7);
	doNothing(1000);
	moveArmUp(200);
	doNothing(1000);
	forward(2.5 / WHEEL_CIRCUM);
	doNothing(1000);
	openClaw();
	doNothing(1000);
	moveArmUp(300);
	doNothing(1000);
	backward(2 / WHEEL_CIRCUM);
	doNothing(1000);
	moveArmDown(600);
	doNothing(1000);
	forward(2.5 / WHEEL_CIRCUM);
	doNothing(1000);
	closeClaw();
	doNothing(1000);
	moveArmUp(900);
	doNothing(1000);
	turnRight(0.7);
	doNothing(1000);
	forward(1.5 * 12 / WHEEL_CIRCUM);
	doNothing(1000);
	turnLeft(0.7);
	doNothing(1000);
	forward(2 * 12 / WHEEL_CIRCUM);
	doNothing(1000);
	turnLeft(0.7);
	doNothing(1000);
	forward(12 / WHEEL_CIRCUM);
	doNothing(1000);
	moveArmDown(900);
	doNothing(1000);
	openClaw();
}
示例#3
0
    void DropOff::release(){
        //Initialize timestamp
        if (releaseTimestamp == 0){
            releaseTimestamp = millis();
            openClaw(claw,true);
        }

        if (millis() - releaseTimestamp > RELEASE_DELAY){
            releaseTimestamp = 0;
            currentPhase = RETRACTION;
            setPassengerPickup(claw,false);
        }
    }