📄 if_practical.tex~
字号:
\subsubsection{Adding New Features and Updating the Filter}The robot measures the relative position to the point features on thex-axis. We build the map from new observations and update the filterwith those of known landmarks\footnote{Of course, we are assuming that we've solved the data association problem. While this is challenging for any SLAM algorithm, additional complications arise with the information form \cite{eustice05b}.}. New features are addedaccording to the state augmentation process described in (2) of thenotes, just like we do with new poses in the time projectionstep. Notice in `Figure 1' that the new features share informationonly with the vehicle pose and not any other map elements.In the case where the robot has observed a feature that is already inthe map, the IF updates the information matrix and vector per (6) inthe notes. The matrix is modified by adding information only to theelements associated with these features and the robot pose. This ``newinformation'' has the effect of strengthening the constraints betweenthe robot and the map that have decayed as a consequence of the timeprojection step.\subsection{Things to Try}Several parameters that control the simulation are specified at thebeginning of \firstfile\ as fields of the \texttt{Params}structure. These include those listed below. Try changing these tomodify the IF behavior.\begin{table}[h] \begin{tabular}{|l|p{107mm}|} \hline \texttt{Params.Q} & The variance of the Gaussian odometry noise.\\ \hline \texttt{Params.R} & The variance of the noise that corrupts feature observations.\\ \hline \texttt{Params.density} & Density of features in the environment. \\ \hline \texttt{Params.nObsPerIteration} & Maximum number of features that the robot can observe at any one time.\\ \hline \end{tabular}\end{table}\subsection{Take-Home Message}One obvious benefit of the information filter is that, when themeasurement model is linear, the update step is simple. The sameupdate for the Kalman Filter is quadratic in the size of the state. Onthe other hand, the time projection step is computationally expensivefor the IF but efficient for the KF. Intuitively, this is due to thefact that, in marginalizing over the old robot state, we have to transferinformation to the new pose as well as create links among alllandmarks that were linked to the old robot state. When there are abounded number of constraints between the robot and map, this is\emph{easy} but, as the map grows and the matrix becomes dense, thisprocess is no longer tractable \cite{thrun04a, walter05a}.\section{Two-dimensional SLAM Simulation}The two-dimensional simulation is very much like the 1D simulation,though there are a few differences. For one, the default settingsof the code create an environment with many more features and allowthe robot to observe multiple landmarks at once. Consequently, theinformation matrix will be larger and have a more complexstructure. Secondly, the robot will follow a counter-clockwise paththat results in a loop closure as the robot comes back to the(approximate) starting location. This point in the simulation isparticularly interesting since you can see how the information matrixchanges as the vehicle re-observes features that it hadn't seen sincethe beginning of the run.\subsection{Starting the Simulation}In order to start the simulation, type \texttt{slam\_if\_2d} at the Matlabprompt. A window, `Figure 1', is created with a pair of axesside-by-side. The one on the left is a plot of the simulatedenvironment while the schematic on the right depicts theinformation matrix. The legend is the same as in the 1D simulationwith the addition of red three-sigma uncertainty ellipses around theposition estimates. With regards to the plot of the informationmatrix, we visualize the determinant of each $2 \times 2$ sub-block (x and y) ofthe matrix.%%\begin{figure}[ht] \center \includegraphics[width=0.6\columnwidth]{./Graphics/slam_if_2d.eps} \caption{The main figure window for \secondfile.} \label{fig:slam_if_2d}\end{figure}%%\subsection{Displays}Alongside the main Matlab window, additional displays will pop up,with the following roles:\begin{table}[h] \begin{tabular}{|l|l|p{88mm}|} \hline Figure 1 (left) & Simulation Plot & Display of the ground-truth feature locations (black dots) together with the current SLAM estimates for the vehicle (red triangle) and feature (red ``x'') positions. The red ellipses signify the $3\sigma$ uncertainty bounds.\\ \hline Figure 1 (right) & Information Matrix & Depicts the structure of the information matrix. Shade intensity corresponds to the magnitude of the normalized matrix elements, white being zero and black being one.\\ \hline Figure 2 & Information Matrix & The window shows the form of the information matrix immediately prior to the current step in the filter.\\ \hline Figure 3 & Shared Information History & Plot of the determinant of the off-diagonal sub-matrix between the first few features and the robot pose as a function of time.\\ \hline \end{tabular}\end{table}\subsection{Action Sequence}Prior to looping through the simulation, the main Matlab window askswhether or not you want verbose output. In verbose mode, the functionwill pause for the time prediction and measurement update steps aswell as when new features are added. By turning this option off, theprogram will loop through the simulation without stopping.The simulation iterates through the action sequences as described inthe table below. The plots of the simulation and current informationmatrix in `Figure 1' are updated and, in verbose mode, the previousinformation matrix is shown in `Figure 2' for comparison. Hit\texttt{Enter} to continue or \texttt{Control-C} to abort the program.\begin{table}[h] \begin{tabular}{|l|l|p{125mm}|} \hline 1 & Robot moves & The new position of the vehicle, $x_v(t+1)$, is estimated from odometry. The filter performs time prediction as one single step.\\ \hline 3 & Observations & The robot measures the relative $(x,y)$ position of neighboring features as indicated by lines drawn between the vehicle and map.\\ \hline 4 & New features added & Any new features that are observed are added to the map.\\ \hline 5 & Update & The filter performs an update step based upon measurements of known landmarks.\\ \hline \end{tabular}\end{table}Once the simulation has finished, `Figure 3' shows the history of theshared information between the robot and the first few features thatwere added to the map. Unlike the 1D simulation where the vehicledidn't really close any loops, you may notice that there are pointswhere the links strengthen over time. This is a result of loop closure.\subsection{Things to Try}Once the simulation has finished, take a closer look at the resultinginformation matrix for the map. If you type ``\texttt{global TheJournal}'' at the Matlab prompt, you will find that theinformation matrix is stored as \texttt{TheJournal.Lambda} while\texttt{TheJournal.eta} is the information vector. Note that you willprobably have to type ``\texttt{global TheJournal}'' every time you runthe simulation if you want to access global variables.\subsection{Matrix Density}The time history plots of the shared information for the 1D and 2Dsimulations show, to some extent, how the magnitude of theoff-diagonal terms decays with time. In order to get a better idea ofthe distribution of values within the matrix, plot a histogram overthe magnitudes. Matlab provides the \texttt{hist} function tocompute histograms over a (optional) desired number of bins (type``\texttt{help hist}''). Rather than the original information matrix,though, look at the normalized matrix returned by a call to\texttt{rhomatrix}.You should see a large disparity in the distribution with asignificant majority of the terms nearly zero. What fraction of thetotal number of elements within the matrix falls within the left-mostbins (see ``\texttt{help numel}'' and ``\texttt{help nnz}'')? Ifthese terms were actually zero and did not need to be explicitlystored, how much memory would we save? Assume double precision (8bytes) and that you can ignore the overhead necessary to store sparsearrays. In our simulation, this improvement is minor since we aretracking only a few states. On the other hand, calculate how muchmemory would we save if we had 10,000 states\cite{eustice05b} and anequivalent percentage of zeros in the information matrix?\subsection{Effects of Noise Strength}The extent of the noise that corrupts the motion and observation datais one factor that affects the strength and rate of decay of theshared information between the robot and map. How you think that lessobservation noise would affect the magnitude of the off-diagonal termsin the information matrix? How about a decrease in the motion modeluncertainty? Edit \secondfile\ and modify the measurement and motionnoise covariances, \texttt{Params.R} and \texttt{Params.Q}, and checkto see if your intuition is correct. To speed up the simulation, youcan turn off the plotting by setting \mbox{\texttt{Params.PlotSwitch} = 0} and disabling verbose mode.\subsection{Computation Time}One advantage of the canonical form is that the number of computationsin the measurement update step is proportional to the number ofobservations and not the size of the map. Contrast this with the KF,which is quadratic in the number of features. For the 2D code, we havetried to be efficient in the way that we store the information matrixas well as in our implementation of the measurement update step. Over thecourse of the simulation, the function has kept a history of theelapsed time for each time projection and measurement update. Theseare stored as \texttt{TheJournal.ProjectionTime} and\texttt{TheJournal.UpdateTime}, respectively, with one column for eachrecord. The columns are of the form $\left[k \; n \; \Delta_t\right]^\top$ where $k$ is the simulation time stamp, $n$the current size of the state vector, and $\Delta_t$ is thecomputational time required for the projection/update. Plot thecomputation times (third row) as a function of the number of states(second row).\subsection{Additional Simulation Parameters}There are a few other parameters defined as fields of the\texttt{Params} structure within \secondfile. These include\texttt{Params.density} and \texttt{Params.nObsPerIteration} that wedefined earlier, as well as \texttt{Params.MaxObsRange}. If you havetime, you can try changing these to see how they influence theinformation filter. \bibliography{bibliography}\end{document}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -