VRPN Sample
Use the VRPN Sample to verify that OptiTrack data is streaming through the VRPN protocol.
Last updated
Was this helpful?
Use the VRPN Sample to verify that OptiTrack data is streaming through the VRPN protocol.
Last updated
Was this helpful?
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.
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.
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.
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.
Enable VRPN and ensure the correct Broadcast Port is selected.
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.
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.
The Run Again options are not available if the local PC does not successfully connect to the Motive server. See the troubleshooting section below for more information.
Use the R key to re-run the test using the same values. Data will append to the existing output files.
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.
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.
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.
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 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.
Example 1 shows the error when an IP address is used:
Example 2 shows the error when an incorrect server name is entered rather than an IP address:
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.
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.
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.