SlimeVR / SlimeVR-Tracker-ESP

SlimeVR tracker firmware for ESP32/ESP8266 and different IMUs
Apache License 2.0
798 stars 274 forks source link

Add range command [Feature Request] #324

Open BlackthornYugen opened 2 months ago

BlackthornYugen commented 2 months ago

I'm curious about the potential of using Ultrawideband (UWB) technology to auto-correct positional drift in tracking systems. The idea is for the Slime server to periodically initiate distance checks between sensors. Would implementing additional range commands to facilitate this process be effective?

// get the distance to another sensor
void requestRangeOnce(const std::string& targetSensorUUID);

// get the distance to another sensor every n ms, if already ranging that sensor the interval is updated
void startPeriodicRangeRequest(const std::string& targetSensorUUID, std::chrono::milliseconds interval);

// stop ranging one sensor
void stopPeriodicRangeRequest(const std::string& targetSensorUUID);

void stopAllPeriodicRangeRequests();

image

@startuml
participant SlimeServer
participant "Sensor A" as A
participant "Sensor B" as B

SlimeServer -> A : Request range to Sensor B
A -> B : Send UWB ping
B --> A : UWB ping response
A -> SlimeServer : 6cm
@enduml

Has anyone looked into UWB to assist with tracking previously? Is this worth experimenting with?

My plan is to order something like a SR040HN and to connect it with serial to a ESP8266 or a ESP32.