VRPN Sample

Use the VRPN Sample to verify that OptiTrack data is streaming through the VRPN protocol.

Overview

Mocap data can be livestreamed through the Virtual Reality Peripheral Network (VRPN). To confirm that live OptiTrack data is streaming through this protocol, download and run the VRPN Sample available on our downloads page.

VRPN Sample Contents

Once downloaded, the VRPN Sample provides the following content:

  • SimpleVRPNTest folder, which includes all the files needed to run the VRPN test.

  • thirdparty folder, which includes files needed to stream VRPN to third-party applications, such as Python or Java.

  • License file for VRPN.

Streaming Settings

Click the Streaming Settings button in the lower left corner of the Control Deck to open the Streaming tab of the Application Settings panel.

The Streaming Settings button is gray when streaming is disabled and white when streaming is enabled.

Streaming Settings for VRPN

NatNet Settings

Enable NatNet streaming to access the Local Interface setting. If streaming mocap data to the same computer as Motive, select Loopback. Otherwise, select the IP address for the network that the data should stream to.

VRPN Settings

Enable VRPN and ensure the correct Broadcast Port is selected.

Run the Simple VRPN Test

  • Open the SimpleVRPNTest folder and browse to x64 > release.

  • Run SimpleVRPNTest.exe. The script will request the required input. Press Enter at any prompt to select the default value, noted in parentheses.

    • Motive IP: enter the IP address for the Motive computer. This is the same address used in the NatNet settings in Motive.

    • Local IP: enter the IP address of the computer that the data is streaming to. Use localhost if the data is streaming to the same computer.

    • Port Number: enter the VRPN port number used in the VRPN settings.

    • Object Name: enter the name of an asset in the mocap volume to track for the test. Make sure to precisely match the case and spacing in Motive when entering the name, or the VRPN test will fail.

  • Once the requested parameters are entered, the script creates 3 output files and reports on the status of the test. A successful test will note the number of Tracker Dropped Frames, Duplicate Frames, and Received Frames collected.

A successful VRPN test.

Run Again

Once a connection has been successfully made between the local PC and the Motive server, the sample allows three (3) options for running the test again.

Repeat with the Same Values (r)

Use the R key to re-run the test using the same values. Data will append to the existing output files.

Prompt to Change Values (P)

The P key allows you to input new data for the Motive IP, Port Number, and Object Name, but does not allow you to change the local IP. This maintains the connection once established rather than dropping and re-connected each time new data is selected to stream.

Data is appended to the existing output files when this option is selected.

Clear for New Input (C)

The C key clears all of the entered data, including the Local IP address with an existing connection. This option overwrites the existing output files in the default directory.

Output Files

The Simple VRPN Test creates three output files in the same folder where the sample is located, overwriting any existing files with the same name:

  • output_analog.txt includes the analog data of the selected asset, if applicable.

  • output_button.txt includes the button data of the selected asset, if applicable.

  • output_tracker.txt includes the tracking data of the selected asset.

Analog and Button data are only available when the test tracks a VRPN asset that contains this type of data. For example, a Navigation Controller includes both analog and button data, whereas a puck, skeleton, or trained markerset will have neither.

Output results from the VRPN Test are saved in the Release folder.
output_tracker.txt data

Troubleshooting

The VRPN test will fail if it is unable to establish a connection between the host pc and the Motive server, or if any of the input data does not match the data in Motive.

The images below show the various errors that can occur.

Connection Issues

Connection issues arise when either the Motive IP or the Local IP information is entered incorrectly or when there is a problem with the network.

  • Ensure that the Motive IP address entered matches the Local Interface address in Motive's NatNet settings.

  • If the Local Interface address in Motive is set to loopback, use the default localhost option for both the Motive IP and the Local IP.

  • If all entered values are correct, contact your IT department to ensure you have sufficient privileges to stream data on the selected network.

Wrong Motive IP Entered

Connection failed - wrong Motive IP address entered.

Wrong Local IP Entered

Example 1 shows the error when an IP address is used:

Connection failed - wrong Local IP entered.

Example 2 shows the error when an incorrect server name is entered rather than an IP address:

Connection failed - incomplete Local IP name entered.

No Response

Once a connection is made, the VRPN test will attempt to connect to the Rigid Body in Motive using the port number entered. If the test is unsuccessful, the test will return VRPN warning messages stating there was no response from server.

Once the issue is identified, use the Run Again commands to re-run the test with the appropriate inputs.

Incorrect Port Number

  • Ensure that the Port Number entered matches the VRPN Port Number in Motive and correct as necessary.

  • Verify with your IT department that the selected port number is open and allows streaming data.

Test failed - incorrect Port Number entered.

Rigid Body Not Found

If the asset selected is not found in the live capture volume (or if the name is misspelled), the VRPN Test will return errors during data collection.

  • Ensure that the Object Name entered in the test is an enabled Rigid Body currently being streamed from Motive.

VRPN Test - Selected asset is not found.

Was this helpful?