Handling continuous rotations (> 180 deg.)

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

Handling continuous rotations (> 180 deg.)

Post by ORB_Lab » Mon Oct 29, 2012 6:38 pm

I'm trying to perform motion capture on a small planar double pendulum with a 4 camera setup of s250e cameras. I'm able to make trackables from each of the links of the pendulum and get the data out of the Tracking Tools .csv file just fine.

However, I've noticed that for rotations greater than 180 degrees, tracking tools estimates of the angles will suddenly switch signs. So, when one of the links is swinging past 180, the sign of its angle switches to be -180 and then it begins to become less negative. Similarly, in the other direction, it switches from negative to positive abruptly.

Any thoughts on how I might be able to get an integrated estimate of phase from the data I get out of Tracking Tools?

jolsonsalem
Posts: 323
Joined: Thu Oct 11, 2012 9:18 am

Re: Handling continuous rotations (> 180 deg.)

Post by jolsonsalem » Wed Oct 31, 2012 5:12 pm

I'm passing this one on to one of our developers and should have an answer for you soon.

NaturalPoint - Mike
Posts: 1896
Joined: Tue Feb 01, 2011 8:41 am
Location: Corvallis, OR

Re: Handling continuous rotations (> 180 deg.)

Post by NaturalPoint - Mike » Fri Nov 02, 2012 7:25 am

Hello -

Unfortunately, as the OptiTrack system is based on a fixed coordinate system instead of a record of total movement, it's not possible to do this natively. You could, however, write a simple script or program to read the csv, parse out the values, and reorient the data as you see fit.

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

Re: Handling continuous rotations (> 180 deg.)

Post by ORB_Lab » Fri Feb 01, 2013 8:48 am

As it turns out, I decided to process the data in Python, and the NumPy package has a very nice function called "unwrap" that does exactly what I needed, giving a true integrated estimate of angles.

jolsonsalem
Posts: 323
Joined: Thu Oct 11, 2012 9:18 am

Re: Handling continuous rotations (> 180 deg.)

Post by jolsonsalem » Fri Feb 01, 2013 11:43 am

Glad to hear you came up with a solution!

Post Reply