Commit 2bdfb129 authored by Christoph Haag's avatar Christoph Haag

bindings: Update to new gxr API

Binding filenames are now taken from action manifest.

Adds htc vive controller bindings for OpenXR.
parent 71176bfd
Pipeline #197689 failed with stage
in 2 minutes and 52 seconds
......@@ -6,6 +6,7 @@
<file>bindings/openvr/bindings_knuckles_controller.json</file>
<file>bindings/openxr/actions.json</file>
<file>bindings/openxr/bindings_khronos_simple_controller.json</file>
<file>bindings/openxr/bindings_htc_vive_controller.json</file>
<file>bindings/openxr/bindings_valve_index_controller.json</file>
</gresource>
</gresources>
......@@ -2,15 +2,19 @@
"default_bindings":[
{
"controller_type":"khronos_simple",
"binding_url":"bindings_khronos_simple.json"
"binding_url":"bindings_khronos_simple_controller.json"
},
{
"controller_type":"mnd_psmv",
"binding_url":"bindings_mnd_psmv.json"
"binding_url":"bindings_mnd_psmv_controller.json"
},
{
"controller_type": "index",
"binding_url": "bindings_valve_index.json"
"binding_url": "bindings_valve_index_controller.json"
},
{
"controller_type": "htcvive",
"binding_url": "bindings_htc_vive_controller.json"
}
],
"actions":[
......
{
"interaction_profile": "/interaction_profiles/htc/vive_controller",
"bindings" : {
"/actions/mouse_synth": {
"sources": [
{
"path": "/user/hand/right/input/trackpad",
"inputs": {
"position": {
"output": "/actions/mouse_synth/in/scroll"
}
}
},
{
"path": "/user/hand/right/input/menu",
"inputs": {
"click": {
"output": "/actions/mouse_synth/in/right_click"
}
}
},
{
"path": "/user/hand/right/input/trackpad",
"inputs": {
"click": {
"output": "/actions/mouse_synth/in/left_click"
}
}
},
{
"path": "/user/hand/left/input/trackpad",
"inputs": {
"position": {
"output": "/actions/mouse_synth/in/scroll"
}
}
},
{
"path": "/user/hand/left/input/trackpad",
"inputs": {
"click": {
"output": "/actions/mouse_synth/in/left_click"
}
}
},
{
"path": "/user/hand/left/input/menu",
"inputs": {
"click": {
"output": "/actions/mouse_synth/in/right_click"
}
}
}
]
},
"/actions/wm": {
"poses": [
{
"output": "/actions/wm/in/hand_pose",
"path": "/user/hand/right/input/aim/pose"
},
{
"output": "/actions/wm/in/hand_pose",
"path": "/user/hand/left/input/aim/pose"
},
{
"output": "/actions/wm/in/hand_pose_hand_grip",
"path": "/user/hand/right/input/grip/pose"
},
{
"output": "/actions/wm/in/hand_pose_hand_grip",
"path": "/user/hand/left/input/grip/pose"
}
],
"haptics": [
{
"output": "/actions/wm/out/haptic",
"path": "/user/hand/right/output/haptic"
},
{
"output": "/actions/wm/out/haptic",
"path": "/user/hand/left/output/haptic"
}
],
"sources": [
{
"path": "/user/hand/right/input/trigger",
"mode": "button",
"inputs": {
"pull": {
"output": "/actions/wm/in/grab_window"
}
}
},
{
"path": "/user/hand/right/input/trigger",
"mode": "button",
"inputs": {
"click": {
"output": "/actions/wm/in/reset_orientation"
}
}
},
{
"path": "/user/hand/right/input/trackpad",
"mode": "trackpad",
"inputs": {
"position": {
"output": "/actions/wm/in/push_pull_scale"
}
}
},
{
"path": "/user/hand/right/input/menu",
"mode": "button",
"inputs": {
"click": {
"output": "/actions/wm/in/menu"
}
}
},
{
"path": "/user/hand/left/input/squeeze",
"mode": "button",
"inputs": {
"click": {
"output": "/actions/wm/in/show_keyboard"
}
}
},
{
"path": "/user/hand/left/input/trigger",
"mode": "button",
"inputs": {
"pull": {
"output": "/actions/wm/in/grab_window"
}
}
},
{
"path": "/user/hand/left/input/trigger",
"mode": "button",
"inputs": {
"click": {
"output": "/actions/wm/in/reset_orientation"
}
}
},
{
"path": "/user/hand/left/input/trackpad",
"mode": "trackpad",
"inputs": {
"position": {
"output": "/actions/wm/in/push_pull_scale"
}
}
},
{
"path": "/user/hand/left/input/menu",
"mode": "button",
"inputs": {
"click": {
"output": "/actions/wm/in/menu"
}
}
},
{
"path": "/user/hand/right/input/squeeze",
"mode": "button",
"inputs": {
"click": {
"output": "/actions/wm/in/show_keyboard"
}
}
}
]
}
}
}
......@@ -22,7 +22,7 @@
}
}
],
"pose": [
"poses": [
{
"path": "/user/hand/left/input/aim/pose",
"output": "/actions/wm/in/hand_pose"
......
......@@ -103,7 +103,7 @@
}
],
"pose": [
"poses": [
{
"path": "/user/hand/left/input/aim/pose",
"output": "/actions/wm/in/hand_pose"
......
......@@ -2171,10 +2171,7 @@ xrd_client_init_input_callbacks (XrdClient *self)
priv->context,
"xrdesktop.openvr",
"/res/bindings/openvr",
"actions.json",
"bindings_vive_controller.json",
"bindings_knuckles_controller.json",
NULL))
"actions.json"))
{
g_print ("Failed to load action bindings!\n");
return;
......@@ -2187,10 +2184,7 @@ xrd_client_init_input_callbacks (XrdClient *self)
priv->context,
"xrdesktop.openxr",
"/res/bindings/openxr",
"actions.json",
"bindings_khronos_simple_controller.json",
"bindings_valve_index_controller.json",
NULL))
"actions.json"))
{
g_print ("Failed to load action bindings!\n");
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment