OptiTrack - penn-figueroa-lab/lab_wiki GitHub Wiki
Installation and Calibration
Detailed instructions on installation and calibration found in this google doc written by Chris Fourie.
General calibration steps:
- Aim and focus all cameras, instructions here: https://docs.optitrack.com/hardware/aiming-and-focusing WATCH VIDEO, important instructions start at 1:30min
- Once cameras are installed we can do the calibration with the wand and the set the ground plane frame, instructions here: https://docs.optitrack.com/motive/calibration
Data Collection
Option 1: Using ROS libraries (for Linux)
-
Connect a Linux computer with the Windows computer that has Optitrack installed. There are two ways for this.
a. Ethernet cables (do not connect with the same port as Optitrack's cameras)
b. WiFi with the same router
-
Turn off all firewalls and manually set IP addresses for both Windows and Linux computers.
a. Client:
ifconfigin Linux's terminal and check IPv4 of theeth0/enp4s0orwl01part (ex. 169.254.206.219)b. Server:
ipconfigin Windows's terminal and check IPv4 of theEthernetorWi-Fipart (ex. 169.254.216.209) -
Install one of the following three libraries.
a. natnet_ros_cpp (strongly recommended, only works for ROS Noetic and below)
b. vrpn_client_ros (recommended for general usage, works for all ROS)
c. mocap_optitrack (not recommended)
-
Setup the configuration files.
a. For VRPN method, setup the rigid body names in
initial.yamlfileb. For Natnet method, setup the points' names in
initiate.yamlfile
For additional guides check the following links: https://tuw-cpsg.github.io/tutorials/optitrack-and-ros/ and https://github.com/L2S-lab/natnet_ros_cpp
For ROS2, check MOCAP4ROS2
Option 2: Using stand-alone NatNet 4.0 SDK (for Windows and Matlab)
This is the method for collecting data on the Windows computer that Optitrack cameras are connected to, or Matlab on a Linux computer. The NatNet SDK is the recommended way to use it for data porting. However, Python is not fully supported, whereas C++ and Matlab are. If you want to use Python, we recommend that you download the NatNet SDK example files, which have Python examples in them, and modify them. It is possible to modify it by using global variables.
Optitrack website NatNet 4.0 SDK: https://docs.optitrack.com/developer-tools/natnet-sdk/natnet-4.0
Example Python interface with NatNet 3.0 https://github.com/mje-nz/python_natnet
For offline data collection, use Optitrack Motive's native recording option. It supports recording, replay, and export functions. You can export the data into many different formats, including CSV.
Natnet Instructions (Recommended)
Set IP Addresses:
- Client (Linux): 169.254.206.219
- Server (Windows): 169.254.216.209
On Windows:
- Launch Motiv
- Select rigid bodies (give them names!)
- Check the bottom right corner to see if the streaming is on
- Check Edit->Settings->Streaming->Local Interface has the Windows IP address (169.254.216.209)
On Linux:
- Launch
roslaunch natnet_ros_cpp natnet_ros.launch - Confirm with rviz