feat: ESP32 UWB Pro anchor firmware — DS-TWR responder (Issue #544) #570

Merged
sl-jetson merged 1 commits from sl-uwb/issue-544-anchor-firmware into main 2026-03-14 11:49:51 -04:00
Collaborator

Summary

ESP32 UWB Pro anchor firmware for SaltyBot UWB positioning system.

Two anchors mount on the robot body (port / starboard), each USB-connected to the Jetson Orin. Person-worn tags initiate ranging; anchors respond using DS-TWR.

Files

  • esp32/uwb_anchor/src/main.cpp — anchor firmware (DS-TWR responder)
  • esp32/uwb_anchor/platformio.ini — PlatformIO build (anchor0 / anchor1 envs)
  • esp32/uwb_anchor/udev/99-uwb-anchors.rules — USB symlinks for Jetson

Protocol: Double-Sided TWR

Tag → POLL → Anchor → RESP → Tag → FINAL → Anchor computes range
DS-TWR eliminates clock-drift error; targets ±10 cm at up to 120 m.

Serial output (to Jetson ROS2 driver)

+RANGE:<anchor_id>,<range_mm>,<rssi_dbm>

Compatible with existing uwb_driver_node.py AT protocol.

AT commands

AT+RANGE?              → last buffered range
AT+RANGE_ADDR=<hex>    → pair with specific tag
AT+ID?                 → returns +ID:<anchor_id>

Build

pio run -e anchor0 --target upload   # port anchor
pio run -e anchor1 --target upload   # starboard anchor

Closes #544

## Summary ESP32 UWB Pro anchor firmware for SaltyBot UWB positioning system. Two anchors mount on the robot body (port / starboard), each USB-connected to the Jetson Orin. Person-worn tags initiate ranging; anchors respond using DS-TWR. ### Files - `esp32/uwb_anchor/src/main.cpp` — anchor firmware (DS-TWR responder) - `esp32/uwb_anchor/platformio.ini` — PlatformIO build (anchor0 / anchor1 envs) - `esp32/uwb_anchor/udev/99-uwb-anchors.rules` — USB symlinks for Jetson ### Protocol: Double-Sided TWR `Tag → POLL → Anchor → RESP → Tag → FINAL → Anchor computes range` DS-TWR eliminates clock-drift error; targets ±10 cm at up to 120 m. ### Serial output (to Jetson ROS2 driver) ``` +RANGE:<anchor_id>,<range_mm>,<rssi_dbm> ``` Compatible with existing `uwb_driver_node.py` AT protocol. ### AT commands ``` AT+RANGE? → last buffered range AT+RANGE_ADDR=<hex> → pair with specific tag AT+ID? → returns +ID:<anchor_id> ``` ### Build ```bash pio run -e anchor0 --target upload # port anchor pio run -e anchor1 --target upload # starboard anchor ``` Closes #544
sl-jetson added 1 commit 2026-03-14 11:45:50 -04:00
Anchor firmware for Makerfabs ESP32 UWB Pro (DW3000 chip). Two anchors
mount on SaltyBot (port/starboard), USB-connected to Jetson Orin.

- DS-TWR responder: Poll→Resp→Final with ±10cm accuracy
- Streams +RANGE:<id>,<mm>,<rssi_dbm> on Serial 115200
- AT command interface: AT+RANGE?, AT+RANGE_ADDR=, AT+ID?
- ANCHOR_ID 0/1 set at build time (env:anchor0 / env:anchor1)
- PlatformIO config for Makerfabs MaUWB_DW3000 library
- udev rules for /dev/uwb-anchor0 /dev/uwb-anchor1 USB symlinks
- Pin map: SCK=18 MISO=19 MOSI=23 CS=21 RST=27 IRQ=34

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sl-jetson merged commit d36b79371d into main 2026-03-14 11:49:51 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#570
No description provided.