When we mount a tracker on HMD, haploscope or camera (for video AR/VR), we need to do lot of transformations to bring the origin of tracking body to the eye position. These transformations results into lot of complexity in an otherwise simple code (not to mention an increased probability of bugs)
Luckily, The ART tracker gives the ability to shift the origin of a tracking body to any position (that position can be the eye position in our case)
- Attach the Tracking body to the hmd/haploscope/camera.
- Place the camera such that the camera lens (virtual eye) is at a known position w.r.t. the world coordinate origin.
- Measure the difference between actual position and the position measured by ART tracker.
- E.g Zreq = 500, Zactual = 395, Zoffset = Zactual – Zreq = -105
- Open DTrack
- Go to Calibration -> Body Adjustment
- Select the appropriate body
- Go to Translation by Vector tab
- Put the value of Zoffset in Z
- Hit Apply (Caution: Press only once, If you hit twice it will add twice of the offset )
- Press Reset Vector
- Enter values for Xoffset, Yoffset
- You can set all X, Y, Z values together, the trick is to press Apply only once. If you decide to do it separately make sure to press Reset Vector. The previously applied values stays in the box and if you won’t press Resent Vector before pressing Apply, it will be applied again.
- Good Luck!!!
Sometimes the error of format:
DTrack.obj : error LNK2019: unresolved external symbol _gethostbyname@4 referenced in function "unsigned int __cdecl ip_name2ip(char const *)" (?ip_name2ip@@YAIPBD@Z) 1>istest_haplo.obj : error LNK2001: unresolved external symbol _gethostbyname@4
can be solved by linking Ws2_32.lib to the Project Properties->Linker-> Input-> Additional Dependencies.
- Download GLUT from Nate Robin’s Site
- glut.h to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include
- glut32.lib to C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib
- glut32.dll to C:\Windows\System32\ or C:\Windows\SysWOW64
- And, we are done
When you have created an Empty project in VS 2008, add a new c++ source file (.cpp).
- Open Project properties
- Configuration Properties -> Linker -> Input
- Select Configuration Drop-down box
- Select All Configurations
- It changes settings for both Debug and Release configurations
- In the Additional Dependencies box, add opengl32.lib glu32.lib
- Click OK
An opengl error that shows up mostly in VS 2003 and VS 2005:
microsoft visual studio 8\vc\include\stdlib.h(433) : error C2381: 'exit' :
redefinition; __declspec(noreturn) differs \includes\gl\glut.h(146) :
see declaration of 'exit'
This error is caused by including glut.h before stdlib.h. So just by reversing the order of inclusion we can remove this error: