A Node.js based Axis Neuron mocap reader that listens for streams of data coming from the Axis Neuron application. Data is streamed over UDP as BVH-binary version 1.1.0.0 so that it can be read and interpreted by the axis-streamer application.
Data is streamed from Axis Neuron over UDP port 7002. When data arrives and is parsed, the following options are available:
- OSC broadcast: forward absolute joint positions as OSC messages over UDP to OSC receivers
- WebSocket: send absolute joint positions to a web-app listening on default port 5080
Alternatively, data can be read and played back from one or more .bvh files.
- open a Terminal
- install Node.js and the yarn package manager if you haven't done so yet, an installer is available from the Node.js website. Alternatively use brew or nvm.
- check if Node.js and yarn are properly installed by typing
node --version
andyarn --version
in the terminal - install npx with
yarn global add npx
Before you start, the folder structure for Axis-Streamer should look like this assuming your project's root folder is called movement-project
movement-project
├── external
| ├── app
| ├── storage
| | ├── bvh
| | └── settings
- use the Terminal to cd into the directory where you want your project to live eg.
cd ~/Documents
and create a folder which you want to use as your working directory eg. movement-project withmkdir movement-project
then change directory withcd movement-project
- inside working directory movement-project a folder structure as outlined above is required.
- then clone the axis-streamer repository from https://github.com/sojamo/axis-streamer.git with
git clone https://github.com/sojamo/axis-streamer.git
into the working directory. cd
into the repository's root foldercd axis-streamer
- install project dependencies with running
yarn
- call
yarn run help
for a list of options, or callyarn run with --mode stream
for streaming data from Axis Neuron (see details below) or useyarn run with --mode load
to load and playback a .bvh file (files should be located inside folder external → storage → bvh), callyarn run with --mode streamload
to load and stream data simultaneously. - open http://localhost:5080 in your browser, you should see a black 3D space with a checkered-board plane and one or more body representations.
After you have completed the above steps, your folder structure should look like this
movement-project
├── axis-streamer
├── external
| ├── app
| ├── storage
| | ├── bvh
| | └── settings
- cd into your working directory eg. movement-project and
git pull
to update to the latest version
Axis-Streamer uses a json file to customize settings, these settings files go into movement-project → external → storage → settings. See the wiki at wiki/Settings for a detailed breakdown.
the following assumes that you are using a Terminal and you are cd
'ed into your working directory.
To stream data from Axis Neuron cd into your working directory and use yarn run with --mode stream
- open Axis Neuron
- open a .raw mocap file or connect your sensor suit
- after the file is loaded, use the play-buttons inside the Control editing pane to start the playback, you can increase the playback speed on the right and set the playback to loop (see loop-icon)
- under Preferences → Output format set Frequency reducing to a value below 1 and make sure Rotation is set to YXZ and Displacement is ticked.
- under Preferences → Broadcasting choose UDP and scroll down to section BVH. Here tick enable, set Format to Binary, the Client Port should be 7002
- confirm with OK
- data should now stream to the application and animate the skeleton in the browser at http://localhost:5080
To stream data from file(s) use yarn run with --mode load
. You need to place a .bvh file named eg. test.bvh
(you can copy test.bvh located inside folder assets for a start) into folder external → storage → bvh after which you need to update the filePath to the(se) file(s) in your Settings file (breakdown of settings).
movement-project
├── axis-streamer
├── external
| ├── app
| ├── storage
| | ├── bvh ⟵
| | └── settings
To accept both, streams and files, use yarn run with --mode streamload
- 7002 Axis Neuron (UDP)
- 5000 OSC (UDP)
- 5080 when axis-streamer is running, open a browser window and point at http://localhost:5080 (HTTP and WebSocket)
There are 3 examples inside the examples folder for
- OpenFrameworks over UDP and OSC
- Processing over UDP and OSC
- p5js over WebSocket
- This project is currently under development
- The purpose of this project is to take data streamed from Axis Neuron or from a .bvh file, translate angular position data to absolute position coordinates and streame these out over WebSocket and OSC
- Able to send and receive multiple streams