Parsing CSV output files
Parsing CSV output files
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
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
-
- Posts: 1896
- Joined: Tue Feb 01, 2011 8:41 am
- Location: Corvallis, OR
Re: Parsing CSV output files
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).
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
Great - thanks for clearing that up.
Aaron
Aaron
Re: Parsing CSV output files
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
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
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 . . .
#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 . . .
-
- Posts: 1896
- Joined: Tue Feb 01, 2011 8:41 am
- Location: Corvallis, OR
Re: Parsing CSV output files
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
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
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
-
- Posts: 1896
- Joined: Tue Feb 01, 2011 8:41 am
- Location: Corvallis, OR
Re: Parsing CSV output files
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
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
Aaron
-
- Posts: 1896
- Joined: Tue Feb 01, 2011 8:41 am
- Location: Corvallis, OR
Re: Parsing CSV output files
Added!