X-Git-Url: https://git.rohieb.name/bachelor-thesis/written-stuff.git/blobdiff_plain/9a0c63405476423a6f7ca048b38d1c59832ba079..775e6043272712d56c091be5346cf837a754b294:/Ausarbeitung/roomba.tex diff --git a/Ausarbeitung/roomba.tex b/Ausarbeitung/roomba.tex index 819d034..f45e31d 100644 --- a/Ausarbeitung/roomba.tex +++ b/Ausarbeitung/roomba.tex @@ -5,9 +5,28 @@ currently represents the third generation of iRobot's cleaning robots, and the first generation of robots controllable over an external interface. \subsection{Hardware design} +\begin{SCfigure} + \centering + \includegraphics[width=.5\textwidth]{images/Roomba-Diagram.pdf} + \caption[Diagram of the Roomba 500 series]{Diagram of the Roomba 500 series, + view from below\label{fig:roomba-diagram} \\ + 1:~front~caster, 2:~battery, 3:~side~brush, 4:~main~wheels, 5:~main~brush, + 6:~vacuum~bin, 7:~front~bumper, 8:~cliff~sensors} +\end{SCfigure} + The Roomba lives in a cylindrical case with diameter of about 34~cm and height -of about 7~cm, so it can crawl easily under furniture for cleaning. -\todo{diagram?} +of about 8~cm, so it can crawl easily under furniture for cleaning. +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 \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 +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 @@ -81,14 +100,15 @@ 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} +\label{sec:roi} 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, in mode 8N1 -(8 data bits, no parity, 1 stop bit). 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. +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{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, @@ -135,10 +155,10 @@ 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 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 -left. There are also four special values for the radius: \magicnumber{1} makes -the Roomba turn on the spot in counter-clockwise direction, \magicnumber{-1} +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 -\magicnumber{0x7fff} and \magicnumber{0x8000} make it drive straight. +\magicvalue{0x7fff} and \magicvalue{0x8000} make it drive straight. For example, to drive straight with a velocity of 1000~mm, one would send the following bytes over the serial interface: @@ -194,15 +214,15 @@ where: $\sum_{i=1}^n\left(p_1 + v(p_1)\right) + c + n \equiv 0 \mod 256$ \end{description} Example: The following byte sequence requests data from the left cliff -signal (packet~ID \magicnumber{0x1d}) and virtual wall sensor (packet~ID -\magicnumber{0x0d}): +signal (packet~ID \magicvalue{0x1d}) and virtual wall sensor (packet~ID +\magicvalue{0x0d}):~\cite{irobot-oi} \begin{verbatim} 0x94, // Stream command 0x02, // parameter: 2 packets following 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} +15~ms:\label{sec:roi-stream-packet}~\cite{irobot-oi} \begin{verbatim} 0x13, // Header byte 0x05, // 5 bytes following, except checksum @@ -213,6 +233,23 @@ The Roomba then would return a packet with the following format every 0xb6 // checksum: 0x5 + 0x1d + 0x2 + 0x19 + 0xd + 0x0 + 0xb6 = 0x100 \end{verbatim} +\paragraph{Latency} +On the connection, there is a certain latency between the time the command is +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''. + +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. + + 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