THE ONBOARD IMU.
Two parts on one board: a QMI8658A (3-axis accelerometer and 3-axis gyroscope) and a QMC6309 (3-axis magnetometer), nine axes between them. They report how the car is accelerating, how fast it is turning, and where magnetic north sits, all in the imu_link frame at 100 Hz.
WHAT IT MEASURES.
Each of the three sensors answers a different question. The accelerometer reads linear acceleration along x, y, and z in metres per second squared, which includes gravity. The gyroscope reads angular velocity around each axis in radians per second. The magnetometer reads the local magnetic field in teslas, which is what you would lean on for an absolute heading.
Accelerometer
Gyroscope
Magnetometer
THE rc.physics API.
One thing to flag up front, because it surprises almost everyone: the IMU is not rc.imu. It lives under rc.physics, alongside the rest of the motion sensing. The three calls map straight onto the three sensors.
pythonaccel = rc.physics.get_linear_acceleration() # (x, y, z) in m/s^2 gyro = rc.physics.get_angular_velocity() # (x, y, z) in rad/s mag = rc.physics.get_magnetic_field() # (x, y, z) in teslas, car only print(accel) # e.g. acceleration along each axis, gravity included print(gyro) # turn rate around each axis print(mag) # magnetic field vector
rc.physics.get_linear_acceleration()· linear acceleration in m/s^2, gravity included.rc.physics.get_angular_velocity()· angular velocity in rad/s around each axis.rc.physics.get_magnetic_field()· magnetic field in teslas. Available on the car only.
WHAT IT OUTPUTS.
The readings come through raw and bias-corrected. They are not run through an orientation filter, so there is no fused roll, pitch, or yaw waiting for you. That is by design: the smoothing and sensor fusion are yours to write, so you stay in control of the trade-off between responsiveness and noise rather than inheriting one. A light moving average over the accelerometer, or a complementary filter that blends the gyro with the magnetometer, is a reasonable place to start.
THE ROS 2 TOPICS.
Under the hood, imu_node publishes the inertial data and the magnetic field on two separate topics, both stamped in the imu_link frame.
| Topic | Message type | Frame | Units |
|---|---|---|---|
| /imu | sensor_msgs/Imu | imu_link | linear accel m/s^2, angular velocity rad/s |
| /mag | sensor_msgs/MagneticField | imu_link | magnetic field in teslas |
ON THE CAR.
On the shipping car, the IMU does not talk to the Jetson directly. An MCU (microcontroller unit) sits between them and bridges the sensor to the Jetson, then the data surfaces on the same topics and the same rc.physics calls you saw above. The MCU is also why the magnetometer reading is present on the car: that path carries the full 9-axis stream.
