Skip to content

tianshu-z/Vicon-dataStream

Repository files navigation

Vicon-dataStream

Adapted from Vicon Datastream SDK (https://www.vicon.com/products/software/datastream-sdk) for streaming motion capture data using TCP/IP protocal from Nexus, Blade, Shōgun, and Tracker applications to another computer and on different softwares. Please note that in Vicon's SDK download, they forgot to include the IDataStreamClientBase.h header file.

Please find the Linux and Windows version on Vicon website.

1. Download the folder

gitclone https://github.com/tianshu-z/Vicon-dataStream

2. Change the current directory to where your folder is located. For example:

cd Documents/Vicon-dataStream/Mac/

3. Run the script with full data stream

./vicon-test 172.28.146.79:801

Please note that you should modify ViconDataStreamSDK_CPPTest.cpp file based upon your needs. The process is as follow:

I. Use your text editor to comment out some unnecessary output of the ViconDataStreamSDK_CPPTest.cpp script. Save and rename it, for example ViconDataStreamSDK_CPPTest_dataStream.cpp

II. Run the following command line in your terminal. This will compile to a binary vicon-dataStream.

g++ ViconDataStreamSDK_CPPTest_dataStream.cpp -L $PWD -lViconDataStreamSDK_CPP -o vicon-dataStream

III. Specify the IP address and you should be able to connect to your MoCap hosting computer.

./vicon-dataStream 172.28.146.79:801

I have another example, perf-ieeegem, compiled from ViconDataStreamSDK_CPPTest_dataStream_sliced.cpp. I used it for real-time music composing based on the captured dancer movements in a performance during the IEEE Games Entertainment & Media Conference 2019. Becuase Max/MSP cannot digest too much information all at once, I have to only keep the translation value information of the markers that I need before it is streamed into the software. Here in this case, the C++ file.

In Max/MSP, I used shell object (https://github.com/jeremybernstein/shell/releases/tag/1.0b2) and zlobject (https://docs.cycling74.com/max5/refpages/max-ref/zl.html). If you only want to bring the object tracking data from Vicon Tracker out to another software like Max/MSP, you should try udpstream before going this route.

We also used the same method to stream data into an autoencoder neural network (https://github.com/mariel-pettee/choreography) and then a localhost webpage in real time.

Supplimentary:

I have a sample included in this repository. In this sample, you can use hands (specifically the joints of phalanges and metacarpal bones on your index fingers) to control the volume of the sound and the height of your body (specifically T10, the center on your back).

Prerequisite:

Max 8 (Max 7 should work but I didn't test it on 7.)

Shell library for Max/MSP

Vicon Motion Capture System

Vicon Shogun Software and full body tracking set up. (Note: unlike udp streaming on Vicon Tracker, you don't need to do any pre-setup for out data streaming here. It just runs.)

macOS

  1. Open your terminal

  2. Download the repository

gitclone https://github.com/tianshu-z/Vicon-dataStream

  1. Change your directory

cd Vicon-dataStream/Mac/

  1. Open up the Max/MSP patcher dataStream-test_sineWave.maxpat in the folder. You need to change the directory to your. Right now, it is /Users/zoe/Vicon-dataStream/Mac/dataStream.log

  2. In the terminal, run

./vicon-test 172.28.146.79:801 | dataStream.log

  1. Run your max patcher

You should be able to see data stream on both your terminal and your max console, which also means you can hear the sinewave now.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published