Neobotics Foundation Inc.
These docs are public and open source.Edit on GitHub

THE MOTOR ENCODER

A Hall-effect encoder on the motor shaft reports how far the drivetrain has turned.

The encoder

The OSCORE board counts its pulses and publishes the car's odometry on /odom.

Encoder typeHall effect
LocationMotor shaft
Channels3 (incremental A, B, Z)
Resolution1 - 4096
Maximum motor speed20,000 rpm
CountingMCU hardware pulse counter
Topic/odom at ~200 Hz

SHAFT-SIDE COUNTING

The encoder sits on the motor shaft, before the gearbox. One wheel turn is many shaft turns, so every centimetre of travel produces many pulses. The MCU counts them in a hardware counter, so no pulses are missed even at full speed.

Three numbers convert the count into distance: the pulses per shaft revolution, the gear ratio, and the wheel diameter.

Your code reads the encoder through rc.physics:

python
speed = rc.physics.get_encoder_speed() # forward speed in m/s print(speed)

FUSION WITH LiDAR

Odometry drifts over time. Small errors add up, so the position the car calculates slowly moves away from its real position. The SLAM and Nav2 stack corrects for this by combining /odom with the LiDAR scans. The encoder fills in the motion between scans, and the LiDAR corrects the accumulated error. Together they are what lets the car map and localise. /odom is listed with every other topic on the ROS 2 Topics page.