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[*pow(sin(elevation)*cos(azimuth),2.0) + gibmag[lighthouse][VERTICAL]*cos(elevation+gibphase[lighthouse][VERTICAL]); azimuth += phase[ ][ ]; azimuth += curve[ ][ ]*pow(cos(elevation),2.0) + gibmag[lighthouse][HORIZONTAL]*cos(azimuth+gibphase[lighthouse][HORIZONTAL]);][ ]; elevation += curve[ ][ ]
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 good...in 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.