Comments (4)
the absolute orientation may need to be rotated based on your usage. also you should use quaternions not euler to avoid errors at 90/180/270
from adafruit_bno055.
I rotated the axis which is the correct way to do it according to the datasheet. If you leave the axes as are and then apply rotations to the orientation then you won't get the right answers because the fusion algorithm uses magnetometer differently depending on the tilt with respect to its z axis.
I thought the answer may be due to using Android orientation, but that doesn't really make sense.
from adafruit_bno055.
@DrJaymz In my case, roll is around -Z, pitch is around -Y and yaw is around -X. So roll and yaw are switched and have the reversed sign. Pitch is correct but its sign is incorrect.
In other words, the library's default config does not match with the datasheet's default axis.
from adafruit_bno055.
I think there is a bug in that for euler angles the z rotation is read from the sensor and put into the x part of the output vector. And the x rotation from the sensor gets put into the z part of the vector. There is also some weirdness with signs, but i didn't look into that.
I think this is because the library reads from the registers in this order here, which is heading, roll, pitch. It then writes heading to X, roll to Y, and pitch to Z here.
I've seen conflicting info out there on whether pitch corresponds to x rotation, or pitch corresponds to y rotation. I've tested with this sensor and this breakout board and the data in pitch register corresponds to X rotation in default axis mapping.
BNO055_EULER_H_LSB_ADDR = 0X1A,
BNO055_EULER_H_MSB_ADDR = 0X1B,
BNO055_EULER_R_LSB_ADDR = 0X1C,
BNO055_EULER_R_MSB_ADDR = 0X1D,
BNO055_EULER_P_LSB_ADDR = 0X1E,
BNO055_EULER_P_MSB_ADDR = 0X1F,
readLen((adafruit_bno055_reg_t)vector_type, buffer, 6);
x = ((int16_t)buffer[0]) | (((int16_t)buffer[1]) << 8);
y = ((int16_t)buffer[2]) | (((int16_t)buffer[3]) << 8);
z = ((int16_t)buffer[4]) | (((int16_t)buffer[5]) << 8);
from adafruit_bno055.
Related Issues (20)
- Wrong license? Shouldn't this library be GPL v3? HOT 9
- Compatibility with RPi? HOT 1
- X and Z Axes Swapped? HOT 2
- Euler angle range mismatch HOT 1
- Not able to calibrate acceleration HOT 1
- Add support for changing sensor ranges HOT 2
- Convert to BusIO HOT 1
- webserial_3d.ino quaternion output has low resolution
- Add Support for RP2040 Chip (Raspberry Pi Pico) HOT 4
- Can't use current library for multi-i2c bus. HOT 1
- BNO055 sensor development
- I2C I/O Error on Teensy 4.1
- NO AHRS output with multiple sensors
- Renap setting
- Boolean is deprecated, use bool
- Remove _wire->begin() HOT 7
- Expired link in documentation HOT 1
- Orientation HOT 8
- .obj file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_bno055.