Monado derivatives may choose to create and use a
custom variant of service-lib for android builds
with a different library name, this change replaces the
hard-coded library name used for dynamic lib loading.
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2265>
In the process of flipping OpenGL subimage coordinates (in accordance
with the specification of the XR_KHR_opengl_enable extension), Monado
was incorrectly assuming a subimage height of 1.0.
When the height of the subimage was reduced below 1.0 this was making
Monado clip the bottom instead of the top of the swapchain (as if the
origin was the top-left), and when the subimage Y offset was increased
Monado would show a black bar at the top where the coordinates went out
of range of the swapchain.
Fix this in both the compute and graphics compositor, effectively
replacing the assumed height of 1 with the original subimage height
before negation.
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2250>
git worktree is not supported by androidgitversion
This makes it work with git worktrees and submodules, unlike the
plugin we used before. Unlike some other gradle plugins,
this allows us to set our own filter for tags that get included in
the version.
Thanks to Tao Pei for noticing the problem and proposing an initial fix.
Co-authored-by: tao.pei <tao.pei@xjmz.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2204>
Testing with a Luxonis Oak-D Pro with basalt slam tracking on a simulated
Northstar suggests the returned axis from basalt vit are wrong wrt. to
the OpenXR reference frame.
Invert assigned y and z axis, similar to what is done for poses returned
by basalt slam for other HMD drivers, e.g., the drivers for Rift-S, Valve
Index / Vive, WMR and Realsense, in various *_correct_pose_from_basalt()
functions.
While we are at it, also make sure the dx->pre_rotate enable flag and
debug UI checkbox actually has an effect on operation.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2228>
We need a different axis assignment before submitting samples from the
DepthAI driven Luxonis Oak cameras IMU to the imu sinks, to account for
the orientation of the IMU in those cameras. On those cameras, the IMU
y axis points to the right, the x axis points downwards, the z axis
backwards. See following official Luxonis answer for reference:
https://discuss.luxonis.com/d/1044-about-oak-d-pro-w-imu-coordinate-system/8
One way to confirm the current wrong assignment and this fix is to select
"Use 3DOF tracking instead of SLAM" checkbox in the "Generic inside out
head tracker" debug UI.
Tested with a Luxonis Oak-D Pro camera.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2228>
The HMD display device apparently needs to be the first one in
the xdevs list. Comments in xrt_prober.h seem to confirm this.
Order hmd and slam device acccordingly in the north_star target
builder.
Otherwise XR client calls to xrEndFrame(), at least with projection
layers, will cause monado-service to crash, as it chooses the
"slam device" xdev as "HMD", instead of the actual hmd device,
and therefore dereferences a xdev->hmd which is NULL inside
_update_projection_layer() and thereby segfaults.
gdb backtrace after SIGSEGV:
_update_projection_layer (xc=0x7ffe60000bf0, ics=0x5555560a5208, layer=0x7fff0a5ed620, i=0) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_handler.c:749
749 uint32_t view_count = xdev->hmd->view_count;
(gdb) bt
0 _update_projection_layer (xc=0x7ffe60000bf0, ics=0x5555560a5208, layer=0x7fff0a5ed620, i=0) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_handler.c:749
1 0x00005555555abd30 in _update_layers (ics=0x5555560a5208, xc=0x7ffe60000bf0, slot=0x7fff0a5ed600) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_handler.c:973
2 0x00005555555ac060 in ipc_handle_compositor_layer_sync (ics=0x5555560a5208, slot_id=0, out_free_slot_id=0x7fff0a5ef134, handles=0x7fff0a5ef170, handle_count=0)
at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_handler.c:1058
3 0x00005555555a7167 in ipc_dispatch (ics=0x5555560a5208, ipc_command=0x7fff0a5ef840) at /home/dragon/projects/monado/build/src/xrt/ipc/ipc_server_generated.c:518
4 0x00005555555a56cc in client_loop (ics=0x5555560a5208) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_per_client_thread.c:191
5 0x00005555555a593d in ipc_server_client_thread (_ics=0x5555560a5208) at /home/dragon/projects/monado/src/xrt/ipc/server/ipc_server_per_client_thread.c:332
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2228>