Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to obtain absolute orientation? #120

Open
PatrickVibild opened this issue Oct 24, 2023 · 0 comments
Open

How to obtain absolute orientation? #120

PatrickVibild opened this issue Oct 24, 2023 · 0 comments

Comments

@PatrickVibild
Copy link

Hi.

Being struggling with bno055 to obtain an absolute orientation from it.

I notice that even when the sensor is set ut in NDOF mode there is no fusion on the orientation.

import adafruit_bno055
import busio
import board
import time


class IMU:
  def __init__(self):
    self.i2c = busio.I2C(board.SCL, board.SDA)
    self.imu_sensor = adafruit_bno055.BNO055_I2C(self.i2c)
    self.imu_sensor.mode = adafruit_bno055.NDOF_MODE

  def get_data(self):
    return self.imu_sensor.quaternion, self.imu_sensor.euler

  def calibrated(self):
    return self.imu_sensor.calibrated, self.imu_sensor.calibration_status

if __name__ == '__main__':
  imu = IMU()
  while True:
    q, e = imu.get_data()
    print(q)
    print(e)
    time.sleep(1)

How can I obtain an absolute orientation of the sensor? Do I have to use magnetometer and euler at the same time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant