IMU-BNO055.Parameters

BNO055.Parameters is a way to configure and customize the settings of your BNO055 sensor. These parameters influence how the sensor operates and the type of data it provides. You can use the block in this section to create new parameters, modify their attributes, and retrieve information from them.

new IMU-BNO055.Parameters

Creates a new IMU-BNO055.Parameters Object.

setAccelUnit

Updates the IMU parameters object by setting the acceleration units to either METERS_PERSEC_PERSEC or MILLI_EARTH_GRAVITY.

Key points:

  • METERS_PERSEC_PERSEC: This represents acceleration in the standard SI unit, meters per second squared (m/s²). This is a direct measure of how much an object's velocity changes every second.

  • MILLI_EARTH_GRAVITY: This represents acceleration in terms of thousandths of Earth's standard gravitational acceleration (g). Earth's standard gravity is approximately 9.80665 m/s². So, 1 milli-g is equal to 0.00980665 m/s².

setAccelerationIntegrationAlgorithm

Sets the acceleration integration algorithm in the IMU parameters object to either NAIVE or JUST_LOGGING. Acceleration integration is the process of mathematically processing raw acceleration data from the IMU to estimate velocity and position. This is useful for tracking the robot's movement across the field even when other methods, like wheel encoders, might not be reliable (e.g., during slippage or when the robot is lifted)

Key points:

  • NAIVE: This algorithm performs straightforward integration of acceleration data to calculate velocity and then integrates velocity to calculate position. This algorithm is simple to implement and computationally efficient. But it could accumulate errors caused by the drift and could lead to inaccurate position estimates because it does not consider the gravity effect.

  • JUST_LOGGING. This algorithm doesn't actually perform any integration. It simply logs the raw acceleration data for later analysis or processing.

setAngleUnit

Updates the IMU parameters object by setting the angle unit to either DEGREES or RADIANS.

Key points:

  • DEGREES: This is the most common and intuitive unit for representing angles. A full circle is 360 degrees, a right angle is 90 degrees, and so on.

  • RADIANS: This is the standard unit of angular measurement in mathematics and physics. A full circle is 2Ï€ radians, a right angle is Ï€/2 radians.

setCalibrationDataFile

Updates the IMU parameters object by setting the calibration data file to a specified file name.

Key points:

  • IMU-BNO055 are sensitive instruments that can have slight variations and offsets in their measurements.

  • Calibration is the process of measuring and compensating for these inherent errors to improve the accuracy of the sensor readings.

  • Calibration data is often stored in a file so it can be loaded and applied each time the IMU is initialized.

setI2cAddess7Bit

Updates the IMU parameters object by setting the 7 bit I2C address.

Key points:

  • Purpose. Change the default 7 bit I2C address to differentiate sensors.

  • The address must be an even number from 8 to 127 included.

setI2cAddess8Bit

Updates the IMU parameters object by setting the 8 bit I2C address.

Key points:

  • Purpose. Change the default 8 bit I2C address to differentiate sensors.

  • The address must be an even number from 16 to 254 included.

setLoggingEnabled

Updates the IMU parameters object by setting the logging enabled state to true or false.

Key points:

  • If the state is set to true the IMU sensor activities will be added to the log.

  • If the state is set to false, there will be no log of the IMU sensor activities.

setLoggingTag

Updates the IMU parameters object by setting the logging tag to a specific text. This tag will appear at the beginning of each IMU log entry.

Key points:

  • This tag makes it easier to visually scan and interpret log files, especially when multiple components or sensors are generating log entries.

setSensorMode

Updates the IMU parameters object by setting the senor’s mode to one of 11 sensor modes:

Individual Sensor Modes

  • ACCONLY: Only the accelerometer is active. Use this when you just need linear acceleration data (e.g., detecting if the robot is being bumped or tilted).

  • MAGONLY: Only the magnetometer is active. Acts like a compass, providing information about the Earth's magnetic field.

  • GYROONLY: Only the gyroscope is active. Measures how fast the sensor is rotating around its axes.

Combined Sensor Modes

  • ACCMAG: Accelerometer and magnetometer are both active. Useful when you need both linear acceleration and compass-like heading information.

  • ACCGYRO: Accelerometer and gyroscope are both active. Common for basic orientation tracking and motion control.

  • MAGGYRO: Magnetometer and gyroscope are both active. Can be used for orientation tracking with lower power consumption than using the gyroscope alone.

Fusion Modes (Combining all Sensors)

  • AMG (ACC-MAG-GYRO): All three sensors are active. Provides the most complete information about the sensor's movement and orientation.

  • IMU: Fuses accelerometer and gyroscope data to calculate orientation. Fast and suitable for many applications.

  • COMPASS: Uses all sensors to calculate geographic direction (like a compass). Requires calibration due to magnetic field variations.

  • M4G: Similar to IMU mode but uses the magnetometer instead of the gyroscope to detect rotation. Lower power consumption but sensitive to magnetic fields.

  • NDOF: Advanced fusion mode that provides highly accurate orientation data, even in the presence of magnetic interference.

  • NDOF_FMC_OFF: Same as NDOF but without fast magnetometer calibration. Slightly lower power consumption but may require longer calibration times.

Key points:

How to choose the right mode?

  • Consider your application's needs: Do you need just acceleration, just orientation, or a combination?

  • Power consumption: Some modes consume less power than others.

  • Accuracy: Fusion modes generally provide the most accurate orientation data.

  • Calibration: Some modes, like COMPASS, require calibration to function properly.

setTempUnit

Updates the IMU parameters object by setting the temperature unit to either CELSIUS, FARENHEIT, or KELVIN.

Key points:

  • CELSIUS: The most widely used temperature scale globally, especially for everyday measurements, weather reports, and scientific applications.

  • FARENHEIT: Primarily used in the United States for everyday temperature measurements.

  • KELVIN: Used mainly in scientific fields, especially those involving very low or very high temperatures (like in thermodynamics or astronomy).

AccelUnit

Returns the acceleration unit of the IMU parameters object.

AccelerationIntegrationAlgorithm

Returns the acceleration integration algorithm of the IMU parameters object.

AngleUnit

Returns the angle unit of the IMU parameters object.

CalibrationDataFile

Returns the calibration data file of the IMU parameters object.

I2cAddess7Bit

Returns the 7 bit I2C address of the IMU parameters object.

I2cAddess8Bit

Returns the 8 bit I2C address of the IMU parameters object.

LoggingEnabled

Returns whether logging is enabled or not.

LoggingTag

Returns the logging tag of the IMU parameters object.

SensorMode

Returns the sensor mode of the IMU parameters object.

TempUnit

Returns the temperature unit of the IMU parameters object.