GoPiGo OS - Beta1: How do I calibrate the IMU in Bloxter?

Greetings!

While using Bloxter within the GoPiGo OS Beta1 release, I am trying to create a simple IMU test program.

According to the “Lessons” in Bloxter, the IMU must be “calibrated” prior to use.

  • Calibration involves picking up the 'bot and moving it all around in all three axes multiple times.
    • The accuracy of the calibration depends on how carefully and competely the device is rotated.
    • It is necessary to rotate the device enough times for it to gather enough calibration data to be reasonably accurate.
    • There needs to be a way to indicate when the calibration has gathered enough data to be complete and accurate.
  • The illustration in the lessons shows as part of the slide out panel where you define sensors vs ports, a “calibration” indicator for the IMU. Unfortunately, this is not present. At least not on my system.
    • Has anyone else been able to verify that the IMU calibration/data readings do not exist on the sensor assignment panel?
    • Idea: On the micro:bit, within the Make:Code blockly editor, there is a special block that forces “calibration” of the on-board IMU, and causes the micro:bit to display a special light pattern that indicates when the IMU has gathered enough calibration data to be accurate.
      Maybe we can do something like this for the GoPiGo?

Thanks!

If my memory serves right, when I first selected IMU, compass, AD1 it filled with “awaiting calibration”, so I picked up Carl by the hair, flung him about in a figure-8 and suddenly it started reading bass-ackwards 180 off magnetic North.

2 Likes

BTW, be sure to power down all the way before that. That chip remembers stuff. (Hopefully it doesn’t call the authorities on me for “manhandling” Carl.

1 Like

And that’s the joy of it all. It’s a lot easier to turn the IMU around than to reprogram a lot of other stuff on different 'bots.

BTW, this didn’t happen on my system just now. The sensor control panel simply reads one of either “IMU (compass)” or “IMU (airplane)”. Readings are either numeric or written cardinal compass points. Of course this is in bloxter.

If I ever get to do development work on bloxter, I want to add a few IMU blocks:

  • Calibrate IMU
  • Save calibration data
  • Load calibration data
  • Clear calibration data
     

We’ll see.

1 Like

I’m talking about using Charlie for a while, primarily sitting on my desk as a static device, and then deciding to mess with the IMU in Bloxter after several hours of sitting there. Maybe that makes a difference? I’ll have to test that tomorrow.

1 Like

You don’t need any of those - everything is automatic, and the cal saving is only for fast waking after sleep. Calibration is continuous not a single event.

2 Likes

Hmmm. . . .

Maybe THAT’S why it’s not being picky?

1 Like