From c549bc150a5190197595f96e980f9b4da4a216b1 Mon Sep 17 00:00:00 2001 From: Roland Hieber Date: Fri, 29 Jul 2011 14:24:41 +0200 Subject: [PATCH] checkpoint --- Ausarbeitung/acronyms.tex | 22 +++++++ Ausarbeitung/biblio.bib | 11 +++- Ausarbeitung/experiment1.tex | 20 +++---- Ausarbeitung/implementation.tex | 100 ++++++++++++++++++++------------ Ausarbeitung/introduction.tex | 2 +- Ausarbeitung/main.kilepr | 68 ++++++++++++++++------ Ausarbeitung/main.tex | 75 ++++++++++++++---------- Ausarbeitung/preliminaries.tex | 2 +- Ausarbeitung/roomba.tex | 8 +-- Ausarbeitung/wiselib.tex | 43 +++++++------- 10 files changed, 226 insertions(+), 125 deletions(-) create mode 100644 Ausarbeitung/acronyms.tex diff --git a/Ausarbeitung/acronyms.tex b/Ausarbeitung/acronyms.tex new file mode 100644 index 0000000..d9d1fe9 --- /dev/null +++ b/Ausarbeitung/acronyms.tex @@ -0,0 +1,22 @@ +\chapter*{Table of Acronyms} +\begin{acronym}[opcode] + \acro{8N1}{8 data bits, no parity, 1 start/stop bit} + \acro{CDROM}{Compact Disc Read Only Memory} + \acro{DC}{Direct Current} + \acro{DIN}{Deutsches Institut für Normung (German Institute for + Standardization)} + \acro{GNU}{GNU's Not Unix} + \acro{GPS}{Global Positioning System} + \acro{ISO}{International Standardization Organization} + \acro{LED}{Light-Emitting Diode} + \acro{NiMH}{Nickel-Metal Hydride} + \acro{opcode}{operation code} + \acro{OS}{operating system} + \acro{pSTL}{pico Standard Template Library} + \acro{RAM}{Random Access Memory} + \acro{ROI}{Roomba Open Interface} + \acro{STL}{Standard Template Library} + \acro{SVN}{Subversion} + \acro{TTL}{Transistor-Transistor Logic} + \acro{USB}{Universal Serial Bus} +\end{acronym} diff --git a/Ausarbeitung/biblio.bib b/Ausarbeitung/biblio.bib index 8715ced..eb8124e 100644 --- a/Ausarbeitung/biblio.bib +++ b/Ausarbeitung/biblio.bib @@ -20,11 +20,11 @@ booktitle = "Robotics and Automation, 1996. Proceedings., 1996 IEEE International Conference on", title = "Mobile robot localization in dynamic environments using dead reckoning and evidence grids", year = "1996", - month = "april", + month = apr, volume = "2", number = "", pages = "1401--1406 vol.2", - keywords = "ELDEN learning system, adaptive place network, dead reckoning, dynamic environments, evidence grids, hill-climbing algorithm, lasting changes, mobile robot localization, navigation, position estimate, transient changes, learning systems, mobile robots, navigation, path planning, position control, sonar, ultrasonic transducer arrays", + keywords = "adaptive place network, dead reckoning, dynamic environments, ELDEN learning system, evidence grids, hill-climbing algorithm, lasting changes, learning systems, mobile robot localization, mobile robots, navigation, path planning, position control, position estimate, sonar, transient changes, ultrasonic transducer arrays", doi = "10.1109/ROBOT.1996.506902", ISSN = "1050-4729" } @@ -71,3 +71,10 @@ isbn = "978-0-470-07271-4" } +@Manual{ qt-signalslots, + title = "Qt 4.7 Reference Documentation: Signals \& Slots", + organization = "{Nokia Corporation}", + note = "\url{http://doc.qt.nokia.com/4.7/signalsandslots.html}", + year = "2010" +} + diff --git a/Ausarbeitung/experiment1.tex b/Ausarbeitung/experiment1.tex index db31c23..28a49ca 100644 --- a/Ausarbeitung/experiment1.tex +++ b/Ausarbeitung/experiment1.tex @@ -6,7 +6,7 @@ establish a pool of data for correction approaches to work on later. There was no error correction involved (apart from any possible error correction the Roomba itself implements in its underlying logic, and which is not known to anyone except iRobot). To achieve this, the Wiselib Roomba Control -is used to access the Roomba over the \ac{ROI}\index{\acs{ROI}}. +is used to access the Roomba over the \ac{ROI}\index{Roomba Open Interface}. \section{Setup} \begin{figure}[htbp] @@ -23,17 +23,17 @@ is used to access the Roomba over the \ac{ROI}\index{\acs{ROI}}. The test equipment consisted of a small x86 \index{netbook} netbook which was mounted on an iRobot Roomba~530\index{Roomba} robot, as seen in Figure~\ref{fig:roombasetup}. The netbook controlled the Roomba over a -\acs{USB}-to-serial converter plugged into the Open Interface \index{\acs{ROI}} -port on the Roomba, and hosted as the environment for executing the Wiselib -\index{Wiselib} code. +\acs{USB}-to-serial converter plugged into the \ac{ROI}\index{Roomba +Open Interface} port on the Roomba, and hosted as the environment for +executing the Wiselib \index{Wiselib} code. In this experiment, the Roomba started right off with the full velocity the movement was executed with; so there was no control to adhere a constant acceleration when starting or stopping the movement. As mentioned before, due to -limitations in the \acs{ROI}\index{\acs{ROI}} it is only possible to explicitly -start and stop the Roomba's movements at different times, so the Wiselib's -implementation of the Roomba control code first starts the Roomba's movement, -keeps track of the turned angle and dcovered distance, and then stops +limitations in the \ac{ROI}\index{Roomba Open Interface} it is only possible to +explicitly start and stop the Roomba's movements at different times, so the +Wiselib's implementation of the Roomba control code first starts the Roomba's +movement, keeps track of the turned angle and dcovered distance, and then stops the Roomba if these values exceed the target values. The tests were done in two atomic drive modes: letting the Roomba walk a @@ -59,7 +59,7 @@ center of the paper. A laser pointer\index{laser pointer} attached to the Roomba pointed to the current orientation on the paper, as shown in Fig.~\ref{fig:laserpointer}. The accuracy for these tests was 1~degree. -After the initial setup, the application \prog{roomba\_tests} (see +After the initial setup, the application \prog{roomba\_test} (see section~\ref{sec:impl:measuring}) was started on the netbook for half-automatic testing. It used a predefined array of nominal distances, angles and velocities and for each pair of distance (for straight drive tests) or angle (for turn @@ -137,6 +137,6 @@ On the other hand, rising the velocity always seems to cause the error to increase. The same effects also apply for turn tests. Additionally, there could be errors -resulting from false assumptions about the Roomba's wheelbase\index{wheelbase} +resulting from false assumptions about the Roomba's wheel base\index{wheel base} diameter, resulting in false calculations of the circle the Roomba's wheels describe while turning, and therefore leading to false results. diff --git a/Ausarbeitung/implementation.tex b/Ausarbeitung/implementation.tex index 6acf6d9..3247aec 100644 --- a/Ausarbeitung/implementation.tex +++ b/Ausarbeitung/implementation.tex @@ -1,10 +1,9 @@ \chapter{Implementation} - -\todo{?} +\todo{more?} This chapter describes the implementation that was used for the aforementioned experiments. It consists of the measuring programs themselves, which use the Wiselib Roomba Control, and are written in C++. Additionally, there are several -Bash scripts to help with the analysis of the measured data. +Bash and Perl scripts to help with the analysis of the measured data. All code used for this thesis resides in the Wiselib source tree\footnote{see \url{https://github.com/ibr-alg/wiselib/}, or the \acs{CDROM} attached at the @@ -25,18 +24,18 @@ the target values for the Roomba movement himself, in automatic mode, the application uses a list of pre-programmed values for the target values, so the user only has to input the measured data. -All measured data is written to a log file in the current directory, whose name +All measured data is written to a log file in the current directory whose name is based on the type of experiment performed. Every line in that log file -describes one measurement made by the user, and consists of key-value pairs -linked together with equality signs and separated of each other by whitespace. -In particular, the data on each line are (with key name, in the order of -appearance on the line): +describes one measurement made by the user, and consists of pairs of the form +\code{key=value}, separated of by whitespace. In particular, the data on each +line are (with key name, in the order of appearance on the line): \begin{enumerate} - \item\texttt{svn:} the SVN or Git revision the program was compiled from + \setlength{\itemsep}{1pt} + \item\texttt{svn:} the \ac{SVN} or Git revision the program was compiled from (statically compiled into the program) \item\texttt{roomba\_id:} the ID of the Roomba the measurement was performed with (given by the user) - \item\texttt{ground\_type} the ground type used for measurement: + \item\texttt{ground\_type:} the ground type used for measurement: \magicvalue{iz250flur} for laminated floor, \magicvalue{seminarraum} for carpet floor (given by the user) \item\texttt{diff\_ticks\_left:} the difference of encoder counts between the @@ -57,11 +56,12 @@ appearance on the line): (packet~ID~\magicvalue{0x16}) \item\texttt{batt\_voltage:} the current going out of the Roomba's battery in mA (packet~ID~\magicvalue{0x17}) - \item\texttt{move:} \magicvalue{straight} for straight moves, - \magicvalue{turn} for turn moves + \item\texttt{move:} movement type; \magicvalue{straight} for straight moves, + \magicvalue{turn} for turn moves (given by the user while selecting the + experiment type) \newcounter{logitems}\setcounter{logitems}{\value{enumi}+1} \end{enumerate} -For straight moves (\magicvalue{move=straight}) follows: +For straight moves (\magicvalue{move=straight}) follow: \begin{enumerate}[start=\value{logitems}] \item\texttt{input\_distance}: the target distance in mm sent to the Roomba via the \ac{ROI} \cmd{Drive} command (given by the user in manual mode, @@ -76,7 +76,7 @@ For straight moves (\magicvalue{move=straight}) follows: \item\texttt{deviation\_orientation:} originally, the shift in orientation of the Roomba. Not used anymore. \end{enumerate} -For straight moves (\magicvalue{move=turn}) follows: +For turn moves (\magicvalue{move=turn}) follow: \begin{enumerate}[start=\value{logitems}] \item\texttt{turn\_angle:} the turn angle in degree sent to the Roomba via the \ac{ROI} \cmd{Drive} command (given by the user in manual mode, or @@ -93,29 +93,63 @@ For straight moves (\magicvalue{move=turn}) follows: \includegraphics[width=\textwidth]{images/Implementation-Diagram.pdf} \caption[File structure of the measuring implementation]{Simplified file structure of the measuring implementation\label{fig:impl:struct}\\ - yellow: general files used for all three experiments; green: files for - Experiment~1; blue: files for Experiment~2; red: files for Experiment~3} + yellow: common files used for all three experiments; green: files for + Experiment~1; blue: files for Experiment~2; red: files for Experiment~3.\\ + An arrow from node $x$ to node $y$ means ``$y$ depends from $x$''.} \end{figure} Figure~\ref{fig:impl:struct} shows the file layout of the measuring implementation. It reuses components whereever possible, and therefore -consists of three parts specific for the three performed experiments (see -Sections~\ref{sec:exp1}, \ref{sec:exp2} and~\ref{sec:exp3}), as well as a -general part, which contains the elements of the implementation common to the -other three parts. - -\subsection{General part} -The files \file{stuff.cc}, \file{stuff.h}, -\file{target\_value\_input\_dialog.cc} and \file{target\_value\_input\_dialog.h} -build up the general part of the implementation. These are the files shown with -a yellow background in Figure~\ref{fig:impl:struct}, and are included in all -other three parts of the implementation. +consists of three parts (green, blue, red) specific for the three performed +experiments (see Sections~\ref{sec:exp1}, \ref{sec:exp2} and~\ref{sec:exp3}), as +well as a common part (yellow), which contains the elements of the +implementation shared by the other three parts. + +\subsection{Common part} +% no \file{} here please, we don't want "stuff.{cc,h}" in index... +The files \code{stuff.\{cc,h\}} and \code{target\_value\_input\_dialog.\{cc,h\}} +build up the general part of the implementation (shown with a yellow background +in Figure~\ref{fig:impl:struct}). These are included in all other three parts of +the implementation. \paragraph{\file{stuff.cc} and \file{stuff.h}} -Both of these files contain global functions for logging text to a file, -according to the format described above. Also there +Both of these files contain global helper functions and variables, +implementation-specific data structures and all kinds of convenient typedefs. In +particular, there are functions for formatting and logging messages to a log +file, according to the format described above. While \file{stuff.h} contains the +declarations and typedefs, \file{stuff.cc} contains the appropriate definitions. +Besides, since \file{stuff.h} is included indirectly in most other source files, +it also includes the Wiselib headers needed for Roomba control. + +\paragraph{\file{target\_value\_input\_dialog.cc} and +\file{target\_value\_input\_dialog.h}} +These files contain the class \code{TargetValueInputDialog} +\index{TargetValueInputDialog}, an implementation of a dialog box that allows +the user to input a measured angle (although the names mention a ``target +value'', it does that probably only to increase the confusion\ldots). This is a +typical Qt dialog which contains an input box with adjacent spin box for +entering the measured value, OK and Cancel buttons, and also information about +the target orientation and the current real orientation. + +When the dialog is displayed, it obtains the orientation as it was before the +last movement, and the target angle, and sets the input box to the specified +target value. When the input box is changed, the dialog calculates the new +orientation from the last orientation and the value in the input box, and +displays this new orientation. This way, the user can simply enter the measured +angle by increasing or decreasing the value by operating the spin box, and +adjusting the value until the displayed orientation reflects the real +orientation of the Roomba. + +To achieve this, the class uses the Qt signal-slot +mechanism~\cite{qt-signalslots}, and connects the \code{intValueChanged(int)} +signal of the input box to the method \code{turn\_dialog\_value\_changed(int)}, +which performs the calculation and display of the new value. \subsection{Implementation for Experiment~1} +The implementation for Experiment~1 is used to build the application +\prog{roomba\_test}. Its main part is constituted by the file \file{main.cc}, +which uses the global definitions of \file{stuff.h} and the dialog box from + \subsection{Implementation for Experiment~2} \subsection{Implementation for Experiment~3} @@ -123,11 +157,6 @@ three single applications with same base: roomba\_test (main.cc), mean\_correction\_test (mean\_correction.cc), soft\_start\_test (soft\_start.cc). -user interface: Qt. - -manual tests (user is asked for new values every time) or automated tests (user -only asked for measured values). - 1) open UART connection 2) register state callback for getting roomba sensor data @@ -136,8 +165,7 @@ only asked for measured values). 4) drive() / turn() use wiselib::ControlledMotion for moving specified angle/distance; and ask for measured -values and write to external log file, including battery status, roomba/wiselib -internal angles/distances (ticks), svn revision, floor type, roomba ID +values and write to log additionally, mean correction test uses CorrectedMeanMotion from corrected\_mean\_motion.h, implements same concept like diff --git a/Ausarbeitung/introduction.tex b/Ausarbeitung/introduction.tex index 578af57..3f6696d 100644 --- a/Ausarbeitung/introduction.tex +++ b/Ausarbeitung/introduction.tex @@ -8,4 +8,4 @@ Yamauchi \cite{yamauchi}: Dead-reckoning with Evidence Grids Chong, Kleeman \cite{chongkleeman}: High-precision odometry -\todo{} \ No newline at end of file +\todo{!!!} \ No newline at end of file diff --git a/Ausarbeitung/main.kilepr b/Ausarbeitung/main.kilepr index c21a9a2..8e81b9a 100644 --- a/Ausarbeitung/main.kilepr +++ b/Ausarbeitung/main.kilepr @@ -5,8 +5,8 @@ img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif kileprversion=2 kileversion=2.0.85 lastDocument=experiment1.tex -masterDocument= -name=Project +masterDocument=main.tex +name=Bachelor Thesis pkg_extIsRegExp=false pkg_extensions=.cls .sty .bbx .cbx .lbx src_extIsRegExp=false @@ -14,7 +14,7 @@ src_extensions=.tex .ltx .latex .dtx .ins [Tools] MakeIndex= -QuickBuild= +QuickBuild=PDFLatex+BibTeX+MakeIndex+ViewPDF [document-settings,item:biblio.bib] Bookmarks= @@ -88,6 +88,16 @@ Indentation Mode=normal Mode=LaTeX ReadWrite=true +[item:acronyms.tex] +archive=true +column=32610 +encoding= +highlight= +line=0 +mode= +open=true +order=-1 + [item:biblio.bib] archive=true column=0 @@ -110,20 +120,20 @@ order=7 [item:experiment1.tex] archive=true -column=1 +column=69 encoding=UTF-8 highlight=LaTeX -line=99 +line=139 mode=LaTeX open=true order=2 [item:experiment2.tex] archive=true -column=12 +column=0 encoding=UTF-8 highlight=LaTeX -line=40 +line=55 mode=LaTeX open=true order=3 @@ -290,10 +300,10 @@ order=5 [item:introduction.tex] archive=true -column=7 +column=9 encoding=UTF-8 highlight=LaTeX -line=0 +line=10 mode=LaTeX open=true order=1 @@ -310,14 +320,34 @@ order=0 [item:preliminaries.tex] archive=true -column=35 +column=0 encoding=UTF-8 highlight=LaTeX -line=41 +line=0 mode=LaTeX open=true order=6 +[item:roomba.tex] +archive=true +column=0 +encoding= +highlight= +line=0 +mode= +open=false +order=-1 + +[item:wiselib.tex] +archive=true +column=2097255 +encoding= +highlight= +line=0 +mode= +open=false +order=-1 + [view-settings,view=0,item:biblio.bib] CursorColumn=0 CursorLine=39 @@ -327,12 +357,12 @@ CursorColumn=8 CursorLine=1 [view-settings,view=0,item:experiment1.tex] -CursorColumn=1 -CursorLine=99 +CursorColumn=69 +CursorLine=139 [view-settings,view=0,item:experiment2.tex] -CursorColumn=12 -CursorLine=40 +CursorColumn=0 +CursorLine=55 [view-settings,view=0,item:experiment3.tex] CursorColumn=0 @@ -343,13 +373,13 @@ CursorColumn=7 CursorLine=39 [view-settings,view=0,item:introduction.tex] -CursorColumn=7 -CursorLine=0 +CursorColumn=9 +CursorLine=10 [view-settings,view=0,item:main.tex] CursorColumn=64 CursorLine=4 [view-settings,view=0,item:preliminaries.tex] -CursorColumn=35 -CursorLine=41 +CursorColumn=0 +CursorLine=0 diff --git a/Ausarbeitung/main.tex b/Ausarbeitung/main.tex index 973b463..0749682 100644 --- a/Ausarbeitung/main.tex +++ b/Ausarbeitung/main.tex @@ -3,23 +3,44 @@ \usepackage[T1]{fontenc} \usepackage{ae} \usepackage[ngerman,english]{babel} -\usepackage{hyperref,color,url,acronym,graphicx,makeidx,amsfonts,amsmath} +\usepackage{makeidx}%,showidx} +% evil hack to enable command expansion in \index +% \makeatletter +% \def\makeindex{% +% \newwrite\@indexfile +% \immediate\openout\@indexfile=\jobname.idx +% \def\index{\@bsphack\begingroup +% \@sanitize +% \@wrindex} \typeout +% {Writing custom index file \jobname.idx}% +% \let\makeindex\@empty +% } +% \def\@wrindex#1{% +% \edef\@wrindex@params{#1}% +% \protected@write\@indexfile{}% +% {\string\indexentry{\@wrindex@params}{\thepage}}% +% \endgroup\@esphack} +% \def\T1{\@empty} % someone needs this... don't know why +% \let\@origindex\index +% \renewcommand{\index}[1]{\expandafter\@origindex{#1}} +% \def\index#1{\expandafter\@datrueindex{#1}\typeout{new index used}} +% \makeatother +\usepackage{hyperref,color,url,acronym,graphicx,amsfonts,amsmath} \usepackage{sidecap} \usepackage{todonotes} \usepackage{enumitem} -% FIXME hyperref setup - \makeindex %\newcommand{\todo}[1]{\textcolor{red}{\index{Todo}\LARGE TODO:~#1}} -\newcommand{\definition}[1]{\textit{#1}\index{#1}} % FIXME: add to glossary? -\newcommand{\cmd}[1]{\texttt{#1}\index{#1 (command)}} % FIXME: add to glossary? -\newcommand{\prog}[1]{\texttt{#1}\index{#1 (program)}} % FIXME: add to glossary? +\newcommand{\definition}[1]{\textit{#1}\index{#1}} +\newcommand{\cmd}[1]{\texttt{#1}\index{#1 (command)}} +\newcommand{\prog}[1]{\texttt{#1}\index{#1 (program)}} \newcommand{\code}[1]{\texttt{#1}} +\newcommand{\class}[1]{\code{#1}\index{#1 (class)}} \newcommand{\file}[1]{\texttt{#1}\index{#1 (file)}} \newcommand{\filepath}[1]{\texttt{#1}} -\newcommand{\magicvalue}[1]{\texttt{#1}} +\newcommand{\magicvalue}[1]{\code{#1}} \newcommand{\opcode}[1]{\ac{opcode} \magicvalue{#1}} % ignore output, but evaluate command with side-effects @@ -30,11 +51,19 @@ \title{Error modeling of an autonomous, mobile robot} % \date{July 9, 2011} +\makeatletter +\hypersetup{ + colorlinks=false, % FIXME turn of for printing + pdftitle={\@title}, + pdfauthor={\@author}, + pdfcreator={\@author} +} + \begin{document} +\pagenumbering{roman} \begin{titlepage} \vskip 60pt - \makeatletter \begin{center} {\large Braunschweig University of Technology}\\ {\large Institute of Operating Systems and Computer Networks}\\[2cm] @@ -73,37 +102,19 @@ Braunschweig, den \today \todo{abstract!!!} % \end{abstract} +\cleardoublepage +\pagenumbering{arabic} +\pagestyle{headings} + \tableofcontents \cleardoublepage \listoffigures \cleardoublepage % \listoftables % \cleardoublepage -\chapter*{Table of Acronyms} -\begin{acronym}[opcode] - \acro{8N1}{8 data bits, no parity, 1 start/stop bit} - \acro{CDROM}{Compact Disc Read Only Memory} - \acro{DC}{Direct Current} - \acro{DIN}{Deutsches Institut für Normung (German Institute for - Standardization)} - \acro{GNU}{GNU's Not Unix} - \acro{GPS}{Global Positioning System} - \acro{ISO}{International Standardization Organization} - \acro{LED}{Light-Emitting Diode} - \acro{NiMH}{Nickel-Metal Hydride} - \acro{opcode}{operation code} - \acro{OS}{operating system} - \acro{pSTL}{pico Standard Template Library} - \acro{RAM}{Random Access Memory} - \acro{ROI}{Roomba Open Interface} - \acro{STL}{Standard Template Library} - \acro{SVN}{Subversion} - \acro{TTL}{Transistor-Transistor Logic} - \acro{USB}{Universal Serial Bus} -\end{acronym} -\pagenumbering{arabic} -\pagestyle{headings} +\input{acronyms} +\cleardoublepage % chapters \input{introduction} diff --git a/Ausarbeitung/preliminaries.tex b/Ausarbeitung/preliminaries.tex index 2f4754b..7ff5857 100644 --- a/Ausarbeitung/preliminaries.tex +++ b/Ausarbeitung/preliminaries.tex @@ -1,5 +1,5 @@ \chapter{Preliminaries} -This chapter describes the preliminary topics. \todo . +This chapter describes the preliminary topics. \todo{.} \section{Dead reckoning} The process of \definition{dead reckoning} describes an inexpensive method for diff --git a/Ausarbeitung/roomba.tex b/Ausarbeitung/roomba.tex index 279a6c2..f45e31d 100644 --- a/Ausarbeitung/roomba.tex +++ b/Ausarbeitung/roomba.tex @@ -105,10 +105,10 @@ However, robots of the Roomba 500 series are also easily controllable over a serial port, which provides a two-way communication at 5~V~\acs{TTL} levels over a 7-pin mini-\acs{DIN} connector, with a speed of either 19,200 or 115,200 Baud, in mode \acused{8N1} \ac{8N1} (\acl{8N1}). Over this serial port, the Roomba -speaks a specified protocol, called the \acused{ROI}\definition{\acl{ROI}} -(\acs{ROI})~\cite{irobot-oi}, which allows the user to interact with the robot's -internal logic, reading its sensor values, and control its movements and -cleaning behaviour. +speaks a specified protocol, called the \acused{ROI}\definition{Roomba Open +Interface} (\acs{ROI})~\cite{irobot-oi}, which allows the user to interact with +the robot's internal logic, reading its sensor values, and control its movements +and cleaning behaviour. After starting the communication with the Roomba by sending the \cmd{Start} command, the robot is in a state called \definition{Passive mode}. In this mode, diff --git a/Ausarbeitung/wiselib.tex b/Ausarbeitung/wiselib.tex index 8745d9f..4b84324 100644 --- a/Ausarbeitung/wiselib.tex +++ b/Ausarbeitung/wiselib.tex @@ -1,5 +1,5 @@ \section{Wiselib} -The \definition{Wiselib}\cite{wiselib} is a C++\index{C++} algorithm library for +The \definition{Wiselib}\cite{wiselib} is a C++ algorithm library for sensor networks, containing for example algorithms for routing, localization and time synchronization, and is strongly focused on portability and cross-platform development. In particular, it allows the user to develop applications that run @@ -40,7 +40,7 @@ algorithm uses. \end{figure} Besides algorithms, and basic concepts and models, the Wiselib also consists of two other main parts: the internal interface and the external interface (see -Figure \ref{fig:wiselib-arch}). +Figure~\ref{fig:wiselib-arch}). \paragraph{External Interface} The \definition{External Interface} provides access to the underlying \ac{OS}, @@ -60,8 +60,9 @@ restricted platforms; for instance a wireless sensor node without dynamic memory management can use a static implementation of lists and other containers, whereas a full-grown desktop can use the dynamic implementation provided by the C++ \ac{STL}. For this purpose, the Wiselib also contains the -\acused{pSTL}\definition{\acl{pSTL}} (\acs{pSTL}) which implements a -subset of the \ac{STL} without the use of dynamic memory allocation. +\acused{pSTL}\definition{pico Standard Template Library} (\acs{pSTL}) which +implements a subset of the \ac{STL} without the use of dynamic memory +allocation. \paragraph{Stackability} Another central design principle used in the Wiselib is @@ -77,8 +78,8 @@ de- and encryption over the radio. \subsection{Roomba Control} Even more interesting is the fact that the Wiselib includes code to control an iRobot Roomba\index{Roomba} over a serial interface, and getting access to its -internal sensor data, using the \acl{ROI}\index{\acl{ROI}} mentioned earlier. -For this purpose, it defines two concepts for Robot Motion: +internal sensor data, using the \ac{ROI}\index{Roomba Open Interface} mentioned +earlier. For this purpose, it defines two concepts for Robot Motion: \paragraph{TurnWalkMotion concept}\index{TurnWalkMotion (concept)} This concept represents a simple robot that can turn on the spot and walk @@ -127,10 +128,11 @@ guessing of the object's traveled distance and current orientation. \paragraph{ControlledMotion class}\index{ControlledMotion (class)} On top of the TurnWalkMotion and Odometer concepts builds the -\definition{ControlledMotion} model. It takes implementations of each of these -concepts as template parameters and extends the simple turn-and-walk paradigm by -a temporal dimension, which let the robot stop after a specific time interval. -In particular, it provides the following methods: +\textit{ControlledMotion}\index{ControlledMotion (class)} model. It takes +implementations of each of these concepts as template parameters and extends the +simple turn-and-walk paradigm by a temporal dimension, which let the robot stop +after a specific time interval. In particular, it provides the following +methods: \begin{description} \item[\code{int move\_distance(distance\_t, velocity\_t)}] move the robot straight by a given distance with a given velocity @@ -148,16 +150,17 @@ target values given by the user through the functions above, and if the actual values exceed the target values, the robot is stopped. \paragraph{Underlying Roomba Implementation} -The actual communication with the Roomba is done in the \definition{RoombaModel} -class. It implements the aforementioned TurnWalkMotion \index{TurnWalkMotion -(concept)} and Odometer \index{Odometer (concept)} concepts and therewith allows -the interaction with a ControlledMotion instance. In particular, it manages the -serial communication with the Roomba and translates the function calls -\code{turn()}, \code{move()} and \code{stop()} of the TurnWalkMotion concept to -the according parameters for the \ac{ROI} \cmd{Drive} command, reads a subset of -the Roomba's sensors and presents the sensor data to the user, and, while -implementing the Odometer concept, calculates the covered distance and angle -from the Roomba's right and left wheel rotations. +The actual communication with the Roomba is done in the +\textit{RoombaModel}\index{RoombaModel (class)} class. It implements the +aforementioned TurnWalkMotion\index{TurnWalkMotion (concept)} and +Odometer\index{Odometer (concept)} concepts and therewith allows the interaction +with a ControlledMotion\index{ControlledMotion (class)} instance. In particular, +it manages the serial communication with the Roomba and translates the function +calls \code{turn()}, \code{move()} and \code{stop()} of the TurnWalkMotion +concept to the according parameters for the \ac{ROI} \cmd{Drive} command, reads +a subset of the Roomba's sensors and presents the sensor data to the user, and, +while implementing the Odometer concept, calculates the covered distance and +angle from the Roomba's right and left wheel rotations. The sensor data is read from the Roomba using the \cmd{Stream} command on the \ac{ROI}, which results in a sensor data packet (see Section -- 2.20.1