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 200 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 firmware does two jobs before the data reaches ROS: it subtracts each sensor's steady bias, and it fuses the accelerometer and gyro into an orientation quaternion. Both arrive on /imu together: the fused orientation, plus the bias-corrected raw acceleration and turn rates. Use the quaternion for a ready-made heading; use the raw fields to run your own filter and control the trade-off between responsiveness and noise.
THE ROS 2 TOPICS.
The controller 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.
