Data streaming on motive can be done in several different ways such as:
- Loop back when data is streamed and used on the same machine
- Data streamed on to a virtual machine installed on the same computer
- Two separate computer under the same network
For the purpose of our project option 3 was ideal. However we cover option 1 since it was pretty simple and can be useful for other projects.
Motive (Optitrack motion capture system software) is only supported on Windows. So option 1 is only doable on windows machines. Optitrack provided SDK Natnet would take care of data streaming on Windows machines. Open motive and under view tab open data streaming. For option 1 you need to set local interface to Loopback then simply download Natnet SDK and run WinFormTestApp: yourPath\NatNetSDK\Samples\bin\x86\WinFormTestApp
Natnet offers a good GUI for capturing and recording required data. You should be able to see something like below:
-
Also need to set ip addresses in Natnet as shown in picture: (for loopback set both server and local to 127.0.0.1 for any other setup server is the machine running motive and local is the machine data are sent to):
-
Link to: demo using Natnet SDK
For option 3 setup, we used Motive 2.0.2 version on Windows 7 and VRPN-CLIENT-ROS on Ubuntu 16.04. This time change the local interface to your camera network ip address:
For more information you may follow this tutorial to set up VRPN-Client on your Ubuntu :
github
Run the below command to install vrpn-client package: sudo apt-get install ros-kinetic-vrpn-client-ros Above tutorial shows how to set up graphical user interface for your data in Ubuntu using Rviz package. However as for our project we are only interested to extract position data and send them to our drone. This last step is just to make sure we could successfully setup the connection and read data from optitrack onto Ubuntu:
After VRPN-Client package is installed simply run below command and you should be able to see the position data of your object in Euler(m) and Quaternion: vrpn_print_devices tracker_name@vrpn_server_IP_address
You show be able to see something like this:
Demo Link: Optitrack datastreaming onto Ubuntu