% (c) Andreas Hofmeier
% http://www.lgut.uni-bremen.de/an-h/
% http://an-h.de/ oder http://an-h.de.vu/ (without advertising)

% Version 1. Reviewed be
%	Michael Riemer
%	Jakob Sröter

\documentclass[12pt]{article}
%\usepackage{a4,german}
\usepackage{a4}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
%\usepackage{ngerman}
\usepackage[dvips]{graphics}
\usepackage{latexsym}
\usepackage{exscale}
\usepackage{amssymb,amsmath}
%\documentclass[11pt]{report}
%\usepackage{isolatin1}
%\usepackage{german}
\usepackage{epsf}
\usepackage[dvips]{rotating}

\usepackage{longtable}
\usepackage{dcolumn}

\usepackage{listings}

%\usepackage{eurosym}
%\EUR{300}

\usepackage{multicol}
%\usepackage[dvips]{rotating}

%ENDHEAD

\parindent=0pt
\parskip=\baselineskip

%\setcounter{tocdepth}{4}
%\setcounter{secnumdepth}{4}

\pagestyle{plain}
%\pagestyle{myheadings}
%\markright{\mbox{\bf A. Hofmeier, Final Year Project: Interim Report}}

\begin{titlepage}
\title{
  \centerline{
     \epsffile{../LSBULogo.eps}
  }
\vspace{2cm}
-- Final Year Project --\vspace{1cm}\\Communication Between\\Robots and a Computer via Lan\vspace{1cm}\\Interim Report}
\author{Andreas Hofmeier}
%\date{12. Mai 2003}
\date{}
\end{titlepage}


\begin{document}
\maketitle

\begin{center}
\begin{tabular}{rl}

Supervisor: & Dr. Shuwo Chen\\
Hand-In: & 09.11.2004 to Dr. Shuwo Chen\\
\\
Student: & Andreas Bernhard Max Hofmeier\\
Student ID: & 2406108\\
Address: & Dante Road Student Residence\\
 & Room 2G3\\
 & 2 Dante Place\\
 & London SE11 4RX \\
Tele Number: & 0870 036 5618 \\
eMail: & an-h@an-h.de
\\
Course: & Computer Systems and Networks (2388), \\
 & 3 Year, BEng, FT \\

\end{tabular}

\end{center}


\newpage
\begin{abstract}

\hspace{-0.65cm}
The importance of robotics increases very fast. Therefore the remote
control of robots by using a public telecommunications system -- the
Internet -- becomes more important.
\\\\
Within this project the possibilities of using the Internet to control
robots will be figured out. After the potentials are found a software
platform in form of a library for GNU Linux will be developed to serve
these potentials.
\\\\
The function of the system will be shown in a concrete example of
controlling a robot via the Internet. Therefore an user interface and
an interface to the robot will also developed. A simulator of the
robot will be developed to support the developing process of the whole
system.
\\\\
Up to now a basic idea of the system structure is developed. The aim,
the objectives and the deliverables are fixed. In addition an example
test of the reliability and response time of some servers over the
Internet is done.

\end{abstract}
\newpage

\tableofcontents
\newpage


\pagestyle{myheadings}
\markright{\mbox{\bf A. Hofmeier, Final Year Project: Interim Report}}


\section{Introduction}

Robots become more and more important because the technical progress
allows cheap and useful applications. Therefore simple and cheap
solutions for controlling robots are demanded. Controlling robots over
short distances with cable or wireless is not longer a problem, but
more often than not robots need to be controlled from far away. For
example a security guard or a pizza-robot at home from the
office. Most people do not have enough money to take a cable from her
office to her home. For this reason a public communication network
have to be used.

One of the most flexible and cheapest possibilities is the Internet
which works packet-oriented. That means that all data has to be
fragmented before it can be transfered. The transfer-process within
the Internet can be compared with the postal service (Ball, 1999). ``The
packet should be there within two days'' is a possible answer if the
post clerk is asked how long the packet takes. This little word
``should'' is the problem. It should, but there is no guarantee. If
many packets are handed in, it may take a week to deliver the
packet. The Internet has the same problem even if a packet does not need
a week, it cannot be predicted how long a packet takes to be
delivered. Because of this random time delay the Internet is only
limited able to provide a platform to control robots (Elhaji, 2000).

Whitin this project the feasibility of remote control of robots over
the Internet will be figured out and a software platform on Linux
which provides this possibility delivered.

After the possibilities of the Internet are figured out the structure
of a system which uses these will be designed. The main part of the
system will be the library which is the software platform. For
demonstrating and testing purposes it is necessary to develop a user
interface (UI) which allows the user to control a robot. In one case
the robot is a simulation and in the other case a real
robot. Therefore it is necessary to develop an interface to the real
robot and a simulator. These four parts has to be assemblied together.

%There are three possibilities of controlling a robot over the
%internet: direct control, supervisory control and job control
%(Kuk-Hyun, 2002).


The description of the project is following, and follows this layout:
Section 2, 3 and 4 define the aim, the objectives and the deliverables
of the project. In the next two sections the requirements and the way
for achieving the defined targets are discussed. The actual progress
of the project is mentioned in section 7. In the last section the
project plan is listed in form of an action plan and a Gantt-chart.


\section{Aim}


The aim of the project is to develop a software platform on GNU Linux
systems (in the form of a library) for the communication between a
server and robots to realise remote control of robots in the
Internet. The communication between robots are allowed as well.


\section{Objectives}

\begin{enumerate}

\item

\begin{enumerate}

\item Feasibility study of real-time control of robots on the Internet.

\item Establishing of realistic levels according to the Internet
overloading

\item Block diagram of the architecture of the software platform

\end{enumerate}

\item

\begin{enumerate}


\item Developing the library

\item Developing the simulator and the user interface (UI)

\item Demonstrating the platform by using a simulation. Show that it is
possible to control the simulated robot over an Internet connection.

\end{enumerate}

\item

\begin{enumerate}

\item Developing an interface to the real robot

\item Demonstrating the platform by means of the real robot. Show that it is
possible to control the real robot over an Internet connection.

\end{enumerate}
\end{enumerate}


\section{Deliverables}

\begin{enumerate}

\item The Library (the Software Platform)

\item Documentation of the Library (API; description of the functions; how
to use)

\item User Interface

\item Documentation of the User Interface (User manual)

\item Simulator

\item Documentation of the Simulator (User manual)

\item Interface between Library and real Robot, for Demonstration.

\item Interim Report

\item Presentation

\item Final Report


\end{enumerate}


\section{Requirements to Meet Project Aim/Objectives}

\begin{enumerate}

\item Time and Work

The most important resource which is necessary to meet the project aims
is time. According the unit guide at least 300 hours have to be spent on the
project work. That are approximately 11 hours a week without Christmas and
Easter. At least this time will be spent for project work.


\item Computer and Internet

The second thing is access to a computer and the Internet. Computer
are essential in this project because the project outcome is a peace
of software and have to run on a computer. Therefore a computer will
be used for developing and testing the software. A computer is also
necessary to use the Internet which is indispensable to getting
information and testing the system.

Computer and Internet access are available in the Learning Resource
Centre. In addition I have a computer and can get Internet access by
using the network in the student residence.


\item Access to a Robot

One Part of this project is to show the function of the system with
a real robot. This robot is located in the laboratory T40??? at the
LSBU. For this reason access to this laboratory is necessary. 


\item Library Access

Another important source of information are books and journals which
are located in a library, for example. Therefore access to the library
is necessary and possible in the Perry Library of the LSBU.


\item Supervisor

The proect has to be supervisored. Therefore the assigned supervisior
has to be present.

\item ********************************** Was muß dass system leisten, was werden für Ansprüche an es gestellt?


\end{enumerate}


\section{Proposed Technical Approach}

\subsection{Basic Concept}

The Library provides the comminucations feasibility to the robot and
server control program. Therefore, a command from a user goes the
following way:

The user gives the command to the server control program by using the
user interface. The server control program evaluate the command and
send it throw the IP network (the Internet) by using the functions of
the Network Library. The Networt Library on the robot's side receives
the command and hand it over to the robot controll program. The robot
control program evaluates the command again and affect the hardware of
the robot.

This was is bidirectional. Therefore it is possible to get date from
the robot. This is important to get an acknowledgement for a command,
get knowledge of the enviroment if the robot and to monitor the robot
(for example to know what the robot is doing now, energy repertoire
and consumption).

\includegraphics[width=14.54cm]{FYPInterimReport-basicstructure.eps}

This functionality will be implemented as a shared library for a GNU
Linux system. This network library should run on small embedded
system, therefore the library itself will only use the
libc-library\footnote{This library contains the commands for the C
programming language} of the GNU Linux system. May be the
ld-linux-library\footnote{Enabled the system to handel librarys
dynamic (loading during the system runs)} is also
necessary. (Mitchell, 2001)


\subsection{Project}

All phases that are mentioned (marked as {\bf bold}) in the text
bellow are referring to the Gantt-chart and action plan in section
{\tt Project Planning} on page \pageref{pp}.

The project can only start after the aims and objectives are
established. This was done in the {\bf Clearing Project
Aim/Objectives}-phase.

At first a {\bf Feasible Study} about how usable the Internet is for
controlling robots, has to be done. After this part of the project it
has to be clear under which conditions the Internet is real-time able
and usable.

After the {\bf Feasible Study} is carried out the {\bf Design
Structure}-phase begins. In this phase the design of the system has
to be worked out. The design covers the internal design of the library
and the design of the whole system (interaction between all parts:
Library, UI, simulator and the real robot). Furthermore it has to be
decided which protocol is used and which version of the Internet
protocol (IP) is preferred. The first decision falls among a own
protocol among IP, UDP and TCP socket streams.

The {\bf Literature Search} is carried out simultaneous to the {\bf
Feasible Study} and the {\bf Design Structure} because it is necessary
to take other people's work in to account.

{\bf Interface to Robot}: In this part of the project an interface to
the real robot is established. The aim of this part is it to take over
control of a robot. This is a condition in a later phase of the
project ({\bf Interface between Robot and Library}) to demonstrate the
system on the real robot. The library has to interact with the robot
therefore this part is performed in an early stage of the project. All
information gathered in this stage can help to ensure the match
between robot and library.

When the structure of the system is figured out the library will be
developed within the {\bf Build Library}-phase. The documentation
about the library has to be written simultaneous in the {\bf Write
Documentation (Library)}-phase because during the development all
knowledge about the library is recent in the mind. Therefore it can be
easily written down. The last week of the documentation-phase is
reserved for reviews.

After a basic version of the library is developed, the {\bf Build
User Interface} and the {\bf Build Robot Simulator}-phase begins. During
the development of the user interface and the simulator it is possible
to find weaknesses of the system. Therefore these four workings are
carried out simultaneously. The simulator is a simple model of the robot
and is used to help develop and test the library. The user
interface will be used to send commands to the robot or the
simulator. 

Also, the documentation of the user interface and the simulator has to
be written. This will be done within the {\bf Write Documentation
(UI/Simulator)}-phase of the project. The last week of this phase is
reserved for reviews.

At the end of the project the {\bf Interface to the Robot} will be
completed to the {\bf Interface between the Robot and the
Library}. This phase is called {\bf Interface between Robot and
Library}. After this phase it will be possible to control the robot
over the Internet by using the library developed before.

\subsection{Reports}

All reports will be completed and handed in by the
deadline. Therefore there are project-phases to write the reports
before the deadline. The Interim Report was written in the completed
{\bf Interim Report}-phase.

The Final Report will be written during the whole project in the {\bf
Final Report}-phase because this report has to shows the process of
the project. Work on the Final Report will start after the {\bf
Feedback on Interim Report} is given.

Within the {\bf Prepare Presentation}-phase the presentation will be
prepared.


\section{Technical Progress to Date}

\begin{itemize}

\item Up to now the aims and objectives are clear and the Interim Report
has been written.

\item About one third of the {\bf Feasible Study} is done by now. Within
this phase a test of the reliability of the Internet is down. A script
was written to test the response time of some servers on the Internet
by using ping. A part of the {\bf Literature Search} is done now to
support the feasible study. The literature search is one week behind
the schedule. Furthermore some research about GNU Linux on robots and
safety has been done.

\item In addition the basic structure is the system has been worked
out.

\item Reliability of the Internet has to be
considered. This is an important point together with safety. The robot
has to stop if the emergency stop has been pressed. One posibility to
bypass this problem is to define that this library can only used for
safty unrelevent robots. Another idea is to monitor the robot and the
Internet and take the control if the remote control is not longer
able to control the robot. 

\end{itemize}

\section{Conclusions}

\begin{itemize}

\item The boundaries, aim, objectives and deliverables of the project
are defined now.

\item The interim report reflects the current project state, is
written and handed in in time.

\item A basic comprehension of the area needs to be enlarged.

\item The structure of the system and of the library has to be considered
and figured out.

\item It has to be decided which protocol should be used for the
communication. The decision between a self-developed protocol on IP,
TCP-socket streams and UDP. In addition the version of the Internet
Protocol (IP) has to be considered.

\item After the system works in the simulation it is necessary to
demonstrate the operation on a real robot.

\item The project has to be documented well. For this reason the
documentation of the library, the UI and the simulator have to
prepared. To deliver an evidence of project progress the interim and
final report have to be written. Additionaly the project has to be
presented in a presentation and some questions have to be answered
orally in the viva period.

\item One of the main problems which has to be considert is the random time
dalay of an IP-Network. This is safty relevant because every robot has
to have an emergency stop.

\end{itemize}

\section{References}


{\bf Ball, P.; Farnham, J; Iraca, S.} (1999) Transmission Control
Protocol/Internet Protocol TCP/IP [Online] Available at
{http://cne.gmu.edu/itcore/internet/\-tcpip/tcpip.html} (accessed 29
October 2004)

{\bf Elhaji, I.; Tan, J.; Xi, N.; Fung, W.K.; Liu, Y.H.; Kaga, T.;
Hasegawa, Y.; Fukuda, T.} (2000) Multi-site Internet-based cooperative
control of robotic operations. {\it Proceedings 2000 IEEE/RSJ
International Conference on Intelligent Robots and Systems}, 2, 31 Oct
- 5 Nov 2000 p826-831 [Online] Available at
http://0-ieeexplore.ieee.org.lispac.lsbu.ac.uk/iel5/7177/19309/00893121.pdf
(accessed 20 October 2004)

%{\bf Kuk-Hyun H.; Yong-Jae K.; Jong-Hwan K.; Hsia, S.} (2002)
%Internet control of personal robot between KAIST and UC Davis {\it
%Robotics and Automation, 2002. Proceedings. ICRA 02. IEEE
%International Conference on - Robotics and Automation Washington, DC},
%2, 11-15 May 2002 p2184 - 2189 [Online] Available at
%http://0-ieeexplore.ieee.org.lispac.lsbu.ac.uk/iel5/7916/21842/01014863.pdf
%(accessed 3 November 2004)


{\bf Mitchell M.; Oldham J.; Samuel A.} (2001) Advanced Linux
Programming,  New Riders Publishing [Online] Available at
http://docs.linux.cz/programming/other/ALP/advanced-linux-programming.pdf
(accessed 20 September 2004)





\section{Project Planning}

\subsection{Action Plan}

\begin{tabular}{|l|l|c|c|}

\hline
\multicolumn{2}{|l|}{} & Estimated Duration & \\
\multicolumn{2}{|l|}{Task} & in Weeks & Precedence \\
\hline
\hline
A & Interim Report & 3 & - \\
B & Final Report & 15 & Feedback A \\
C & Clearing Project Aim/Objectives & 5 & - \\
D & Literature Search & 8 & - \\
E & Feasible Study & 3 & C \\
F & Prepare Presentation & 2 & - \\
G & Interface to Robot & 4 & C \\
H & Design Structure & 4 & C \\
I & Build Library & 8 & (G) \\
J & Write Documentation (Library) & 9 & (I) \\
K & Build User Interface & 7 & (I) \\
L & Build Robot Simulator & 7 & (I) \\
M & Write Documentation (UI/Simulator) & 5 & (K),(L) \\
N & Interface between Robot and Library & 3 & G,(M) \\
\hline

\end{tabular}

\begin{itemize}

\item Precedence:
\begin{itemize}

\item [X:] Task X has to be completed before the task can start.

\item [(X):] Task X has to be semi-completed before the task can
start. That means that task X has to be in a state in which is
possible to start a new task simultaneous. Tasks which run
simultaneous can have an influence among each other.

\end{itemize}

\item Duration and Overlapping

The weekly working time and effort is shared by overlapping tasks. For
example the effort to write the final report will be start at a lower
level and increases during the project. On the other hand the effort
on developing the library is decreasing. The main work will be done
in the first three weeks. The last fife weeks are planed for little
changes to fit the library, the UI and the simulator
together. Therefore the duration does not say that the working-time of
the phase is 11 hours by duration. Rather it says that the phase will
take n weeks with different effort over the time.

\item Holiday Periodes

The holiday periodes are not included in the calculation. It is
planned to do all project work within the lecture time. The holidays
are scheduled as a reserve for the case that the projectwork takes
longer than on the schedule.

\end{itemize}

\subsection{Milestones}

\begin{enumerate}

\item The project is defined by now and has been started. This is
reflected by the interim report which is completed and handed in.

\item At this point of the project it is possible to control the
robot with a little experimental program. The interface to the robot
is well understood.

\item An early simulation with library, user interface and
simulator shows the basic function of the system.

\item The system works. It is now possible to control the robot over
the Internet by using the library. The simulation works as well.

\item The project and final report are completed and handed in. 

\end{enumerate}


\newpage
\subsection{Project Schedule -- Gantt Chart}
\label{pp}
\centerline{
\includegraphics[height=23cm]{GanttChart.eps}
}



\end{document}