Initializes IMU Sensor.
More...
|
| | __init__ (self, i2c) |
| | Initialization.
|
| | euler (self) |
| | Read Euler Angles.
|
| | calibration_check (self) |
| | Check IMU Calibration.
|
| | calibration_check_sys (self) |
| | Check System Calibration.
|
| | calibration_check_gyro (self) |
| | Check Gyroscope Calibration.
|
| | calibration_check_accel (self) |
| | Check Accelerometer Calibration.
|
| | calibration_check_mag (self) |
| | Check Magnetometer Calibration.
|
| | get_calibration_coeff_accel (self) |
| | Get the Accelerometer Calibration Coefficients.
|
| | get_calibration_coeff_mag (self) |
| | Get the Magnetometer Calibration Coefficients.
|
| | get_calibration_coeff_gyro (self) |
| | Get the Gyroscope Calibration Coefficients.
|
| | get_calibration_coeff (self) |
| | Get the Accelerometer, Magnetometer and Gyroscope Calibration Coefficients Method.
|
| | change_mode (self, mode) |
| | Change the IMU Operating Mode.
|
| | write_calibration_coeff (self, coef1, coef2, coef3, coef4, coef5, coef6, coef7, coef8, coef9, coef10, coef11) |
| | Write Calibration Coefficients.
|
| | get_Euler_x (self) |
| | Get Euler x data.
|
| | get_Euler_y (self) |
| | Get Euler Y data.
|
| | get_Euler_z (self) |
| | Get Euler Z data.
|
| | get_Yaw_Velocity (self) |
| | Get Yaw Angular Velocity data.
|
| | get_Roll_Velocity (self) |
| | Get Roll Angular Velocity data.
|
| | get_Pitch_Velocity (self) |
| | Get Pitch Angular Velocity data.
|
|
| | _buf = bytearray((0 for n in range(22))) |
| | _i2c = i2c |
| | _buf_8 = bytearray((0)) |
Initializes IMU Sensor.
This class manages the IMU sensors for romi.
Definition at line 7 of file imu.py.
◆ __init__()
| imu.IMU.__init__ |
( |
| self, |
|
|
| i2c ) |
Initialization.
- Parameters
-
Definition at line 45 of file imu.py.
◆ _read_reg()
| imu.IMU._read_reg |
( |
| self, |
|
|
| reg ) |
|
protected |
Read Register.
Helper method to get data from the IMU
- Parameters
-
Definition at line 58 of file imu.py.
◆ calibration_check()
| imu.IMU.calibration_check |
( |
| self | ) |
|
Check IMU Calibration.
Returns the Caliration status of the System, Gyroscope, Accelerometer and Magnetometer
Value of 3 means fully calibrated
Definition at line 87 of file imu.py.
◆ calibration_check_accel()
| imu.IMU.calibration_check_accel |
( |
| self | ) |
|
Check Accelerometer Calibration.
Returns the Caliration status of the Accelerometer
Value of 3 means fully calibrated
Definition at line 122 of file imu.py.
◆ calibration_check_gyro()
| imu.IMU.calibration_check_gyro |
( |
| self | ) |
|
Check Gyroscope Calibration.
Returns the Caliration status of the Gyroscope
Value of 3 means fully calibrated
Definition at line 112 of file imu.py.
◆ calibration_check_mag()
| imu.IMU.calibration_check_mag |
( |
| self | ) |
|
Check Magnetometer Calibration.
Returns the Caliration status of the Magnetometer
Value of 3 means fully calibrated
Definition at line 132 of file imu.py.
◆ calibration_check_sys()
| imu.IMU.calibration_check_sys |
( |
| self | ) |
|
Check System Calibration.
Returns the Calibration status of the System
Returns a 3 when the entire system is calibrated
Definition at line 102 of file imu.py.
◆ change_mode()
| imu.IMU.change_mode |
( |
| self, |
|
|
| mode ) |
Change the IMU Operating Mode.
Definition at line 173 of file imu.py.
◆ euler()
Read Euler Angles.
Returns Heading, Roll and Pitch
Definition at line 76 of file imu.py.
◆ get_calibration_coeff()
| imu.IMU.get_calibration_coeff |
( |
| self | ) |
|
Get the Accelerometer, Magnetometer and Gyroscope Calibration Coefficients Method.
Returns the Accelerometer, Magnetometer and Gyroscope Calibration Coefficients as binary data
Definition at line 168 of file imu.py.
◆ get_calibration_coeff_accel()
| imu.IMU.get_calibration_coeff_accel |
( |
| self | ) |
|
Get the Accelerometer Calibration Coefficients.
Returns the Accelerometer Calibration Coefficients as binary data
Definition at line 140 of file imu.py.
◆ get_calibration_coeff_gyro()
| imu.IMU.get_calibration_coeff_gyro |
( |
| self | ) |
|
Get the Gyroscope Calibration Coefficients.
Returns the Gyroscope Calibration Coefficients as binary data
Definition at line 158 of file imu.py.
◆ get_calibration_coeff_mag()
| imu.IMU.get_calibration_coeff_mag |
( |
| self | ) |
|
Get the Magnetometer Calibration Coefficients.
Returns the Magnetometer Calibration Coefficients as binary data
Definition at line 149 of file imu.py.
◆ get_Euler_x()
| imu.IMU.get_Euler_x |
( |
| self | ) |
|
Get Euler x data.
Reads the Euler data to use as measurments
Definition at line 192 of file imu.py.
◆ get_Euler_y()
| imu.IMU.get_Euler_y |
( |
| self | ) |
|
Get Euler Y data.
Reads the Euler data to use as measurments
Definition at line 201 of file imu.py.
◆ get_Euler_z()
| imu.IMU.get_Euler_z |
( |
| self | ) |
|
Get Euler Z data.
Reads the Euler data to use as measurments
Definition at line 210 of file imu.py.
◆ get_Pitch_Velocity()
| imu.IMU.get_Pitch_Velocity |
( |
| self | ) |
|
Get Pitch Angular Velocity data.
Reads the Pitch Angular Velocity to use as measurments
Definition at line 233 of file imu.py.
◆ get_Roll_Velocity()
| imu.IMU.get_Roll_Velocity |
( |
| self | ) |
|
Get Roll Angular Velocity data.
Reads the Roll Angular Velocity to use as measurments
Definition at line 226 of file imu.py.
◆ get_Yaw_Velocity()
| imu.IMU.get_Yaw_Velocity |
( |
| self | ) |
|
Get Yaw Angular Velocity data.
Reads the Yaw Angular Velocity to use as measurments
Definition at line 219 of file imu.py.
◆ write_calibration_coeff()
| imu.IMU.write_calibration_coeff |
( |
| self, |
|
|
| coef1, |
|
|
| coef2, |
|
|
| coef3, |
|
|
| coef4, |
|
|
| coef5, |
|
|
| coef6, |
|
|
| coef7, |
|
|
| coef8, |
|
|
| coef9, |
|
|
| coef10, |
|
|
| coef11 ) |
Write Calibration Coefficients.
Writes the Calibration Coefficients to the IMU from pre-recorded binary data
Definition at line 182 of file imu.py.
◆ _buf
| imu.IMU._buf = bytearray((0 for n in range(22))) |
|
protected |
◆ _buf_8
| imu.IMU._buf_8 = bytearray((0)) |
|
protected |
◆ _i2c
◆ DEV_ADDR
Definition at line 9 of file imu.py.
The documentation for this class was generated from the following file:
- C:/Users/14083/vscode_python/imu.py