amalon / osgxr Goto Github PK
View Code? Open in Web Editor NEWVirtual Reality with OpenXR and OpenSceneGraph
License: GNU Lesser General Public License v2.1
Virtual Reality with OpenXR and OpenSceneGraph
License: GNU Lesser General Public License v2.1
I do not have yet VR headset, but I have been building and running flightgear-2020.4.0 with osgXR enabled. This shows up in the console at start-up:
Now checking for plug-in osgPlugins-3.6.5/osgdb_nvtt.so
Error [GENERAL | | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - unknown error
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to find a valid runtime
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime()
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed querying extension properties
Error [GENERAL | | OpenXR-Loader] : RuntimeManifestFile::FindManifestFiles - failed to determine active runtime file path for this environment
Error [ 0.43 [INFO]:OSG
GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - unknown error
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : RuntimeInterface::LoadRuntimes - failed to find a valid runtime
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader] : Failed to find default runtime with RuntimeInterface::LoadRuntime()
Error [GENERAL | xrEnumerateInstanceExtensionProperties | OpenXR-Loader 0.43 [WARN]:OSG Failed to count OpenXR instance extensions: -13
] : Failed querying extension properties
Let me know if you prefer this bug to be opened as a flightgear's ticket!
Cheers,
Chris.
Thanks for your work and effort to create this lib.
I am currently working on a project where I want to display an osg graph in a VR headset (Quest 3) via wifi streaming (steam link, win11 with msys2, mingw64).
Due to your easy setup, I had a quick success seeing something.
But I noticed flickering of the image in the headset, along with this repeated error messages:
Failed to acquire swapchain image: XR_ERROR_CALL_ORDER_INVALID
XRView::preDrawCallback(): Failure to acquire OpenXR swapchain image (got image index -1)
Failed to begin OpenXR frame: XR_ERROR_CALL_ORDER_INVALID
Failed to begin OpenXR frame: XR_ERROR_CALL_ORDER_INVALID
Failed to begin OpenXR frame: XR_ERROR_CALL_ORDER_INVALID
Failed to begin OpenXR frame: XR_ERROR_CALL_ORDER_INVALID
Failed to acquire swapchain image: XR_ERROR_CALL_ORDER_INVALID
XRView::preDrawCallback(): Failure to acquire OpenXR swapchain image (got image index -1)
I suspect the issues are created by the higher latencies introduced by the wifi image transmission.
While trying to fix it myself, I found this PR on the Godot game engine that seems to be related:
godotengine/godot#82752, the linked issue there also describes using a Quest headset that results in XR_ERROR_CALL_ORDER_INVALID messages.
In the PR discussion, they explain that the result of xrAcquireSwapchainImage may be > 0, which also defines an erorr state, but that is not handled by XR_FAILED() but by XR_UNQUALIFIED_SUCCESS().
The check() function in Instance.cpp, only checks for XR_FAILED(), not for XR_UNQUALIFIED_SUCCESS() (https://github.com/amalon/osgXR/blob/master/src/OpenXR/Instance.cpp#L302)
I tried to implement a fix, but I failed in finding the correct spots (e.g. a good way) for not calling xrEndFrame in the wrong situation, as described here.
Just increasing the timeout in Swapchain::waitImage does not help.
Any help is appreciated (either a fix or some hints that help me to provide a PR).
Thanks in advance.
I am having some problems to implement a osgXR action https://www.khronos.org/registry/OpenXR/specs/1.0/html/xrspec.html#XR_EXT_eye_gaze_interaction
I could not understand how I am supposed to go about implementing it, I tried something like:
actionSet = new osgXR::ActionSet(manager, "user_intent", "User Intent");
actionPose = new osgXR::ActionPose(actionSet, "gaze_pose", "Gaze pose");
interactionProfile = new osgXR::InteractionProfile(manager, "ext", "eye_gaze_interaction");
subAction = new osgXR::Subaction(manager, "/user/eyes_ext/input/gaze_ext/pose");
actionPose->addSubaction(subAction);
interactionProfile ->suggestBinding(actionPose, "/user/eyes_ext/input/gaze_ext/pose");
actionSet->activate(subAction);
syncActionSetup();
actionSet->activate(subAction);
manager->syncSettings()
manager->update()
and then tried to get the location with:
osgXR::ActionPose::Location location = action->getValue(subAction);
however, the location is always empty.
I also made a minor change to the osgXR code to enable the XR_EXT_eye_gaze_interaction extension that is needed for this action as I couldn't find a way to enable extensions without doing so.
What am I missing ?
Hi there,
I was trying to build the lib with cmake, but it fails searching for some funny target Threads (OpenThreads is properly found).
cmake version 3.19.2
Any help welcome.
Thanks,
Cheers,
Chris.
The C compiler identification is GNU 10.3.0
-- The CXX compiler identification is GNU 10.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found OpenGL: /usr/lib64/libOpenGL.so
-- Found osgViewer: /usr/lib64/libosgViewer.so
-- Found osgUtil: /usr/lib64/libosgUtil.so
-- Found osg: /usr/lib64/libosg.so
-- Found OpenThreads: /usr/lib64/libOpenThreads.so
-- Found OpenSceneGraph: /usr/lib64/libosgViewer.so;/usr/lib64/libosgUtil.so;/usr/lib64/libosg.so;/usr/lib64/libOpenThreads.so (found version "3.6.5")
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Configuring done
CMake Error at src/CMakeLists.txt:74 (add_library):
Target "osgXR" links to target "Threads::Threads" but the target was not
found. Perhaps a find_package() call is missing for an IMPORTED target, or
an ALIAS target is missing?
Hi there,
just spotted a little issue when building against OpenXR 1.0.22, the pkgconfig provides seems to be openxr instead of OpenXR. I've fixed it with this:
--- osgXR-0.3.8/osgXR.pc.in.orig 2022-04-10 17:48:35.661919444 +0200
+++ osgXR-0.3.8/osgXR.pc.in 2022-04-10 17:48:53.002573686 +0200
@@ -7,6 +7,6 @@
Description: @PROJECT_DESCRIPTION@
Version: @PROJECT_VERSION@
-Requires: openscenegraph OpenXR
+Requires: openscenegraph openxr
Libs: -L${libdir} -lmylib
Cflags: -I${includedir}
Hi there,
just a comment, my system has only openxr-1.0.13 and the build of osgXR-0.5.1 fails with it. I indeed cannot find the variable in openxr.h, but I do see it in latest versions of openxr.
Maybe some conditionals on a minimal version of openxr should be added in cmake config files, or, some preprocessor conditionals in the code itself to not use that guy for older version of openxr?
PS: tested also osgXR-0.5.1 against openxr-1.0.22, everything is fine there!
Cheers,
Chris.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.