[AMR] Finish sensing

This commit is contained in:
2026-03-26 15:02:50 +01:00
parent f71cb9841f
commit 48952f4941
5 changed files with 100 additions and 5 deletions
@@ -1,9 +1,67 @@
\subsection{Cameras}
\shortdefinition[Pinhole projection]
$\begin{bmatrix}
u \\ v
\end{bmatrix}
u & v
\end{bmatrix}^\top
= \frac{f}{z}
\begin{bmatrix}
x \\ y
x & y
\end{bmatrix}^\top$
with $f$ the distance to the lens and $z$ the full distance
\newpage
$u = c_u + f \cdot x'$ and $v = c_v + f \cdot y'$ where $x' = t_x \div t_z$ and $y' = t_y \div t_z$
where $u, v$ are the pixel $x, y$ coords, $\vec{c} = [c_u, c_v]^\top$ is optical centre of cam in pixel coords, $f$ scale factor,
and $\vec{{_C}\vec{t}_P} = [t_x, t_y, t_z]^\top$
The full proj: $\vec{u} = \begin{bmatrix}
\lambda u \\
\lambda v \\
\lambda
\end{bmatrix}
=
\begin{bmatrix}
f & 0 & c_u \\
0 & f & c_v \\
0 & 0 & 1
\end{bmatrix}
\begin{bmatrix}
t_x \\t_y\\t_z
\end{bmatrix}
= \mat{K}\; {_C}\vec{t}_P$
If p. in diff frame ${_W} \vec{t}_P$, then $\vec{u} = \mat{K}[\mat{R}_{CW}\; {_C}\vec{t}_{CW}] = {_W}\vec{t}_P$
\subsubsection{Pinhole Camera Projection with distortion}
\shortdefinition Model: $\vec{u} = \vec{k}(\vec{d}(\vec{p}({_C}\vec{t}_P)))$, with:
(Projection) $\vec{x'} = \vec{p}({_C}\vec{t}_P) = t_z^{-1} \cdot [t_x, t_y]^\top$
(Distortion model, $r^2 = x'^2 + y'^2$, $\vec{x''} = \vec{d}(\vec{x'})$\\
$\vec{x''} = \! \frac{1 + k_1 r^2 + k_2 r^4 + k_3 r^6}{1 + k_4 r^2 + k_5 r^4 + k_6 r^6} \vec{x'}
+ \begin{bmatrix}
2p_1 x' y' + p_2(r^2 + 2x'^2) \\
p_1 (r^2 + 2y'^2) + 2p_2 x'y'
\end{bmatrix}$
with $f$ the distance to the lens and $z$ the full distance
(Scale and Centre) $\vec{u} = \vec{k}(\vec{x''}) = \text{diag}([f_u, f_v]) \cdot \vec{x''} + \vec{x}$
All with $k_i$ radial distortion params, optional for $i > 2$, $p_i$ tang. dist. param, $f_u, f_v$ focal length in pixels
\shade{green}{Inverse} ${_C}\vec{r} = [\vec{d}^{-1}(\vec{k^{-1}(\vec{u})}), 1]^\top$\\
(To unit plane)
$\vec{x''} = \vec{k}^{-1}(\vec{u}) = [f_u^{-1}, f_v^{-1}]^\top (\vec{u} - \vec{c})$
(Un-distort)
$\vec{x'} = \vec{d}^{-1}(\vec{x''})$ (usually comp. numerically)
(Compute ray)
${_C}\vec{r} = [\vec{x'}, 1]^\top$
\subsubsection{Undestorting a whole image}
$\vec{u}_i = \vec{k}(\vec{d}(\vec{k_{\text{new}}}^{-1}(\vec{u}_{i, \text{new}})))$
where $\vec{u}_{i, \text{new}}$ is the place of pixel in output, $\vec{u}_i$ is the input
\bi{Omnidir. Cam} undistortion model with $f(u, v) = \sum_{i = 0}^{N} a_i \rho^i$
with $\rho = \sqrt{(u - c_u)^2 + (v - c_v)^2}$, $N = 4$ accurately describes it for most fisheye and catadioptric cameras
@@ -0,0 +1,34 @@
\subsection{Depth and Range sensing}
\subsubsection{Triangulation-based}
\bi{Struct. Light} Single cam, single projector: {\color{ForestGreen}Spatial acc}, {\color{red} no worky in bright light, interference with other IR depth cams}
\bi{Active Stereo} 2 cams, 1 proj: {\color{ForestGreen} worky in bright light}, {\color{red} need stereo matching, less accurate, error grows with distance}
\subsubsection{Classic Stereo}
Both images: same plane, focal length, centre, $x$-axis. Given corresponding pixels $[u_l, v]$ and $[u_r, v]$,
$z = \frac{b \cdot f}{u_r - u_l}$ with $u_l = f\cdot \frac{x}{z} + c_u$ and $u_r = f \cdot \frac{x - b}{z} + c_u$
\subsubsection{Time of Flight, Projection}
{\color{ForestGreen}No occlusions/shadows}, {\color{red}Interference with other dev, multipath leading to larger distances sensed}
\bi{Proj.} $\vec{z} = \begin{bmatrix}
\vec{u} \\ d
\end{bmatrix} =
\begin{bmatrix}
\vec{k}(\vec{d}(\vec{p}({_C}\vec{t}_P))) \\
[0, 0, 1] {_c}\vec{t}_P
\end{bmatrix}$
\bi{Back}: ${_C}\vec{t}_P
= \begin{bmatrix}
d \vec{x'} \\d
\end{bmatrix}$
\subsubsection{Range Sensors}
\bi{Ultrasonic} Typ. freq: 40kHz - 180kHz, Range: 12cm - 5m, Acc: $\approx$ 2cm, rel error $\approx$ 2\%
{\color{ForestGreen} meas. for transp. surf., cheap(ish)}, {\color{red} Cone wider, reflect. angle dep, wind / currents}
\bi{LiDAR} Time-of-Flight-based, {\color{ForestGreen}Accuracy, range, works in bright light}, {\color{red} Complex, expensive, one timestamp per measurement}.
Typical Ranges: up to 100m