These docs are public and open source.Edit on GitHub
THE ONBOARD IMU
The nine axes IMU is split between two physical sensors and is located on the OSCORE board. It reports how the car is accelerating, how fast it is turning, and where magnetic north sits.
MEASUREMENTS
01
Accelerometer
The reading includes gravity: at rest it shows about 9.8 m/s² pointing down. Because of this, it can also be used to estimate the car's tilt.
02
Gyroscope
It measures the rate of rotation, not the angle itself. You can add up the rate over time to estimate orientation, but small errors accumulate, so it is usually combined with another sensor.
03
Magnetometer
The field points toward magnetic north, so it works as a compass. Motors and metal near the sensor distort the reading, so it needs calibration to be accurate.
READING THE IMU
The IMU is read through rc.physics. Each of the three calls reads one of the three sensors.
pythonaccel = rc.physics.get_linear_acceleration() # (x, y, z) in m/s² 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
Before the data reaches ROS, the firmware removes each sensor's steady bias and combines the accelerometer and gyroscope into an orientation quaternion. The /imu topic carries both: the orientation, and the corrected acceleration and turn rates. Use the orientation if you want a heading without extra work. Use the acceleration and turn rates if you want to write your own filter.

