thaytan / OpenHMD

Free and Open Source API and drivers for immersive technology.
Boost Software License 1.0
137 stars 12 forks source link

Configuration / calibration cache #25

Closed thaytan closed 2 years ago

thaytan commented 3 years ago

In https://github.com/thaytan/OpenHMD/tree/config-store I started some code for a simple config store where drivers could drop private cache / configuration data.

The idea is to store (for example) the touch controller JSON blobs that are currently read out on every startup. Reading those over the low bandwidth radio link takes a measurable amount of time as each controller comes online. It would be possible to instead cache those JSON blobs and only re-read them if the firmware hash changes.

Another useful thing to store is accel/gyro bias correction vectors extracted from the sensor fusion. Having a nearly correct bias setup from the start helps with initial tracking and acquisition. With default 0,0,0 bias vectors, the sensor fusion can take many seconds to converge on correct vectors.

Finally, a configuration store would be useful for room calibration - storing the location of sensor cameras, room origins and boundaries (eventually, once OpenHMD has API for that)

thaytan commented 2 years ago

I implemented caching of the touch controller config blocks in https://github.com/thaytan/OpenHMD/commit/3cb21b67557edbec6ffd4c9f9be81b4264d5fb8f.

Room calibration still to come.

thaytan commented 2 years ago

Room configuration store is currently implemented on the rift-room-config branch, but not merged back to rift-kalman-filter just yet, because it has too high a risk of locking onto the wrong initial pose and then permanently storing the wrong room config. It needs to use some pose averaging when first starting up to avoid that problem.

thaytan commented 2 years ago

Closing this in favour of tracking the remaining room-config acquisition in #6