roverc.imu_api
¶
Minimal implementation of the Xsens API.
roverc.imu_api.IMUData
¶
Bases: NamedTuple
IMU orientation, angular velocity, acceleration data.
Attributes:
Name | Type | Description |
---|---|---|
rot |
Float32[ndarray, 3]
|
rotation in Euler angles (roll, pitch, yaw) in radians. |
acc |
Float32[ndarray, 3]
|
acceleration in m/s^2. |
avel |
Float32[ndarray, 3]
|
angular velocity in rad/s. |
Source code in collect/roverc/imu_api.py
roverc.imu_api.InvalidChecksum
¶
roverc.imu_api.XsensIMU
¶
Xsens MTi-3 IMU API.
The IMU should be set up using MT Manager with the following:
- Orientation: Euler Angles; Floating Point 32-bit; 100Hz
- Inertial data: Rate of Turn, Acceleration; Floating Point 32-bit; 100Hz
Parameters:
Name | Type | Description | Default |
---|---|---|---|
port
|
str
|
serial port to use. Must have read/write permissions, e.g.
|
'/dev/ttyUSB0'
|
baudrate
|
int
|
serial baudrate. |
115200
|
name
|
str
|
human readable name. |
'Xsens.MTi-3'
|
Source code in collect/roverc/imu_api.py
read
¶
read() -> Optional[IMUData]
Read a single data packet.
Only handles MTData2 messages; see the Xsens MT Low Level Documentation.
Returns:
Type | Description |
---|---|
Optional[IMUData]
|
IMUData on success; otherwise, returns None. |