public interface BNO055IMU
BNO055IMU
interface abstracts the functionality of the Bosch/Sensortec
BNO055 Intelligent 9-axis absolute orientation sensor. The BNO055 can output the
following sensor data (as described in AdaFruit
Absolute Orientation Sensor).
Of those, the first (the gravity-corrected absolute orientation vector) is arguably the most useful in FTC robot design. It's really handy.
BNO055IMUImpl
,
BNO055 product page,
BNO055 specificationModifier and Type | Interface and Description |
---|---|
static class |
BNO055IMU.AccelBandwidth |
static interface |
BNO055IMU.AccelerationIntegrator
BNO055IMU.AccelerationIntegrator encapsulates an algorithm for integrating
acceleration information over time to produce velocity and position. |
static class |
BNO055IMU.AccelPowerMode |
static class |
BNO055IMU.AccelRange |
static class |
BNO055IMU.AccelUnit |
static class |
BNO055IMU.AngleUnit |
static class |
BNO055IMU.CalibrationData
See Section 3.6.4 of the BNO055 Specification.
|
static class |
BNO055IMU.CalibrationStatus |
static class |
BNO055IMU.GyroBandwidth |
static class |
BNO055IMU.GyroPowerMode |
static class |
BNO055IMU.GyroRange |
static class |
BNO055IMU.MagOpMode |
static class |
BNO055IMU.MagPowerMode |
static class |
BNO055IMU.MagRate |
static class |
BNO055IMU.Parameters
Instances of Parameters contain data indicating how a BNO055 absolute orientation
sensor is to be initialized.
|
static class |
BNO055IMU.PitchMode |
static class |
BNO055IMU.Register
BNO055IMU.Register provides symbolic names for each of the BNO055 device registers. |
static class |
BNO055IMU.SensorMode
Sensor modes are described in Table 3-5 (p21) of the BNO055 specification,
where they are termed "operation modes".
|
static class |
BNO055IMU.SystemError |
static class |
BNO055IMU.SystemStatus |
static class |
BNO055IMU.TempUnit |
Modifier and Type | Field and Description |
---|---|
static I2cAddr |
I2CADDR_ALTERNATE |
static I2cAddr |
I2CADDR_DEFAULT |
static I2cAddr |
I2CADDR_UNSPECIFIED |
Modifier and Type | Method and Description |
---|---|
void |
close()
Shut down the sensor.
|
Acceleration |
getAcceleration()
Returns the last observed acceleration of the sensor.
|
Orientation |
getAngularOrientation()
Returns the absolute orientation of the sensor as a set three angles
|
Orientation |
getAngularOrientation(AxesReference reference,
AxesOrder order,
AngleUnit angleUnit)
Returns the absolute orientation of the sensor as a set three angles with indicated parameters.
|
AngularVelocity |
getAngularVelocity()
Returns the rate of change of the absolute orientation of the sensor.
|
BNO055IMU.CalibrationStatus |
getCalibrationStatus()
Returns the calibration status of the IMU
|
Acceleration |
getGravity()
Returns the direction of the force of gravity relative to the sensor.
|
Acceleration |
getLinearAcceleration()
Returns the acceleration experienced by the sensor due to the movement of the sensor.
|
MagneticFlux |
getMagneticFieldStrength()
Returns the magnetic field strength experienced by the sensor.
|
Acceleration |
getOverallAcceleration()
Returns the overall acceleration experienced by the sensor.
|
BNO055IMU.Parameters |
getParameters()
Returns the parameters which which initialization was last attempted, if any
|
Position |
getPosition()
Returns the current position of the sensor as calculated by doubly integrating the observed
sensor accelerations.
|
Quaternion |
getQuaternionOrientation()
Returns the absolute orientation of the sensor as a quaternion.
|
BNO055IMU.SystemError |
getSystemError()
If
getSystemStatus() is 'system error' (1), returns particulars
regarding that error. |
BNO055IMU.SystemStatus |
getSystemStatus()
Returns the current status of the system.
|
Temperature |
getTemperature()
Returns the current temperature.
|
Velocity |
getVelocity()
Returns the current velocity of the sensor as calculated by integrating the observed
sensor accelerations.
|
boolean |
initialize(BNO055IMU.Parameters parameters)
Initialize the sensor using the indicated set of parameters.
|
boolean |
isAccelerometerCalibrated()
Answers as to whether the accelerometer is fully calibrated.
|
boolean |
isGyroCalibrated()
Answers as to whether the gyro is fully calibrated.
|
boolean |
isMagnetometerCalibrated()
Answers as to whether the magnetometer is fully calibrated.
|
boolean |
isSystemCalibrated()
Answers as to whether the system is fully calibrated.
|
byte[] |
read(BNO055IMU.Register register,
int cb)
Low level: read data starting at the indicated register
|
byte |
read8(BNO055IMU.Register register)
Low level: read the byte starting at the indicated register
|
BNO055IMU.CalibrationData |
readCalibrationData()
Read calibration data from the IMU which later can be restored with writeCalibrationData().
|
void |
startAccelerationIntegration(Position initialPosition,
Velocity initialVelocity,
int msPollInterval)
Start (or re-start) a thread that continuously at intervals polls the current linear acceleration
of the sensor and integrates it to provide velocity and position information.
|
void |
stopAccelerationIntegration()
Stop the integration thread if it is currently running.
|
void |
write(BNO055IMU.Register register,
byte[] data)
Low level: write data starting at the indicated register
|
void |
write8(BNO055IMU.Register register,
int bVal)
Low level: write a byte to the indicated register
|
void |
writeCalibrationData(BNO055IMU.CalibrationData data)
Write calibration data previously retrieved.
|
static final I2cAddr I2CADDR_UNSPECIFIED
static final I2cAddr I2CADDR_DEFAULT
static final I2cAddr I2CADDR_ALTERNATE
boolean initialize(BNO055IMU.Parameters parameters)
parameters
- the parameters with which to initialize the deviceBNO055IMU.Parameters getParameters()
void close()
Orientation getAngularOrientation()
getQuaternionOrientation()
,
Orientation
,
getAngularOrientation(AxesReference, AxesOrder, org.firstinspires.ftc.robotcore.external.navigation.AngleUnit)
Orientation getAngularOrientation(AxesReference reference, AxesOrder order, AngleUnit angleUnit)
reference
- the axes reference in which the result will be expressedorder
- the axes order in which the result will be expressedangleUnit
- the angle units in which the result will be expressedOrientation
,
getAngularOrientation()
Acceleration getOverallAcceleration()
getLinearAcceleration()
,
getGravity()
AngularVelocity getAngularVelocity()
getAngularOrientation()
Acceleration getLinearAcceleration()
getOverallAcceleration()
,
getGravity()
Acceleration getGravity()
getOverallAcceleration()
,
getLinearAcceleration()
Temperature getTemperature()
MagneticFlux getMagneticFieldStrength()
Quaternion getQuaternionOrientation()
getAngularOrientation()
Position getPosition()
BNO055IMU.Parameters.accelerationIntegrationAlgorithm
,
startAccelerationIntegration(Position, Velocity, int)
Velocity getVelocity()
BNO055IMU.Parameters.accelerationIntegrationAlgorithm
,
startAccelerationIntegration(Position, Velocity, int)
Acceleration getAcceleration()
getLinearAcceleration()
,
BNO055IMU.Parameters.accelerationIntegrationAlgorithm
,
startAccelerationIntegration(Position, Velocity, int)
void startAccelerationIntegration(Position initialPosition, Velocity initialVelocity, int msPollInterval)
initialPosition
- If non-null, the current sensor position is set to this value. If
null, the current sensor position is unchanged.initialVelocity
- If non-null, the current sensor velocity is set to this value. If
null, the current sensor velocity is unchanged.msPollInterval
- the interval to use, in milliseconds, between successive calls to getLinearAcceleration()
stopAccelerationIntegration()
,
BNO055IMU.AccelerationIntegrator
void stopAccelerationIntegration()
BNO055IMU.SystemStatus getSystemStatus()
Result Meaning
0 idle
1 system error
2 initializing peripherals
3 system initialization
4 executing self-test
5 sensor fusion algorithm running
6 system running without fusion algorithms
BNO055IMU.SystemError getSystemError()
getSystemStatus()
is 'system error' (1), returns particulars
regarding that error.
See section 4.3.58 of the BNO055 specification.
Result Meaning
0 no error
1 peripheral initialization error
2 system initialization error
3 self test result failed
4 register map value out of range
5 register map address out of range
6 register map write error
7 BNO low power mode not available for selected operation mode
8 accelerometer power mode not available
9 fusion algorithm configuration error
A sensor configuration error
BNO055IMU.CalibrationStatus getCalibrationStatus()
boolean isSystemCalibrated()
boolean isGyroCalibrated()
boolean isAccelerometerCalibrated()
boolean isMagnetometerCalibrated()
BNO055IMU.CalibrationData readCalibrationData()
writeCalibrationData(CalibrationData)
void writeCalibrationData(BNO055IMU.CalibrationData data)
data
- the calibration data to writereadCalibrationData()
byte read8(BNO055IMU.Register register)
register
- the location from which to read the databyte[] read(BNO055IMU.Register register, int cb)
register
- the location from which to read the datacb
- the number of bytes to readvoid write8(BNO055IMU.Register register, int bVal)
register
- the location at which to write the databVal
- the data to writevoid write(BNO055IMU.Register register, byte[] data)
register
- the location at which to write the datadata
- the data to write