# How do I calibrate a rotating laser scanner pose from known global coordinates?

Assume the following scenario:

• A 2D LIDAR sensor is mounted with a vertical (not exactly known) scan plane at a height of 20m
• The scanner can be rotated about the vertical axis and the encoder values are known and absolute. But I would like to calibrate the scanner from a single scan line (which should contain enough points)
• The scanner sees objects relatively far away (no easy way to put calibration pattern close to the scanner)
• I can obtain 3d coordinates of scanned points in the global coordinate system

I now wish to compute the scanner rotation and translation w.r.t. to the global coordinate frame.

# Question:

Am I correct in the assumption that a few known global coordinates and their scanner-local correspondences from measurement are sufficient in computing rotation and translation? Algebraically, it seems that $$R \cdot \vec{x}_\text{global} + \vec{t} = \vec{x}_\text{local}$$ would lead to a system of linear equations with 9 + 3 unknowns, so I would only need 12 / 3 = 4 coordinate correspondences.

If no, what would I need for performing this task?

• Are you trying to estimate 2D position? or do you need 3D solution? Jan 16, 2020 at 17:37
• I need the 6dof pose, although i can start from a good guess. Jan 29, 2020 at 21:00

You are mostly correct. You can compute the global coordinates from only a few point correspondences, but the system is not linear. If we expand the equation that described the relationship between the local and global coordinates (in 2D for simplicity), we have $$\begin{bmatrix} x_\mathsf{global} \\ y_\mathsf{global} \end{bmatrix} = \begin{bmatrix} \cos{\theta} & -\sin{\theta} \\ \sin{\theta} & \cos{\theta} \end{bmatrix} \begin{bmatrix} x_\mathsf{local} \\ y_\mathsf{local} \end{bmatrix} + \begin{bmatrix} x \\ y \end{bmatrix}$$ where $$x$$ and $$\theta$$ are the position and orientation of the lidar with respect to the global coordinate frame (I wrote in 2D but similar applied to 3D).
Now, the parameters you are solving for are the orientation and translation of the lidar, which are $$x$$, $$y$$, and $$\theta$$ in 2D. If you have enough points, you can solve for these parameters, but you need to do some nonlinear optimization. If you have noise in your measurements (as you probably do), you will need even more points depending on how much noise. Hope this is helpful for you.
• I have done this on toy data by using scipy.optimize.least_squares on the residuals between transformed and ground-truth points. This seems to work well, I get an average translational error of <10mm on points around 2m away from the scanner. Feb 21, 2020 at 8:13