Skip to content

Add hall sensor tick counters for wheel odometry - #599

Merged
EFeru merged 1 commit into
EFeru:mainfrom
anttix:odometry
Jul 4, 2026
Merged

Add hall sensor tick counters for wheel odometry#599
EFeru merged 1 commit into
EFeru:mainfrom
anttix:odometry

Conversation

@anttix

@anttix anttix commented May 31, 2026

Copy link
Copy Markdown

Port hall sensor tick counting from hoverboard-robotics-master branch. Each DMA ISR cycle, the hall sensor state is decoded via a lookup table and a direction is determined from the position transition. Counters odom_l and odom_r wrap at 9000 ticks (10 full wheel revolutions).

The counters are exposed in the serial feedback struct as wheelR_cnt and wheelL_cnt and included in the checksum for both USART2 and USART3.

Testing done

  • Tested on a "standard" board with custom ROS2 driver taking advantage of the functionality. While the feedback format is expected to be compatible, no explicit verification with the hoverboard-robotics's ROS2 driver was performed.

Port hall sensor tick counting from hoverboard-robotics-master branch.
Each DMA ISR cycle, the hall sensor state is decoded via a lookup table
and a direction is determined from the position transition. Counters
odom_l and odom_r wrap at 9000 ticks (10 full wheel revolutions).

The counters are exposed in the serial feedback struct as wheelR_cnt
and wheelL_cnt and included in the checksum for both USART2 and USART3.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@EFeru
EFeru merged commit 8f934b8 into EFeru:main Jul 4, 2026
1 check passed
@EFeru

EFeru commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Thanks for your nice contribution @anttix !

@Tomas-Kuchta-FPV

Copy link
Copy Markdown

OoOoooOoo I love it as I really wanted to push odometry to ardupilot from hoverboard hack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants