Monado OpenXR runtime development gaining momentum: version 0.2, multi-layer support & more!
Jakob Bornecrantz May 29, 2020
Share this post:
With the excellent (online) edition of Augmented World Expo 2020 in full swing this week, what better time to announce version 0.2 of the Monado OpenXR runtime for Linux!
It's been a very busy three months since the last Monado developer update and there are a number of exciting developments to share. Most importantly however, a big thanks to everyone who has contributed patchs, bugs and ideas to the project thus far, and who have cheered us on. The Monado OpenXR community is growing and we're very proud to be part of it.
Please keep playing around with Monado, and come say hello on our Discord to get help, report bugs or ask about contributing.
As usual, if you would like to learn more about Monado or OpenXR, or would like some assistance integrating either in your platform, please contact us!
The Monado compositor now supports multiple layers. Allowing applications to submit multiple XrCompositionLayerProjection as well as XrCompositionLayerQuad. This is an important feature for applications that make use of quad layers to render UIs as well as a step towards supporting overlay applications like xrdesktop or Pluto VR. For reference and testing a branch of the xrgears demo can be used. This huge tasks was done by Lubosz.
The Compositor and Drivers now run in their own service process. We are already working on enabling multiple OpenXR applications to connect to the same Monado service instance and with the XR_EXTX_overlay extension, they will even be able to render at the same time. For more information see our earlier blog post. (!295)
Vive Wand and Valve Index controllers are now supported as 3DOF controllers thanks to prior work by Lighthouse Redox, OpenHMD, libsurvive and our own Lubosz Sarnecki. In the coming months we will hopefully expand this driver with full 6DOF support using lighthouse tracking. This work was done by Christoph.
Pete and Jakob implemented support for Bluetooth LE and added a Google Daydream 3DOF Controller driver making use of it.
For makers who want to experiment with their own controller designs Jakob added an arduino driver based on the Day Dream driver by Pete. It includes an arduino sketch for arduino controllers with BLE.
The experimental libsurvive driver by Christoph was merged to master. Users interested in open source positional tracking with lighthouse can enable this driver at compile time. We will talk more on this driver soon.
The debug UI now supports a custom timing graph for imgui. At first it is used to visualize cpu time based compositor timings. In the future we want to extend debug visualization to vulkan based frame timings and include application frame times.
monado-gui now produuces a proper configuration file in $XDG_CONFIG_HOME/monado or $HOME/.config/monado. It also enables configuring generic stereo usb cameras for PSMV and the upcoming PSVR tracking.
The build system has been given a large refactor by Ryan greatly improving it and making it more consistent.
A PPA with Ubuntu packages for Monado, the OpenXR-SDK and the xr-hardware udev rules is now available here. It will be updated ASAP to include this release.
Support optional systemd socket-activation: if not disabled at configure time, monado-service can be launched by systemd as a service with an associated socket. If the service is launched this way, it will use the systemd-created domain socket instead of creating its own. (If launched manually, it will still create its own as normal.) This allows optional auto-launching of the service when running a client (OpenXR) application. Associated systemd unit files are also included. (!306)
Inspired by the Python project Towncrier Ryan made the tool Proclamation to "auto" generated changelogs from snippets. Proclamation has already been used in generating the changelogs for OpenXR repos and is now used in Monado. The giant wall of changelogs below is generated by it.
OpenXR Composition Layers in Monado
Here's a demo of Monado running xrgears, utilizing the OpenXR composition layers API. Rendering the scene as 2 quad and 2 projection layers. Thank you to Pluto VR who partially funded this work.
Big list from the changelog
Add a new settings interface for transporting camera settings, in xrt/xrt_settings.h. (!266)
Make it possible to send JSON object to drivers when probing for devices. (!266)
Added new xrt_instance object to be root object, a singleton that allows us to better swap out the whole stack underneath the state trackers. This is now implemented by the xrt_prober code and used by the OpenXR state tracker. (!274)
Remove the struct timestate argument from the struct xrt_device interface. It should be easy to write a driver and the state tracker should be the one that tracks this state. It was mostly triggered by the out of process compositor work. (!280)
Add the new format XRT_FORMAT_UYVY422 to the interface and various parts of the code where it is needed to be supported, like the conversion functions and calibration code. Also rename the XRT_FORMAT_YUV422 to XRT_FORMAT_YUYV422. (!283)
Expose manufacturer and serial number in the prober interface, right now only for the video device probing. But this is the only thing that really requires this in order to tell different cameras apart. (!286)
Add XRT_CAST_PTR_TO_OXR_HANDLE and XRT_CAST_OXR_HANDLE_TO_PTR macros to perform warning-free conversion between pointers and OpenXR handles, even on 32-bit platforms. They should be used instead of raw casts. (!294)
Remove declaration and implementations of xrt_prober_create: the minimal functionality previously performed there should now be moved to xrt_instance_create. (!347)
gui: Fix compilation issue in st/gui when building without OpenCV. (#63, !256)
OpenXR: Don't return struct with invalid type from xrEnumerateViewConfigurationViews. (!234)
prober: Print more information from the prober when spewing. (!261)
gui: Save camera and calibration data using new settings structs and format. (!266)
prober: Load tracking config from json and use new settings struct. (!266)
gui: Fix name not being shown when video device does not have any modes. (!269)
gui: Remove old video test scene, never used and seemed to be broken. (!275)
gui: Fix build when OpenCV is not available or disabled. (!292)
OpenXR: Fix build when OpenGL is not enabled. (!292)
OpenXR: Validate that we support the given XR_ENVIRONMENT_BLEND_MODE as according to the OpenXR spec. And better print the error messages. (!345)
OpenXR: Validate given displayTime in xrEndFrame as required by the spec. (!345)
OpenXR: Validate internal state that we get from the compositor. (!345)
OpenXR: Validate time better in xrConvertTimeToTimespecTimeKHR and add better error print. (!348)
OpenXR: Correctly translate the XrSwapchainCreateFlags flags to xrt ones. (!349)
OpenXR: In order to be able to correctly validate XrPath ids turn them into a atom and keep all created paths in a array. (!349)
OpenXR: Give better error messages on invalid poses in quad layers instead of using the simple macro. (!350)
OpenXR: Validate poses for project layer views, using the same expressive error messages as the quad layers. (!350)
OpenXR: Translate the swapchain usage bits from OpenXR enums to Monado's internal enums. (!350)
OpenXR: Report a spec following amount of maximum layers supported. (!354)
OpenXR: Correctly reject invalid times given to xrLocateSpace. (!354)
OpenXR: Correctly handle the space relation flag bits, some old hacked up code left over since Monado's first days have been removed. (!356)
dd: Add a driver for the Google Daydream View controller. (!242)
all: Use new pre-filter and 3-DoF filter in drivers. (!249)
arduino: Added a Arduino based flexible input device driver, along with Arduino C++ code for it. (!251)
psmv: Use all 6 measurements to compute acceleration bias, and port to new IMU prefilter. (!255)
v4l2: Add special tweaks for the ELP camera. (!266)
vive: Add basic 3DOF driver for Vive Wand Controller with full input support and Valve Index Controller with partial input support. (!281)
psvr: Use a better 3dof fusion for the PSVR when no tracking is available. (!282)
psvm: Move the led and rumble updating from the application facing update_inputs function to the internal thread instead. (!287)
psmv: Fix failure to build from source on PPC. (!288, #69)
main: Fix XCB memory leaks and correctly use XCB/Xlib interop. (!257)
tracking: Expose save function with none hardcode path for calibration data. (!266)
tracking: Remove all path hardcoded calibration data loading and saving functions. (!266)
threading: New helper functions and structs for doing threaded work, these are on a higher level then the one in os wrappers. (!278)
threading: Fix missing #pragma once in os/os_threading.h. (!282)
u/time: Temporarily disable the time skew in time state and used fixed offset instead to fix various time issues in st/oxr. Will be fixed properly later. (!348)
math: Correctly validate quaternion using non-squared "length" instead of squared "length", certain combinations of elements would produce valid regular "length" but not valid squared ones. (!350)
build: Refactor CMake build system to make static (not object) libraries and explicitly describe dependencies. (!233, !237, !238, !240)
os/ble: Add utility functionality for accessing Bluetooth Low-Energy (Bluetooth LE or BLE) over D-Bus, in os/os_ble.h and os/os_ble_dbus.c. (!242)
util: Add some bit manipulation helper functions in util/u_bitwise.c and util/u_bitwise.c. (!242)
tracking: Make stereo_camera_calibration reference counted, and have the prober, not the calibration, call the save function. (!245)
math: Expand algebraic math functions in math/m_api.h, math/m_vec3.h and math/m_base.cpp. (!249)
math: Add pre-filter and a simple understandable 3-DoF fusion filter. (!249)
build: Enable the build system to install monado-cli and monado-gui. (!252)
build: Unify inputs for generated files between CMake and Meson builds. (!252)
build: Support building with system cJSON instead of bundled copy. (!284, #62)
ci: Perform test builds using the Android NDK (for armeabi-v7a and armv8-a). This is not a full Android port (missing a compositor, etc) but it ensures we don't add more Android porting problems. (!292)
os/ble: Check if org.bluez name is available before calling in os/os_ble_dbus.c. (#65, #64, !265)
README: Added information to the README containing OpenHMD version requirement and information regarding the requirement of GL_EXT_memory_object_fd and limitations on Monado's compositor. (!4)
build: Fix build issues and build warnings when 32-bit. (!230)
os/ble: Fix crash due to bad dbus path, triggered by bad return checking when probing for BLE devices. (!247)
d/dd: Use the correct time delta in DayDream driver. (!249)
doc: Stop changelog snippets from showing up in 'Related Pages' (!253)
os/ble: Fix leak in os/os_ble_dbus.c code when failing to find any device. (!264)
os/ble: Make ble code check for some error returns in os/os_ble_dbus.c. (!265)
u/hashset: Fix warnings in util/u_hashset.h after pedantic warnings were enabled for C++. (!268)
build: Fix failure to build from source on ppc64 and s390x. (!284)
build: Mark OpenXR runtime target in CMake as a MODULE library, instead of a SHARED library. (!284)
windows: Way way back when Gallium was made auxiliary was named aux but then it was ported to Windows and it was renamed to auxiliary since Windows is allergic to filenames that match its device names (e.g., AUX, CON, PRN, etc.). Through the ages, this knowledge was lost and so we find ourselves with the same problem. Although Monado inherited the correct name, the same old mistake was made in docs. (!314)
build: For CMake rename (nearly) all build options so they begin with XRT_ and match the defines used in the source. You will probably want to clear your build directory and reconfigure from scratch. (!327)
ipc: Correctly set the shared semaphore value when creating it, the wrong value resulted in the client not blocking in xrWaitFrame. (!348)
ipc: Previously some arguments where dropped at swapchain creation time, correct pass them between the client and server. (!349)
Add a Comment