EncoderNEORACER DOCS
These docs are public and open source.Edit on GitHub
HARDWARE / SENSORS

THE MOTOR ENCODER.

A Hall-effect encoder on the motor shaft reports how far the drivetrain has turned. The MCU (microcontroller unit) counts its pulses in hardware, folds in the gear ratio and the car's steering geometry, and publishes the result on /odom at ~200 Hz. That is the car telling you, between LiDAR scans, how far and how fast it has travelled.

Dead reckoning between scansHall effect · motor shaftMCU integrated/odom · nav_msgs/Odometry
01 / ONE ENCODER, COUNTED IN HARDWARE

SHAFT-SIDE COUNTING.

The encoder sits on the motor shaft, before the gearbox, which is the right side to measure from: one wheel turn is many shaft turns, so every centimetre of travel produces plenty of pulses. The MCU's hardware pulse counter tallies them without interrupting the processor, which is how the count stays honest even at full speed.

02 / TICKS TO ODOMETRY

FROM COUNTS TO /odom.

01

Counted on the shaft

Pulses accumulate in a hardware counter.
Each shaft revolution produces a fixed number of Hall pulses. The gear ratio and wheel diameter turn that count into distance along the ground.
02

Fused on the MCU

Distance plus heading becomes a position.
The MCU combines the travelled distance with the IMU's sense of rotation and the steering geometry, tracking position, velocity, and yaw in one place. That fused state streams to the Jetson at ~200 Hz.
03

Published on /odom

The estimate leaves the car as nav_msgs/Odometry.
The driver publishes the estimate on /odom, where the rest of the stack subscribes to it the same way it subscribes to any other topic.
03 / RESOLUTION

WHAT SETS THE PRECISION.

Three numbers decide how finely the odometry resolves motion: the pulses per shaft revolution, the gear ratio, and the wheel diameter. Together they set how much ground one pulse represents. Measuring on the shaft side of the gearbox multiplies the resolution by the gear ratio, which is why a simple Hall sensor is enough for clean odometry.

04 / WHY THE STACK CARES

FUSION WITH LiDAR.

On its own, odometry drifts. Run long enough and the dead-reckoning position wanders away from the truth. That is fine, because the SLAM and Nav2 stack does not trust it alone. It fuses the odometry from /odom with the LiDAR scans, using the encoder to fill in the motion between scans and the LiDAR to correct the drift. Together they let the car map and localise, which neither signal does well by itself.

  • The encoder gives continuous, high-rate motion between LiDAR frames.
  • LiDAR gives absolute structure that pins the drift back down.
  • The /odom topic is where the estimate starts, listed alongside every other ROS 2 topic.
05 / AT A GLANCE

SPECIFICATIONS.

FieldValue
Encoder typeHall effect
LocationMotor shaft (one encoder)
CountingMCU hardware pulse counter
Topic/odom at ~200 Hz
Messagenav_msgs/Odometry