Git Product home page Git Product logo

panda3d-openvr's People

Contributors

diamondsbattle avatar el-dee avatar zurgeg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

panda3d-openvr's Issues

Can we add a Quest/Rift version?

Oculus's APIs are extremely complicated. I think that a Quest/Rift version could be helpful. The Quest version is what I'm working on right now (using this) and Rift using pyovr shouldn't be that different (since it's made by the same person). Thanks!

[Issue] Actions return None/0 data and no device path on Oculus Rift S

When trying to use actions with the Oculus Rift S controllers all data is either None/0 and has no device path. This can be demonstrated with the stock ralph sample. You can not walk around the environment. I also noticed stuttering with the compositor submit process when actions were enabled on the Rift S

[Bug] Panda3D OpenVR incompatibility with Render Pipeline

While using render pipeline, Panda3D OpenVR runs into an issue where the scene where the sun and stuff can only be seen through the desktop window, and the objects can only be seen through the HMD.

I suspect that this may be caused by the Showbase initialized by Render Pipeline.

Then, upon changing the initialization from the standard way to the following:

        from rpcore import RenderPipeline, PointLight
        self.render_pipeline = RenderPipeline()
        self.render_pipeline.pre_showbase_init()
        ShowBase.__init__(self)
        self.vr = P3DOpenVR()
        self.vr.init()
        self.render_pipeline.create(self)

I get

Traceback (most recent call last):
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 319, in right_cb
   self.submit_texture(openvr.Eye_Left, self.left_texture)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 309, in submit_texture
   self.compositor.submit(eye, ovr_texture)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openvr\__init__.py", line 4360, in submit
   openvr.error_code.CompositorError.check_error_value(error)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openvr\error_code\__init__.py", line 23, in check_error_value
   raise error_class(error_value, message)
openvr.error_code.CompositorError_DoNotHaveFocus
Traceback (most recent call last):
 File "C:/Users/zurgE/OneDrive/Documents/Panda3D Render Pipeline Test/main.py", line 93, in <module>
   Application().run()
 File "C:/Users/zurgE/OneDrive/Documents/Panda3D Render Pipeline Test/main.py", line 24, in __init__
   self.render_pipeline.create(self)
 File "./renderpipeline\rpcore\render_pipeline.py", line 168, in create
   self.loading_screen.create()
 File "./renderpipeline\rpcore\gui\loading_screen.py", line 65, in create
   Globals.base.graphicsEngine.render_frame()
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 319, in right_cb
   self.submit_texture(openvr.Eye_Left, self.left_texture)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 309, in submit_texture
   self.compositor.submit(eye, ovr_texture)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openvr\__init__.py", line 4360, in submit
   openvr.error_code.CompositorError.check_error_value(error)
 File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\openvr\error_code\__init__.py", line 23, in check_error_value
   raise error_class(error_value, message)
openvr.error_code.CompositorError_DoNotHaveFocus

This makes me suspicious that the loading screen is causing some problems.

I'll try with it removed later and I'll see if it fixes it.

EDIT: Removing the loading screen sadly didn't fix the problem.

"AssertionError: has_mat() at line 461 of c:\buildslave\sdk-windows-i386\build\built1.10\include\transformState.I"

Setup
Headset: HTC Vive
Controllers: Valve Index Knuckles
SteamVR Version: 1.15.16
Issue
Upon running my game, it seems to work fine, until the SteamVR Menu (revealed by pressing the System button [Wands/Knuckles] or the menu/hamburger button [Touch 1 and 2]) is opened, and the game crashes with:

Traceback (most recent call last):
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 312, in left_cb
    cbdata.upcall()
AssertionError: has_mat() at line 461 of c:\buildslave\sdk-windows-i386\build\built1.10\include\transformState.I
Traceback (most recent call last):
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 317, in right_cb
    cbdata.upcall()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 312, in left_cb
    cbdata.upcall()
AssertionError: has_mat() at line 461 of c:\buildslave\sdk-windows-i386\build\built1.10\include\transformState.I
Traceback (most recent call last):
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\direct\showbase\ShowBase.py", line 2020, in __igLoop
    self.graphicsEngine.renderFrame()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 317, in right_cb
    cbdata.upcall()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 312, in left_cb
    cbdata.upcall()
AssertionError: has_mat() at line 461 of c:\buildslave\sdk-windows-i386\build\built1.10\include\transformState.I
Traceback (most recent call last):
  File "C:\Users\zurgE\OneDrive\Documents\3D Python programs\firehawk_vr2.py", line 456, in <module>
    App().run()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\direct\showbase\ShowBase.py", line 3152, in run
    self.taskMgr.run()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\direct\task\Task.py", line 537, in run
    self.step()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\direct\task\Task.py", line 491, in step
    self.mgr.poll()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\direct\showbase\ShowBase.py", line 2020, in __igLoop
    self.graphicsEngine.renderFrame()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 317, in right_cb
    cbdata.upcall()
  File "C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\lib\site-packages\p3dopenvr\p3dopenvr.py", line 312, in left_cb
    cbdata.upcall()
AssertionError: has_mat() at line 461 of c:\buildslave\sdk-windows-i386\build\built1.10\include\transformState.I

In theory, this could be caught and removed(?) once the latest release with error handling is out (by passing on the error, which would most likely cause a freeze/further crashing sadly). It appears to by caused by the game not pausing when the universal menu is opened.

Interestingly enough, when this happens, the game doesn't actually run again until you reboot SteamVR, which would not be great in a production environment!

[Feature Request] OpenXR Support

The currently available standard for OpenXR gives extra versatility to VR applications by allowing for almost any VR system to be supported by a single app. This would be an incredibly helpful feature to add. Thanks!

[Feature Request] On compositor error triggers

I recently upgraded to a Vive, and since my RTX 2060 doesn't have multiple HDMI ports, I chose to plug it into my 1050 Ti, except upon re-running my code, it spat out openvr.error_code.CompositorError_TextureIsOnWrongDevice, I would like to be able to catch this (and other OpenVR related errors) and display an error box like so:

def on_compositor_error(error):
    if error == openvr.error_code.CompositorError_TextureIsOnWrongDevice:
        messagebox.showerror('An error occured','An error occurred:\nHMD is not connected to the correct device')
   else:
        messagebox.showerror('An error occured','An unknown error occured')

Would this be possible? Thanks in advance.

Unable to read VR Path Registry

Hello,
While trying to use this, I get an Unable to read VR Path Registry error.
This maybe because I am using Ursina Engine, but since it's based on Panda3D and that other P3D tools work, I doubt it's that.
How can I fix this ? I have tried making the file empty, but no appealing changes.

Full error :

  File "C:\Users\***\Downloads\zuiahzgutzgyahz.py", line 8, in <module>
    r.init()
  File "C:\Users\***\AppData\Local\Programs\Python\Python38\lib\site-packages\p3dopenvr\p3dopenvr.py", line 159, in init
    self.vr_system = openvr.init(openvr.VRApplication_Scene)
  File "C:\Users\***\AppData\Local\Programs\Python\Python38\lib\site-packages\openvr\__init__.py", line 7170, in init
    initInternal2(applicationType, pStartupInfo)
  File "C:\Users\***\AppData\Local\Programs\Python\Python38\lib\site-packages\openvr\__init__.py", line 7302, in initInternal2
    openvr.error_code.InitError.check_error_value(error.value)
  File "C:\Users\***\AppData\Local\Programs\Python\Python38\lib\site-packages\openvr\error_code\__init__.py", line 23, in check_error_value
    raise error_class(error_value, message)
openvr.error_code.InitError_Init_PathRegistryNotFound
Unable to read VR Path Registry from C:\Users\***\AppData\Local\openvr\openvrpaths.vrpath

Thanks

Can we add a hand presence sample?

I was working on this and couldn't figure out how to do hand presence. I figured it would be helpful if you could add a hand presence tutorial.
Thanks in advance.

Right Eye lags while Left Eye doesn't.

I was working on some code, and it appears that on the demo found in minimal the Right Eye is lagging while the left isn't. What could be causing this? Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.