Please Select Your Location
Australia
Österreich
België
Canada
Canada - Français
中国
Česká republika
Denmark
Deutschland
France
HongKong
Iceland
Ireland
Italia
日本
Korea
Latvija
Lietuva
Lëtzebuerg
Malta
المملكة العربية السعودية (Arabic)
Nederland
New Zealand
Norge
Polska
Portugal
Russia
Saudi Arabia
Southeast Asia
España
Suisse
Suomi
Sverige
台灣
Ukraine
United Kingdom
United States
Please Select Your Location
België
Česká republika
Denmark
Iceland
Ireland
Italia
Latvija
Lietuva
Lëtzebuerg
Malta
Nederland
Norge
Polska
Portugal
España
Suisse
Suomi
Sverige

Marker-Based Location Sharing APIs (PC VR)

LBSS provides several application programming interfaces (APIs) to assist in Marker-Based Location Sharing.
Note:

These APIs can only be used with PC VR applications. For APIs designed for use with compatible AIO applications developed with the VIVE Wave VR SDK, see Marker-Based Location Sharing APIs (AIO).

Configure marker ID and dictionary

Configures the marker ID and dictionary for one or two ArUco markers. Location sharing only starts after users scan the secondary marker when configuring two markers.

There are two ways to configure the marker ID and dictionary when setting up Marker-Based Location Sharing with PC VR:

  • Use the API to retrieve the marker settings from markers_list.json (saved to your PC)
  • Insert the marker settings from markers_list_escape.json directly into the API

You can choose which method to apply when setting up Marker-Based Location Sharing with VIVE Business Streaming. For details, see Setting up Marker-Based Location Sharing with VIVE Business Streaming.

One ArUco marker

In this sample, the marker ID is 66, and the marker size is 0.280. This marker size value corresponds to a marker measuring 280 millimeters on each side.
string key = "‍PLAYER00InitMA"‍;
setting = "‍{\"‍marker1\"‍: {\"‍id\"‍: 66,\"‍behavior\"‍: 3,\"‍size\"‍: 0.280}}"‍;
key += setting;
// Check VS_WVRGetParameters() result

bool result = VS_WVRGetParameters((int)DeviceType.HMD, key);
if (result == false)
{
   // Write your error handling code here.
}

Two ArUco markers

In this sample, the marker IDs are 66 and 88 and both marker sizes are 0.280.
string key = "‍PLAYER00InitMA"‍;
setting = "‍{\"‍marker1\"‍: {\"‍id\"‍: 66,\"‍behavior\"‍: 3,\"‍size\"‍: 0.280,\"‍isMainMarker\"‍: true,\"‍pairMarkerID\"‍: 88},\"‍marker2\"‍: {\"‍id\"‍: 88,\"‍behavior\"‍: 3,\"‍size\"‍: 0.280,\"‍isMainMarker\"‍: false,\"‍pairMarkerID\"‍: 66}}"‍;
key += setting;
// Check VS_WVRGetParameters() result

bool result = VS_WVRGetParameters((int)DeviceType.HMD, key);
if (result == false)
{
   // Write your error handling code here.
}

Send marker settings

Retrieves the marker settings from the JSON file on the PC and sends them to the headset.

string key = "‍PLAYER00InitMA"‍;
// default path: C:\Users\{USER_NAME}\markers_list.json
string markerInfoPath =
Environment.ExpandEnvironmentVariables(@"‍%USERPROFILE%\markers_list.json"‍);
if (File.Exists(markerInfoPath))
{
string setting = File.ReadAllText(markerInfoPath);
setting = setting.Replace("‍\n"‍, "‍"‍).Replace("‍ "‍, "‍"‍);
key += setting;
}
bool result = VS_WVRGetParameters((int)DeviceType.HMD, key);
if (result == false)
{
   // Write your error handling code here.
}

Send requests

Helper function for sending requests.

enum DeviceType
{
HMD = 0,
Controller_Left,
Controller_Right
}
bool result = VS_WVRGetParameters((int)DeviceType.HMD, key);
VS_WVRSetParameters((int)DeviceType.HMD, key);

Scan marker

Prompts the headset's tracking engine to detect an ArUco marker and process the data.

string key = "‍ClearRecenterXform"‍;
VS_WVRSetParameters((int)DeviceType.HMD, key);
// This clears the recenter transform for the headset and other tracking devices or objects. You can also manage each device separately, but this is not necessary for most applications.

string key = "‍PLAYER00StartScan"‍;
bool result = VS_WVRGetParameters((int)DeviceType.HMD, key);

Stop scan

Stops the scanning process.

string key = "‍PLAYER00StopScan"‍;
bool result = VS_WVRGetParameters((int)DeviceType.HMD, key);

Check scan status (optional)

Checks the status of the latest scan at regular intervals.

Note: To avoid affecting system performance, do not set the checking frequency to more than two times per second.
string key = "‍PLAYER00CheckMA"‍;
bool result = VS_WVRGetParameters((int)DeviceType.HMD, key);
Submit
Thank you! Your feedback helps others to see the most helpful information.