Where do I reset my Inertial Sensor

Relatively new to pros here, where do I reset (calibrate) my inertial sensor? Initialize, competition initialize, or anywhere else?

u have to wait 2 seconds for it to calibrate though, it will be a good idea to do it in initialize

1 Like

initialize() runs every time your program starts and if you are connected to a competition controller competition_initialize() runs immediately after that. If you ever forget, you can refer back to the comments that are generated in a default project. Normally, people just put the calibration in initialize() to be safe. (Just know that each time your start the program you will have to wait for it to calibrate) If you do not need the imu during driver control and you always test your auto with a competition switch you could put the calibration in competition_initialize(). Really the only benefit of this would be if you did not want to wait for the calibration to finish each you started the program disconnected from a competition switch such as during driving practice.


On a side note, if you’re talking about zeroing or tareing an imu sensor that feature will be coming in the future. For now, Okapi supports zeroing an IMU as well.

1 Like