SDK Interface Description
Currently, the DLL exposes 8 ports externally. Each SDK is a wrapper around the DLL interface. You can check the include/rebocap_ws_sdk/rebocap_ws_sdk.h
header file in the cpp SDK for more details.
The output value type of the SDK is quaternion, which can support multiple coordinate space outputs [default OpenGL right-handed coordinate system, Blender, Unity, UE]. The displacement unit of the output is meters.
The Python version has not yet integrated the rebocap_ws_sdk_calculate_foot_vertex
interface.
Interface Description
- rebocap_ws_sdk_new ``` Create an SDK instance. The input parameters include:
- Coordinate system space. The specific supported spaces can be found in each SDK, which will not be elaborated here.
- Whether to use the global coordinate system. Passing 0 uses the local coordinate system. The local coordinate system is relative to the parent bone's coordinate system. All rotations are relative to the tpose rotation. If you are not clear about rotations, you can refer to the source code of Blender, Unity, and UE. Unity's rotation is relatively easier to understand.
Return value: Returns a pointer to the SDK object instance.
* rebocap_ws_sdk_release
Release the SDK instance object. The input parameter is the instance pointer.
* rebocap_ws_sdk_open
Open the WebSocket client and connect to the WebSocket port. For specific usage and return value descriptions, please refer to the SDK code.
* rebocap_ws_sdk_close
Close the WebSocket client and disconnect. For specific usage and return value descriptions, please refer to the SDK.
* rebocap_ws_sdk_set_pose_msg_callback
Register a message callback. Here, only after the user performs motion calibration will the WebSocket output data at a frame rate of 60 frames per second. For specific usage, see the SDK code. Refer to the 24 bone names for joint order.
* rebocap_ws_sdk_set_exception_close_callback
Register a WebSocket exception close callback. For specific usage, see the SDK code.
* rebocap_ws_sdk_get_last_msg
In addition to the callback form, you can also directly get the last motion message here. The data format is consistent with the callback.
* rebocap_ws_sdk_calculate_foot_vertex
This interface is mainly used to register the contact points of the soles and the body skeleton into rebocap. You need to input body skeleton data (the positions of each joint, the specific order is consistent with the smpl order). If you need the DLL to automatically calculate the contact point positions, you need to input the sole mesh. You can also input the sole contact point position information yourself (3 points for each foot, a total of 12 points). In this case, the DLL will not automatically calculate but use the input values. Note that the unit here is meters, and the coordinates are global coordinates. Additionally, you need to use the OpenGL coordinate system. If not, you need to input conversion parameters. For specific usage, please refer to the Unity demo and the UE plugin usage.
This interface is relatively complex. Please ensure you have sufficient development capability or can fully understand the code in the Unity demo or the UE plugin code before using it. The Python version does not expose this interface. If needed, you can wrap the Python interface from the cpp SDK or the original DLL yourself.
Most users can upload the VRM model to the rebocap client themselves when developing plugins, achieving the same effect. For understanding the sole contact points, you can refer to the Blender integration and the skeleton export instructions.
### 24 Bone Names
The corresponding names for mixamo and smpl specifications are as follows, with a total of 24 bones. For example, the bone with index 0 is the hips, which corresponds to the waist node.
Among them, the joints corresponding to the left and right toes and fingers do not have corresponding tracker nodes, so the output local rotation is 0. If using global rotation, the output rotation value is consistent with the parent node.
- Corresponding names for mixamo
```python
joints_mixamo = [
"mixamorig:Hips",
"mixamorig:LeftUpLeg",
"mixamorig:RightUpLeg",
"mixamorig:Spine",
"mixamorig:LeftLeg",
"mixamorig:RightLeg",
"mixamorig:Spine1",
"mixamorig:LeftFoot",
"mixamorig:RightFoot",
"mixamorig:Spine2",
"mixamorig:LeftToeBase",
"mixamorig:RightToeBase",
"mixamorig:Neck",
"mixamorig:LeftShoulder",
"mixamorig:RightShoulder",
"mixamorig:Head",
"mixamorig:LeftArm",
"mixamorig:RightArm",
"mixamorig:LeftForeArm",
"mixamorig:RightForeArm",
"mixamorig:LeftHand",
"mixamorig:RightHand",
"mixamorig:LeftHandIndex1",
"mixamorig:RightHandIndex1"
]
- Corresponding names for smpl specification
joints_smpl = [ "Pelvis", "L_Hip", "R_Hip", "Spine1", "L_Knee", "R_Knee", "Spine2", "L_Ankle", "R_Ankle", "Spine3", "L_Foot", "R_Foot", "Neck", "L_Collar", "R_Collar", "Head", "L_Shoulder", "R_Shoulder", "L_Elbow", "R_Elbow", "L_Wrist", "R_Wrist", "L_Hand", "R_Hand" ]
SDK Download
python SDK
Suitable for python3.6~python3.12
python sdk v2 update contents:
Fixed deadlock issue caused by
get_last_msg
interface Added support for allpython
versions
C# SDK
Please refer to the README.md in the download file for details
For usage, you can refer to the Unity project
c# sdk v2 update contents:
Fixed deadlock issue caused by
get_last_msg
interface
CPP SDK
Please refer to the README.md in the download file for details
For usage, you can refer to the UE project
c++ sdk v3 update contents:
Fixed deadlock issue caused by
get_last_msg
interface