| 1 | import sys
|
|---|
| 2 |
|
|---|
| 3 | sys.path.insert(0, '.')
|
|---|
| 4 |
|
|---|
| 5 | import xr_examples
|
|---|
| 6 |
|
|---|
| 7 | import xr_examples.hello_xr
|
|---|
| 8 |
|
|---|
| 9 | xr_examples.hello_xr
|
|---|
| 10 | Out[6]: <module 'xr_examples.hello_xr' from 'C:\\cygwin64\\home\\goddard\\ucsf\\pyopenxr_examples\\xr_examples\\hello_xr\\__init__.py'>
|
|---|
| 11 |
|
|---|
| 12 | from xr_examples.hello_xr.main import main
|
|---|
| 13 |
|
|---|
| 14 | main()
|
|---|
| 15 | 03/11/25 07:56:31.772 main INFO: Press any key to shutdown...
|
|---|
| 16 | 03/11/25 07:56:32.376 openxr_program INFO: Available Layers: (2)
|
|---|
| 17 | 03/11/25 07:56:32.390 openxr_program INFO: Instance RuntimeName=Acer XR Runtime RuntimeVersion=1.2.1001
|
|---|
| 18 | 03/11/25 07:56:32.391 openxr_program INFO: Available View Configuration Types: (1)
|
|---|
| 19 | 03/11/25 07:56:32.392 openxr_program INFO: Available Environment Blend Mode count : (1)
|
|---|
| 20 | 03/11/25 07:56:32.392 openxr_program INFO: Environment Blend Mode (1) : (Selected)
|
|---|
| 21 | 03/11/25 07:56:32.578 openxr_program INFO: Available reference spaces: 3
|
|---|
| 22 | 03/11/25 07:56:32.579 openxr_program INFO: System Properties: Name=SpatialLabs Display Driver VendorId=1282
|
|---|
| 23 | 03/11/25 07:56:32.580 openxr_program INFO: System Graphics Properties: MaxWidth=1920 MaxHeight=1080 MaxLayers=16
|
|---|
| 24 | 03/11/25 07:56:32.580 openxr_program INFO: System Tracking Properties: OrientationTracking=True PositionTracking=True
|
|---|
| 25 | 03/11/25 07:56:32.581 openxr_program INFO: Creating swapchain for view 0 with dimensions Width=1920 Height=1080 SampleCount=1
|
|---|
| 26 | 03/11/25 07:56:32.584 openxr_program INFO: Creating swapchain for view 1 with dimensions Width=1920 Height=1080 SampleCount=1
|
|---|
| 27 | 03/11/25 07:56:32.588 openxr_program INFO: XrEventDataSessionStateChanged: state 0->1 session=0x3000003 time=659513800
|
|---|
| 28 | 03/11/25 07:56:32.588 openxr_program INFO: XrEventDataSessionStateChanged: state 1->2 session=0x3000003 time=697457200
|
|---|
| 29 | 03/11/25 07:56:32.602 openxr_program INFO: XrEventDataSessionStateChanged: state 2->3 session=0x3000003 time=791657100
|
|---|
| 30 | 03/11/25 07:56:32.602 openxr_program INFO: XrEventDataSessionStateChanged: state 3->4 session=0x3000003 time=791660100
|
|---|
| 31 | 03/11/25 07:56:32.603 openxr_program INFO: XrEventDataSessionStateChanged: state 4->5 session=0x3000003 time=791660600
|
|---|
| 32 | ---------------------------------------------------------------------------
|
|---|
| 33 | AssertionError Traceback (most recent call last)
|
|---|
| 34 | Cell In[8], line 1
|
|---|
| 35 | ----> 1 main()
|
|---|
| 36 |
|
|---|
| 37 | File C:\cygwin64\home\goddard\ucsf\pyopenxr_examples\xr_examples\hello_xr\main.py:98, in main()
|
|---|
| 38 | 95 except xr.exception.SessionNotFocused:
|
|---|
| 39 | 96 # TODO: C++ code does not need this conditional. Why does python?
|
|---|
| 40 | 97 pass
|
|---|
| 41 | ---> 98 program.render_frame()
|
|---|
| 42 | 99 else:
|
|---|
| 43 | 100 # Throttle loop since xrWaitFrame won't be called.
|
|---|
| 44 | 101 time.sleep(0.250)
|
|---|
| 45 |
|
|---|
| 46 | File C:\cygwin64\home\goddard\ucsf\pyopenxr_examples\xr_examples\hello_xr\openxr_program.py:759, in OpenXRProgram.render_frame(self)
|
|---|
| 47 | 755 projection_layer_views = (xr.CompositionLayerProjectionView * 2)(
|
|---|
| 48 | 756 xr.CompositionLayerProjectionView(),
|
|---|
| 49 | 757 xr.CompositionLayerProjectionView())
|
|---|
| 50 | 758 if frame_state.should_render:
|
|---|
| 51 | --> 759 if self.render_layer(frame_state.predicted_display_time, projection_layer_views, layer):
|
|---|
| 52 | 760 layers.append(byref(layer))
|
|---|
| 53 | 762 xr.end_frame(
|
|---|
| 54 | 763 session=self.session,
|
|---|
| 55 | 764 frame_end_info=xr.FrameEndInfo(
|
|---|
| 56 | (...)
|
|---|
| 57 | 768 ),
|
|---|
| 58 | 769 )
|
|---|
| 59 |
|
|---|
| 60 | File C:\cygwin64\home\goddard\ucsf\pyopenxr_examples\xr_examples\hello_xr\openxr_program.py:792, in OpenXRProgram.render_layer(self, predicted_display_time, projection_layer_views, layer)
|
|---|
| 61 | 790 return False # There are no valid tracking poses for the views.
|
|---|
| 62 | 791 assert view_count_output == view_capacity_input
|
|---|
| 63 | --> 792 assert view_count_output == len(self.config_views)
|
|---|
| 64 | 793 assert view_count_output == len(self.swapchains)
|
|---|
| 65 | 794 assert view_count_output == len(projection_layer_views)
|
|---|
| 66 |
|
|---|
| 67 | AssertionError:
|
|---|
| 68 | 03/11/25 07:56:45.321 ipkernel INFO: Exception in execute request:
|
|---|
| 69 | ---------------------------------------------------------------------------
|
|---|
| 70 | AssertionError Traceback (most recent call last)
|
|---|
| 71 | Cell In[8], line 1
|
|---|
| 72 | ----> 1 main()
|
|---|
| 73 |
|
|---|
| 74 | File C:\cygwin64\home\goddard\ucsf\pyopenxr_examples\xr_examples\hello_xr\main.py:98, in main()
|
|---|
| 75 | 95 except xr.exception.SessionNotFocused:
|
|---|
| 76 | 96 # TODO: C++ code does not need this conditional. Why does python?
|
|---|
| 77 | 97 pass
|
|---|
| 78 | ---> 98 program.render_frame()
|
|---|
| 79 | 99 else:
|
|---|
| 80 | 100 # Throttle loop since xrWaitFrame won't be called.
|
|---|
| 81 | 101 time.sleep(0.250)
|
|---|
| 82 |
|
|---|
| 83 | File C:\cygwin64\home\goddard\ucsf\pyopenxr_examples\xr_examples\hello_xr\openxr_program.py:759, in OpenXRProgram.render_frame(self)
|
|---|
| 84 | 755 projection_layer_views = (xr.CompositionLayerProjectionView * 2)(
|
|---|
| 85 | 756 xr.CompositionLayerProjectionView(),
|
|---|
| 86 | 757 xr.CompositionLayerProjectionView())
|
|---|
| 87 | 758 if frame_state.should_render:
|
|---|
| 88 | --> 759 if self.render_layer(frame_state.predicted_display_time, projection_layer_views, layer):
|
|---|
| 89 | 760 layers.append(byref(layer))
|
|---|
| 90 | 762 xr.end_frame(
|
|---|
| 91 | 763 session=self.session,
|
|---|
| 92 | 764 frame_end_info=xr.FrameEndInfo(
|
|---|
| 93 | (...)
|
|---|
| 94 | 768 ),
|
|---|
| 95 | 769 )
|
|---|
| 96 |
|
|---|
| 97 | File C:\cygwin64\home\goddard\ucsf\pyopenxr_examples\xr_examples\hello_xr\openxr_program.py:792, in OpenXRProgram.render_layer(self, predicted_display_time, projection_layer_views, layer)
|
|---|
| 98 | 790 return False # There are no valid tracking poses for the views.
|
|---|
| 99 | 791 assert view_count_output == view_capacity_input
|
|---|
| 100 | --> 792 assert view_count_output == len(self.config_views)
|
|---|
| 101 | 793 assert view_count_output == len(self.swapchains)
|
|---|
| 102 | 794 assert view_count_output == len(projection_layer_views)
|
|---|
| 103 |
|
|---|
| 104 | AssertionError:
|
|---|