Skip to content

d/wmr: Implement config read and Poly3K distortion model

Dan Weatherford requested to merge fraxul/monado:master into master

This patch reads and parses the WMR headset's JSON configuration blob, computes poses/offsets for the IMU, and implements the WMR Poly3K distortion model. It was developed/tested with a Lenovo Explorer HMD.

The functions that retrieve the config from the sensor endpoint (wmr_config_command_sync, wmr_read_config_part, wmr_read_config) and the config keyblob (wmr_config_key.h) were ported from OpenHMD (/src/drv_wmr/wmr.c) -- I think that the licenses of both projects should allow this?

The distortion model (wmr_compute_distortion) was proven correct by instrumenting the Windows HoloLensSensors.dll driver and comparing the outputs. It matches for a 1:1 FoV scale (wh->fov_scale == 1.0). The WMR runtime seems to further scale the output of the distortion model and the FoV to use more of the headset displays, and I haven't figured out exactly how that works yet; the current fov_scale implementation is a guess.

Merge request reports