Coder Social home page Coder Social logo

optitrack-ws-server's Introduction

OptiTrack Gateway

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.

Install

  1. 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.

  2. If python3 and pipenv are not installed, install them. On macOS:

    1. Install homebrew

    2. Run the terminal commands:

      brew install python pipenv

    On other operating systems, follow the instructions here to install pipenv.

  3. Clone this repository

  4. Inside the cloned directory, run this command:

    pipenv install

Create CSV Files

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.

Run the Server

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.

References

optitrack-ws-server's People

Contributors

dependabot[bot] avatar osteele avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.