Gyro Calibration During Skills at Worlds

Good morning everybody,

This is our first year attending The Vex High School Championships and we are very excited and looking forward to the experience.

I do have a question about the programming skills portion that will be occurring. When you connect to the field using the RobotC Competition Template, there is a section for the pre-autonomous code, autonomous code, and of course the driver control code. It is within the pre-autonomous function that we have our gyroscope run the code for calibration. I’d assume this occurs as soon as we connect to the Vex field running the software.

So in a normal game, with the 15 sec autonomous, and then the 1min 45sec driver control, our gyro has time while the game is being set up to run the calibration. We give the gyro 9 seconds to reset within our pre-autonomous code. I realize this 9 seconds is more than likely excessive, but our lead programming wanted to be 100% sure that the gyro is resetting and take no chances. RobotC says gyro calibration takes “at least 1.1 seconds”.

My concern is during the programming skills aspect at the Worlds. We will need to run the gyro calibration for our robot, which we’d like to be at least 4 seconds, and I am curious if that will take away from our 60 seconds that our robot has to score points during the programming skills component. Or is there field control there that allows the pre-autonomous to run, and then switches to 60 seconds of autonomous as controlled by the field?

At our provincial event, there simply was a field with no field control that people ran on, and they used a stop watch. The guy running the skills portion said he’d just start the stop watch once the robot began to move. So I want to be 100% what we are going to encounter while at worlds, so we are best able to program for the situation.

Thanks everybody. :slight_smile:

The preauton function doesn’t run when you plug into the field, it runs the moment you turn on the robot. Since preauton is a function, if you add a delay to calibrate, then the function will hold the robot at that position in the code until the delay is over, then preauton does not run until you turn off the robot, then on again. Just set up the robot normally, then turn it on, leave it alone for the duration of the calibration, and then tell them to start the skills run.

Pre autonomous should run before the match starts.