|
ME 405 Romi
|
Runs the IMU. More...
Public Member Functions | |
| __init__ (self, imu, imu_flg, yaw, yaw_velocity) | |
| Initialization. | |
| run (self) | |
| Runs the IMU Tasks. | |
Public Attributes | |
| imu = imu | |
| imu_flg = imu_flg | |
| int | state = 0 |
| int | count = 0 |
| int | calibrated = 0 |
| int | substate = 0 |
| int | accel = 0 |
| int | sys = 0 |
| int | gyro = 0 |
| int | mag = 0 |
| int | config_flag = 0 |
| yaw = yaw | |
| yaw_velocity = yaw_velocity | |
Runs the IMU.
This task class which contains a generator finite state machine that runs multiple functions.
It sets up the IMU and collects data from it using its methods
Definition at line 8 of file imu_task.py.
| imu_task.imu_task.__init__ | ( | self, | |
| imu, | |||
| imu_flg, | |||
| yaw, | |||
| yaw_velocity ) |
Initialization.
| P1 | IMU object |
| P2 | IMU flag |
| P3 | Romi Yaw Share |
| P4 | Romi Yaw Velocity Share |
Definition at line 15 of file imu_task.py.
| imu_task.imu_task.run | ( | self | ) |
Runs the IMU Tasks.
State 0 Initialize the IMU by writing to it the coefficients and changing it to the desired fusion mode
State 1 Put IMU data in shares for other tasks (note commented out code is for obtaining calibration coefficients)
State 2 Delay
Definition at line 38 of file imu_task.py.
| int imu_task.imu_task.accel = 0 |
Definition at line 23 of file imu_task.py.
| int imu_task.imu_task.calibrated = 0 |
Definition at line 21 of file imu_task.py.
| int imu_task.imu_task.config_flag = 0 |
Definition at line 27 of file imu_task.py.
| int imu_task.imu_task.count = 0 |
Definition at line 20 of file imu_task.py.
| int imu_task.imu_task.gyro = 0 |
Definition at line 25 of file imu_task.py.
| imu_task.imu_task.imu = imu |
Definition at line 17 of file imu_task.py.
| imu_task.imu_task.imu_flg = imu_flg |
Definition at line 18 of file imu_task.py.
| int imu_task.imu_task.mag = 0 |
Definition at line 26 of file imu_task.py.
| int imu_task.imu_task.state = 0 |
Definition at line 19 of file imu_task.py.
| int imu_task.imu_task.substate = 0 |
Definition at line 22 of file imu_task.py.
| int imu_task.imu_task.sys = 0 |
Definition at line 24 of file imu_task.py.
| imu_task.imu_task.yaw = yaw |
Definition at line 28 of file imu_task.py.
| imu_task.imu_task.yaw_velocity = yaw_velocity |
Definition at line 29 of file imu_task.py.