Parsing CSV output files

Post Reply
ORB_Lab
Posts: 17
Joined: Thu Jan 05, 2012 10:15 am

Parsing CSV output files

Post 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
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Parsing CSV output files

Post 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).
ORB_Lab
Posts: 17
Joined: Thu Jan 05, 2012 10:15 am

Re: Parsing CSV output files

Post by ORB_Lab »

Great - thanks for clearing that up.

Aaron
tlin067
Posts: 1
Joined: Sun May 13, 2012 7:10 pm

Re: Parsing CSV output files

Post 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
sburden
Posts: 3
Joined: Tue Jun 12, 2012 7:07 am

Re: Parsing CSV output files

Post 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 . . .
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Parsing CSV output files

Post 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.
ORB_Lab
Posts: 17
Joined: Thu Jan 05, 2012 10:15 am

Re: Parsing CSV output files

Post 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
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Parsing CSV output files

Post 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.
ORB_Lab
Posts: 17
Joined: Thu Jan 05, 2012 10:15 am

Re: Parsing CSV output files

Post 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
NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Parsing CSV output files

Post by NaturalPoint - Mike »

Added!
Post Reply