BNO055 System Calibration Status "uncalibrated"
45 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gavin
am 4 Apr. 2023
Kommentiert: Gavin
am 20 Apr. 2023
When attempting to read orientation data from Bosch BNO055 9DOF Absolute Orientation Sensor using MATLAB Support Package for Arduino add-on, I am unable to keep "system" calibration status from becoming "uncalibrated".
I have followed all recommended calibration steps found in the documentation and am able to get acclerometer, gyroscope, and magnetometer to read "3" or "full", in which case the "system" calibration should supposedly change to "full" as well. I am sometimes able to get "system" to "full" momentarily but it invariably returns to "uncalibrated" only seconds later even without moving the sensor.
It is my understadning that this is a known issue with the BNO055 sensors, and the recommended workaround is to simply ignore the system calibration. My problem is that the Arduino support package does not allow you to read data from the sensor unless all values read "full". Below is the code I am using to read system status and attempt to read orientation data from the IMU.
a = arduino('COM4', 'MEGA2560', 'Libraries', 'I2C');
imu = bno055(a,'OperatingMode','ndof');
tic;
while (toc < 120)
[status,~] = readCalibrationStatus(imu);
disp(status);
if strcmpi(status.System,'full') && strcmpi(status.Magnetometer,'full') && strcmpi(status.Accelerometer,'full') && strcmpi(status.Gyroscope,'full')
break; %System is calibrated proceed further
end
end
while true
[readVal,timestamp] = readOrientation(imu);
disp(readVal);
end
When running the program, either the system status never becomes "full", or it does become "full" and I begin to read data only for it to become "uncalibrated" again after only a couple of seconds.
My main question is: is there a way to read the data even if the system status is not full? Answers in other forums imply that there is, but I do not know how to implement this using MATLAB and the Support Package for Arduino.
0 Kommentare
Akzeptierte Antwort
Amey Waghmare
am 17 Apr. 2023
Hi,
As per my understanding, you are using Bosch ‘BNO055’ 9DoF Absolute Orientation sensor to obtain orientations but are facing issues with the calibration. You want to know if you can read the data from sensor even if the ‘System’ status is ‘uncalibrated’.
The BNO055 sensor includes internal algorithms to calibrate the gyroscope, accelerometer, and magnetometer inside the sensor. The exact nature of the calibration process is not fully documented. However, the calibration status of the sensor can be read from the CALIB_STAT (0x35) register of the sensor.
The MATLAB function "readCalibrationStatus" reads the CALIB_STAT register, extracts the required bits, and outputs the calibration status. It does not implement any additional calibration logic on top of the data read from the calibration register of the BNO055. Ideally, once the calibration of the accelerometer, gyroscope, and magnetometer are complete, the system calibration value should show as calibrated.
To bypass the “BNO055 sensor is uncalibrated” error message, either one of the approaches below can be used:
Option 1:
1. The function “read” can be used to read acceleration, angular velocity, magnetic field, and orientation at a specific rate. See the sample code given below:
a = arduino
imu = bno055(a,'OperatingMode','ndof','SamplesPerRead', 5, 'SampleRate', 50 ,'OutputFormat','matrix')
[accelReadings, gyroReadings, magReadings, orientationReadings,timeStamps, overrun] = read(imu)
For more information on the “read” function, see the following link: https://www.mathworks.com/help/supportpkg/arduinoio/ref/bno055.read.read.html
Option 2:
1. Execute the below command in the command window to open the BNO055 source code:
>> edit bno055
2. Go to the function “readOrientation” in the file. Comment out the code below:
numericStatus = readCalibrationStatusInternal(obj);
if ~all(numericStatus)
error(message('matlab_sensors:general:uncalibratedSensor','BNO055 sensor'));
end
I hope this helps.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!