Developing for the Vicon Motion Capturing System

This page contains all the stuff we learned while developing software that uses the Vicon Motion Capturing System

  1. Simulating a datastream without hardware
  2. Getting CSV from Vicon
  3. Using ViconDataStream Framework for Unlabeled Markers
  4. Obsolete repositories


Simulating a datastream without hardware

It is possible to simulate a datastream with the Vicon Tracker software without having to use the hardware, which is very helpful when you just want to test whether your software processes the datastream correctly. To create such a simulated datastream follow the guide below:

Required:

  • software "Tracker 1.1" or higher
  • software "Vicon Virtual System"

+ if it's not installed you should find the installer in oliver/Public/Software/Device Dependent Software/VICON/Vicon Tracker/

  • sample data: camera data file (.x2d), camera calibration file (.xcp) and object files (.vsk)

+ if you don't have your own sample files you can use the ones in oliver/Public/Software/Device Dependent Software/VICON/Vicon Tracker/RigidBodySample.rar. There you should find a .xcp and several .x2d and .vsk files.

Setup

  1. Start the Tracker and the Vicon Virtual System, they have to run on the same machine.
  2. In Tracker switch to the "Calibrate" tab and under "manage camera calibration" click on "load..." and choose your .xcp file. (for example "RightHand Cal 01.xcp")
  3. Switch to the "Objects" tab and click on the load button on the left (it should have a small folder icon and a tooltip "Load an Object"). Choose a .vsk file. (for example Head.vsk) You can load several objects files to track several objects at the same time.
  4. Switch to the Vicon Virtual System application.
  5. Click on the folder button on the right of the "Camera Data File" field to load an .x2d file of your choice. (for example "Head Hand Walking 01.x2d")
  6. Click on "Stream" to start the simulation.


Now the Tracker should display moving objects according to your configuration.

Explanation

The Vicon Virtual System simulates the camera data which is then read by the Tracker to calculate the normal body tracking stuff.
The "Device Data File" (.x1d) is not needed for a simple simulation. It is supposed to be used if analogue data is necessary, but we don't have any more information about it and haven't tried it yet.

Getting CSV from Vicon

Geek’s summary

  • Ethernet -> Gigabit PoE Switches, IP: 192.168.10.1, Subnet: 255.255.255.0
  • Vicon laptop IP: 192.168.88.88
  • Source code (git):
    git clone ssh://oliver.informatik.rwth-aachen.de/Public/Software/i10%20Software/Vicon/SimpleViconGLClient.git

Detailed

You can get CSV of coordinates of rigid body by connecting your Mac running SimpleViconGLClient with Vicon machine running Vicon Tracker.

Prepare Vicon laptop (Windows machine) side by setup, calibration, and defining body. Use a meaningful name for points on the rigid body. This will be column name of your CSV output.

Get the simple Vicon client from the following SVN and compile it using Xcode:

git clone ssh://oliver.informatik.rwth-aachen.de/Public/Software/i10%20Software/Vicon/SimpleViconGLClient.git


Connect your Mac to the Gigabit PoE switch (the same that Vicon is connected to).

Make the Ethernet connection top priority of your network preference. If you don’t know how, just turn off other connections such as AirPort. Change your IP address to 192.168.88.88 and subnet mask to 255.255.255.0. You need to make sure that the IP address does not clash with Vicon laptop or Vicon cameras.

Connect to Vicon laptop with IP address 192.168.88.88

If this is successful, you will see some marker moving around. Press “Rec” to record, and press it again to stop. You will be asked to save the CSV output file.

If this is not successful, you should try the following (if failure go to the next step):

  1. Ping the Vicon machine from your Mac.
  2. Turn off all other network connection, then ping again.
  3. Check the IP address and subnet mask, then ping again.
  4. Reading this section twice, slowly, and try again. If it doesn’t work, cry for Joachim, Chat, or Thorsten.

Using ViconDataStream Framework for Unlabeled Markers

To date (7.4.11), in order to use SimpleViconGLClient or other RealTime protocol-based code, you need at least three markers on a rigid body. This may not be suitable for some application such as finger tracking.

You can, however, use ViconDataStream framework to get unlabeled markers from Vicon.

  1. (optional) If you want a high-speed data, it may be a good idea to use a wired approach. Use Apple USB LAN extension to add a second ethernet port to the Vicon machine. Connect it to the switch in the room. (Not a switch that connects Vicon cameras). I will refer to the connection between Vicon-Switch-Vicon cameras as et0, and the connection between Vicon-switch-your mac as et1. Do the following sequence to avoid Vicon Tracker nagging about unlicensed configuration.

+• Disable et1 connection
+• Launch Vicon Tracker
+• Enable et1 connection

  1. Vicon machine side (Windows): While Vicon Tracker is running, run DataStreamRelayServer (the shortcut is on the desktop). Choose an IP that is corresponding to the machine’s Wireless LAN to broadcast. Usually, it is an IP that is not 192.168.10.1.
  2. Mac side: Use ViconDataStreamFramework. After include the framework in your project, it is as simple as following.

	

// Setup:
vicon = [VDSVicon alloc] initWithBonjour];
vicon.delegate = self;

// Delegate method:
-(void)viconIsReady:(VDSVicon*)theVicon;
{
theVicon startStream:kVDSUnlabeledMarkerStreamType withTarget:self andSelector:@selector(viconDidReceiveFrame:markers:);
}

// Data processing method:
-(void)viconDidReceiveFrame:(NSNumber *)theFrame markers:(NSDictionary *)theMarkers;
{
NSLog(@"%@: %@", theFrame, theMarkers);
// theMarkers is a dictionary of markers. The keys are a unique name like, “ 1”. The values are arrays of x, y, z.

}


// Stop:
vicon stopStream:kVDSUnlabeledMarkerStreamType;


Technical detail

The markers are streamed over UDP protocol with JSON encoding. As of 10.06.11, based on a capture of three static markers over 22 hours, the average frame rate is around 50 frame per second (average delay 0.02 second (SD = 0.0022) between consecutive frames). There is an increasing memory consumption (500K/hour) in Cocoa framework side which I cannot track it down, but it should be fine if you do not run the tracking continuously for a week.

Downloads:

Windows server: TODO (requires Vicon Data Stream SDK and Bonjour SDK installed)
Mac cocoa framework: ViconDataStreamFramework 0.11

Git repositories:

Windows server: git clone ssh://oliver.informatik.rwth-aachen.de/Public/Software/i10%20Software/Vicon/VICONDataStream/Emitter.git
Stable tag: DataStreamRelayServer0.4
Mac cocoa framework: git clone ssh://oliver.informatik.rwth-aachen.de/Public/Software/i10%20Software/Vicon/VICONDataStream/Receiver.git
Stable tag: ViconDataStreamFramework0.11
Mac Benchmark Program: git clone ssh://oliver.informatik.rwth-aachen.de/Public/Software/i10%20Software/Vicon/VICONDataStream/ViconBenchmark.git
Stable tag: ViconDataStreamFramework0.1

Troubleshooting

  • If you cannot connect to the Windows side, try restart your program again. Bonjour resolution is still strange for me.
  • Maintained by Chat




Obsolete repositories

I moved all Vicon code from SVN to git (see above for the git repository location). The obsolete SVN repositories contains examples for Tarsus and from Prophysics. Since they were no change in the code, I exported them as normal files and put them on oliver/Software/i10 Software/Vicon/Obsolete-fromSVN

Attachments:
File Description File size Downloads Last modified
ViconDataStreamFramework.framework 0.11.zip ViconDataStreamFramework 0.11 131 kB 633 2011-06-10 15:59

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.