A method for adapting to multiple VR controllers
By using integer variables and floating point numbers to represent the key and joystick status of the VR handle, and converting the posture data into a left-hand coordinate system, the problem of adapting different VR handles is solved, and the maintenance and update of the server is simplified.
Patent Information
- Application Number
- CN202310050726.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-01
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2043-02-01
AI Technical Summary
The prior art is difficult to efficiently adapt to the SDK of different VR helmets and handles, resulting in cumbersome adaptation and difficult maintenance.
Integer variables with byte size represent the key state, floating point numbers represent the rocker offset and Trigger/Grip key state, and convert the handle pose data into the left-hand coordinate system for unified calculation.
It realizes unified adaptation of different VR handles, simplifies the server maintenance and update process, and improves the adaptation efficiency.
Abstract
Description
Technical Field
[0001] The present invention relates to the field of VR cloud streaming, and particularly to a method for adapting to multiple VR handles. Background Art
[0002] There are various VR head-mounted displays (VR headsets) on the market, and the accompanying handles are also diverse. To make it easy for users to get started, the functions of the handles developed by each manufacturer are relatively unified. The manufacturer provides an SDK for the VR headset and the handle for developers to use. Regarding the operation of the handle, the manifestation forms of different SDKs are different. For example, whether the "A" key of the handle is pressed, some SDKs give two values of "true" and "false", while some SDKs give a floating-point number to represent it.
[0003] To connect VR to the cloud streaming system, the client needs to adapt to various headsets and the handles supporting the headsets, and the server also needs to adapt according to different headsets and handles. As the types of connected VR headsets increase, the adaptation work and subsequent maintenance and updates will become cumbersome.
[0004] Therefore, the prior art has deficiencies and needs to be improved. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a method for adapting to multiple VR handles, mapping them to a unified solution, and the cloud streaming server uses the unified solution for calculation.
[0006] The technical solution of the present invention is as follows: Provide a method for adapting to multiple VR handles, including the following steps:
[0007] Step 1: Use an integer variable of one-byte size to represent the states of different buttons, and each button occupies 1 bit of this integer variable;
[0008] Step 2: Use a two-dimensional vector of floating-point type to represent the offset (x, y) of the joystick. When there are multiple handles or multiple joysticks on a handle, different two-dimensional vectors are used to represent different joystick offsets respectively;
[0009] Step 3: Use a floating-point number to represent the Trigger key, with the value range from 0 to 1, the reset state is 0, and the fully triggered state is 1. Different Trigger keys correspond to a floating-point number respectively;
[0010] Step 4: Use a floating-point number to represent the Grip key, with the value range from 0 to 1, the reset state is 0, and the fully triggered state is 1. Different Grip keys correspond to a floating-point number respectively;
[0011] Step 5: Convert the coordinates of the "orientation" and "position" of the pose data of the handle into the left-handed coordinate system for calculation.
[0012] Further, in the step 1, when the corresponding bit value is "1", it indicates that the button is pressed, and when the corresponding bit value is "0", it indicates that the button is in the initial state.
[0013] Further, in the step 2, the value ranges of both x and y are from -1 to 1.
[0014] With the above solution, the present invention maps the handle with the smallest byte and floating point number, so as to ensure that the server only needs to adapt to the most widely used handles on the market, and maps different handles in a unified manner, thus facilitating the maintenance and update of the server and meeting the requirements of use and maintenance. Specific embodiments
[0015] The present invention will be described in detail below in conjunction with specific embodiments.
[0016] The present invention provides a method for adapting multiple VR handles, including the following steps:
[0017] Step 1: Use an integer variable of one byte (Byte) size to represent the states of different buttons, and each button occupies 1 bit (bit) of this integer variable. When the corresponding bit value is "1", it indicates that the button is pressed, and when the corresponding bit value is "0", it indicates that the button is in the initial state.
[0018] On the current VR handles on the market, the configured buttons are generally eight buttons: A, B, X, Y, menu, view, LS (press the left joystick), and RS (press the right joystick). And a byte generally has eight bits. Correspond the buttons to the eight bits within one byte respectively, so that
[0019] Step 2: Use a two-dimensional vector of floating point type to represent the offset of the joystick (x, y), where x represents the offset of the X axis of the joystick, y represents the offset of the Y axis of the joystick, and the value ranges of both x and y are from -1 to 1. When there are multiple handles or multiple joysticks on a handle, use different two-dimensional vectors to represent the offset of different joysticks respectively.
[0020] Generally, there are two supporting VR handles, corresponding to the left and right hands respectively, and there is one joystick on each of the left and right handles. Therefore, two two-dimensional vectors are needed to represent the joysticks of the left and right handles.
[0021] Step 3: Use a floating point number to represent the Trigger key, with the value range from 0 to 1, the reset state is 0, and the fully triggered state is 1. Different Trigger keys correspond to a floating point number respectively.
[0022] Generally, each of the left and right VR handles has one Trigger key. Therefore, a total of two floating point numbers are needed.
[0023] Step 4: Use a floating-point number to represent the Grip key, with a value range from 0 to 1, the reset state being 0, and the fully triggered state being 1. Different Grip keys correspond to a floating-point number respectively.
[0024] Generally, each of the left and right VR controllers has a Grip key, so a total of two floating-point numbers are required.
[0025] Step 5: Convert the coordinates of the "orientation" and "position" of the controller's pose data into the left-handed coordinate system for calculation.
[0026] The pose data of the VR controller contains two types of information: "orientation" and "position". Among them, "orientation" is a quaternion, and "position" is a three-dimensional vector. By converting the controller coordinates into the left-handed coordinate system, the server uniformly uses the left-handed coordinate system for calculation.
[0027] The present invention maps the controller with the smallest number of bytes and floating-point numbers, thus ensuring that the server only needs to adapt to the most widely used controllers on the market and maps different controllers in a unified manner, which is convenient for server maintenance and update and meets the requirements of use and maintenance.
[0028] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for adapting to multiple VR handles, characterized in that, It includes the following steps: Step 1: Use an integer variable of one-byte size to represent the states of different buttons, with each button occupying 1 bit of this integer variable; Step 2: Use a two-dimensional vector of floating-point type to represent the offset (x, y) of the joystick. When there are multiple handles or multiple joysticks on a handle, different two-dimensional vectors are used to represent the offset of different joysticks respectively; Step 3: Use a floating-point number to represent the Trigger button, with the value range from 0 to 1, the reset state is 0, and the fully triggered state is 1. Different Trigger buttons correspond to a floating-point number respectively; Step 4: Use a floating-point number to represent the Grip button, with the value range from 0 to 1, the reset state is 0, and the fully triggered state is 1. Different Grip buttons correspond to a floating-point number respectively; Step 5: Convert the coordinates of "azimuth" and "position" of the attitude data of the handle into the left-handed coordinate system for calculation.
2. The method for adapting multiple VR handles according to claim 1, characterized in that In the said Step 1, when the corresponding bit value is "1", it indicates that the button is pressed, and when the corresponding bit value is "0", it indicates that the button is in the initial state.
3. The method for adapting to multiple VR handles according to claim 1, characterized in that In the said Step 2, the value ranges of both x and y are from -1 to 1.
Citation Information
Patent Citations
Method adaptive to multiple gamepads and Android terminal equipment
CN106730820A
Operating handle
DE102021107252A1