in your gibbous phase

A project log for HTC vive lighthouse custom tracking

3d position tracking using our own design of the sensors, an altera fpga for decoding the signals and custom code for triangulation and poseestimation

Simon TrendelSimon Trendel 01/10/2018 at 23:552 Comments

The sensors are probably hold up in customs...

So far, we haven't seen anyone actually using the mysterious factory calibration values. Although it might be very handy to just use the ootx values.. in the end, calibrating your 'camera' is something one has to do all the time. For the lighthouses unfortunately there is no nice opencv example. 

The plan is to calibrate them with our own correction function (might be close to the original or not, but should do the job). 

The function we are using is

elevation += phase[lighthouse][VERTICAL];
elevation += curve[lighthouse][VERTICAL]*pow(sin(elevation)*cos(azimuth),2.0) + gibmag[lighthouse][VERTICAL]*cos(elevation+gibphase[lighthouse][VERTICAL]);
azimuth += phase[lighthouse][HORIZONTAL];
azimuth += curve[lighthouse][HORIZONTAL]*pow(cos(elevation),2.0) + gibmag[lighthouse][HORIZONTAL]*cos(azimuth+gibphase[lighthouse][HORIZONTAL]);

 The phase is a constant angle offset. The curve scales a quadratic function that curves the lighthouse plane. The gibbous magnitude and phase describe a distortion with respect to the motor angle.

We are using a least square optimizer to minimize the measured angle to a ground truth over the above parameters. 

The result looks simulation ;P

Now we gotta build a real life calibration platform with know angles...


We decided to laser cut a plate, such that the photodiodes are at known distances. 

Using the seams between the tiles and a laser distance measurer, we tried to place the board as precise as possible wrt the lighthouses. We calibrated each lighthouse individually using the minimizer mentioned above. However, we adapted the optical model to be closer to reality. So instead of using spherical coordinates (ie pin hole camera), the motors are treated to have their respective offsets and as sweeping planes. This is important because otherwise any estimated curve parameter would be wrong for sure using the pin hole model. So far we left tilt aside.

After the calibration the relative pose estimator also finally started to produce reasonable results

Which in turn results in a relative lighthouse pose correction that is not so bad

The pose estimator for the calibration object produces ok results too.

This truly feels like some light at the end of the tunnel. The pose estimation has never worked properly with real sensors. So the calibration seems to be crucial for any tracking application. The calibration is rather annoying, since it highly depends on how accurately you are able to put the calibration object relative to the lighthouse. At one of the institutes at TUM they have a vikon system. So that might be the next step, to get a lot of data and get very accurate calibration values. It might also be possible with a lot of data, to figure out which kind of permutation of sin/cos/+/- and in which order the original HTC factory values are used. 


j.david.berger wrote 04/02/2018 at 02:12 point

I'm not sure where you ended up on this project, but if you've collected any CNC based light data, I'd be interested in it. I did a write up on how I'm using the HTC calibration values here:

  Are you sure? yes | no

Alan Yates wrote 01/30/2018 at 09:04 point

You are the closest anyone has gotten to calibrating and getting real measurements out of Lighthouse from scratch.  Yes, calibration is very important for applications that need correct metric space.  The position of the centre of projection for each beam is important, especially close to the base station with large tilts, but the phase and eccentric terms are the ones that really flatten the space and make it globally usable.

You don't actually need a precision-built calibration object to calibrate a base (or vice versa), you can ratchet-up the calibration quality on both iteratively if you are careful.  Drop me an email alany (at) valvesoftware (dot) com and I can answer any questions you might have.

  Are you sure? yes | no