checkpoint
authorRoland Hieber <rohieb@rohieb.name>
Fri, 29 Jul 2011 05:17:58 +0000 (07:17 +0200)
committerRoland Hieber <rohieb@rohieb.name>
Fri, 29 Jul 2011 05:17:58 +0000 (07:17 +0200)
20 files changed:
Ausarbeitung/experiment1.tex
Ausarbeitung/experiment2.tex
Ausarbeitung/experiment3.tex
Ausarbeitung/images/Implementation-Diagram.dot [new file with mode: 0644]
Ausarbeitung/images/Makefile
Ausarbeitung/images/iz250flur_drive-mean_data.pdf
Ausarbeitung/images/iz250flur_drive-soft_data.pdf
Ausarbeitung/images/iz250flur_drive_data.pdf
Ausarbeitung/images/iz250flur_turn-mean_data.pdf
Ausarbeitung/images/iz250flur_turn-soft_data.pdf
Ausarbeitung/images/iz250flur_turn_data.pdf
Ausarbeitung/images/seminarraum_drive-mean_data.pdf
Ausarbeitung/images/seminarraum_drive-soft_data.pdf
Ausarbeitung/images/seminarraum_drive_data.pdf
Ausarbeitung/images/seminarraum_turn-soft_data.pdf
Ausarbeitung/images/seminarraum_turn_data.pdf
Ausarbeitung/implementation.tex
Ausarbeitung/main.tex
Ausarbeitung/roomba.tex
Ausarbeitung/wiselib.tex

index fd46738..db31c23 100644 (file)
@@ -1,5 +1,5 @@
 \chapter{Experiment 1: Original Movement Behaviour}
-
+\label{sec:exp1}
 In the first experiment, the Roomba's original movement behaviour is
 measured to get an overview of the errors that occur while moving, and to
 establish a pool of data for correction approaches to work on later.
@@ -72,21 +72,20 @@ from, the battery status\index{battery status}, and other internal
 implementation-specific values.
 
 For the straight drive tests, the arrays with predefined values were:\\
-\begin{tabular}[h!]{ll}
-  Distances: & 20, 50, 100, 200, 500, 1000, 2000, and 4000~mm \\
-  Velocities: & 20, 50, 70, 100, 150, 200, 300, and 400~mm/s \\
+\begin{tabular}{@{}ll@{}}
+Distances: & 20, 50, 100, 200, 500, 1000, 2000, and 4000~mm \\
+Velocities: & 20, 50, 70, 100, 150, 200, 300, and 400~mm/s
 \end{tabular}
 
-For the turn tests, the arrays with predefined values were:\\
-\begin{tabular}[h!]{ll}
-  Turn angles: & 5, 15, 30, 45, 90, 120, 180, 360, 530, and 720~degree \\
-  Velocities: & 20, 50, 70, 100, 150, 200, 300, and 400~mm/s \\
+For the turn tests, the arrays with predefined values were: \\
+\begin{tabular}{@{}ll@{}}
+Turn angles: & 5, 15, 30, 45, 90, 120, 180, 360, 530, and 720~degree \\
+Velocities: & 20, 50, 70, 100, 150, 200, 300, and 400~mm/s
 \end{tabular}
-According to the implementation of the Wiselib Roomba control,
-the velocities were given in mm/sec and referred to the distance the wheels
-travelled when the Roomba turned on the spot, which was a circle of 230~mm in
-diameter.
 
+According to the implementation of the Wiselib Roomba control, the velocities
+were given in mm/sec and referred to the distance the wheels travelled when the
+Roomba turned on the spot, which was a circle of 230~mm in diameter.
 
 \section{Results}
 \label{exp1:results}
@@ -98,7 +97,6 @@ plots show multiple test runs; given are the minimum, the maximum and the
 arithmetic mean\index{arithmetic mean} of all results for a data point.
 
 \todo{clearpage, cleardoublepage?}
-%\clearpage
 \begin{figure}[p!]
  \centering
  \includegraphics[width=\textwidth]{images/iz250flur_drive_data.pdf}
@@ -124,16 +122,16 @@ arithmetic mean\index{arithmetic mean} of all results for a data point.
   \label{fig:orig:carpet:turn}}
 \end{figure}
 
-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
-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
-both, adding up over the time the movement continues. Also slippage of the
-wheels on the laminated floor could be possible, as well as slowdown through
-the carpet floor, explaining why the error increases on the laminated floor, but
-decreases into negative values on the carpet floor when the distance grows.
+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 Figure~\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 both, adding up over the time the
+movement continues. Also slippage of the wheels on the laminated floor could be
+possible, as well as slowdown through the carpet floor, explaining why the error
+increases on the laminated floor, but decreases into negative values on the
+carpet floor when the distance grows.
 
 On the other hand, rising the velocity always seems to cause the
 error to increase.
@@ -142,5 +140,3 @@ The same effects also apply for turn tests. Additionally, there could be errors
 resulting from false assumptions about the Roomba's wheelbase\index{wheelbase}
 diameter, resulting in false calculations of the circle the Roomba's wheels
 describe while turning, and therefore leading to false results.
-
-\todo{statistical values, stddev?}
index ad83cc8..08816c0 100644 (file)
@@ -1,5 +1,6 @@
 \chapter{Experiment 2: Movement Behaviour with Mean Correction}
 \todo{}
+\label{sec:exp2}
 
 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
@@ -30,23 +31,23 @@ it adapted the target value according to the method described above.
  \centering
  \includegraphics[width=\textwidth]{images/iz250flur_drive-mean_data.pdf}
  \caption{Behaviour with mean correction on laminated floor, straight drive
-tests}
+movements}
 \end{figure}
 \begin{figure}[p!]
  \centering
  \includegraphics[width=\textwidth]{images/iz250flur_turn-mean_data.pdf}
- \caption{Behaviour with mean correction on laminated floor, turn tests}
+ \caption{Behaviour with mean correction on laminated floor, turn movements}
 \end{figure}
 \begin{figure}[p!]
  \centering
  \includegraphics[width=\textwidth]{images/seminarraum_drive-mean_data.pdf}
  \caption{Behaviour with mean correction on carpet floor, straight drive
-tests}
+movements}
 \end{figure}
 \begin{figure}[p!]
  \centering
  \includegraphics[width=\textwidth]{images/seminarraum_drive-mean_data.pdf}
- \caption{Behaviour with mean correction on carpet floor, turn tests}
+ \caption{Behaviour with mean correction on carpet floor, turn movements}
 \end{figure}
 
 results better than in experiment 1, very accurate for laminate floor, carpet
index 409d562..9855b54 100644 (file)
@@ -1,9 +1,10 @@
 \chapter{Experiment 3: Movement Behaviour with Constant Start/Stop
 Acceleration}
+\label{sec:exp3}
 \todo{}
 
 \section{Setup}
-algorithm: slowly accelerate at start over a time of 1 second, deaccelerate at
+algorithm: slowly accelerate at start over a time of 1 second, decelerate at
 stop. no mean correction.
 
 approach: correct slippage on the floor
@@ -17,23 +18,28 @@ expectations \& were they fulfilled?
 \begin{figure}
  \centering
  \includegraphics[width=\textwidth]{images/iz250flur_drive-soft_data.pdf}
- \caption{foo}
+ \caption{Behaviour with constant start/stop acceleration, laminated floor,
+straight drive movements}
 \end{figure}
 \begin{figure}
  \centering
  \includegraphics[width=\textwidth]{images/iz250flur_turn-soft_data.pdf}
- \caption{foo}
+ \caption{Behaviour with constant start/stop acceleration, laminated floor,
+turn movements}
 \end{figure}
 \begin{figure}
  \centering
  \includegraphics[width=\textwidth]{images/seminarraum_drive-soft_data.pdf}
- \caption{foo}
+ \caption{Behaviour with constant start/stop acceleration, carpet floor,
+straight drive movements}
 \end{figure}
 \begin{figure}
  \centering
- \includegraphics[width=\textwidth]{images/seminarraum_drive-soft_data.pdf}
- \caption{foo}
+ \includegraphics[width=\textwidth]{images/seminarraum_turn-soft_data.pdf}
+ \caption{Behaviour with constant start/stop acceleration, carpet floor,
+turn movements}
 \end{figure}
 
 same or even worse deviation as in original behaviour...
+
 \todo{statistical values, stddev?}
diff --git a/Ausarbeitung/images/Implementation-Diagram.dot b/Ausarbeitung/images/Implementation-Diagram.dot
new file mode 100644 (file)
index 0000000..bac19ec
--- /dev/null
@@ -0,0 +1,51 @@
+digraph G {
+  rankdir="LR"
+  nodesep=0.5
+  ranksep=1
+  pad=0
+  margin=0.2
+  node [ fontname=LMRoman10 ]
+
+  roomba_test [ style=filled, fillcolor=greenyellow, label="application:\nroomba_test" ]
+  mean_correction_test [ style=filled, fillcolor=lightblue, label="application:\nmean_correction_test" ]
+  soft_start_test [ style=filled, fillcolor=tomato, label="application:\nsoft_start_test" ]
+
+  target_value_input_dialog_cc [ style=filled, fillcolor=yellow, shape=note, label="source file:\ntarget_value_input_dialog.cc" ]
+  stuff_cc [ style=filled, fillcolor=yellow, shape=note, label="source file:\nstuff.cc" ]
+  main_cc [ style=filled, fillcolor=greenyellow, shape=note, label="source file:\nmain.cc" ]
+  mean_correction_cc [ style=filled, fillcolor=lightblue, shape=note, label="source file:\nmean_correction.cc" ]
+  soft_start_cc [ style=filled, fillcolor=tomato, shape=note, label="source file:\nsoft_start.cc" ]
+
+  //svnrevision_h [ label="header file:\nsvnrevision.h" ]
+  stuff_h [ style=filled, fillcolor=yellow, shape=note, label="header file:\nstuff.h" ]
+  target_value_input_dialog_h [ style=filled, fillcolor=yellow, shape=note, label="header file:\ntarget_value_input_dialog.h" ]
+  corrected_mean_motion_h [ style=filled, fillcolor=lightblue, shape=note, label="header file:\ncorrected_mean_motion.h" ]
+  soft_start_motion_h [ style=filled, fillcolor=tomato, shape=note, label="header file:\nsoft_start_motion.h" ]
+
+  // generic:
+  stuff_h -> stuff_cc
+  target_value_input_dialog_h -> target_value_input_dialog_cc
+
+  // app: roomba_test
+  stuff_h -> main_cc
+  target_value_input_dialog_h -> main_cc
+  main_cc -> roomba_test
+  stuff_cc -> roomba_test
+  target_value_input_dialog_cc -> roomba_test
+
+  // app: mean_correction_test
+  stuff_h -> mean_correction_cc
+  corrected_mean_motion_h -> mean_correction_cc
+  target_value_input_dialog_h -> mean_correction_cc
+  mean_correction_cc -> mean_correction_test
+  stuff_cc -> mean_correction_test
+  target_value_input_dialog_cc -> mean_correction_test
+
+  // app: soft_start_test
+  stuff_h -> soft_start_cc
+  target_value_input_dialog_h -> soft_start_cc
+  soft_start_motion_h -> soft_start_cc
+  soft_start_cc -> soft_start_test
+  stuff_cc -> soft_start_test
+  target_value_input_dialog_cc -> soft_start_test
+}
index 6850b23..fb32227 100644 (file)
@@ -1,5 +1,8 @@
-all: Wiselib-Arch.pdf Roomba-Diagram.pdf
+all: Wiselib-Arch.pdf Roomba-Diagram.pdf Implementation-Diagram.pdf
 
 %.pdf: %.svg
        inkscape --export-area-page --export-text-to-path --export-pdf=$@ $<
 
+Implementation-Diagram.pdf: Implementation-Diagram.dot
+       dot $< -Tpdf > $@
+
index 5200c27..aa4df5c 100644 (file)
Binary files a/Ausarbeitung/images/iz250flur_drive-mean_data.pdf and b/Ausarbeitung/images/iz250flur_drive-mean_data.pdf differ
index 0c8f573..46625c4 100644 (file)
Binary files a/Ausarbeitung/images/iz250flur_drive-soft_data.pdf and b/Ausarbeitung/images/iz250flur_drive-soft_data.pdf differ
index f263e6d..251130f 100644 (file)
Binary files a/Ausarbeitung/images/iz250flur_drive_data.pdf and b/Ausarbeitung/images/iz250flur_drive_data.pdf differ
index e6e2a81..bf70d2d 100644 (file)
Binary files a/Ausarbeitung/images/iz250flur_turn-mean_data.pdf and b/Ausarbeitung/images/iz250flur_turn-mean_data.pdf differ
index e52cd32..b087666 100644 (file)
Binary files a/Ausarbeitung/images/iz250flur_turn-soft_data.pdf and b/Ausarbeitung/images/iz250flur_turn-soft_data.pdf differ
index 276fb7d..2160fe8 100644 (file)
Binary files a/Ausarbeitung/images/iz250flur_turn_data.pdf and b/Ausarbeitung/images/iz250flur_turn_data.pdf differ
index eafcb05..f513ebb 100644 (file)
Binary files a/Ausarbeitung/images/seminarraum_drive-mean_data.pdf and b/Ausarbeitung/images/seminarraum_drive-mean_data.pdf differ
index 59df0a0..f0281ba 100644 (file)
Binary files a/Ausarbeitung/images/seminarraum_drive-soft_data.pdf and b/Ausarbeitung/images/seminarraum_drive-soft_data.pdf differ
index 089c42f..aa51ff9 100644 (file)
Binary files a/Ausarbeitung/images/seminarraum_drive_data.pdf and b/Ausarbeitung/images/seminarraum_drive_data.pdf differ
index e69de29..ecfdc7b 100644 (file)
Binary files a/Ausarbeitung/images/seminarraum_turn-soft_data.pdf and b/Ausarbeitung/images/seminarraum_turn-soft_data.pdf differ
index 825e1b9..67f470f 100644 (file)
Binary files a/Ausarbeitung/images/seminarraum_turn_data.pdf and b/Ausarbeitung/images/seminarraum_turn_data.pdf differ
index 64e3a44..6acf6d9 100644 (file)
 
 \todo{?}
 This chapter describes the implementation that was used for the aforementioned
-experiments. It consists of the measuring program itself, as well as several
-scripts to help with analysis of the measured data.
+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.
+
+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
+end of this book} in the directory \filepath{apps/pc\_apps/roomba\_tests}.
 
 \section{Measuring}
 \label{sec:impl:measuring}
 
-C++ code in wiselib/trunk/pc\_apps/roomba\_tests
+The measuring implementation is a set of programs running on a x86-compatible
+Linux system which uses the Wiselib to control a Roomba attached to the system
+over a serial interface. It features a graphical user interface using the
+Qt application framework. Basically, it carries out a movement with specified
+parameters (velocity, and destination or angle, depending on the experiment),
+then prompts the user to measure and input the actual destination or angle the
+Roomba has moved after it has finished the movement. In this context, the user
+can choose between two operation modes. In the manual mode, the user can control
+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
+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):
+\begin{enumerate}
+  \item\texttt{svn:} the 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:
+    \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
+    beginning and the end of the movement, on the Roomba's left wheel
+    (packet~ID \magicvalue{0x2b} in the \ac{ROI} Specification)
+  \item\texttt{diff\_ticks\_right:} the difference of encoder counts between the
+    beginning and the end of the movement, on the Roomba's right wheel
+    (packet~ID \magicvalue{0x2c} in the \ac{ROI} Specification)
+  \item\texttt{raw\_ticks\_left:} the absolute value of the encoder count of the
+    Roomba's left wheel (packet~ID \magicvalue{0x2b})
+  \item\texttt{raw\_ticks\_right:} the absolute value of the encoder count of
+    the Roomba's right wheel (packet~ID \magicvalue{0x2c})
+  \item\texttt{batt\_charge:} the charge of the Roomba's battery in mAh
+    (packet~ID~\magicvalue{0x19})
+  \item\texttt{batt\_capacity:} the capacity of the Roomba's battery in mAh
+    (packet~ID~\magicvalue{0x1a})
+  \item\texttt{batt\_voltage:} the applied voltage of the Roomba's battery in mV
+    (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
+  \newcounter{logitems}\setcounter{logitems}{\value{enumi}+1}
+\end{enumerate}
+For straight moves (\magicvalue{move=straight}) follows:
+\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,
+    or determined by the program in automatic mode)
+  \item\texttt{velocity:} (the velocity in mm/s sent to the Roomba over the
+    \ac{ROI} \cmd{Drive} command (given by the user in manual mode, or
+    determined by the program in automatic mode)
+  \item\texttt{measured\_x:} the actual covered distance in mm in the Roomba's
+    original viewing direction (measured by the user)
+  \item\texttt{measured\_y:} originally, the distance shift perpendicular to the
+    viewing direction of the Roomba. Not used anymore.
+  \item\texttt{deviation\_orientation:} originally, the shift in orientation of
+    the Roomba. Not used anymore.
+\end{enumerate}
+For straight moves (\magicvalue{move=turn}) follows:
+\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
+    determined by the program in automatic mode)
+  \item\texttt{measured\_angle:} the actual turned angle of the Roomba in degree
+    (measured by the user)
+  \item\texttt{velocity:} (the velocity in mm/s sent to the Roomba over the
+    \ac{ROI} \cmd{Drive} command (given by the user in manual mode, or
+    determined by the program in automatic mode)
+\end{enumerate}
+
+\begin{figure}
+  \centering
+  \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}
+\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.
+
+\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
+
+\subsection{Implementation for Experiment~1}
+\subsection{Implementation for Experiment~2}
+\subsection{Implementation for Experiment~3}
 
 three single applications with same base: roomba\_test (main.cc),
 mean\_correction\_test (mean\_correction.cc), soft\_start\_test
index d4a87f8..973b463 100644 (file)
@@ -6,6 +6,7 @@
 \usepackage{hyperref,color,url,acronym,graphicx,makeidx,amsfonts,amsmath}
 \usepackage{sidecap}
 \usepackage{todonotes}
+\usepackage{enumitem}
 
 % FIXME hyperref setup
 
 \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{\code}[1]{\texttt{#1}}
-\newcommand{\magicnumber}[1]{\texttt{#1}}
-\newcommand{\opcode}[1]{\ac{opcode} \magicnumber{#1}}
+\newcommand{\file}[1]{\texttt{#1}\index{#1 (file)}}
+\newcommand{\filepath}[1]{\texttt{#1}}
+\newcommand{\magicvalue}[1]{\texttt{#1}}
+\newcommand{\opcode}[1]{\ac{opcode} \magicvalue{#1}}
 
 % ignore output, but evaluate command with side-effects
 \newsavebox{\trashbox}
@@ -79,6 +82,7 @@ Braunschweig, den \today
 \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)}
index f7dd0b7..279a6c2 100644 (file)
@@ -155,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:
@@ -214,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
index 42bc223..8745d9f 100644 (file)
@@ -164,27 +164,27 @@ The sensor data is read from the Roomba using the \cmd{Stream} command on the
 \ref{sec:roi-stream-packet}) every 15~ms, and $66.67$ packets per second. At a
 speed of 19,200 baud in mode \ac{8N1}, the maximum size of a data packet is
 $19,200 \div (66.67 \times 9) = 32$ byte, so at the moment only the sensor
-packets \emph{encoder counts left/right} (IDs~\magicnumber{0x2b},
-\magicnumber{0x2c}, 2+2 bytes), \emph{battery voltage/current/charge/capacity}
-(IDs~\magicnumber{0x16}, \magicnumber{0x17}, \magicnumber{0x19},
-\magicnumber{0x1a}, 2+2+2+2 bytes) are streamed, which add up to 18 data bytes +
+packets \emph{encoder counts left/right} (IDs~\magicvalue{0x2b},
+\magicvalue{0x2c}, 2+2 bytes), \emph{battery voltage/current/charge/capacity}
+(IDs~\magicvalue{0x16}, \magicvalue{0x17}, \magicvalue{0x19},
+\magicvalue{0x1a}, 2+2+2+2 bytes) are streamed, which add up to 18 data bytes +
 3 header/checksum bytes. There has currently been no success yet in
 communicating at the higher speed of 115,200 baud.
 
 Also there has been research to use the distance and angle values that the
-Roomba itself provides (sensor packet~IDs \magicnumber{0x13} and
-\magicnumber{0x14}). However, according to the \ac{ROI} Specification these
+Roomba itself provides (sensor packet~IDs \magicvalue{0x13} and
+\magicvalue{0x14}). However, according to the \ac{ROI} Specification these
 values are integer values, and the value is reset to zero every time it is read.
 By using the \cmd{Stream} command on the \ac{ROI} and therefore reading these
 values every 15~ms, the Roomba cannot move fast enough to increment these values
-to \magicnumber{1}, so everytime \magicnumber{0} is read. It is obvious that
+to \magicvalue{1}, so everytime \magicvalue{0} is read. It is obvious that
 these sensor values are not suited for such rapid evaluations, and can only be
 used for larger distances and angles. Nevertheless, since the Wiselib Roomba
 control needs to keep track of the Roomba's current position and orientation as
 fast as possible to maintain a certain accuracy in movement, the distance and
 angle values as provided by the Roomba itself cannot be used. On the other hand,
 working with the Roomba's wheel encoder counts (sensor packet~IDs
-\magicnumber{0x2b} and \magicnumber{0x2c}) has proven itself quite acceptable.
+\magicvalue{0x2b} and \magicvalue{0x2c}) has proven itself quite acceptable.
 After a few test runs, the number of encoder counts per~mm for straight
 walks turned out as $2.27$, and for turning on the spot, $2.27 \times 115 =
 261.05$ encoder counts per radian, which is the number of encoder counts per~mm
This page took 0.066283 seconds and 4 git commands to generate.