rayantony / linux-track

Automatically exported from code.google.com/p/linux-track
MIT License
0 stars 0 forks source link

Value of Z-axis of VectorClip captured by TrackIR5 is inconsistent #50

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Sample code at http://code.google.com/p/linux-track/wiki/LinuxtrackInterface
2. Instead of output pose 60 times, wrote a infinite while loop to output the 
value of Z:
while(1)
  {
    ltr_get_pose(&heading, &pitch, &roll, &x, &y, &z, &counter);
    printf("Z=%f\n", z);
    usleep(10000);
  }

What is the expected output? What do you see instead?

Expected: the output of Z should be consistent
Observed: move VectorClip towards and away from the camera, different values of 
Z are reported even VectorClip is at the same physical distance (in real world) 
from the camera.

Tested output values of X, Y, heading, yaw and roll, they are OK, i.e. their 
values are consistent.

What version of the product are you using? On what operating system?
linuxtrack-0.99.7-64
Debian 64bit
TrackIR5
VectorClip

Please provide any additional information below.

Please check.
Thanks!

(Also, it would be great if the API could offer a function/method to return the 
number of markers currently captured by the camera.)

Original issue reported on code.google.com by hw...@simquest.com on 22 Dec 2013 at 11:48

GoogleCodeExporter commented 8 years ago
Hi,
may I ask you how much inconsistent values did you see?

The thing is this: the Z value is the least stable (numerically) - even the 
smallest jitter in the blob position has relatively strong influence on the 
result. To have it more precise, my guess is that a different setup would have 
to be used (more than three markers, calibrated camera, different 
processing...).

One more thing - what setup for the Z axis are you using? Any non-linearities? 
Is it symetrical? (if you'd attach here a log from ltr_gui, it contains all the 
info). 

As for the number of blobs seen - directly there is no way to get that info; 
however the position is only updated when three valid blobs are seen. There is 
private part of the interface (private for now, but I can make it public, if 
you'd have use for it), that provides positions of the blobs (up to 3 blobs) 
and also the raw data (before filtering). 

Kind regards,

Michal

Original comment by f.jo...@email.cz on 7 Jan 2014 at 6:18

GoogleCodeExporter commented 8 years ago
Thanks for your prompt reply.

Please refer to the attachment for the log.

Original comment by hw...@simquest.com on 29 Jan 2014 at 9:32

Attachments:

GoogleCodeExporter commented 8 years ago
Also, could you please verify that in function:

linuxtrack_get_pose(float *heading, float *pitch, float *roll,
                    float *tx,      float *ty,    float *tz, uint32_t *counter);

that:
1. Are the returned angles (heading, pitch, roll) Tait–Bryan angles or Euler 
Angles?
   Is "Yaw" around the Y-axis, "Pitch" around Z-axis and "Roll" around X-axis?
   What coordinate linuxtrack uses?

2. What's the rotation order of those angles?
   Are they intrinsic rotations or extrinsic rotations?

We are developing applications using Natural Point's CameraSDK 1.5 with 
TrackIR5 on Windows platform as well.

If you happened to know above information about CameraSDK 1.5, could you please 
kindly share them with us?

Thank you very much.

Original comment by hw...@simquest.com on 29 Jan 2014 at 9:43

GoogleCodeExporter commented 8 years ago
Hello,

unfortunately I don't have much info on the Camera SDK - I haven't used it; I'd 
advise you to try and ask on NP's forums, I'm pretty sure they'll tell you...

As far as the Z axis inconsistencies, on the third tab of ltr_gui press 
Detailed axis setup button and head to the Z axis setup; there check the "as 
above" (I think it is the name) checkbox to make the axis symetrical. The 
visualization of sensitivity should become V shaped then. But as I said, the Z 
axis is the least numericaly stable, so you might need to apply more filtration 
to get some smoother values...

As for the Euler vs Tait-Bryan, extrinsic vs intrinsic, I'd have to dig deep - 
just from a quick glance my angles to rotation matrix conversion doesn't seem 
to match any of the usual suspects. Anyway, this code snippet might give you 
some idea:

     glLoadIdentity();

     glRotated(-xRot, 1.0, 0.0, 0.0);
     glRotated(-yRot, 0.0, 1.0, 0.0);
     glRotated(-zRot, 0.0, 0.0, 1.0);
     glTranslated(-xTrans, -yTrans, -zTrans);

This is how I use it in the ltr_gui's cockpit visualization; the thing with 
signs has to do with the fact, that it is not my viewpoint that moves, but the 
objects around me (when I want to look to the right, I have to rotate the world 
to the left).

I'll try to recover the info you need and chime back.
Kind regards,

Michal

Original comment by f.jo...@email.cz on 30 Jan 2014 at 7:06

GoogleCodeExporter commented 8 years ago
Thanks for your prompt reply!

I will try tweaking ltr_gui.

hwang

Original comment by hw...@simquest.com on 30 Jan 2014 at 10:53

GoogleCodeExporter commented 8 years ago
Hello!

In your last post, can we assume that:
xRot is roll angle
yRot is yaw angle
zRot is pitch angle?

Also, could you please tell in linuxtrack, is left-handed coordinate system or 
right-handed coordinate system used?

After line "glTranslated(-xTrans, -yTrans, -zTrans);", I assume "drawObject();" 
is called, right?

Thanks!

hwang

Original comment by hw...@simquest.com on 7 Feb 2014 at 4:51

GoogleCodeExporter commented 8 years ago
Hello,
you can check the code in question here: 
https://code.google.com/p/linux-track/source/browse/trunk/src/qt_gui/glwidget.cp
p - the function void GLWidget::paintGL() does the drawing. The coordinate 
system should be consistent with OpenGL one - so it should be right handed; 
that also means that xRot is pitch, yRot is yaw and zRot is roll.

Kind regards,

Michal

Original comment by f.jo...@email.cz on 7 Feb 2014 at 8:26

GoogleCodeExporter commented 8 years ago
Thanks for the information!

Original comment by hw...@simquest.com on 7 Feb 2014 at 10:52

GoogleCodeExporter commented 8 years ago
Wow..sure glad icopied all this...and other pahes to

Original comment by sweetpea...@gmail.com on 6 Feb 2015 at 3:19

GoogleCodeExporter commented 8 years ago
I dont believe i said anyone could use ny email...looks like wr ahve anA ISSUE

Original comment by sweetpea...@gmail.com on 6 Feb 2015 at 3:22

GoogleCodeExporter commented 8 years ago
I dont believe i said anyone could use ny email...looks like wr ahve anA ISSUE

Original comment by sweetpea...@gmail.com on 6 Feb 2015 at 3:23

GoogleCodeExporter commented 8 years ago
I dont believe i said anyone could use ny email...looks like wr ahve anA ISSUE

Original comment by sweetpea...@gmail.com on 6 Feb 2015 at 3:25