Stream IMU Data¶
Neon +1.1.2
Data generated by the IMU can be received using the device.receive_imu_datum
method. It returns a UTC timestamp in seconds, the head pose as a quaternion, gyro data, and accelerometer data as follows.
IMUData(
gyro_data=Data3D(x=-0.1659393310546875, y=-0.1964569091796875, z=0.1735687255859375),
accel_data=Data3D(x=-0.02880859375, y=-0.224609375, z=1.0068359375),
quaternion=Quaternion(x=-0.06114135682582855, y=-0.090116947889328, z=0.8700147271156311, w=0.48084819316864014),
timestamp_unix_seconds=1744297102.1941311
)
IMUData
IMUData
¶
Bases: NamedTuple
Data from the Inertial Measurement Unit (IMU).
Contains gyroscope, accelerometer, and rotation data from the IMU sensor.
Attributes:
-
accel_data
(Data3D
) –Accelerometer data in m/s².
-
datetime
(datetime
) –Get timestamp as a datetime object.
-
gyro_data
(Data3D
) –Gyroscope data in deg/s.
-
quaternion
(Quaternion
) –Rotation represented as a quaternion.
-
timestamp_unix_nanoseconds
(int
) –Get timestamp in nanoseconds since Unix epoch.
-
timestamp_unix_ns
(int
) –Get timestamp in nanoseconds since Unix epoch.
-
timestamp_unix_seconds
(float
) –Timestamp in seconds since Unix epoch.
Check the whole example code here
stream_imu.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|