From: Roland Hieber Date: Wed, 27 Jul 2011 04:40:17 +0000 (+0200) Subject: checkpoint X-Git-Url: https://git.rohieb.name/bachelor-thesis/written-stuff.git/commitdiff_plain/600380af57fe95132b89fbf21db1ef26258f955b checkpoint --- diff --git a/Ausarbeitung/experiment1.tex b/Ausarbeitung/experiment1.tex index ca605b9..b467077 100644 --- a/Ausarbeitung/experiment1.tex +++ b/Ausarbeitung/experiment1.tex @@ -12,21 +12,22 @@ \caption{Measuring turn angles with laser pointer\label{fig:laserpointer}} \end{figure} -The test equipment consisted of a small Intel Atom \index{netbook} which was +The test equipment consisted of a small x86 \index{netbook} which was mounted on -an iRobot Roomba~500\index{Roomba~500} robot. The netbook controlled the Roomba +an iRobot Roomba~500\index{Roomba} robot. The netbook controlled the Roomba over a -\acs{USB}-to-serial converter plugged into the Open Interface \index{Open -Interface|see {iRobot Roomba Open Interface}} port on the +\acs{USB}-to-serial converter plugged into the Open Interface \index{iRobot +Roomba Open Interface} port on the Roomba, and hosted as the environment for executing the Wiselib \index{Wiselib} -code (see fig.~\ref{fig:roombasetup}). +code (see Fig.~\ref{fig:roombasetup}). In the first experiment, the original movement behaviour of the Roomba was measured to establish a pool of data for correction approaches to work on. There was no error correction involved, and 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. Due to -limitations in the iRobot Roomba Open Interface\index{Open Interface} it is only +limitations in the iRobot Roomba Open Interface\index{iRobot 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, calculates the time needed until the movement should be @@ -50,7 +51,7 @@ of paper with a printed polar coordinate system in which a circular hole was cut in the center to let the Roomba's wheels touch the floor. The sheet was fixed on the floor, and the Roomba was aligned in the 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 +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 \cmd{roomba\_tests} (see @@ -120,7 +121,7 @@ arithmetic mean\index{arithmetic mean} of all results for a data point. Figure~\ref{fig:orig:lam:drive} shows that the error becomes greater with increasing input distance when driving straight on the -laminated floor, however, in fig.~\ref{fig:orig:carpet:drive} we see the +laminated floor, however, in Fig.~\ref{fig:orig:carpet:drive} we see the opposite effect on the carpet floor, the error decreases with greater input distance. This could happen due to imprecise measurement of distances in either the Roomba's sensors or the Wiselib implementation that controls the Roomba, or diff --git a/Ausarbeitung/experiment2.tex b/Ausarbeitung/experiment2.tex index 1dbe336..ba75ff5 100644 --- a/Ausarbeitung/experiment2.tex +++ b/Ausarbeitung/experiment2.tex @@ -1,7 +1,7 @@ \chapter{Experiment 2: Movement Behaviour with Mean Correction} \todo{} -As presumed in section \ref{exp1:results}, errors in the Roomba's movements +As presumed in Section \ref{exp1:results}, errors in the Roomba's movements could originate from imprecise measurement of the Roomba's internal sensors or in the Wiselib implementation. So a natural approach to correct this sort of errors would be to average the results for each data point from Experiment 1, diff --git a/Ausarbeitung/main.kilepr b/Ausarbeitung/main.kilepr index f5c3ee3..c21a9a2 100644 --- a/Ausarbeitung/main.kilepr +++ b/Ausarbeitung/main.kilepr @@ -4,7 +4,7 @@ img_extIsRegExp=false img_extensions=.eps .jpg .jpeg .png .pdf .ps .fig .gif kileprversion=2 kileversion=2.0.85 -lastDocument=biblio.bib +lastDocument=experiment1.tex masterDocument= name=Project pkg_extIsRegExp=false @@ -24,6 +24,14 @@ Indentation Mode=normal Mode=BibTeX ReadWrite=true +[document-settings,item:conclusion.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Indentation Mode=normal +Mode=LaTeX +ReadWrite=true + [document-settings,item:experiment1.tex] Bookmarks= Encoding=UTF-8 @@ -72,6 +80,14 @@ Indentation Mode=normal Mode=LaTeX ReadWrite=true +[document-settings,item:preliminaries.tex] +Bookmarks= +Encoding=UTF-8 +Highlighting=LaTeX +Indentation Mode=normal +Mode=LaTeX +ReadWrite=true + [item:biblio.bib] archive=true column=0 @@ -79,48 +95,48 @@ encoding=UTF-8 highlight=BibTeX line=39 mode=BibTeX -open=true +open=false order=2 [item:conclusion.tex] archive=true -column=7471201 -encoding= -highlight= -line=0 -mode= -open=false -order=-1 +column=8 +encoding=UTF-8 +highlight=LaTeX +line=1 +mode=LaTeX +open=true +order=7 [item:experiment1.tex] archive=true -column=0 +column=1 encoding=UTF-8 highlight=LaTeX -line=14 +line=99 mode=LaTeX -open=false -order=3 +open=true +order=2 [item:experiment2.tex] archive=true -column=0 +column=12 encoding=UTF-8 highlight=LaTeX -line=35 +line=40 mode=LaTeX -open=false -order=4 +open=true +order=3 [item:experiment3.tex] archive=true -column=66 +column=0 encoding=UTF-8 highlight=LaTeX line=0 mode=LaTeX -open=false -order=5 +open=true +order=4 [item:images/IMAGE_00079.jpg] archive=true @@ -264,68 +280,76 @@ order=-1 [item:implementation.tex] archive=true -column=0 +column=7 encoding=UTF-8 highlight=LaTeX -line=31 +line=39 mode=LaTeX -open=false -order=6 +open=true +order=5 [item:introduction.tex] archive=true -column=0 +column=7 encoding=UTF-8 highlight=LaTeX -line=9 +line=0 mode=LaTeX open=true order=1 [item:main.tex] archive=true -column=0 +column=64 encoding=UTF-8 highlight=LaTeX -line=10 +line=4 mode=LaTeX open=true order=0 [item:preliminaries.tex] archive=true -column=0 -encoding= -highlight= -line=0 -mode= -open=false -order=-1 +column=35 +encoding=UTF-8 +highlight=LaTeX +line=41 +mode=LaTeX +open=true +order=6 [view-settings,view=0,item:biblio.bib] CursorColumn=0 CursorLine=39 +[view-settings,view=0,item:conclusion.tex] +CursorColumn=8 +CursorLine=1 + [view-settings,view=0,item:experiment1.tex] -CursorColumn=0 -CursorLine=14 +CursorColumn=1 +CursorLine=99 [view-settings,view=0,item:experiment2.tex] -CursorColumn=0 -CursorLine=35 +CursorColumn=12 +CursorLine=40 [view-settings,view=0,item:experiment3.tex] -CursorColumn=66 +CursorColumn=0 CursorLine=0 [view-settings,view=0,item:implementation.tex] -CursorColumn=0 -CursorLine=31 +CursorColumn=7 +CursorLine=39 [view-settings,view=0,item:introduction.tex] -CursorColumn=0 -CursorLine=9 +CursorColumn=7 +CursorLine=0 [view-settings,view=0,item:main.tex] -CursorColumn=0 -CursorLine=10 +CursorColumn=64 +CursorLine=4 + +[view-settings,view=0,item:preliminaries.tex] +CursorColumn=35 +CursorLine=41 diff --git a/Ausarbeitung/main.tex b/Ausarbeitung/main.tex index c165562..5f3600b 100644 --- a/Ausarbeitung/main.tex +++ b/Ausarbeitung/main.tex @@ -1,6 +1,7 @@ \documentclass[a4paper,11pt,bibliography=totoc,twoside]{scrbook} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} +\usepackage{ae} \usepackage[ngerman,english]{babel} \usepackage{hyperref,color,url,acronym,graphicx,makeidx,amsfonts} @@ -9,8 +10,13 @@ \makeindex \newcommand{\todo}[1]{\textcolor{red}{\index{Todo}\LARGE TODO:~#1}} -\newcommand{\definition}[1]{#1\index{#1}} % FIXME: add to glossary and/or index -\newcommand{\cmd}[1]{\texttt{#1}\index{#1}} % FIXME: add to glossary and/or +\newcommand{\definition}[1]{\textit{#1}\index{#1}} % FIXME: add to glossary? +\newcommand{\cmd}[1]{\texttt{#1}\index{#1}} % FIXME: add to glossary? +\newcommand{\magicnumber}[1]{\texttt{#1}} + +% ignore output, but evaluate command with side-effects +\newsavebox{\trashbox} +\newcommand{\ignoreoutput}[1]{\setbox\trashbox\vbox{#1}} \author{Roland Hieber} \title{Error modeling of an autonomous, mobile robot} @@ -55,7 +61,9 @@ Braunschweig, den \today \pagestyle{headings} \cleardoublepage -% FIXME abstract +% \begin{abstract} + \todo{abstract!!!} +% \end{abstract} \tableofcontents \cleardoublepage @@ -65,10 +73,12 @@ Braunschweig, den \today % \cleardoublepage \chapter*{Table of Acronyms} \begin{acronym} + \acro{GNU}{GNU's Not Unix} \acro{GPS}{Global Positioning System} - \acro{USB}{Universal Serial Bus} + \acro{opcode}{operation code} + \acro{ROI}{Roomba Open Interface} \acro{SVN}{Subversion} - \acro{GNU}{GNU's Not Unix} + \acro{USB}{Universal Serial Bus} \end{acronym} \pagenumbering{arabic} @@ -83,9 +93,11 @@ Braunschweig, den \today \input{conclusion} \input{implementation} +\addcontentsline{toc}{chapter}{Index} \printindex -\bibliographystyle{plain} +\bibliographystyle{alpha} \bibliography{biblio} +\nocite{hacking-roomba} \end{document} diff --git a/Ausarbeitung/preliminaries.tex b/Ausarbeitung/preliminaries.tex index d47a81b..a6124b4 100644 --- a/Ausarbeitung/preliminaries.tex +++ b/Ausarbeitung/preliminaries.tex @@ -1,4 +1,5 @@ \chapter{Preliminaries} +This chapter describes the preliminary topics. \todo . \section{Dead reckoning} The process of \definition{dead reckoning} describes an inexpensive method for @@ -18,24 +19,133 @@ time, or are even impreciser than relative approaches\cite{umbmark}, so dead reckoning can still be useful for the time being. \section{iRobot Roomba 500} -Originally, the \definition{Roomba~500} is an autonomous vacuum cleaning -robot, -manufactured by the US-based company \definition{iRobot}. It has the size of a -disc of about 34~cm in diameter and 9~cm in height; and normally follows its -own, non-customizable logic to detect dirt and clean rooms. However, it is also -easily controllable over a serial port, which provides a two-way -communication at 5~V TTL levels over a Mini-DIN connector, with a speed of -either 19,200 or 115,200 Baud. Over this serial port, the Roomba speaks a -specified protocol, called the \definition{iRobot Roomba Open -Interface}~\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. - -In our setup, the iRobot \index{Roomba~500} is used as an instance of an -autonomous, +Originally, the \definition{Roomba} is an autonomous vacuum cleaning robot, +manufactured by the US-based company \definition{iRobot}. The 500 series +currently represents the third generation of iRobot's cleaning robots, and the +first generation of robots controllable over an external interface. + +\subsection{Hardware design} +\todo{diagram?} +\paragraph{Wheels} +The Roomba lives in a cylindrical case with diameter of about 34~cm and height +of about 7~cm. It has two main wheels which are positioned slightly behind the +centerline, so the Roomba leans forward due to gravity, and a small caster on +the front to prevent it from sliding on the floor. The main wheels can be +controlled over two independent motors, each one allowing to turn the connected +wheel with a minimum of 10~mm/s and a maximum of 500~mm/s in each direction. +One of the main wheel motors consumes about 300~mA in their slowest rotation +speed, and about 1000~mA when driving with normal speed. Each wheel is also +equipped with a drop sensor that tells if the respective wheel has dropped into +a hole or similar, and does not reach the ground anymore. These sensors are +realized with a spring pushing the wheel towards the ground, with the spring +force adjusted to the Roomba's weight, and a micro switch which triggers if the +wheel drops below a specified level. Furthermore, both wheels feature rotating, +toothed discs, which in conjunction with an LED and a photo-electric resistor +act as an optical interrupter. This system can be used to measure the wheel's +current speed by counting the optical interruptions the wheel causes while +moving. + +\paragraph{Brushes} +In addition to the wheel motors, the Roomba has a motor which operates the +vacuum brush, and a small motor on the front connected to a side brush, to allow +cleaning of room corners. + +\paragraph{Bumper shield} +Since the main movement direction in normal operation is forward, the front of +the Roomba consists of a crecent-shaped bumper shield which contains several +sensors. This bumper\index{Roomba!bumper} is spring-loaded and on the one +hand absorbs shock to reduce damage, on the other hand, it allows the Roomba to +detect obstacles in front of it, both via infrared sensors as well as by +mechanical means. There are two sensors for mechanical bump detection, located +30° to the left and to the right of the bumper's center, each implemented as +photo-electrical interruptors. Additionally, six infrared sensors are unevenly +distributed over the bumper, facing away from it in a star-like manner. Each one +of them allows the Roomba to recognize objects in a maxmimum distance of 10~cm. +Finally, the bumper shield contains four infrared sensors facing downwards, +acting as cliff sensors \index{Roomba!cliff sensor} to recognize steps or +similar chasms which could be dangerous for the Roomba to drive towards. + +The back part of the Roomba contains the main vacuum brush\index{Roomba!vacuum +brush}, and the reservoir for holding dirt. Both of them can be removed, though +the removal of the main brush reduces the Roomba's weight and slightly +unbalances the Roomba so the springs used for the wheel drop sensors are not in +balance anymore and push the Roomba upwards, so it tilts more to the front when +accelerating forwards. There is also a sensor on the underside +\index{Roomba!dirt sensor} for detecting particularly dirty regions of the +floor, which is implemented as a capacitive touch sensor. + +\paragraph{Battery} +The battery\index{Roomba!battery} is placed in the front part behind the bumper, +it is a rechargeable NiMH battery and holds a capacity of 3300~mAh which lasts +for about 90 to 120 minutes under normal operation. The Roomba can also find its +home base and charge itself when it has finished cleaning or runs out of energy +by using a special infrared sensor mounted on top of the Roomba. This sensor can +see in all directions and is able to detect the home base by looking for a +special infrared signal the home base\index{Roomba!home base} emits. The same +principle is used for so-called "`virtual walls"'\index{virtual wall} which can +be placed by the user in regions the Roomba should not move into. + +\subsection{Behaviour} +\paragraph{Intended Behaviour} +The Roomba normally follows its own, non-customizable algorithm to detect dirt +and clean rooms. It is kind of a random walk\index{random walk}, controlled by +the internal logic, which tries to keep the Roomba away from dangers like +stairs and walls (by evaluating the cliff and bump sensors), and direct it to +the more dusty regions of the room (by using the dirt sensor). The random walk +concept allows a more or less complete coverage of the room, given the time for +cleaning is large enough, while at the same only needing very little information +about the environment. Of course, that concept is not very efficient when it +comes to cleaning rooms, but cleaning time is not neccessarily the constraining +factor, and the robot still saves the human some time. + +\paragraph{Roomba Open Interface} +However, robots of the Roomba 500 series are also easily controllable over a +serial port, which provides a two-way communication at 5~V TTL levels over a +Mini-DIN connector, with a speed of either 19,200 or 115,200 Baud. Over this +serial port, the Roomba speaks a specified protocol, called the +\ignoreoutput{\ac{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. + +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, +the user cannot control the robot by himself, but the internal logic defines +icants behaviour. However, the user is able to read the internal sensors. The +\ac{ROI} then allows the user to set the Roomba into two different modes: +\begin{itemize} + \item In \definition{Safe mode}, the Roomba monitors the wheel drop, cliff + and internal charger sensors, and reverts into Passive mode if safety + conditions occur, so the Roomba is not harmed. + \item In \definition{Full mode}, the user has full control over the Roomba, + and has to take care not to harm the Roomba by evaluating the wheel drop, + cliff and internal charger sensors by himself. +\end{itemize} + +In particular, every command is assigned an \ac{opcode} of one byte length, +followed by a fixed amount of bytes as parameters which depend on the opcode. +For example, to drive straight with a velocity of 1000~mm, one would send the +following bytes over the serial interface: +\begin{verbatim} +0x80, // start byte +0x83, // safe mode +0x89, // drive +0x03, 0xe8 // drive: parameter velocity: 0x03e8 == 1000 +0x80, 0x00 // drive: parameter radius: special value "straight" +\end{verbatim} + +A little disadvantage of the \ac{ROI} \cmd{Drive} command is that the robot is +modeled as a state machine. In the previous example, the Roomba would keep on +driving until it runs out of energy, or a safety condition occurs which causes +the Roomba to revert into Passive mode, or a new \cmd{Drive} command with the +velocity parameter set to zero is sent. Thus, if the user wants to drive a +specific distance, he has to calculate the time interval the robot needs to +travel that distance, measure the time interval, and stop the robot after that +time interval has passed. + +In our setup, an iRobot Roomba~530 is used as an instance of an autonomous, mobile robot to conduct the experiments described afterwards. For that, the -Open Interface is used to control the Roomba's movements from a netbook which is -running Wiselib code. +Roomba's movements are controlled over a netbook mounted on top of the Roomba +(cf.~Figure~\ref{fig:roombasetup}), which is running Wiselib code. \section{Wiselib} The \definition{Wiselib}\cite{wiselib} is a C++ algorithm library for sensor @@ -48,8 +158,8 @@ platforms are diverse sensor node platforms, like iSense, Contiki and TinyOS, but there are as well implementations for the diverse x86-compatible Personal Computer platforms, and the Shawn sensor network simulator. -Moreover, the Wiselib includes code to control the iRobot \index{Roomba|see -{Roomba~500}} over a +Moreover, the Wiselib includes code to control the iRobot +Roomba\index{Roomba~500} over a serial interface, and getting access to its internal sensor data, using the iRobot Roomba Open Interface mentioned earlier.