We can send data in real time from Vicon Tracker to Grasshopper using OSC. OSC or Open Sound Control is sent through a network or to your local computer using a defined port and IP address.
We will need the gHowl plugin for grasshopper. You can download the gHowl plugin here: ghowlr50.zip.
To install the gHowl plugin you first unzip the file “gHowl_r50.gha” and make sure you make sure the file is unblocked through the file properties window. You can then just drag the plugin file onto the grasshopper workspace to install it.
You can download the above definition here: OSC_Tracker_to_Polyline
You will need to get your computers IP address once you are on the NETGEAR54 (password: rapidsun259) wireless network.
Find your IP address for Windows PC.
Find your IP address for a Mac
Once we are able to receive the OSC stream from Vicon Tracker we want to break the OSC message up so we can create vectors (X,Y,Z coordinates) for each marker. The original message is on the left. We will Split the list starting at index 3 to get the middle two lists. This will separate the top 3 lines from the rest of the list. Then we need to Partition the bottom part of the middle list in branches of size 4 to get the list on the right.
/vicon/frame 989 100 /vicon/marker/Object/Object1 100.878 300.474 150.892 /vicon/marker/Object/Object2 -200.726 600.567 200.387 /vicon/marker/Object/Object3 350.489 -400.575 -300.575
/vicon/frame 989 100
/vicon/marker/Object/Object1 100.878 300.474 150.892 /vicon/marker/Object/Object2 -200.726 600.567 200.387 /vicon/marker/Object/Object3 350.489 -400.575 -300.575
/vicon/marker/Object/Object1 100.878 300.474 150.892
/vicon/marker/Object/Object2 -200.726 600.567 200.387
/vicon/marker/Object/Object3 350.489 -400.575 -300.575
Once we have the branched list on the right, we can use List Item to get the values in indices 1,2, and 3 and plug them into the X, Y, and Z inputs of the Vector node to create a vector for each marker.
