JAR Template- Pre-autonomous inertial calibration

  1. I currently use the JAR template for all of my codes, and I have come across a problem with the inertial calibration. First when is the “pre-auton?” I am unsure if this is a) before I plug my controller into the field, b) once I have plugged it in, c) during the count down, or d) perhaps none of the above.

  2. I assumed it was before I plugged it in, so I would set my robot up, then run the program, give it 5-10 secs, then plug it into the field. But the robot still becomes inconsistent, despite having the “Inertial.calibrate” command in my pre-auton. Is there something I am missing, or does it have to do with the fact that sometimes when I plug my robot into the field, it will say “Radio disconnected” for 2 seconds, then reset my program once fully connected to the field.

  3. If this is the problem, is there some way to go around it, because once I have plugged it in, I have no control over if my radio will do the weird disconnection thing again.

Thank you

  1. Pre-auton is executed as soon as you run your code, no matter what.
  2. What you think is probably correct.
  3. Again, probably not the problem.

You probably have some problems with your drivetrain turning the wrong amount, and it’s maybe because of the inertial sensor calibration and maybe not. Tell us about those problems.