UDEXREAL Unity Android Bluetooth SDK
UDE SDK 1.0.0
For Unity 2021.3 and above Android platform versions.
SDK Overview
The SDK is used for Udexreal motion capture gloves to Bluetooth transmission /2.4G transmission mode, and can be used in Android applications developed by Unity for smartphones, VR devices, etc.
Note: Please do not use the Bluetooth device connection function in the headset operating system to connect to the glove, otherwise the glove will never connect again. Just use the Bluetooth application developed by this SDK to connect.
SDK Function Introduction
Bluetooth Initialization
2.4G Initialization
Start searching for UDE Bluetooth devices
Terminate search for UDE Bluetooth devices
Search for UDE2.4G devices
Get the list of UDE Bluetooth devices currently searched
Get the list of UDE2.4G devices currently searched
Connect specified UDE Bluetooth devices
Connect to specified UDE2.4G devices
Detects if a specified UDE device is connected (Bluetooth)
Check if the specified UDE device is connected (2.4G).
Disconnect from specified UDE device (Bluetooth)
Disconnected from specified UDE device (2.4G)
Get the current battery level of the UDE device (Bluetooth).
UDE Device Data Reading (Bluetooth)
UDE device data reading (2.4G)
Start and end of control calibration action
Get current calibration phase
Get all knuckle change angles
Obtain calibration performance value
Obtain Bluetooth transmission frame rate
Acquire knuckle axial configuration
Set knuckle axial configuration
Get thumb root node limit parameter
Set thumb root node limit parameter
Get the root node offset value of the thumb
Set the thumb root node offset value
Get external device data
Zero calibration of joystick position
Rocker range calibration control
Get joystick dead zone value
Set joystick dead zone value
Get Trigger trigger value
Set Trigger trigger value
Get Grip trigger value
Set Grip trigger value
Get Trackpad trigger value
Set Trackpad trigger value
Controlled vibration feedback
UDE SDK Quick Start Overview
Drag the Unitypackage into the Unity project and click import to import all files.
You can see UDE_SDK in CoreScripts, which integrates all the methods of the SDK, introduced in the script
using UDESDK;
The method API can be called immediately.
Precondition
Unity needs to be switched to the Android platform. The player- > Configuration- > Api CompatibilityLevel in the project settings needs to be set to. NET Framework.
SDK Function Method Interface Detailed Explanation
Use steps
After importing the SDK, an application instance can be found in the SampleScene under the Sample folder. The following is the routine process for using the SDK.
BLE SDK (Bluetooth)
Create a static instance of the SDK in the main management/control class script.
public static UDE_SDK _SDK = new();
In the initial method flow of Unity Monobehaviour, the Bluetooth initialization method is first called.
_SDK.UDE_BleInit();
Then all methods related to Bluetooth can be called. You need to start searching for the device first, then obtain a list of device names, and call the method according to the device name for connection and other operations.
//初始化
_SDK.UDE_BleStartSearching();
var NameList = _SDK.UDE_GetBleDeviceList();
//连接
string DeviceName = NameList[i]; //i 为任意合法索引值
_SDK.UDE_ConnectCertainDevice(DeviceName);
bool state = _SDK.UDE_CheckDeviceIsConnect(DeviceName);
//断开连接
_SDK.UDE_DisconnectDevice(DeviceName);
_SDK.UDE_BleStopSearching();
Obtaining glove data requires completing all calibration actions in sequence. The data update method needs to be continuously executed in Mono's Update or within the coroutine.
//数据更新与获取
void Update()
{
_SDK.UDE_RunningDataUpdate(DeviceName);
var FingerDataDict = _SDK.UDE_GetFingerRotations(DeviceName);
var ExtraDeviceData = _SDK.UDE_GetInputDeviceData(DeviceName);
}
//动作标定(A B C)开始/停止
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Fist, true);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Fist, false);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Adduct, true);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Adduct, false);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Stretch, true);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Stretch, false);
//获取当前标定阶段
_SDK.UDE_GetCalibrationType(DeviceName)
2.4G SDK (2.4G receiver)
Create a static instance of the SDK in the main management/control class script.
public static UDE_SDK _SDK = new();
In the initial method flow of Unity Monobehaviour, the 2.4G initialization method is first called.
_SDK.UDE_24GInit();
Subsequently, methods related to 2.4G can be called. You need to search for the device first, then obtain a list of device names, and call the method based on the device name for connection and other operations.
//初始化
_SDK.UDE_24GSeraching ();
var list = _SDK.UDE_Get24GDevice();
//连接
UDE_Serial serial = list [i]; //i 为任意合法索引值
_SDK.UDE_24GConnectCertainDevice(serial.mSerialNumber);
bool state = _SDK.UDE_24GCheckDeviceIsConnect(serial.mSerialNumber);
//断开连接
_SDK.UDE_24GDisconnectDevice(serial.mSerialNumber);
Obtaining glove data requires completing all calibration actions in sequence. The data update method needs to be continuously executed in Mono's Update or within the coroutine.
//数据更新与获取
void Update()
{
_SDK.UDE_24GRunningDataUpdate(DeviceName,SerialNum);
var FingerDataDict = _SDK.UDE_GetFingerRotations(DeviceName);
var ExtraDeviceData = _SDK.UDE_GetInputDeviceData(DeviceName);
}
//动作标定(A B C)开始/停止
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Fist, true);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Fist, false);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Adduct, true);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Adduct, false);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Stretch, true);
_SDK.UDE_CalibrationMotionController(DeviceName, CalibrationType.Stretch, false);
//获取当前标定阶段
_SDK.UDE_GetCalibrationType(DeviceName)
API Reference
UDE_SDK
Class name of UDE SDK.
void UDE_BleInit ()
Interface functionBluetooth connection initialization, this method needs to be executed before calling any API of the SDK.
void UDE_24GInit ()
Interface function2.4G connection initialization, this method needs to be executed before calling any API of the SDK.
bool UDE_BleStartSearching()
Interface functionStart searching for connectable UDE devices.Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
Bool
true
Did the search start successfully?
bool UDE_BleStopSearching()
Interface functionTerminate the search for connectable UDE devices.Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the search was successfully terminated
bool UDE_24GSeraching()
Interface functionSearch for connectable UDE devices (2.4G).Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the search was successful
List<string> UDE_GetBleDeviceList()
Interface functionObtain the names of all searched UDE devices.Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
List<string>
{"UDST00001L", "UDST00001R"}
The device name is returned as a list of string type.
List<UDE_Serial> UDE_Get24GDevice()
Interface functionGet all searched UDE devices (2.4G).Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
List<UDE_Serial>
The device name is returned as a list of UDE_Serial types.
bool UDE_ConnectCertainDevice(string DeviceName, Action<string, bool> action = null)
Interface functionConnect the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
action
Action<string, bool>
No
This parameter needs to be transmitted when the connection status listens to the callback
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the device was successfully connected.
bool UDE_24GConnectCertainDevice(string DeviceName, int serial_num)
Interface functionConnect the specified device (2.4G) based on the device name and serial number.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
serial_num
int
Yes
0
Device serial number (UDE_Serial acquired)
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the device was successfully connected.
bool UDE_CheckDeviceIsConnect (string DeviceName)
Interface functionGet the specified device connection status based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Is the device connected?
bool UDE_24GCheckDeviceIsConnect(int serial_num)
Interface functionObtain the specified device connection status (2.4G) based on the device serial number.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
serial_num
int
Yes
0
Device serial number
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Is the device connected?
bool UDE_DisconnectDevice(string DeviceName)
Interface functionDisconnect from the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Has the device completed disconnecting?
bool UDE_24GDisconnectDevice(int serial_num)
Interface functionDisconnect from the specified device based on the device serial number (2.4G).Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
serial_num
int
Yes
0
Device serial number
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Has the device completed disconnecting?
int UDE_GetDeviceBatteryLevel(string DeviceName)
Interface functionGet the current battery status based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
int
1
The battery level is 1-5, corresponding to the current remaining battery level increasing. When it returns to 0, it is considered a failed acquisition.
bool UDE_RunningDataUpdate(string DeviceName)
Interface functionMake the specified device perform data transfer updates based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Is the device updating data normally?
bool UDE_24GRunningDataUpdate(string DeviceName,int serial_num)
Interface functionMake the specified device perform data transfer updates (2.4G) based on the device name and device serial number.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
serial_num
int
Yes
0
Device serial number
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Is the device updating data normally?
bool UDE_CalibrationMotionController(string DeviceName, CalibrationType calibrationType, bool IsStart)
Interface functionControl the start and end of the calibration action for the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
CalibrationType
Enum
Yes
CalibrationType.Fist
The optional enumeration type for this method is Fist.Adduct,Stretch
IsStart
bool
Yes
true
If true, the calibration starts, if false, the method ends
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the device successfully switched calibration status
CalibrationType UDE_GetCalibrationType(string DeviceName)
Interface functionObtain the calibration status of the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
Enum
CalibrationType.Completed
Acquire current calibration phase
double[] UDE_GetCalibrationInfoOffset(string DeviceName)
Interface functionObtain the calibration performance difference of the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
double[]
{1050, 700, 350...}
There are fifteen digits in total, corresponding to the sensor. The larger the number within the standard range, the better the calibration effect.
int UDE_GetDeviceTransferFPS(string DeviceName)
Interface functionObtain the Bluetooth data transmission frame rate of the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
int
100
Gets the instant frame number of Bluetooth data received by the device.
Dictionary<FingerJointType, Vector3> UDE_GetFingerRotations(string DeviceName)
Interface functionObtain the finger joint change data of the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
Dictionary<FingerJointType, Vector3>
{{FingerJointType.Thumb1, {0,0,0}}}
According to the FingerJointType enumeration type, the Euler angle of each finger joint is given
Axis[] UDE_GetThreeAxis(string DeviceName)
Interface functionObtain the axial configuration of the specified device's knuckles based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
Axis[]
{Axis.x, Axis.y, Axis.z}
Provide the actual axis (x, y, z, -x, -y, -z) corresponding to the pitch angle, rotation angle, and yaw angle.
bool UDE_SetThreeAxis(string DeviceName,Axis[] axes)
Interface functionSet the knuckle axial configuration of the specified device according to the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
axes
Axis[]
Yes
{Axis.x, Axis.y, Axis.z}
Set the coordinate axis configuration of three rotation angles
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the setting was successful
float UDE_GetThumbCoefficient(string DeviceName)
Interface functionGets the thumb root limit value for the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
float
0.6
Get limit magnification value
bool UDE_SetThumbCoefficient(string DeviceName, float value)
Interface functionGets the thumb root limit value for the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
value
float
Yes
0.8
Limit the magnification value, the range needs to be between 0-1
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the setting was successful
Vector3 UDE_GetThumbFirstJointOffset(string DeviceName)
Interface functionObtain the thumb root joint offset value of the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
Vector3
{0,0,0}
The offset value of the root joint in each axis
bool UDE_SetThumbFirstJointOffset(string DeviceName, Vector3 value)
Interface functionSet the thumb root offset value for the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
value
Vector3
Yes
{0,0,0}
Offset value Euler angle
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the setting was successful
InputData UDE_GetInputDeviceData(string DeviceName)
Interface functionObtain external device input (joystick and button data) for the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
InputData
Structure of additional data
bool UDE_JoystickCenterCalibration(string DeviceName)
Interface functionObtain the specified device based on the device name and perform zero calibration of the joystick position of the device.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the calibration instruction was successfully received
bool UDE_JoystickRangeCalibration(string DeviceName, bool IsStart)
Interface functionObtain the specified device based on the device name, and control the start and end of the joystick position range calibration of the device.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
IsStart
bool
Yes
true
True is the start of calibration, false is the end of calibration
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the calibration instruction was successfully received
float UDE_GetJoystickDeadZone(string DeviceName)
Interface functionObtain the specified device by device name and obtain the value of the joystick dead zone range for the device.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
float
0.15
The dead zone range value is 0-1, corresponding to 0% - 100%.
bool UDE_SetJoystickDeadZone(string DeviceName, float value)
Interface functionGet the specified device according to the device name and set the joystick dead zone range value of the device.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
value
float
Yes
0.1
Dead zone limit ratio parameter, range is 0-1
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the setting was successful
float UDE_GetTriggerActiveValue(string DeviceName)
Interface functionObtain the trigger value of the designated device simulation Trigger key based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
float
0
When there is an error, the returned data is -1, and the normal case is a numerical value of 0-1.
bool UDE_SetTriggerActiveValue(string DeviceName, float value)
Interface functionSet the trigger value of the designated device simulation Trigger button based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
value
float
Yes
0.1
The trigger value ratio required to simulate the Trigger button, with a range of 0-1.
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the setting was successful
float UDE_GetGripActiveValue(string DeviceName)
Interface functionObtain the trigger value of the specified device's simulated Grip button based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
float
0.1
When there is an error, the returned data is -1, and the normal case is a numerical value of 0-1.
bool UDE_SetGripActiveValue(string DeviceName, float value)
Interface functionSet the trigger value of the designated device simulation Grip button according to the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
value
float
Yes
0.1
The trigger value ratio required to simulate the Grip button, with a range of 0-1.
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the setting was successful
float UDE_GetTrackpadActiveValue(string DeviceName)
Interface functionObtain the trigger value of the specified device's simulated Trackpad button based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
float
0.1
When there is an error, the returned data is -1, and the normal case is a numerical value of 0-1.
bool UDE_SetTrackpadActiveValue(string DeviceName, float value)
Interface functionSet the trigger value of the designated device simulation Trackpad button according to the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
value
float
Yes
0.1
Simulate the trigger value ratio required for Trackpad keys, with a range of 0-1.
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the setting was successful
bool UDE_ControlVibration(string DeviceName, int PlaceIndex, int SustainedTenMillionsecond = 4, int Strength = 1)
Interface functionControl the vibration feedback of the specified device based on the device name.Parameter descriptionThe parameter description of this interface is as follows:
Parameter name
Type
Is it mandatory?
Example values
Explanation
DeviceName
string
Yes
"UDST00001L"
Device name
PlaceIndex
int
Yes
1
There are only two vibration feedback modules on the equipment, corresponding to values 1 and 2.
SustainedTenMillionsecond
int
No
4
Vibration duration, 4 is the minimum default value, indicating 40ms
Strength
int
No
1
Vibration level, 1 is the minimum default value, and the maximum magnitude is 7.
Return valueThe return value of this interface is described as follows:
Parameter name
Type
Example values
Explanation
Custom
bool
true
Whether the vibration feedback trigger command was successfully sent
Enumeration
enum CalibrationType
Calibration action and state
public enum CalibrationType
{
AdductFin = -2,
FistFin = -1,
None,
Fist,
Adduct,
Stretch,
Completed
}
The enumeration values of this enumeration are described as follows:
Enumerated values
Numerical value
Explanation
AdductFin
-2
Close action (action B) completed
FistFin
-1
The fist-making action (Action A) is completed
None
0
Calibration not started
Fist
1
Fist Clenching (Action A)
Adduct
2
Close action (action B)
Stretch
3
Stretching exercise (Action C)
Completed
4
Calibration completed
enum FingerJointType
Finger joints
public enum FingerJointType
{
Thumb1, Thumb2, Thumb3,
Index1, Index2, Index3,
Middle1, Middle2, Middle3,
Ring1, Ring2, Ring3,
Pinky1, Pinky2, Pinky3
}
The enumeration values of this enumeration are described as follows:
Enumerated values
Numerical value
Explanation
Thumb1
0
First joint of thumb
Thumb2
1
Second joint of thumb
Thumb3
2
Third joint of thumb
Index1
3
First joint of index finger
Index2
4
Second joint of index finger
Index3
5
Third joint of index finger
Middle1
6
Middle finger first joint
Middle2
7
Second joint of middle finger
Middle3
8
Third joint of middle finger
Ring1
9
First joint of ring finger
Ring2
10
Second joint of ring finger
Ring3
11
Third joint of ring finger
Pinky1
12
First joint of little finger
Pinky2
13
Second joint of little finger
Pinky3
14
Third joint of little finger
enum Axis
Axial configuration
public enum Axis
{
x = -3,
y = -2,
z = -1,
x_n,
y_n,
z_n
}
The enumeration values of this enumeration are described as follows:
Enumerated values
Numerical value
Explanation
x
-3
X-axis positive direction
y
-2
Y-axis positive direction
z
-1
Z-axis positive direction
x_n
0
X-axis reverse direction
y_n
1
Y-axis reverse direction
z_n
2
Z-axis reverse direction
Structure
struct InputData
Data and trigger information for external devices (buttons, joysticks)
public struct InputData
{
public float joyX; //range: -1 -> 1
public float joyY; //range: -1 -> 1
public bool joyButton;
public bool trgButton;
public bool aButton;
public bool bButton;
public bool grab;
public bool menu;
public bool trackpad_touch;
public float trgValue; //range: 0 -> 1
}
The parameter description of this structure is as follows:
Parameter
Type
Explanation
joyX
float
Rocker X-axis value, range [-1, 1]
joyY
float
Rocker Y-axis value, range [-1, 1]
joyButton
bool
Is the joystick button pressed?
trgButton
bool
Simulate whether the joystick button is pressed
aButton
bool
Is the A button pressed?
bButton
bool
Is the B button pressed?
grab
bool
Simulate whether the Grab button is pressed
menu
bool
Simulate whether the Menu button (AB button at the same time) is pressed
trackpad_touch
bool
Simulate whether the Trackpad button is pressed
trgValue
float
Trigger values for simulation, with a range of [0,1].
Last updated