Skip to content

Custom tracking system

In the event you want to use a tracking system that is currently not supported, it's possible to manually progammatically send tracking data to MANUS Core.

This does not need to be enabled similar to other tracking systems. An array of tracker positions and rotation is sent to MANUS Core and added to the tracker list. To update tracker transformations a new list with identical trackerIDs is sent again.

Example

Below is a very barebones example of a single tracker position being sent to MANUS Core. For this to work MANUS Core needs to be connected and the SDK initialized. This code could be substituted in the SDKMinimalClient main loop.

Note

This example uses our C++ SDK but this approach works similarly in our Unreal Engine and Unity plugins.

Tracker Sending Example
#include <thread>
#include <cmath>

float t_Counter = 0;
while (true)
{   
    //Hold the array of tracker positions that will be sent (only one in the example)
    TrackerData t_Data;

    //Set TrackerID
    strcpy(t_Data.trackerId.id, "Trckr0");

    //Set world position of tracker, in session coordinate system.
    ManusVec3 t_Vec;
    t_Vec.x = sin(t_Counter);
    t_Vec.y = 1;
    t_Vec.z = cos(t_Counter);

    t_Data.position = t_Vec;

    //Set rotation of tracker
    ManusQuaternion t_Qat;
    ManusQuaternion_Init(&t_Qat);

    t_Data.rotation = t_Qat;

    //Tracking quality is internally used for calibration, is exposed to the plugins.
    t_Data.quality = TrackingQuality_Trackable;

    //Sends the data to Core, length is specified in the second parameter.
    CoreSdk_SendDataForTrackers(&t_Data, 1);

    std::this_thread::sleep_for(std::chrono::milliseconds(16)); // or roughly 60fps

    t_Counter += 0.1;
}

alt text