Context and definition of the problem
In today's modern society automation has become an integral part of our daily life. We are increasingly noticing that more and more mondane tasks are given to robots. For this purpose, we propose to automate the task of waitering tables at a restaurant. More specifically, we will design a robot and an automated solution to ensure that all customers on the same table of a restaurant are served at the same time.
To do so, we will design on the one hand a system to automate putting in orders, estimating cooking time and getting instructions from the kitchen to serve each table. And on the other hand, we will put in place a robot that can receives these instructions, find its way to the corresponding table, serve the customers' dishes and send feedback.
Solution considered and functionalities
We therefore propose to design a connected, autonomous and autopilot robot.
On the one hand, we need to build a program or a solution to:
● Make the decision of which table should be served next
● Send the instruction to the robot
On the other hand, the robot must be able to:
● Deliver three dishes to a table
For this purpose, the robot must be able to:
○ Follow a predefined path
○ Arrive at / find the right table
○ Avoid obstacles in its way
● Communicate with the restaurant as well as with the customer:
○ Receive the number of the serving table
○ Send / Receive the status of each table: Served or not
○ Send customer feedback
○ Send / update status in real time: Battery, availability, etc.
In addition and for security reasons, it is preferable to set up a solution to control the robot remotely.
In order to ensure proper navigation of the robot, a certain number of sensors are to be considered. But due to the complexity of the sensors and the huge amount of data to be processed in the context of a restaurant, the robot needs a certain amount of computing power and very low data transmission time.
Namely, there are two possible processing modes; edge computing and cloud computing. Edge computing involves processing data at the edge of the network, near the source of the data. However, cloud computing consists of using remote computer servers via a network, generally the Internet, to store or exploit data.
Given the above problems, we propose to develop a robot combining both mothodes of edge computing and cloud computing (in this case we will opt for the mqtt protocol). Edge computing processes data in real time to take care of the driving decisions. Cloud computing performs more user-oriented work such as decision-making, the formulation of instructions for the robot and receiveing or analyzing data from both the robot and the users.
For our project, we propose to solve the problem of serving the tables of a restaurant. So we imagine the following model of a restaurant (image below):
The robot receives an instruction from the server to serve a table. A table can be served only when all the customer orders on this table are ready. This decision will be made by a remote server.
The robot's starting point will always be the kitchen. The restaurant will be represented in the form of a grid. For our project we will limit ourselves to six tables. the robot knows that there are only odd tables on the right and that even tables on the left. So to find the right table, the robor just needs to follow the line and count the number of intersections it encounters.
Considering all these technical choices and according to the robot's tasks, we have designed the architecture below, to be followed for our first prototype of the robot.
The whole structure is divided into two parts: the Arduino robot part and the PC server part.
The tasks of the Arduino robot part mainly include: supporting two control modes, namely Bluetooth mode and automatic mode, sending the robot status to the PC server, receiving control instructions from the PC server, and automatically tracking to the designated location.
The tasks on the PC server part mainly include: creating a database, sending and receiving MQTT instructions.
The cabeling is very simple, we will be connecting three photosensor, the WiFi module and a button to the arduino card. There are no compilcated layouts, all we need to do is pick the pins for the different components.
Designing a robot that can follow a line
Before starting to code, we recommand that you use a voltage regulator if your robot is powered by betteries.
The idea behind this code is to design a robot that can follow a line, can make a left or a right turn and is also able to go backwards to the begining of the line.
Acoording to the setting of the restaurant we imagined (see picture above), all that the robot has to do is follow a striaght line, it should keep count of how many interesections have been crossed and from that conclude where the tables are.
For example : To get to table number 6, the robot will know that it has to do a left turn because that's where even-numbered tables are, it will also know that in order to get to table number 6, it should count until 3 intersections.
In order to make sure that the robot follows the line, we will put it under a control system with the help of the photosensors. If through the photosensos, we notice the robot turning a little bit too much to the left (or to the right), via the control-system-like code it will be adjusted to tilt a bit to the right (respectively, to the left) to get back on track. That is the major idea behind the code.
You can check this code in the git repository (link below) at Arduino/suiveur.ino
Setting a database for the restaurant and a restaurant simulator game
To realistically simulate a restaurant, we created three tables in the database: MENU, CLIENT and TABLES. The MENU table is used to store the number of dishes and the time required for each dish. The CLIENT table is used to store the dishes ordered by each guest. The TABLE table is usd to store the total waiting time required to all the dishes on each table.
The database is shown in the following figure:
When the user enters the table number and dish order in the user interface, the table number and ordering data of each table will be automatically stored in the database. And the waiting time of the corresponding dish will also be read from the database and appear on the user interface.
The following is a simple example of user operation:
At the same time, the instructions entered by the user are sent to the robot through the MQTT protocol, and the robot receives the necessary instructions and sends back confirmation to the server. Once all is set, the robot starts working on executing the received instructions.
The figure below shows the robot receiving messages via MQTT protocol：
Risks and limits of the project
For this project, we encountered a number of challenges.
The most important being:
● Energy consumption of the robot
● Speed of information transmission and processing
The following video shows an example of our working robot: