激光雷达和里程计内外参标定

参考文献
Simultaneous calibration of odometry and sensor parameters for mobile robots

里程计运动模型

假设左轮线速度为 v L \boldsymbol{v}_L vL,右轮角速度为 v R \boldsymbol{v}_R vR,两轮之间的距离为 b b b,机器人的速度为 v \boldsymbol{v} v,角速度为 ω \omega ω,运动半径为 r r r
v L r − b / 2 = v R r + b / 2 \frac{\boldsymbol{v}_L}{r - b/2} = \frac{\boldsymbol{v}_R}{r + b/2} rb/2vL=r+b/2vR
可解得
( v ω ) = J ( ω L ω R ) = ( r L 2 r R 2 − r L b r R b ) ( ω L ω R ) \left(\begin{matrix}v \\ \omega\end{matrix}\right) = \mathbf{J}\left(\begin{matrix}\omega_L \\ \omega_R\end{matrix}\right) = \left(\begin{matrix}\frac{r_L}{2} & \frac{r_R}{2}\\ -\frac{r_L}{b} & \frac{r_R}{b} \end{matrix}\right) \left(\begin{matrix}\omega_L \\ \omega_R\end{matrix}\right) (vω)=J(ωLωR)=(2rLbrL2rRbrR)(ωLωR)

位姿表换

记sensor frame相对于robot frame的位姿为 l = ( l x , l y , l θ ) \boldsymbol{l} = (l_x, l_y, l_\theta) l=(lx,ly,lθ),记robot frame相对于world frame的位姿为 q = ( q x , q y , q θ ) \boldsymbol{q} = (q_x, q_y, q_\theta) q=(qx,qy,qθ),则Sensor t + 1 t+1 t+1时刻相对于 t t t时刻的位姿 s k = ⊟ ( q k ⊞ l ) ⊞ ( q k + 1 ⊞ l ) \boldsymbol{s}^k = \boxminus(\boldsymbol{q}^k\boxplus\boldsymbol{l})\boxplus(\boldsymbol{q}^{k+1}\boxplus\boldsymbol{l}) sk=(qkl)(qk+1l)
其中 ⊞ \boxplus ⊟ \boxminus 的定义如下:
( a x a y a θ ) ⊞ ( b x b y b θ ) = ( a x + cos ⁡ ( a θ ) b x − s i n ( a θ ) b y a y + sin ⁡ ( a θ ) b x + cos ⁡ ( a θ ) b y a θ + b θ ) \left(\begin{matrix}a_x \\ a_y \\a_\theta\end{matrix}\right)\boxplus\left(\begin{matrix}b_x \\ b_y \\b_\theta\end{matrix}\right) = \left(\begin{matrix}a_x + \cos(a_\theta)b_x - sin(a_\theta)b_y \\ a_y + \sin(a_\theta)b_x + \cos(a_\theta)b_y\\a_\theta+b_\theta\end{matrix}\right) axayaθbxbybθ=ax+cos(aθ)bxsin(aθ)byay+sin(aθ)bx+cos(aθ)byaθ+bθ
⊟ ( a x a y a θ ) = ( − a x cos ⁡ ( a θ ) − a y sin ⁡ ( a θ ) a x sin ⁡ ( a θ ) − a y cos ⁡ ( a θ ) − a θ ) \boxminus\left(\begin{matrix}a_x \\ a_y \\a_\theta\end{matrix}\right) = \left(\begin{matrix}-a_x\cos(a_\theta) - a_y\sin(a_\theta) \\ a_x\sin(a_\theta) - a_y\cos(a_\theta) \\-a_\theta\end{matrix}\right) axayaθ=axcos(aθ)aysin(aθ)axsin(aθ)aycos(aθ)aθ

问题定义

在已知 ω L \omega_L ωL, ω R \omega_R ωR以及sensor运动 s ^ k \hat{\boldsymbol{s}}^k s^k的情况下,求解 r L , r R , b , l x , l y , l θ r_L, r_R, b, l_x, l_y, l_\theta rL,rR,b,lx,ly,lθ。最小化
∣ ∣ l ⊞ s k − r k ⊞ l ∣ ∣ 2 ||\boldsymbol{l}\boxplus\boldsymbol{s}^k - \boldsymbol{r}^k\boxplus\boldsymbol{l}||_2 lskrkl2其中 r k = ⊟ q k ⊞ q k + 1 \boldsymbol{r}^k = \boxminus\boldsymbol{q}^k\boxplus\boldsymbol{q}^{k+1} rk=qkqk+1

解法

由于角度的变化值与坐标系无关,
s θ = ∫ t t + Δ t ω ( t ) d t = ω ( t ) Δ t = J 21 ω L ( t ) + J 22 ω R ( t ) s_\theta = \int_t^{t+\Delta t}\omega(t) dt = \omega(t) \Delta t = J_{21}\omega_L(t)+J_{22}\omega_R(t) sθ=tt+Δtω(t)dt=ω(t)Δt=J21ωL(t)+J22ωR(t)
[ ω L 0 Δ T 0 ω R 0 Δ T 0 ω L 1 Δ T 1 ω R 1 Δ T 1 ⋮ ⋮ ω L n Δ T n ω R n Δ T n ] [ J 21 J 22 ] = [ s θ 0 s θ 1 ⋮ s θ n ] \left[\begin{matrix}\omega_{L0}\Delta T_0 & \omega_{R0}\Delta T_0 \\ \omega_{L1}\Delta T_1 & \omega_{R1}\Delta T_1 \\ \vdots & \vdots \\\omega_{Ln}\Delta T_n & \omega_{Rn}\Delta T_n\end{matrix}\right]\left[\begin{matrix}J_{21} \\J_{22}\end{matrix}\right] = \left[\begin{matrix}s_{\theta 0} \\ s_{\theta 1} \\ \vdots\\ s_{\theta n} \end{matrix}\right] ωL0ΔT0ωL1ΔT1ωLnΔTnωR0ΔT0ωR1ΔT1ωRnΔTn[J21J22]=sθ0sθ1sθn
用最小二乘法即可求解
对于 r k \boldsymbol{r}^k rk,有
r θ ( t ) = ( J 21 ω L ( t ) + J 22 ω R ( t ) ) Δ t r_\theta(t) = \left(J_{21}\omega_L(t) + J_{22}\omega_R(t)\right)\Delta t rθ(t)=(J21ωL(t)+J22ωR(t))Δt
r x ( t ) = v cos ⁡ ( r θ ( t ) ) Δ t = b ( − 1 2 J 21 + 1 2 J 22 ) cos ⁡ ( r θ ( t ) ) Δ t r_x(t) = v\cos(r_\theta(t))\Delta t = b(-\frac{1}{2}J_{21}+\frac{1}{2}J_{22})\cos(r_\theta(t))\Delta t rx(t)=vcos(rθ(t))Δt=b(21J21+21J22)cos(rθ(t))Δt
r y ( t ) = v sin ⁡ ( r θ ( t ) ) Δ t = b ( − 1 2 J 21 + 1 2 J 22 ) sin ⁡ ( r θ ( t ) ) Δ t r_y(t) = v\sin(r_\theta(t))\Delta t = b(-\frac{1}{2}J_{21}+\frac{1}{2}J_{22})\sin(r_\theta(t))\Delta t ry(t)=vsin(rθ(t))Δt=b(21J21+21J22)sin(rθ(t))Δt
即可对 ϕ = ( b l x l y cos ⁡ ( l θ ) sin ⁡ ( l θ ) ) \boldsymbol{\phi} = \left(\begin{matrix}b&l_x&l_y&\cos(l_\theta)&\sin(l_\theta)\end{matrix}\right) ϕ=(blxlycos(lθ)sin(lθ))使用二次型求解。

校准的限制条件

要求环境为二维平面

你可能感兴趣的:(激光雷达和里程计内外参标定)