Imu
Angular velocity in rad/s, linear acceleration in m/s², both in header.frame_id.
Full docstring
Each covariance is a (3, 3) matrix (ROS flattens to 9), or `None` when unknown.
Fields
| Name | Type | Default |
|---|---|---|
orientation | Quaternion | required |
angular_velocity | Vector3 | required |
linear_acceleration | Vector3 | required |
orientation_covariance | Array | None | None |
angular_velocity_covariance | Array | None | None |
linear_acceleration_covariance | Array | None | None |
header | Header | Header() |
Example
One instance from the package's own test catalog; the output is its real repr().
Imu(orientation=Quaternion(x=0.0, y=0.0, z=0.0, w=1.0), angular_velocity=Vector3(x=0.0, y=0.0, z=0.1), linear_acceleration=Vector3(x=0.0, y=0.0, z=9.81), orientation_covariance=float64[3×3], header=Header(stamp=1761600000.25, frame_id='camera_color_optical_frame'))to_dict() as JSON
{
"_type": "sensor/Imu",
"orientation": {
"_type": "geometry/Quaternion",
"x": 0.0,
"y": 0.0,
"z": 0.0,
"w": 1.0
},
"angular_velocity": {
"_type": "geometry/Vector3",
"x": 0.0,
"y": 0.0,
"z": 0.1
},
"linear_acceleration": {
"_type": "geometry/Vector3",
"x": 0.0,
"y": 0.0,
"z": 9.81
},
"orientation_covariance": {
"dtype": "<f8",
"shape": [3, 3],
"data": [0.001, 0.0, 0.0, 0.0, 0.001, 0.0, 0.0, 0.0, 0.001]
},
"angular_velocity_covariance": null,
"linear_acceleration_covariance": null,
"header": {
"_type": "std/Header",
"stamp": 1761600000.25,
"frame_id": "camera_color_optical_frame",
"meta": {}
}
}Long arrays are cut after 16 values and say so with “…”.
Functions
Constructors
Classmethods and staticmethods: ways to build one.