# Autonomous Parking

We have a program for our autonomous that drives up the ramp, and then stops the robot. The program runs for about 10 seconds, so the robot successfully parks for 10 seconds. When the program finishes the motors release and the robot rolls down the ramp. We run this program with 5 seconds left in the match, so as to stay parked at the end of the match. However at a recent tournament that strategy was called into question. The referees felt that the definition of parked was to stay up on the ramp indefinitely, or at least until the score was finalized? Our question is, if a robot is on the ramp at the end of the match, is it parked. Or does it have to stay on the ramp some finite time?

If the robot is “at rest” when the match ends, I would disagree with the referee in this case. If the robot is still in motion at the sounding of the buzzer, the robot would be scored wherever it comes to rest. That said, there is a simple resolution to your situation. Just put a 10 minute wait at the end of your program. This will prevent your program from finishing and releasing the motors. While it wouldn’t be “indefinite” it would surely be “indefinite enough” for any tournament regardless of rule interpretation.

Yeah, that’s what I have told my students when they say: “OK, I have 50s left, so I’ll use 50s wait.” I told them they better make the life of the referee easy. What if the robot rolls down the ramp (and dislodges more balls) while the referee is still counting the points? 10 minutes should be plenty.
When starting the program, I have also promised the parents the students could figure this out and gain significant points in 3 lines of code this year. I have to correct myself and allow for the 4th line

If you are using touch LED then have a “waituntil touchLED == 1” at the end of the program, the robot will wait until someone touches the LED, this way the team can wait until referee’s go ahead to remove the robot from the field upon calculating the score.

The rules state the the score will be taken after all objects, including robots, come to rest. That is at the discretion of the referees. I would recommend locking up your wheels on the ramp and leave it locked until the referees call the “all clear”. You could place a 20 minute wait or even have a touch LED to lock wheels until it is touched. Referees technically can take as long as they need to ensure a fair scoring. When referees have to determine if a penalty or DQ needs to be applied to a match they tend to use more time. A good and fair call is very important to teams. It is best to just lock up the wheels.

The kids usually leave the programming routine up and running until they touch the LED button. That way they ensure everything stays as they want it until they manually end the program when they press the LED.

I think it is something like…

``````while(getTouchLEDValue(led) != 1)
{
sleep(1);
}``````

I do not agree with the judges decision cause if it is up when the match ended it is up, if it falls down later, it was up at the end… but you have to consider that sometimes the robots are in a position that is very difficult to know if it is touching the field or not and it takes some time, and if the robot ends the routine after 5 seconds, it could be difficult for them to know if it was completely up or not.

It makes their life easier and probably the decision will must likely come in your favor if you just let the motors stand on the top of the ramp when they are ready. That is easilly corrected by just adding a touch sensor and place the following code at the very end of the program.

while(getTouchLEDValue(led) != 1)
{
sleep(1);
}