diff --git a/electives/amr/autonomous-mobile-robots-cheatsheet.pdf b/electives/amr/autonomous-mobile-robots-cheatsheet.pdf index 179160d..4b248b0 100644 Binary files a/electives/amr/autonomous-mobile-robots-cheatsheet.pdf and b/electives/amr/autonomous-mobile-robots-cheatsheet.pdf differ diff --git a/electives/amr/autonomous-mobile-robots-cheatsheet.tex b/electives/amr/autonomous-mobile-robots-cheatsheet.tex index 4aebba7..23a3f74 100644 --- a/electives/amr/autonomous-mobile-robots-cheatsheet.tex +++ b/electives/amr/autonomous-mobile-robots-cheatsheet.tex @@ -79,7 +79,7 @@ % \input{parts/03_multi-sensor-estimation/} \section{SLAM to Spatial AI} -{\scriptsize SLAM = Simultaneous Localization and Mapping} + {\scriptsize SLAM = Simultaneous Localization and Mapping} \input{parts/04_vision/00_keypoints.tex} \input{parts/04_vision/01_bootstrapping.tex} \input{parts/04_vision/02_place-recognition.tex} @@ -95,8 +95,8 @@ \input{parts/05_planning-control/00_feedback-control/03_mpc.tex} \input{parts/05_planning-control/01_motion-planning-exploration/00_intro.tex} \input{parts/05_planning-control/01_motion-planning-exploration/01_a-star-algorithm.tex} -\input{parts/05_planning-control/01_motion-planning-exploration/02_rrt.tex} -\input{parts/05_planning-control/01_motion-planning-exploration/03_exploration.tex} +\input{parts/05_planning-control/01_motion-planning-exploration/02_exploration.tex} +\input{parts/05_planning-control/01_motion-planning-exploration/03_rrt.tex} \input{parts/05_planning-control/01_motion-planning-exploration/04_collision-avoidance.tex} \input{parts/05_planning-control/02_learning-to-act/00_intro.tex} \input{parts/05_planning-control/02_learning-to-act/01_mdp.tex} diff --git a/electives/amr/parts/04_vision/00_keypoints.tex b/electives/amr/parts/04_vision/00_keypoints.tex index bd1c2ee..53b62ab 100644 --- a/electives/amr/parts/04_vision/00_keypoints.tex +++ b/electives/amr/parts/04_vision/00_keypoints.tex @@ -26,3 +26,6 @@ Then apply Laplacian Operator $\nabla_\text{norm}^2 L = t\left( \frac{\partial^2 \bi{Diff. of Gaussians} (DoG): $\Delta L = L(x, y, t) - L(x, y, kt)$ \bi{SIFT Detector} \bi{(1)} Subsample + Blur \bi{(2)} DoG on each res. image \bi{(3)} Keypoints extrema in DoG pyramid + +\bi{BRISK} / binary descriptors: Compare pixel intensities at fixed sampling pattern around keypoint. Match by Hamming distance (very fast), +\bi{SuperPoint}: CNN learns detector + descriptor diff --git a/electives/amr/parts/04_vision/01_bootstrapping.tex b/electives/amr/parts/04_vision/01_bootstrapping.tex index 6b2d698..d929599 100644 --- a/electives/amr/parts/04_vision/01_bootstrapping.tex +++ b/electives/amr/parts/04_vision/01_bootstrapping.tex @@ -3,8 +3,11 @@ \bi{PnP Problem} {\scriptsize Perspective $n$-Point} Find sol. for camera pose \textit{directly} -\bi{RANSAC} {\scriptsize RANdom SAmpling Consensus} for find. outliers \& correct +\bi{RANSAC} {\scriptsize RANdom SAmpling Consensus} Model estimation, for find. outliers \& correct. Also great for finding an initial guess for pose. (due to robustness) +For $N$ iteration: sample min set, fit model, count inliers (reprojection error $<$ threshold $t$), keep best, optionally refit on inliers. +More outliers $\Rightarrow$ more iterations. + \bi{Stereo Triang.} Given two rays (known poses for points in 2D). Find good point in 3D. Fast sol: \bi{Midpoint Method}: diff --git a/electives/amr/parts/04_vision/03_mapping.tex b/electives/amr/parts/04_vision/03_mapping.tex index e1980ad..c585eb9 100644 --- a/electives/amr/parts/04_vision/03_mapping.tex +++ b/electives/amr/parts/04_vision/03_mapping.tex @@ -30,4 +30,14 @@ $l(o_j | \vec{x}_{R, 1 : k}, \vec{z}_{1 : k})$ = \shade{gray}{In 3D} 3D voxel $j$ as signed dist. $s$ and weight $w$, update: $\displaystyle s_k = \frac{w_{k - 1} s_{k - 1} + \tilde{s}_k}{w_{k - 1} + 1}$ with $w_k = \min(w_{\max}, w_{k - 1} + 1)$ -\bi{Impl.} Using HashTables or octree +\bi{Implementation} Using Hash maps or octree (dense grid inefficient) + + +\subsubsection{Iterative Closest Point} +Build \textit{correspondences}: associate all live scan points $l_i$ to closest map points $m_i$. Error term: +$\vec{e} = \vec{T}_{W L_l L_l} m_i - {_W}\vec{l}_i$. +Minimize this via Gauss-Newton, then re-associate, iterate. + +\bi{Photometric}: $u_{KF} = \pi(\mat{T}_{WC_{KF}}^{-1} \mat{T}_{WC_l} \pi^{-1}(\vec{u}_{KF}, \mat{D}_{KF}[\vec{u}_{KF}]))$, +error term $\vec{e} = \mat{I}_{KF}[\vec{u}_{KF}] - \mat{I}_L[\vec{u}_{L}]$, +where all subscript $L$ are from live image, all subscript $KF$ key frame. diff --git a/electives/amr/parts/05_planning-control/00_feedback-control/01_pid.tex b/electives/amr/parts/05_planning-control/00_feedback-control/01_pid.tex index 1a43537..f1c7160 100644 --- a/electives/amr/parts/05_planning-control/00_feedback-control/01_pid.tex +++ b/electives/amr/parts/05_planning-control/00_feedback-control/01_pid.tex @@ -1,4 +1,5 @@ \subsection{Proportional-Integral-Differential (PID)} -$u(t) = k_p e(t) + k_i \int_{t_0}^{t} e(\tau) \dx \tau + k_d \frac{\dx e(t)}{\dx t}$, where params $k_p$ (curr), $k_i$ (long-term), $k_d$ (trend) reduce corresp. errors +$u(t) = K_p e(t) + K_i \int_{t_0}^{t} e(\tau) \dx \tau + K_d \frac{\dx e(t)}{\dx t}$, where params $K_p$ (curr), $K_i$ (long-term), $K_d$ (trend) reduce corresp. errors, +with $e = r - y$ \bi{Drone Control} ${_B}\vec{F}$ and ${_B}\vec{M}$ as in sect. \ref{sec:rigid-body-dynamics}, use $\vec{u}' = {_B}\vec{M}$. diff --git a/electives/amr/parts/05_planning-control/01_motion-planning-exploration/00_intro.tex b/electives/amr/parts/05_planning-control/01_motion-planning-exploration/00_intro.tex index 9d2fc14..49703cf 100644 --- a/electives/amr/parts/05_planning-control/01_motion-planning-exploration/00_intro.tex +++ b/electives/amr/parts/05_planning-control/01_motion-planning-exploration/00_intro.tex @@ -3,9 +3,14 @@ \bi{Free C-Space}: $\cC_{\text{free}}$, \bi{C-Space Obstacles} $\cC_\text{obst}$ (occupied) -\bi{Collision checker}: $c(\vec{x}) : \cC \rightarrow \{ 0, 1 \}$ +\bi{Collision checker}: $c(\vec{x}) : \cC \rightarrow \{ 0, 1 \}$ \bi{Visibility graph}: Connect corners, goal outside obstacles \bi{Voronoi Diagram}: Edges at max. dist. from obst. (benefit: safer paths). Also tends to be faster than Dijkstra. + +\bi{Discrete} {\scriptsize via graph/grid}: {\color{ForestGreen} complete solution}, {\color{red} Curse of dimensions} + +\bi{Continuous} {\scriptsize probabilistic}: {\color{ForestGreen} High-D okay, differential constraints ok}, +{\color{red} Probabilistic, depending on setup may not find correct sol. or run forever} diff --git a/electives/amr/parts/05_planning-control/01_motion-planning-exploration/03_exploration.tex b/electives/amr/parts/05_planning-control/01_motion-planning-exploration/02_exploration.tex similarity index 100% rename from electives/amr/parts/05_planning-control/01_motion-planning-exploration/03_exploration.tex rename to electives/amr/parts/05_planning-control/01_motion-planning-exploration/02_exploration.tex diff --git a/electives/amr/parts/05_planning-control/01_motion-planning-exploration/02_rrt.tex b/electives/amr/parts/05_planning-control/01_motion-planning-exploration/03_rrt.tex similarity index 98% rename from electives/amr/parts/05_planning-control/01_motion-planning-exploration/02_rrt.tex rename to electives/amr/parts/05_planning-control/01_motion-planning-exploration/03_rrt.tex index a11dd0f..649d32f 100644 --- a/electives/amr/parts/05_planning-control/01_motion-planning-exploration/02_rrt.tex +++ b/electives/amr/parts/05_planning-control/01_motion-planning-exploration/03_rrt.tex @@ -1,3 +1,4 @@ +\newpage \subsubsection{Rapidly-Exploring Random Tree (RRT)} \begin{algorithm} \small @@ -45,3 +46,4 @@ Extension to RRT* to make path better: \end{algorithm} \bi{Informed RRT*} extension: Once conn. betw. start and goal found, restrict sampling to (hyper)ellipsoid. +$b = 0.5 \sqr{d^2 - ||x_s - x_g||^2}$. diff --git a/electives/amr/parts/05_planning-control/01_motion-planning-exploration/04_collision-avoidance.tex b/electives/amr/parts/05_planning-control/01_motion-planning-exploration/04_collision-avoidance.tex index 0d63b63..b74b1d8 100644 --- a/electives/amr/parts/05_planning-control/01_motion-planning-exploration/04_collision-avoidance.tex +++ b/electives/amr/parts/05_planning-control/01_motion-planning-exploration/04_collision-avoidance.tex @@ -2,7 +2,7 @@ \bi{Dynamic Window Approach} Assume: Robot moves inst. on circ. arcs $(v, \omega)$. Compute arcs with coll. {\color{ForestGreen} Accounts for Kino-Dyn}, {\color{red} Cost func prone to loc. min, assumes static obj} -\bi{Vel. Obst.} Assume: Robot in str. line $(v_x, v_y)$. Comp pos with coll. +\bi{Velocity Obstacles} Assume: Robot in str. line $(v_x, v_y)$. Comp pos with coll. {\color{ForestGreen} Vel. of obj}, {\color{red} prone to local optima, no kino-dyn.} \bi{Potential Field Methods} Define {\color{gray} \textit{repulsive}} and {\color{purple} attractive} potential $c = {\color{purple} c_{\text{att}}} + {\color{gray} c_{\text{rep}}}$. @@ -10,5 +10,4 @@ With e.g. ${\color{purple} c_\text{att}} = \frac{1}{2} k_\text{att} ||\vec{x} - \frac{1}{2} k_\text{rep} \left( \frac{1}{\rho(\vec{x})} + \frac{1}{\rho_{\lim}} \right) & \rho \leq \rho_{\lim} \\ 0 & \text{else} \end{cases}$ - {\color{ForestGreen} Simple control laws}, {\color{red} may trap in loc. min., no diff. const, no guar. to avoid coll} diff --git a/electives/amr/parts/05_planning-control/02_learning-to-act/01_mdp.tex b/electives/amr/parts/05_planning-control/02_learning-to-act/01_mdp.tex index ecf3804..4f34806 100644 --- a/electives/amr/parts/05_planning-control/02_learning-to-act/01_mdp.tex +++ b/electives/amr/parts/05_planning-control/02_learning-to-act/01_mdp.tex @@ -16,16 +16,16 @@ Repeat until conv. to $V^*$ ($\tco{|\cU||\cX|^2}$ per iter). Optimal policy: \vec{\pi}^*(\vec{x}) = \text{argmax}_{\vec{u}} Q(\vec{x}, \vec{u}) \] -Using policy iter: +Using \bi{policy iter}: \begin{algorithm} \begin{algorithmic}[1] \State Choose $\vec{\pi}_0(\vec{x})$ \While{\textit{policy} has not converged} - \Repeat $V_{i + 1}^{\vec{\pi}_j}(\vec{x}) = Q(\vec{x}, \vec{\pi}(\vec{x}))$ $\forall \vec{x}$ and \textit{fixed} pol. $\vec{\pi}_j$ + \Repeat $V_{i + 1}^{\vec{\pi}_j}(\vec{x}) = Q(\vec{x}, \vec{\pi}(\vec{x}))$ $\forall \vec{x}$ and \textit{fixed} pol. $\vec{\pi}_j$ \Until{values converge} \EndWhile \State One step: $\vec{\pi}_{j + 1}(\vec{x}) = \text{argmax}_{\vec{u}} Q(\vec{x}. \vec{u})$ with $V_i = V_{i + 1}^{\pi_j}$ \end{algorithmic} \end{algorithm} -Model-based learning uses empirical models of $\cT$ and $\cR$ +\bi{Model-based} learning uses empirical models of $\cT$ and $\cR$