Antilatency tracking system integration project for a VRPN system.
Follow the instructions below to learn how to access the Antilatency hardware via the VRPN.
To learn more about the VRPN, please, read its official documentation.
You can use Antilatency devices with nDisplay by configuring VRPN inputs. Learn more using this link.

Project compilation

First, you need to create a folder where you want to save the project.
Copy the source code from GitHub into any directory. You can download the antilatency-integration. branch or run in the command line the following command:
git clone --single-branch --branch antilatency-integration https://github.com/antilatency/vrpn
Launch CMake. The Browse Source field is for the path to the source code, and the Browse Build field is for the path where you want to save the project..
Click Configure and choose your Visual Studio and system versions. When the configuration is done, click Generate.
Open the [path to your project]\VRPN.sln file in Visual Studio.
Build the vrpn_server project. It is located in the Main Server tab. You can choose one of the build versions: Debug or Release. To build a project, right-click on it and select the Build option.

Start the server

First of all, you need to download the SDK 2.0.0 libraries, which can be downloaded on the Antilatency website.
You can find the necessary files here:
AntilatencySDK\\Native\\NativeAPI\\bin\\[your system version]
Copy them into the folder with the vrpn_server.exe file. By default, this file is located in the Debug or Release folder, depending on the settings selected when building the project:
[project path]\\server_src\\Debug(or Release)\\
You can specify the path to the libraries via the -lp option in the vrpn.cfg file, that is located here:
[project path]\\server_src\\vrpn.cfg
Then, in the vrpn.cfg file, you need to uncomment this line:
#vrpn_Tracker_Alt <-env [environment code]> [tag <-p [placement code]>] <more tags...> <options>
Here you can specify the tracker names (one or more) and the desired options. If the Environment code or Placement code options are not specified, the default settings from AntilatencyService will be used.
The Environment and Placement code can be obtained from the link in AntilatencyService.
For example, a reference to Environment might look like this:
The data after data = is the code for this Environment.
Please, read here to learn more how to work with such links: Environments
If we want to connect one Socket and use the default Environment and Placement, the line might look as follows:
vrpn_Tracker_Alt Device0
Then you need to connect a socket with an Alt and set its Tag property in AntilatencyService, corresponding to what you wrote in vrpn.cfg.
In the provided example, we registered the device name as Device0, which means that the Tag property should be set to Device0.
Please, read here to learn how to configure the Tag property: How to configure device custom properties
Start a server via the command line, specifying the path to the vrpn.cfg file:
vrpn_server.exe -f ../vrpn.cfg


Open the [project path]\VRPN.sln file in Visual Studio.
Build a Debug or Release version of the vrpn_print_devices project located in the Clients tab. To do this, right-click on the project name and select the desired Build option.
Now you need to run the vrpn_print_devices.exe file, which is located here:
[project path]\\client_src\\Debug(or Release)\\
Make sure that the server is running and run the vrpn_print_devices.exe file from the command line, specifying the tracker tag and the server address:
vrpn_print_devices.exe -trackerstride 10 [TrackerTag]@localhost
In our case, the command will look as follows:
vrpn_print_devices.exe -trackerstride 10 Device0@localhost
-trackerstride - data output frequency; in our case, 1 out of 10 results will be displayed.
In the output you will see:
pos - the position data of the tracker;
quat - the quaternion data.