I am having a problem with pitch measurements with Bosch BNO055 IMU. The device is rotated on a relatively stable rotating spindle and does a revolution on a circle around 10cm radius. It is upright in the current placement. Attached is my signal when I do harmonic oscillations on an arc of around 90 degrees.Internal Kalman filter pose output

The estimates I am getting are from the internal Kalman filter. We are using the sensor with RTIMULib and this test code:https://github.com/RPi-Distro/RTIMULib/blob/master/Linux/python/tests/Fusion.py

As far as I know, no preparations were done, including calibration.

I get very unusual discontinuities in pitch that do not look like warping at all. There are quite a few phenomena, like:

  1. It doesn't seem symmetrical, the signal is not the same at the same point in both directions, which can be seen by asymmetrical peaks.

  2. The jumps are sometimes from a to pi-a or -pi-a, but sometimes to a completely random value.

  3. When the rotating plane is not horizontal, pitch stays small in some parts of the arc, while it changes rapidly in some other parts.

Can this be caused by the problematic orientation? Can this be "expected" in any scenario?

  • $\begingroup$ Welcome to Robotics, Cindy Almighty. What you are seeing is not normal. Could you please edit your question to include the code you're using to generate the output data? You stated that the above plots are what you get when you "do harmonic oscillations on an arc," but you haven't described the arc. As long as the IMU is translating in a plane, you should only see rotation on one axis, but your data here is showing about 3 to 5 (degrees?) on all axes. Please also edit your question to describe the motion you're using. (Also, is the x-axis in samples? Seconds?) $\endgroup$
    – Chuck
    Sep 25 '18 at 18:18
  • $\begingroup$ Hi! Thanks for your corrections. I edited the question - updated the image axes, and explained that the output comes from the chip without my code. I simply plot it - is this important to show as well? For the rotation - I explained that it rotates around a spindle on a 10 cm radius circle. I will now add the approximate arc angle. I am not sure how to better explain this movement. Any chance you could help with a pertinent question? $\endgroup$ Sep 25 '18 at 19:11


Since the data is coming directly from the IMU itself, I would double check the startup parameters for the device and consider resetting it also. The datasheet gives information on selecting the style of fused data that is used (page 21), which is especially noteworthy as the data may be given as a relative orientation (relative to startup orientation) or absolute orientation (relative to the local/Earth magnetic field).

The output angles are selectable between degrees and radians, so I had briefly considered maybe you had set the unit to "relative orientation" and the output units to "radians" and then spun it on a turntable for a while. This might have caused the output angle to accumulate up to 145 radians, but in reviewing the datasheet it states the output angles are clamped to +/- 180 degrees for pitch, +/- 90 degrees for roll, and 0-360 degrees for yaw (page 30).

I would double check the initial configuration settings on the unit to be sure that what you think you're getting is what you're actually getting.

:Original post:

It looks like maybe you've got accelerometer data feeding into your angle estimate, which isn't necessarily bad, but I've seen some bad code out there for "converting" an accelerometer reading to an orientation. There are some solutions that work, but they're all based on this application note that gives "the absence of linear acceleration" as a precondition for using accelerometer output for estimating roll and pitch. If the sensor is traversing an arc then it is experiencing a linear acceleration.

Accelerometer output can't estimate yaw (heading) because the gravity axis is aligned with the yaw axis, so there is no projection of gravity to the yaw axis and thus there's nothing to measure.

  • $\begingroup$ Hi! This is a 11-DOF IMU that estimates all three pose angles on its own. As such, do you think linear acceleration is a problem? I was told it isn't. $\endgroup$ Sep 25 '18 at 19:12
  • $\begingroup$ @CindyAlmighty - It shouldn't be a problem. Are you sure of the part number? It looks like the BNO055 IMU is a 9-axis IMU, not 11. Also, please do post the code you're using to configure and poll/read the device. I'm editing my answer to include a bit more information, too. $\endgroup$
    – Chuck
    Sep 25 '18 at 20:20
  • $\begingroup$ The output dict has temperature and barometer reading keys, but no values. I thought they were just disabled in our application, but it could be they have a general firmware and these sensors are simply not present. I apologize. $\endgroup$ Sep 25 '18 at 20:45
  • $\begingroup$ Also, I edited the question again. Thanks for being patient with me. $\endgroup$ Sep 25 '18 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.