When I constantly poll the values (using rotation vector mode) then I consistently get good output but as soon as there’s some delay between my polling I get strange output often, strange meaning accuracy=0 and real part of quaternion = 0. For example if I set the report rate to 100hz and I have 50ms delay between each of my polls then the output gets weird maybe 30% of the time.
Is this an issue with the internal buffer of the BNO086 or something?
Thanks in advance,
Fredrik
I’d guess it might be related to this Intermittent zeros issue fixed? · Issue #21 · sparkfun/SparkFun_BNO08x_Arduino_Library · GitHub
Try setting wire clock to 50kHz and the loop delay to 1ms (you can also just copy the code Pete posted there!)
I completely forgot to mention that I run it on a Jetson Orin Nano, not an Arduino.
The issue I have is that I don’t want to poll constantly, I only want to poll at certain times and the interval between polling is not consistent. Meaning sometimes it’s 50ms between polls and sometimes it could be 40ms for example (so loop delay is not consistent), my idea was that I could set the report rate of the imu to 100hz and then poll when needed and get the latest quaternion data but this bug stops me at the moment.
It sound like you’ll need to alter the code a bit and try using interrupts 
I don’t see how using interrupts would help in this case. I just want to be able to get rotation vector data when I want, not at a specific rate, is that not possible with the BNO086?
When I used the BNO055 I could do just that without any issues.
Well…you could have it shoot ant INT whenever the buffer is readable and if it has also been 40ms or whatever then poll, and prevent reporting empty buffers that way
If the 086 doesn’t suit ya: Was it purchased from us? If so head over to Returns (contact vendor if purchased elsewhere) and we’ll get ya squared away
Right now I do check the INT before each time I poll the data. Are you entirely sure that the reason I get strange data is because of an empty buffer? I figured it was something to do with the buffer since I get it more frequently the higher reporting rate I use but I didn’t know more than that.
What I’m trying to avoid is the busy wait that I get if I either constantly poll or constantly check the INT pin, we run quite heavy stuff so all optimizations possible are good.
Just to make sure, does the BNO086 support on-demand data retrieval, or is it strictly tied to periodic reporting intervals?
It sure can https://docs.sparkfun.com/SparkFun_VR_IMU_Breakout_BNO086_QWIIC/assets/component_documentation/BNO080_085-Datasheet_v1.16.pdf
I’m not entirely sure of anything…but everything so far points to buffer problems
If offloading polls helps: You might consider having a separate MCU poll and have the Orin check with the MCU at set intervals instead if that helps