A web server that serves offline OptiTrack data, that has been exported as CSV, via a websocket connection.
It is meant to be used in conjunction with the web client in https://github.com/osteele/p5pose-optitrack.
-
Verify that will python3 and pipenv are installed:
python3 --version pipenv --version
The first command should print
Python 3.7.4
or greater.The second command should print something like
pipenv, version 2018.11.26
. It doesn't matter exactly what it prints, it just shouldn't error. -
If python3 and pipenv are not installed, install them. On macOS:
-
Install homebrew
-
Run the terminal commands:
brew install python pipenv
On other operating systems, follow the instructions here to install pipenv.
-
-
Clone this repository
-
Inside the cloned directory, run this command:
pipenv install
You will need an OptiTrack *.csv file.
Use the following command to convert this file to JSON:
pipenv run create-csv FILE_OR_DIR...
If FILE_OR_DIRNAME
is a CSV file, it creats a *.json
file in the
./build
directory.
If FILE_OR_DIRNAME
is a directory, all *.csv files directly inside that
directory (but not files inside directories in that directory) are converted.
pipenv run print-bones FILE_OR_DIR...
Prints the bone names.
pipenv run server [JSON_PATH]
This serves data from JSON_PATH
on WebSocket port 8765. It can be accessed
from a client running on the same machine, at ws://localhost:8765
.