03-12-2021 06:06 PM
Hello,
Something very odd is going on with the linear accel x LSB and accel x LSB, which I don't really know what to make of. When my device rests on a table, the readouts of linear acceleration are off. Y and Z perform as expected, but X would occasionally spike to around 1.3 m/s^2. Looking into the X values further, I notice that this is due to the first bit of LSB in both linear accel and accel memory getting flipped on (and adding 1.28). I'll add a printout of me reading these values in a loop approx 150Hz.
This is the second BNO055 sensor I've bought which behaves this way. I've tried toying around with delays, since this is the first bit which gets read, but no luck. I'd really appreciate any help here, as I don't have much more of a clue what I should be looking into. Overall, I2C is working well, and this one bit usually behaves.
BTW, I'm using the BNO055 with a RPi 3B+ over I2C in NDOF_FMC_OFF mode. I'm using the official C lib here on github: https://github.com/BoschSensortec/BNO055_driver , with added read, write and delay functions attached. I'm using the provided bno055_convert_double_accel_x_msq() and bno055_convert_double_linear_accel_x_msq() functions.
Thanks!
Solved! Go to Solution.
03-15-2021 08:27 AM
03-16-2021 01:51 AM
Could you share the source code you're using?
I'm on Ubuntu 18.04.5 LTS (GNU/Linux 5.4.0-1029-raspi armv7l), and am using the sensor within ROS Melodic.
The full source code I'm working with can be found here: https://github.com/jnatale11/Marae_Mapper
I use a simple `catkin_make -j3` to build, then `source devel/setup.bash`, and run with `rosrun stereo_inertial_recorder stereo_inertial_recorder_motion test 2000`. Those last two arguments just signify the bag filename suffix and number of times the imu data is read.
Hoping we can find out what's going on! I'll also test a simpler setup with ROS removed to see what happens there.
03-16-2021 03:23 AM
Hello Juicy,
I tested it with development desktop software under application board 2.0(official reference hardware).
https://www.bosch-sensortec.com/software-tools/tools/application-board-2-0/#application_board
https://www.bosch-sensortec.com/software-tools/tools/development-desktop-software/
Based on your software platform, it needs to migrate the following github driver code to your system and run well. This driver code run under MCU, not OS. You need to make some adaptations.
03-16-2021 04:38 AM - edited 03-16-2021 04:43 AM
Okay, I just verified that ROS had nothing to do with the issue I'm getting. Stripped it down to just the modfied driver code (from the repo you just linked) and still got the same results.
I should clarify that I'm using the Adafruit breakout board: https://learn.adafruit.com/adafruit-bno055-absolute-orientation-sensor/python-circuitpython
This link shows that it does work over I2C with CircuitPython, so I assume there must be a way to get it working over I2C in C.
Could you explain some more on "This driver code run under MCU, not OS. You need to make some adaptations."? I'm not at all familiar with the differences here, or what would be required. It's very confusing to me that everything else about this sensor seems to work fine, except for this one bit.