ME 405 Romi
Loading...
Searching...
No Matches
imu_task.imu_task Class Reference

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

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

imu_task.imu_task.__init__ ( self,
imu,
imu_flg,
yaw,
yaw_velocity )

Initialization.

Parameters
P1IMU object
P2IMU flag
P3Romi Yaw Share
P4Romi Yaw Velocity Share

Definition at line 15 of file imu_task.py.

Member Function Documentation

◆ run()

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.

Member Data Documentation

◆ accel

int imu_task.imu_task.accel = 0

Definition at line 23 of file imu_task.py.

◆ calibrated

int imu_task.imu_task.calibrated = 0

Definition at line 21 of file imu_task.py.

◆ config_flag

int imu_task.imu_task.config_flag = 0

Definition at line 27 of file imu_task.py.

◆ count

int imu_task.imu_task.count = 0

Definition at line 20 of file imu_task.py.

◆ gyro

int imu_task.imu_task.gyro = 0

Definition at line 25 of file imu_task.py.

◆ imu

imu_task.imu_task.imu = imu

Definition at line 17 of file imu_task.py.

◆ imu_flg

imu_task.imu_task.imu_flg = imu_flg

Definition at line 18 of file imu_task.py.

◆ mag

int imu_task.imu_task.mag = 0

Definition at line 26 of file imu_task.py.

◆ state

int imu_task.imu_task.state = 0

Definition at line 19 of file imu_task.py.

◆ substate

int imu_task.imu_task.substate = 0

Definition at line 22 of file imu_task.py.

◆ sys

int imu_task.imu_task.sys = 0

Definition at line 24 of file imu_task.py.

◆ yaw

imu_task.imu_task.yaw = yaw

Definition at line 28 of file imu_task.py.

◆ yaw_velocity

imu_task.imu_task.yaw_velocity = yaw_velocity

Definition at line 29 of file imu_task.py.


The documentation for this class was generated from the following file: