godotvr / godot_openhmd Goto Github PK
View Code? Open in Web Editor NEWOpenHMD GDNative driver for Godot
License: MIT License
OpenHMD GDNative driver for Godot
License: MIT License
Valve has recently completely overhauled their controller system so I thought godot_openhmd could be a good testcase / demo showcase until I update my stuff.
It seems there is some gdnative code to communicate with controllers, but there's nothing in the demo scene using it. Since there are no rendermodels provided by OpenHMD yet (there will be), for the time being some primitive shape would suffice.
Hi,
After git clone --recursive https://github.com/GodotVR/godot_openhmd.git
, the build system fails apparently in the libusb submodule because it can't find config.h.
$ scons platform=linux [38/1964]
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o glad/glad.os -c -DOHMD_STATIC -DDRIVER_OCULUS_RIFT -DDRIVER_DEEPOON -DDRIVER
_HTC_VIVE -DDRIVER_PSVR -DDRIVER_NOLO -DOPENHMD_DRIVER_WMR -fPIC -g -O3 -fPIC -DOHM
D_STATIC -DOS_LINUX -DUSE_UDEV -DHAVE_LIBUDEV -Ilibusb -Ilibusb/libusb -Ilibusb/lib
usb/os -Ihidapi/hidapi -IOpenHMD/include -I. -Igodot_headers -Iglad glad/glad.c
gcc -o libusb/libusb/core.os -c -DOHMD_STATIC -DDRIVER_OCULUS_RIFT -DDRIVER_DEEPOON
-DDRIVER_HTC_VIVE -DDRIVER_PSVR -DDRIVER_NOLO -DOPENHMD_DRIVER_WMR -fPIC -g -O3 -f
PIC -DOHMD_STATIC -DOS_LINUX -DUSE_UDEV -DHAVE_LIBUDEV -Ilibusb -Ilibusb/libusb -Il
ibusb/libusb/os -Ihidapi/hidapi -IOpenHMD/include -I. -Igodot_headers -Iglad libusb
/libusb/core.c
libusb/libusb/core.c:23:10: fatal error: config.h: No such file or directory
#include "config.h"
^~~~~~~~~~
compilation terminated.
scons: *** [libusb/libusb/core.os] Error 1
scons: building terminated because of errors.
$
A config.h for linux seems to be missing:
~/vr-dev/godot_openhmd$ find . -name config.h
./libusb/android/config.h
./libusb/Xcode/config.h
./libusb/msvc/config.h
~/vr-dev/godot_openhmd$
Seems to me like something with the libusb submodule is wrong.
Once godotengine/godot#19171 gets merged we need to update the source code here in the same way I have done here: BastiaanOlij/ARVRSimple#4
Hi,
I've been experimenting with godot 3.x and this plugin on a Raspberry Pi and moved onto godot 4.0.
I wondered if a 4.0 version of this plugin was planned?
Thanks
Wayne
When running after setting Thread Model to Multi-Threaded in project settings it will immediately crash.
I've added CI to do Windows builds of the plugin.
The script contains steps to do a Linux build but it currently fails on libusb because of a missing config file. As i don't have a linux setup it would be great if someone else could look into this.
If anyone wants to hold their hand up to add MacOS builds to the CI, it shouldn't be hard to do at all.
I'm getting this error:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o src/godot_openhmd.os -c -DOHMD_STATIC -DDRIVER_OCULUS_RIFT -DDRIVER_DEEPOON -DDRIVER_HTC_VIVE -DDRIVER_PSVR -DDRIVER_NOLO -fPIC -g -O3 -std=c++14 -fPIC -DOHMD_STATIC -Ilibusb -Ilibusb/libusb -Ilibusb/libusb/os -Ihidapi/hidapi -Iopenhmd/include -I. -I/RAID/atomo/home/rhradec/dev/godot.git/modules/gdnative/include -Iglad src/godot_openhmd.c
cc1: warning: command line option '-std=c++14' is valid for C++/ObjC++ but not for C
src/godot_openhmd.c: In function 'get_openhmd_data':
src/godot_openhmd.c:47:21: error: 'godot_gdnative_api_struct {aka const struct godot_gdnative_api_struct}' has no member named 'godot_alloc'
openhmd_data = api->godot_alloc(sizeof(openhmd_data_struct));
^~
src/godot_openhmd.c: In function 'release_openhmd_data':
src/godot_openhmd.c:75:7: error: 'godot_gdnative_api_struct {aka const struct godot_gdnative_api_struct}' has no member named 'godot_free'
api->godot_free(openhmd_data);
examining the godot headers, the godot_alloc() is indeed defined there... so not sure what's going on!
I'll keep digging, but any help would be greatly appreciated!
cheers...
-H
So when I try to open the demo project I get this error
ERROR: open_dynamic_library: Can't open dynamic library: /home/chris/oldhome/build/godot_openhmd/demo/bin/libgodot_openhmd.so. Error: /home/chris/oldhome/build/godot_openhmd/demo/bin/libgodot_openhmd.so: undefined symbol: hid_get_product_string
I can make that error go away with LD_PRELOAD=/usr/lib/libhidapi-libusb.so bin/godot.x11.tools.64 but then I get
ERROR: open_dynamic_library: Can't open dynamic library: /home/chris/oldhome/build/godot_openhmd/demo/bin/libgodot_openhmd.so. Error: /home/chris/oldhome/build/godot_openhmd/demo/bin/libgodot_openhmd.so: undefined symbol: usbi_backend
and it doesn't look like preloading libusb helps.
Apparently there is something wrong with linking those libraries.
As the readme for x11 states, its best to build the 3rd party modules using their own build processes and then use the resulting files.
Right now however we still statically build all files to the best of our abilities, probably wrong.
Time to complete this process for all platforms and use the result of each individual build process.
duplicates the same image for both displays,
only render stereo with diferent visuals when i init the tracking device, in PSVR is null, there is no tracking device,
when i init the tracking device with "openhmd_config.init_tracking_device(1)", the PSVR stop sending rotation to godot, and the camera ARVR don't rotate...
what i can do?
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.