9 Commits

Author SHA1 Message Date
Sebastien Vayrette
6ea6e0ccd1 feat(uwb): add MPU6050 IMU + fall detection to tag, IMU forwarding in anchor + ROS2 node
- Tag: MPU6050 on shared I2C bus (SDA=4, SCL=5, addr 0x68)
- Accel ±8g, gyro ±500dps, read at 50Hz
- Fall detection: freefall+impact or sudden >3.5g
- Fall triggers auto e-stop (ESP-NOW broadcast)
- OLED shows tilt bar + accel magnitude
- New ESP-NOW packet types: MSG_IMU (0x40), MSG_FALL (0x50)
- IMU broadcast at 10Hz via ESP-NOW
- Anchor forwards +IMU: and +FALL: lines to Jetson serial
- ROS2 uwb_driver publishes sensor_msgs/Imu on /uwb/imu
- .gitignore for .pio build dirs
2026-03-14 14:09:39 -04:00
salty
d687ef5242 feat: bidirectional ESP-NOW — anchors share ranges with each other + tag
Anchors:
- Broadcast own range via ESP-NOW after each TWR cycle
- Receive other anchor's range via ESP-NOW, print as +RANGE on serial
- Either anchor's serial port gives Orin BOTH ranges (only need 1 USB/UART)

Tag:
- Receives ESP-NOW from both anchors
- Updates display with both A0 + A1 distances regardless of DW1000 pairing
- Solves the 'only sees A0' display issue
2026-03-14 13:25:18 -04:00
salty
2a78201a2d fix: time-division multiplexing for 2-anchor collision avoidance
Each anchor only runs DW1000Ranging during its 50ms time slot.
Anchor 0 responds in even slots, anchor 1 in odd slots.
Prevents RF collisions that caused wild range readings.
2026-03-14 13:01:04 -04:00
salty
35d43f3173 fix: use LOWPOWER mode + add delay(1) to prevent overheating
- MODE_LONGDATA_RANGE_ACCURACY → MODE_LONGDATA_RANGE_LOWPOWER (both anchor+tag)
- Add delay(1) in tag loop to prevent tight-loop when no anchors respond
- ACCURACY was unnecessary and kept DW1000 radio hot
2026-03-14 12:38:28 -04:00
salty
b7dcc00c5e fix: ESP-NOW callback signature for new ESP-IDF, volatile qualifier 2026-03-14 12:32:11 -04:00
salty
30e012255f fix: char[] for DW1000 addr, suppress -Werror=return-type in lib 2026-03-14 12:31:40 -04:00
salty
ed1542ae11 feat: rewrite UWB firmware for DW1000 (all 3 boards)
Anchor (esp32/uwb_anchor):
- DW1000Ranging library (200m range, MODE_LONGDATA_RANGE_ACCURACY)
- Unique addresses per anchor (anchor0/anchor1 build envs)
- +RANGE output: anchor_id, tag_addr, range_mm, rssi
- ESP-NOW receiver: forwards tag packets + priority E-STOP to Jetson
- AT+ID? command

Tag with Display (esp32/uwb_tag):
- DW1000Ranging as tag, auto-discovers anchors
- SSD1306 OLED: big distance, per-anchor ranges, RSSI bars, link status
- ESP-NOW broadcast: range/heartbeat/estop packets
- E-Stop on GPIO 0 (BOOT button), 10Hz TX while held
- Display at 5Hz, ranging driven by DW1000Ranging.loop()

Shared:
- lib/DW1000/ extracted from mf_DW1000.zip (Makerfabs fork)
- lib_extra_dirs for PlatformIO to find local library
2026-03-14 12:30:26 -04:00
salty
a9e1b9fae5 feat: add OLED display, ESP-NOW wireless, and E-Stop to UWB tag
Tag firmware (esp32/uwb_tag):
- SSD1306 128x64 OLED: shows distance, anchor ranges, RSSI bars, link status
- ESP-NOW broadcast: sends range/heartbeat/estop packets (20 bytes, peer-to-peer)
- Emergency stop: GPIO 0 (BOOT), active LOW, 10Hz TX while held, 3x clear on release
- Display updates at 5Hz, ranging still at 20Hz round-robin
- Added Adafruit SSD1306 + GFX lib_deps to platformio.ini

Anchor firmware (esp32/uwb_anchor):
- ESP-NOW receiver: captures tag packets via ISR ring buffer
- Forwards to Jetson serial as +ESPNOW: and +ESTOP: lines
- E-STOP packets get priority immediate output
- Zero impact on existing TWR ranging loop

For Makerfabs ESP32 UWB Pro with Display (DW3000 chip).
2026-03-14 12:12:31 -04:00
sl-uwb
a4879b6b3f feat: ESP32 UWB Pro anchor firmware — DS-TWR responder (Issue #544)
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>
2026-03-14 11:45:29 -04:00