feat: UWB anchor auto-calibration via inter-anchor ranging + MDS (Issue #602) #608
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "sl-uwb/issue-602-anchor-calibration"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Implements automated UWB anchor position calibration (Issue #602).
Anchor firmware (
esp32/uwb_anchor/src/main.cpp)peer_range_once(peer_id)— DS-TWR initiator role toward a peer anchor: POLL → RESP → FINAL exchange with range estimate Ra − Da/2AT+PEER_RANGE=<id>command: triggers inter-anchor ranging, responds with+PEER_RANGE:<my_id>,<peer_id>,<mm>,<rssi>or+PEER_RANGE:ERR,<peer_id>,TIMEOUTROS2
saltybot_uwb_calibration_msgs(new package)CalibrateAnchors.srv— request(anchor_ids[], n_samples), response(positions_x/y/z[], residual_rms_m, anchor_positions_json)ROS2
saltybot_uwb_calibration(new package)mds_math.py— classical MDS: double-centred D², eigendecomposition to recover 2-D positions;anchor_frame_align()fixes anchor-0 at origin, anchor-1 on +X axiscalibration_node.py—/saltybot/uwb/calibrate_anchorsservice: opens anchor serial ports, round-robinsAT+PEER_RANGE=for all N×(N-1)/2 pairs, builds distance matrix, runs MDS, returns JSON anchor configTests
test/test_mds_math.py) — no ROS2 or hardware requiredTest plan
AT+PEER_RANGE=1returns+PEER_RANGE:0,1,<mm>,<rssi>from anchor 0 toward anchor 1+RANGEline when initiator's FINAL is received (responder mode stays active)ros2 launch saltybot_uwb_calibration uwb_calibration.launch.pyros2 service call /saltybot/uwb/calibrate_anchors saltybot_uwb_calibration_msgs/srv/CalibrateAnchors "{anchor_ids: [], n_samples: 5}"🤖 Generated with Claude Code