Optitrack on Raspberry Pi
From Rsewiki
Using optitrack and thin NatNet client
Install
Get client from https://github.com/b4be1/packet-client-linux e.g. from the raspberry:
git clone https://github.com/b4be1/packet-client-linux.git cd packet-client-linux mkdir build cd build cmake .. make
setup
On the raspberry pi set the wireless network to access the dedicated optitrack network
Modify the /etc/wpa_supplicant/wpa_supplicant.conf by adding the network groups, maybe the 5Ghz SSID should have highest priority.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev ctrl_interface_group=0 update_config=1 country=DK network={ ssid="asta_optitrack" psk="asta2020" priority=1 } network={ ssid="asta_optitrack_5G" psk="asta2020" priority=2 }
Restart the network by reboot or just restart the network
sudo /etc/init.d/networking restart
modify source
The NatNet version should be changed - hard-coded in file.
cd ~/packet-client-linux nano PacketClient.cpp
A bit down change the NatNetVersion to 3.1 (to fit Motive version 2.2)
// Versioning int NatNetVersion[4] = {3, 1, 0, 0}; int ServerVersion[4] = {0, 0, 0, 0};
Compile the client
Compile
cd ~/packet-client-linux/build make
Run the client
cd ~/packet-client-linux/build ./PacketClient DESKTOP-OVLVRUD.local 192.168.1.136
where DESKTOP-OVLVRUD is the hostname of the optitrack server and 192.168.1.136 is the IP of the raspberry pi in this case.