X-Git-Url: https://git.rohieb.name/bachelor-thesis/written-stuff.git/blobdiff_plain/c549bc150a5190197595f96e980f9b4da4a216b1..e1b31bbb160bcdaeef79f2c60f2b69d173876ff1:/Ausarbeitung/roomba.tex

diff --git a/Ausarbeitung/roomba.tex b/Ausarbeitung/roomba.tex
index f45e31d..b9d4c3c 100644
--- a/Ausarbeitung/roomba.tex
+++ b/Ausarbeitung/roomba.tex
@@ -1,6 +1,6 @@
 \section{iRobot Roomba}
 Originally, the \definition{Roomba} is an autonomous vacuum cleaning robot,
-manufactured by the US-based company \definition{iRobot}. The 500 series
+manufactured by the US-American 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.
 
@@ -21,7 +21,7 @@ Figure~\ref{fig:roomba-diagram} shows a diagram of the Roomba seen from below.
 The top side features several buttons which vary between the different models,
 most notably the ``Clean'' and ``Spot'' buttons for manual control of the
 cleaning routine, and the ``Dock'' button to send the Roomba to its home base.
-The cover on the top side can be removed, and covers the connector for
+The cover on the top side can be removed to reveal the connector for
 the \ac{ROI} which is discussed in Section~\ref{sec:roi}.
 
 On the side, a socket for a coaxial \acs{DC} power connector can be found, which
@@ -29,9 +29,9 @@ is used for external charging.
 
 \paragraph{Wheels}
 The Roomba has two rubberized main wheels which are positioned slightly behind
-the centerline, so the Roomba leans forward due to gravity, and a small caster
+the center line, so the Roomba tilts forward due to gravity, and a small caster
 on the front to prevent it from sliding on the floor. The space between the
-cmainenter of the main wheels (the \definition{wheel base}) is 230~mm. The main
+center of the main wheels (the \definition{wheel base}) is 230~mm. 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
@@ -53,15 +53,15 @@ 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
+the Roomba consists of a crescent-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
+photo-electrical interrupters. 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.
+of them allows the Roomba to recognize objects in a maximum 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.
@@ -69,25 +69,27 @@ 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
+unbalances it. This leads to the effect that 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.
+floor. It 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 \ac{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
+find its home base and charge itself when it has finished cleaning or is about
+to run out
+of energy. Therefore, it uses a special infrared sensor mounted on top of the
+Roomba, which 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{Original Behaviour}
+\subsection{Behavior}
+\paragraph{Original Behavior}
 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
@@ -96,7 +98,7 @@ 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
+comes to cleaning rooms, but cleaning time is not necessarily the constraining
 factor, and the robot still saves the human some time.
 
 \paragraph{Roomba Open Interface}
@@ -108,13 +110,14 @@ in mode \acused{8N1} \ac{8N1} (\acl{8N1}). Over this serial port, the Roomba
 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.
+and cleaning behavior.
 
 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:
+his movement and cleaning behavior. However, the user is able to read the
+internal sensors in this mode. 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
@@ -138,23 +141,25 @@ mode, one would send the following bytes over the serial interface:
 0x83              // Safe command
 \end{verbatim}
 Then, additional commands can be sent over the \ac{ROI}, like actuator commands
-for controlling the Roomba's driving behaviour.
+for controlling the Roomba's driving behavior.
 
 \paragraph{Actuator commands}
 The \ac{ROI} specifies various actuator commands to control the Roomba's wheels,
 brushes and \ac{LED} displays, and let the Roomba play tunes. However, the
 central command needed for the experiments in this thesis is the \cmd{Drive}
 command, \opcode{0x89}, which takes 4 additional bytes as parameter: the first
-two bytes specify the velocity that the Roomba's centerpoint should travel with
+two bytes specify the velocity with which the Roomba's center point should travel
 while driving, and the third and fourth bytes specify the radius of the arc the
-Roomba's centerpoint should describe. The Roomba then calculates the required
+Roomba's center point should describe. The Roomba then calculates the required
 right and left wheel velocities internally without further interference of the
 user.
 
 The velocity is interpreted in mm/s, the value can range from -500~mm/s to
-500~mm/s, with negative values implying backwards movement. The radius is
+500~mm/s, with negative values implying backwards movement -- it is to be noted
+however that velocities between -10~mm/sec and 10~mm/sec are ignored, since the
+wheel motors cannot operate with that small velocities. The radius is
 interpreted in mm, ranging from -2000~mm to 2000~mm. Negative values make the
-Roomba turn toward the right, whereas positive values make it turn toward the
+Roomba turn towards the right, whereas positive values make it turn towards the
 left. There are also four special values for the radius: \magicvalue{1} makes
 the Roomba turn on the spot in counter-clockwise direction, \magicvalue{-1}
 makes the Roomba turn on the spot in clockwise direction, and
@@ -168,7 +173,7 @@ following bytes over the serial interface:
 0x80, 0x00        // parameter radius: special value "straight"
 \end{verbatim}
 
-A little disadvantage of the \ac{ROI} \cmd{Drive} command is that the robot is
+A slight disadvantage of the \ac{ROI} \cmd{Drive} command is that the robot is
 modeled without a time awareness. 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
@@ -181,13 +186,13 @@ appropriate to monitor the Roomba's movement, for example with its internal
 sensors.
 
 \paragraph{Input commands}
-The Roomba~500 series features a total of 49 different sensor values. Among the
+The Roomba~500 series features a total of 49 different sensor values. Beyond the
 sensors mentioned above, there are also some internal values concerning battery
 charge, capacity, and temperature, motor currents, and even some more (or less)
 useful variables like the characters read from the infrared remote control, the
 current \ac{ROI} mode or the currently playing song. Anyway, there is also the
-possibility to query the travelled distance, the turned angle and the internal
-encoder counts ("`ticks"') for the left and right wheel. Each sensor value is 1
+possibility to query the traveled distance, the turned angle and the internal
+encoder counts (``ticks'') for the left and right wheel. Each sensor value is 1
 or 2 bytes long and is assigned a specific \definition{packet ID}. Some packet
 IDs also describe groups of multiple sensor values sent together.
 
@@ -200,21 +205,21 @@ as parameter. Both of these functions send back the requested values directly.
 
 By using the \cmd{Stream} command (\opcode{0x94}), it is possible to receive
 the requested sensor values every 15~ms. This is very convenient for real-time
-behaviour, when the sensor values have to be evaluated very often. As the
+behavior, when the sensor values have to be evaluated very often. As the
 \cmd{Query List} command, the \cmd{Stream} command takes the total number of
 packet IDs followed by the requested packet IDs as parameter. It sends back the
-sensor values in packets using the following format:\\
-\verb|0x13|, $n, p_1, v(p_1), p_2, v(p_2), \ldots, p_n, v(p_n), c$\\
-where:
-\begin{description}
-  \item[$n$] is the number of bytes sent back, excluding $n$ and $c$,
-  \item[$p_i$] is a requested packet ID, $i = 1, \ldots, n$
-  \item[$v(p_i)$] is the value of the packet with the packet ID $p_i$
-  \item[$c$] is a checksum, with
+sensor values in packets using the byte format\\
+\verb|0x13|, $\mathtt{n, p_1, v(p_1), p_2, v(p_2), \ldots, p_n, v(p_n),
+c}$, where:
+\begin{itemize}\setlength{\itemsep}{0pt}
+  \item $n$ is the number of bytes sent back, excluding $n$ and $c$,
+  \item $p_i$ is a requested packet ID, $i = 1, \ldots, n$
+  \item $v(p_i)$ is the value of the packet with the packet ID $p_i$
+  \item $c$ is a checksum, with
     $\sum_{i=1}^n\left(p_1 + v(p_1)\right) + c + n \equiv 0 \mod 256$
-\end{description}
+\end{itemize}
 Example: The following byte sequence requests data from the left cliff
-signal (packet~ID \magicvalue{0x1d}) and virtual wall sensor (packet~ID
+signal (sensor packet~ID \magicvalue{0x1d}) and virtual wall sensor (packet~ID
 \magicvalue{0x0d}):~\cite{irobot-oi}
 \begin{verbatim}
 0x94,       // Stream command
@@ -222,7 +227,7 @@ signal (packet~ID \magicvalue{0x1d}) and virtual wall sensor (packet~ID
 0x1d, 0x0d  // parameter: request packets 0x1d and 0x0d
 \end{verbatim}
 The Roomba then would return a packet with the following format every
-15~ms:\label{sec:roi-stream-packet}~\cite{irobot-oi}
+15~ms:\label{sec:roi-stream-packet}
 \begin{verbatim}
 0x13,       // Header byte
 0x05,       // 5 bytes following, except checksum
@@ -230,7 +235,7 @@ The Roomba then would return a packet with the following format every
 0x02, 0x19, // Data for Packet ID 0x1d (2 byte)
 0x0d,       // Packet ID 0x1d following
 0x00,       // Data for Packet ID 0x0d (1 byte)
-0xb6        // checksum: 0x5 + 0x1d + 0x2 + 0x19 + 0xd + 0x0 + 0xb6 = 0x100
+0xb6        // Checksum: 0x5+0x1d+0x2+0x19+0xd+0x0+0xb6 = 0x100
 \end{verbatim}
 
 \paragraph{Latency}
@@ -239,17 +244,17 @@ sent to the Roomba and the time the Roomba receives this command and carries out
 the motion. At 19,200 baud, mode \ac{8N1}, the transfer of a 5-byte \cmd{Drive}
 command needs $(5 \times 9) \div 19200 = 2.3$~ms. The time the Roomba
 logic needs to process the command is not mentioned in the \ac{ROI}
-Specification, and there was no way to measure it sufficiently. It is however
-short enough that a human would describe it as ``instant''.
+Specification, and there was no way to measure it precisely. %It is however
+%short enough that a human would describe it as ``instant''.
 
 The same latency of course also exists in the opposite directions when the
 Roomba is sending sensor data to the user. However, the sensor data are sent by
 the Roomba every 15~ms (which is the internal speed at which the data is
 updated from the sensors) and according to the wheel's maximum velocity of
-500~mm/s (which means that a sensor data packet is received every $0.03$~mm when
-driving at this speed), this is acceptible for real-time evaluation of the data.
-
+500~mm/s (which means that a sensor data packet is received every $7.5$~mm when
+driving at this speed), this is acceptable for real-time evaluation of the data.
 
+\paragraph{Usage}
 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
 Roomba's movements are controlled over a netbook mounted on top of the Roomba
