get_imu
Signature:
BoosterRobot.get_imu(imu_id: str = "") -> IMUState
Description:
Get the most recent frame of IMU data.
Parameters:
Parameter | Type | Default | Description |
|---|---|---|---|
|
|
| IMU ID; leave empty to use the default IMU. |
Returns:
IMUState, see "Perception and State Data / IMUState"
Raises:
DataNotReadyError: No IMU data was obtained within the timeout period.
Example:
from boosteros.robots.booster import BoosterRobot
robot = BoosterRobot()
imu = robot.get_imu()
print(imu.timestamp, imu.rpy)
# Example output: 1781085503.5147228 [ 1.11528370e-05 4.49275300e-02 -1.56997216e+00]