mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-09-10 19:15:25 +02:00
[AMR] Fix errors pointed out to me
This commit is contained in:
@@ -8,6 +8,6 @@ It may also be a single value (if just one var in the state)
|
||||
\shortdefinition[Gradient] $\nabla \vec{f}$ is vec, each comp. for par diff of var
|
||||
|
||||
Part. diff; Approx. using finite differences $\frac{f(\overline{x} + h) - f(\overline{x})}{h}$,\\
|
||||
or central differences (vector of $\frac{\vec{f}(\vec{\overline{x}}) + h_i \vec{e_i}}{h_i}$, with $\vec{e_i}$ unit vec)
|
||||
or central differences (vector of $\frac{\vec{f}(\vec{\overline{x}} + h_i \vec{e_i}) - \vec{f}(\vec{\bar{x}} - h_i \vec{e_i})}{h_i}$, with $\vec{e_i}$ unit vec)
|
||||
|
||||
% TODO: Expand this
|
||||
|
||||
@@ -23,10 +23,10 @@ def gauss_newton(x: np.ndarray, F, DF, tol=1e-6):
|
||||
|
||||
\bi{Levenberg-Marquardt}
|
||||
\bi{(1)} Pick start point $\overline{\vec{x}}^0$ and start param $\lambda^0 = \max \text{diag}(\mat{A})$ and $v$ (e.g. $v = 2$).;
|
||||
\bi{(2)} Modified GN sys: $\mat{A} + \lambda \text{diag}(\mat{A})) \Delta \vec{x} = \vec{b}$;
|
||||
\bi{(2)} Modified GN sys: $\mat{A} + \lambda \text{diag}(\mat{A}) \Delta \vec{x} = \vec{b}$;
|
||||
\bi{(3)} Solve for $\Delta \vec{x}$;
|
||||
\bi{(4)} Update: $\overline{\vec{x}}^{k + 1} = \overline{\vec{x}}^k + \Delta \vec{x}$ (if cost reduced),
|
||||
else: $\overline{\vec{x}}^{k + 1} = \overline{\vec{x}}^k$, $\lambda^{k + 1} = \lambda^k v$, go to step 3;
|
||||
\bi{(4)} Update: $\overline{\vec{x}}^{k + 1} = \overline{\vec{x}}^k + \Delta \vec{x}$ and $\lambda^{k + 1} = \lambda^k \div v$ (if cost reduced),
|
||||
else: $\overline{\vec{x}}^{k + 1} = \overline{\vec{x}}^k$ and $\lambda^{k + 1} = \lambda^k v$, go to step 3;
|
||||
\bi{(5)} Check convergence, else go to step 2
|
||||
|
||||
\bi{Robust Cost Functions} Account for outliers, by mod. err. terms
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
\subsection{Bayes Filter (in DAG)}
|
||||
$\vec{x}_k^R$ state at time k, $\vec{z}_k^p$ dist. meas., $\vec{u}^p_k$ wheel odometry (= meas.).
|
||||
$\vec{x}_k^R$ state at time k, $\vec{z}^d$ dist. meas., $\vec{u}^p_k$ wheel odometry (= meas.).
|
||||
Typically care about current state: alternate predict \& update.
|
||||
Prediction with Product/Sum rule for $\P[\vec{x}_k^R \divider \vec{u}_{1:k}^p, \vec{z}_{1:k - 1}^d]$,
|
||||
Update with Bayes' Theorem for $\P[\vec{x}_k^R \divider \vec{u}_{1:k}^p, \vec{z}_{1:k}^d]$
|
||||
|
||||
@@ -17,4 +17,5 @@ $\vec{x}_k = \mat{F}\vec{x}_{k - 1} + \mat{G}\vec{u}_k + \mat{L}\vec{w}_k$ with
|
||||
\item \bi{Updated mean}: $\hat{\vec{x}}_{k | k} = \hat{\vec{x}}_{k | k - 1} + \mat{K}_k \vec{y}_k$
|
||||
\item \bi{Updated Cov.}: $\mat{P}_{k | k} = (\mat{I} - \mat{K}_k \mat{H}) \mat{P}_{k | k - 1}$
|
||||
\end{itemize}
|
||||
All with $G$ the input model, $L$ noise map, $\tilde{\vec{z}}_k$ actual measurement, $K$ trust measurement ($R_k$ small vs $P_{k | k - 1}$ small).
|
||||
All with $G$ the input model, $L$ noise map, $\tilde{\vec{z}}_k$ actual measurement,
|
||||
$K$ trusts measurement when $R_k$ small (or large, but not in between) relative to $P_{k | k - 1}$.
|
||||
|
||||
@@ -20,6 +20,6 @@ State $[x, y, \theta]^\top$. Can compute distance, heading change \& turn radius
|
||||
|
||||
For \bi{State Transition}:
|
||||
$D = 0.5(r_l \Delta \varphi_l + r_r \Delta \varphi_r)$, rest same as in \ref{sec:diff-drive-kin}.
|
||||
$F_k$ is of form $[1, 0, \vec{d}_1; 0, 1, \vec{d}_2; 0, 0, 1]$, with $\vec{d} = b_s$ or $\vec{d} = b_t$ for straight and turning, respectively.
|
||||
$F_k$ is of form $[1, 0, \vec{d}_1; 0, 1, \vec{d}_2; 0, 0, 1]$, with $\vec{d} = b_s$ (with first row negated) or $\vec{d} = b_t$ for straight and turning, respectively.
|
||||
|
||||
\bi{Updates} are linear (GPS: $[x, y]^\top$ and compass: $\theta$, matrix: $\mat{I}$)
|
||||
|
||||
Reference in New Issue
Block a user