These docs are public and open source.Edit on GitHub
RC.PHYSICS
The physics module provides the IMU's acceleration, rotation, and magnetic field readings.
METHODS
EXAMPLE USAGE
pythonimport racecar_core rc = racecar_core.create_racecar() def start(): pass def update(): ax, ay, az = rc.physics.get_linear_acceleration() # m/s^2 wx, wy, wz = rc.physics.get_angular_velocity() # rad/s # wz is the yaw rate. print(f"down accel {az:.1f} m/s^2, yaw rate {wz:.2f} rad/s") rc.set_start_update(start, update) rc.go()
For full documentation, visit the racecar-neo-library documentation.
