Page 1 of 1

Parsing CSV output files

Posted: Thu Jan 05, 2012 10:24 am
by ORB_Lab
Hi All,

I'm currently writing a set of Python classes to parse the output CSV files from OptiTrack Tracking Tools.

I've run across something that's a little confusing to me. When tracking trackables, you get extended frame information that includes "Trackable Marker Location" or (x,y,z) for each marker in the trackable. However, you also get something labeled as "Point Cloud Marker corresponding to each trackable marker (x,y,z)."

What is the difference between these two sets of positions? I noticed that the numbers for the corresponding positions differ ever so slightly.

Thanks.
Aaron

Re: Parsing CSV output files

Posted: Mon Jan 09, 2012 4:03 pm
by NaturalPoint - Mike
Hello -

Due to the nature of markers and tracking, the markers may not be 100% where the software expects them to be, yet still be within tolerance to provide definition for a rigid body. As such, the software will provide not only the actual marker positions (point cloud markers) but also the positions that the rigid body markers were expected to be in (trackable marker location).

Re: Parsing CSV output files

Posted: Tue Jan 10, 2012 7:49 pm
by ORB_Lab
Great - thanks for clearing that up.

Aaron

Re: Parsing CSV output files

Posted: Mon May 14, 2012 4:20 pm
by tlin067
Hi ORB Lab,

I was wondering if you were able to share your python classes for parsing the csv files? I am just beginning to write some now but it would be great to not re invent the wheel.

Thanks,
Tom

Re: Parsing CSV output files

Posted: Tue Jun 12, 2012 7:09 am
by sburden
With regards to parsing CSV data, I recently saved a file with data from two trackables that has some strange data:

#IND0000
#QNAN000

Right now I'm simply ignoring this data -- it would be nice to know what (if anything) it means and whether I might be doing something silly when I'm collecting data . . .

Re: Parsing CSV output files

Posted: Tue Jun 12, 2012 12:21 pm
by NaturalPoint - Mike
Values like these in the trackable lines generally refer to data that isn't there for that frame. Compare the missing data to the frame line. If the trackable is missing points, this can cause either off or broken tracking of the trackable, which will output NAN (not a number) values for orientation and position.

Re: Parsing CSV output files

Posted: Sun Jul 01, 2012 7:30 pm
by ORB_Lab
Hi Tom,

You can find the python file for parsing the CSV that's exported by Tracking Tools in the python subdirectory of this github repository: https://github.com/OlinRoboticsAndBioinspiration/mocap. (I apologize in advance for the lack of extensive documentation in the code - I can try to help you out if you get stuck making use of it.)

As we're an academic lab, we aim to share our code freely. If you present or publish any results that make use of our code, please provide attribution for the Olin Robotics and Bioinspiration Lab.

Cheers,
Aaron

Re: Parsing CSV output files

Posted: Thu Jul 05, 2012 3:57 pm
by NaturalPoint - Mike
Hey Aaron, I'm trying to maintain a collection of publicly available projects for the OptiTrack system, would you mind if I linked to this there? Alternatively I can link to this thread.

Re: Parsing CSV output files

Posted: Mon Jul 09, 2012 3:04 pm
by ORB_Lab
Not at all - please feel free to link to that repository. Folks are also welcome to contribute by adding features they might like to see in the code and submitting pull requests.

Aaron

Re: Parsing CSV output files

Posted: Wed Jul 11, 2012 1:46 pm
by NaturalPoint - Mike
Added!