AM37 Cooperative Search Robots - National University of Singapore

Transcription

AM37 Cooperative Search Robots - National University of Singapore
AM37 Cooperative Search
Robots
Toh Kwang Chern
U006587E11
Department of Mechanical Engineering
National University of Singapore
Session 2003/2004
Summary
The subject of this thesis is to develop a cooperative strategy that can be
adopted when a team of robots is required to search a building of an
unknown layout. The layouts used in this thesis are based on the HDB flat
floor plans, obtained from http://www.hdb.gov.sg/.
For this project, there is a need to devise a cooperative strategy to solve
the problem. Hence, the idea of a cooperative strategy that utilises the sensor
readings obtained and wireless communications, was devised. This was
desired based on the literature survey as it is widely recommended. With the
strategy in mind, an interlinked code was developed where counters will
activate and deactivate linked elements. The coding process took about 4
months though there was still some refining to be done every now and then.
The strategy for each robot is slightly different, with one searching in a
clockwise direction, while the other searches in an anti-clockwise direction.
Based on the layouts obtained, a unique feature was developed in which the
robots would only search the living room once and call a function to readjust
its position once it re-enters the living room. Other functions used are door
search, room search and then light search. Cooperation would exist in terms
of communications as the task is being completed. The entire process will
then be repeated until all the targets are found. This was tested using a
simulation program available in the laboratory. The class of the robots
required and the algorithm was created in the simulation program. The tests
done with a 3-room layout showed the effectiveness of the strategy.
The next step would be to design the robots to test out the strategy. Using
sensors from the laboratory and redesigning the positions of the servos, two
robots, Cooper 1 and Cooper 2, were assembled. The special feature of
these robots is the ability to turn on the spot. For this case, the change in
i
direction is done in right angles. Another feature would be the octagonal layer
of sensors that will help to avoid obstacles and acquire targets. The wireless
communications of the iPAQs were utilised by adding codes to the program.
Fabrication and assembly of the robots took 2 months while testing was done
in the laboratory over a period of 3 months. The first phase is to manufacture
the chassis to house the different components of the robots. This was
followed by the calibration of the sensors and servos. The calibration of the
servos included the creation of the correction function for movement in a
straight path. Next, a sample layout was constructed with materials from the
laboratory. Then, trial runs with a single robot were carried out. Once the
results were consistent, the cooperative element was introduced along with
wireless communications. Potential problems were taken note of and
improvement made to the codes and robots. An example is the improvement
of the correction function to react within a shorter time. When the robots were
consistent, 10 experiments were carried to record the time taken by the single
search and cooperative search.
With the results obtained, it can be concluded that cooperative search does
make the task much more efficient. The time taken to complete the search
was reduced by as much as 50% in some cases. Each robot will cover areas
that the other robot might miss. Communications between the 2 robots is
crucial as information regarding the targets and rooms will be transmitted.
This thesis is structured as follows. There will be an introduction of the
information gathered from available literature. This is applied to the objective
of this project. The layouts are introduced along with the strategy adopted
and its implementation. The robots to be used are introduced next followed by
the experimental set up. The results of the experiments are shown and
analysed. This is rounded off by the conclusion of the project and the
recommendations to be made to improve this project.
ii
Acknowledgement
I would like to thank my supervisor, Associate Professor Gerard Leng for his
guidance throughout the project. He has provided me with invaluable advice
on which direction my project should take and what I should focus on. He has
made it a point to visit the students working in the laboratory and see if we
have any problems.
I would also like to thank my peers, Vincent, Hanyong, Stephen and Shing
Yenn for their insightful comments and help. They have provided a different
perspective for solving the problems I faced. They have also helped in
constructing the different prototypes of the robot and also the finalised robot.
Special mention should also be made for the Master’s students in the
laboratory. Their advice and guidance on how to use the hardware has
ensured that the project got off on a good start. The iPAQ interface made by
Chee Kong has also made the process of controlling the robots much more
user friendly.
Last but not least, the staff from the Dynamics Laboratory for providing the
technical support whenever I needed them.
iii
Table Of Contents
Summary
i
Acknowledgement
iii
Table Of Contents
iv
List Of Figures
vi
List Of Tables
viii
Introduction
1
Project Objectives
4
Chapter 1: Features of HDB Flats
5
1.1 Layout
1.2 Assumptions
Chapter 2: Design of Cooperation Search Strategy
7
2.1. Basic Strategy
2.2. Door Search
2.3. Room Search
2.4. Light Search
2.5. Repetitive Search
Chapter 3: Implementation of Algorithm
10
3.1. Door Search Function
3.2. Room Search Function
3.3. Light Search Function
3.4. Positioning Function
3.5. Simulation Program
18
Chapter 4: Cooper Robot
4.1 What is a Cooper Robot?
4.2 Specifications and Components
4.2.1 Physical Characteristics
4.2.2 Servos Position
4.2.3 Sonar and Light Sensors
4.2.4 Compass
4.2.5 Controller
4.2.6 Hewlett Packard iPAQ
Chapter 5: Experimental Set-up
23
5.1. The Layout
iv
5.2. Correction of Movement
5.3. Identification of Door, Wall and Target
5.4. Wireless Communications
Chapter 6: Experimental Results and Analysis
27
6.1. Single Robot Search
6.2. Cooperative Search
6.3. Analysis
Chapter 7: Conclusions and Recommendations
32
7.1. Conclusion
7.2. Recommendations
References
34
Appendix A – Components of the Robots
A1
Appendix B – Price of Each Robot
B1
Appendix C – Experimental Set-up
C1
v
List Of Figures
1.1
The 3 room layout from the website
1.2
The simplified layout to be used for testing
1.3
A second possible 3-room layout
1.4
A typical 4-room layout
2.1
The logic of the strategy
3.1
The start of the program
3.2
Cooper does a room search
3.3
Cooper 1 enters door search
3.4
Cooper 2 is activated
3.5
Cooper 2 does a room search while Cooper 1 does a door search
3.6
Cooper 2 enters door search while Cooper 1 undergoes position
3.7
Cooper 2 will approach the target once if acquires it. The same goes for Cooper 1
3.8
Cooper 1 starts the search for the simulation program
3.9
Cooper 1 enters the second room triggering Cooper 2 to start searching as well
3.10 Cooper 1 and 2 searching the environment
3.11 Cooper 1 continues on to the second room with the positioning function
3.12 Cooper 1 locates a target and waits for it to be removed
3.13 Cooper 2 locates a target as well and waits for its removal
4.1
The Cooper Robot
4.2
The positions of the HS311 servos
4.3
The SRF08 sonar sensors
4.4
The sensor positions
4.5
The CMPS03 compass
4.6
The Brainstem micro controller
4.7
The HP iPAQ
5.1
The mock layout in the laboratory
5.2
The code used for the correction of the robot’s movements
vi
5.3
The identification of a wall
5.4
The initialisation of the wireless LAN
6.1
Door located in a single robot search
6.2
Discovery of a target for single robot search
6.3
The 2 robots in action, Robot 2 has acquired a target.
6.4
Cooper 1 has found a target while Cooper 2 is searching for a door
A.1
The Brainstem GP 1.0 module
A.2
The CMPS03 compass
A.3
Dimensions of the CMPS03 compass
A.4
Beam pattern of the SRF08 sensor
A.5
Dimensions of the SRF08 sensor
A.6
The HS-311 servo
A.7
Dimensions of the MX-400 servo
C.1
The long board used to form the walls of the layout
C.2
The short board used to form the walls of the layout
C.3
Joints used to form the layout
C.4
The constructed layout
C.5
The set-up for measuring the speed of the robot
C.6
The set-up for measuring the distance required to detect doors
vii
List Of Tables
1
Single robot search results
2
Cooperative search results
3
Comparison of the timings obtained
A.1 Specifications of the CMPS03 compass
A.2 Specifications of the SRF08 sensor
A.3 Specifications of the HS-311 servo
viii
Introduction
Multi-robot teams are an area of interest of many researchers today.
However, some might ask why should we invest in research on multi-robot
teams when we can hardly build a reliable one? An answer for this is that we
can build more robust and reliable systems by combining possibly unreliable
but redundant components. [1]
Research has also been done for multi-robots systems for tasks too complex
for a single robot to accomplish. The performance benefit of having multirobots is another factor. Constructing and utilizing several simple robots can
be cheaper, more flexible and more fault tolerant than having a single
powerful robot for each separate task. The approach used in cooperative
mobile robots can also provide another viewpoint into fundamental problems
in the social and life sciences. [2]
According to Y. Uny Cao, cooperative behaviour is defined as follows: Given
some task specified by a designer, a multiple-robot system displays
cooperative behaviour if, due to some underlying mechanism, there is an
increase in the total utility of the system. This definition more or less applies
to research in the area of multi-robot systems.
Mobile robots must be able to navigate autonomously if they are to perform
useful tasks in unconstrained environments. Since these environments are
usually unknown, robots need to possess learning capabilities. Hence, there
is a need to have a set of safe and efficient elementary operations for
navigation. The robot is expected to reach based on the raw sensory data if
receives. This leads to the obstacle avoidance behaviour of the robot as it
navigates around the environment. [3]
Path planning is an important aspect of robotics research. It is part of the
motion planning process and without it; motions would have to be constantly
1
specified. However, motion planning is also a problematic area of robot
development. Robots fitted with sensors can perceive changes in their
environment but often cannot modify their motion to react to any unforeseen
changes they encounter. There are several areas of the motion-planning
problem. These include sensor errors and computer planning and control.
The latter is linked to the speed data is processed and the type of algorithms
used. [4]
One of the goals of motion planning is to develop robotic systems that enable
a robot to interact intelligently with the environment. Part of this involves
creating a real-time autonomous motion planner that is capable of planning its
own course without human intervention. [4]
Several strategies have been put forward by different researches. Some of
them are based on spatial-temporal distributions where the distributions are
known in advance. This is due to prior intelligence or through the use of
remote sensing. One method is to make decisions about the “Next Step” as
information is collected. This method is very much like how the great sailors
of the past navigated around the world. [5]
Another method is “Clustering by Discovery”. This method makes use of
landmarks present in the environment, which are detected by the sensors.
Hence, a virtual map is constructed as the environment is explored, based on
information given about the landmarks. Clusters are thus identified. Clustering
provides a new topology of the environment, which can be used for optimised
navigation. [5]
A third strategy discussed is the “Artificial Potential Field” method. For this
method, each obstacle exerts a repulsive force while the goal exerts an
attractive one. Used with a hierarchical cell decomposition technique, regions
are labelled as passable or impassable. As the robot moves in the
2
environment, the neighbouring regions are examined and the potential of a
passable region is computed. The best one is thus selected based on the
algorithm. This method insures that the robot will not move away from the
goal but instead, try to move around an obstacle. [5]
Based on the strategies studied, it would be best to adopt a strategy that
makes full use of the sensor readings taken from the environment. Thus, the
robot will interact with the environment and perform its task. The use of
additional robots will provide additional information about the environment
being explored.
3
Project Objectives
The objective of this project is to design, simulate & implement algorithms for
a team of robots to search a building layout for multiple targets. Modification &
redesign of a basic robotic platform is expected.
The aim is to make the task of searching for the targets easier and faster
through the use of multiple robots. Hence, the first part of the project
consisted of research on the different strategies adopted by researchers. This
was to be followed by a study of the layouts found locally and then coming up
with the strategy to solve the problem. Next to be developed, was the
programming concepts. Construction of the robots for testing of the programs
was to be started as well. Mock layouts had to be in place for testing, and
thus it was assembled with equipment from the laboratory. With the code and
hardware in place, testing of the algorithm in the laboratory had to be carried
done.
For the hardware test, the robots are expected to avoid obstacles such as
walls and locate doors. They are expected to be able to locate targets, which
in this case are light sources. They are also required to communicate among
themselves to determine whether the search is completed and to update each
other on the progress. Tests done with a single robot and two robots will be
carried out and the results obtained from the tests will be compared to see
which is the better method.
4
Chapter 1: Features of HDB Flats
1.1 Layout
In order to make this project more relevant to the local context, the
cooperative search strategy is based on local Housing Development Board
(HDB) flat floor plans. Information about the floor plans was obtained from the
HDB website.
Figure 1.2: The simplified layout to be
Figure 1.1: The 3-room layout from
used for testing
the website
Basically, the layout to be searched will consist of a main door through which
the robots will enter the environment. The first room encountered will be the
living room, where there will be doors leading to other rooms. These other
rooms are the bedrooms and kitchen, which will have only one door to enter
and exit from. This suggested layout represents most of the flat designs in
Singapore. The only difference is the number of rooms. Hence, other possible
layouts include other variations of 3-room flats, 4-room flats and 5-room flats.
5
Figure 1.3: A second
Figure 1.4: A typical 4-room layout
possible 3room layout
1.2 Assumptions
It is assumed that the layout to be searched consists of only one room with
multiple doors and the other rooms consist of only one door. This is an
assumption made based on the flat layout in Singapore. This particular room
is usually the living room.
A second assumption is that the rooms to be searched are uncluttered and
are square or rectangular in shape. There should not be another room within
a room, to be consistent with the HDB layouts being used.
A third assumption is that the target, once found, will be removed from the
environment. This is to simulate the removal of a target when located in real
situations.
6
Chapter 2: Design of Cooperation Search Strategy
2.1 Basic Strategy
Since the focus is on search, there is no need for the robots to cover every
inch of the environment. The targets chosen are light bulbs. Hence, the
targets can be sensed in every direction, as its light rays are unidirectional.
Thus, the search strategy will focus on covering the minimum distance
required in a room before proceeding to another room. This is achieved by
having cooperation between the robots.
Start
Enter Door
Yes
Door?
No
Continue
Target?
Yes
Approach
No
No
Room
searched?
Yes
No
In range?
Yes
Target Found
Completed?
No
Yes
End
Figure 2.1: The logic of the strategy
7
The logic of the strategy is illustrated in the flow chart on the previous page.
The strategy can be divided into 4 areas.
2.2 Door Search
The first task for the robots would be to search for the door to enter the flat.
Hence, the robots would have to search for the door once they are active.
The first robot, Cooper 1, will do a clockwise search for the main door while
Cooper 2 will do an anti-clockwise search. Since there is only one main door
to be located, Cooper 2 will wait for a signal from Cooper 1 before starting the
door search. This signal will be given once Cooper 1 finishes its task and
move on to its next part of the strategy. The main feature of this strategy
involves following the wall. The reason for this is because doors are located
along the walls, hence it will be less time consuming if the robot concentrates
on searching for the doors by following walls.
3.3 Room Search
The next task to be carried out is a search of the room. Basically, Cooper 1
and Cooper 2 will maintain their search directions, namely clockwise and anticlockwise respectively. The search will end when the robots have completed
a search in the forward, right, left and reverse directions in the room. If a
target is acquired, the robot will then proceed to the next part of the strategy.
The acquiring of a target indicates the presence of one in the room, but the
exact location is not known yet.
2.4 Light Search
If a target is acquired, the robot that senses the target will start to move
towards it. Once the robot is at a minimum distance away from the target, it
will stop and wait for the target to be removed. A message will also be sent
out to the other robots to indicate that a target has been found. This will
activate a counter and when the counter reaches the expected number of
8
targets, the search would be considered complete. Otherwise, it will proceed
with the search.
Once the target has been de-activated, the robot will then revert back to the
room search strategy. This is to eliminate the possibility of more than one
target in a room. Once the search is completed, the program will return to the
initial door search function.
2.5 Repetitive Search
Based on the assumption that the first room entered is the living room, there
is a need to make the search more efficient. The strategy adopted here is to
avoid the room search process for the living room. Instead of doing a room
search, the robot will instead do a positioning command after it enters the
living room for the second time. This positioning command will ensure that the
robots will not be stuck at places where they enter and exit the same door in
a particular location. The positioning command basically moves the robot
away from the door once it exits the room or kitchen. Once it is away from the
door, the door search function will be called. Hence, the possibility of robots
exiting a door and then re-entering it immediately, is eliminated.
It is not required to search the living room multiple times as both robots will do
a search of the room before exiting to other rooms. Hence, the possibility of
the robots missing out on a target in the living room by adopting this
cooperative strategy is eliminated as well.
9
Chapter 3: Implementation of Algorithm
Based on the strategy developed, a program was created in the C++
platform. The robots will have 3 main functions to operate with. The first
function is the Door Search, the second is the Room Search and the third is
the Light Search. The last function is only active when a target has been
sensed in the surroundings. One main feature of this coding is that the
conditions used for each loop or search criteria will activate or deactivate the
next element of the search process. All these flags are interlinked.
3.1 Door Search Function
This function consists of a series of nested while loops during which the robot
will search for a door. The direction taken would depend on whether the
program is for the first robot or the second robot. Sensor readings from those
mounted in the direction of travel and to the left and right of the direction of
travel, are processed to decide if a door has been located. The readings of
the sensors opposite to the direction of travel are ignored to prevent the robot
from moving back to the same location.
If a door has been found, the robot will enter the room and proceed on to the
Room Search function. In the event that there were some errors and the robot
could not find any door by the end of the first run, the function will run again
until a door is found. The location of a door will trigger a counter that will end
the while loop for the Door Search function. The same counter will activate
the Room Search Function.
3.2 Room Search Function
The Room Search function consists of a series of while loops as well. The
first step would be to do a frontal search. This search will end when the front
sensors are active. This is followed by either the right or left search. However,
if the front sensors are inactive again, the side search will stop and revert
back to the frontal search. This is to cater for obstacles that might be present
10
in the environment. The same steps are utilized for the other 3 directions of
the search
However, if a target is acquired, the robot will exit the Room Search function
and enter the Light function. The light intensity setting is lower for the
acquiring of target compared to the discovery of the actual position of the
target.
The trigger to end the Room Search function will activate the Light Search
Function or the Door Search function. This will depend on whether there are
any targets in the room. If there are no targets, the trigger will also reset all
the counters used previously.
3.3 Light Search Function
With the target acquired, the robot will then move towards the target till the
intensity of the light is at a certain defined value. The movement of the robot
depends very much on which sensor acquired the target.
When the target is located, the robot will send out a message to the other
robot that a target has been found. It will then enter a looped program,
printing a message on the iPAQ to indicate that a target has been found. This
loop will be exited once the target has been switched off. The next step will
be to return to the start of the program and search for a door. This step will
only occur if no more targets are acquired in the room.
The trigger to end the Light Search function will activate the Door Search
function. All other counters used by the program will reset when the Light
search has ended.
3.4 Positioning Function
11
After searching the living room, the robots will proceed on to the other rooms
in the environment. However, they will have to return to the living room in
order to head to the other rooms that are un-searched. Hence there is a need
to make the robots move away from the door it exits. This will prevent a logic
error in which a robot will not be able to leave a room.
The positioning function moves the robot, with the priority given to forward,
right, left then reverse. Whenever a sensor perpendicular to its direction of
motion is active, a trigger will exit the Positioning function. The program will
then return to the Room Search function.
This function will be active for every even room searched and if the total
rooms searched is greater than two. The function will activate once the robot
exits the room it has just searched.
The following figures will illustrate the cooperative search strategy.
Figure 3.1: The start of the program
Figure 3.2: Cooper does a room search
12
Figure 3.3: Cooper 1 enters door search
Figure 3.4: Cooper 2 is activated
Figure 3.5: Cooper 2 does a room
Figure 3.6: Cooper 2 enters door search
search while Cooper 1 does
while Cooper 1 undergoes
a door search
positioning
13
Figure 3.7: Cooper 2 will approach the target once if acquires it. The same goes for
Cooper 1. They will hold at their positions until the targets are removed
3.5 Simulation Program
The algorithm was simulated using a program created by a Master’s student
from the laboratory. A class of the robots to be used was created along with
the algorithm. The required conditions for the sensors were created as well.
The program was tested using a 3-room layout and the simulation showed
that the strategy developed would be able to complete the search task.
The figures will show how the simulation is carried out. The blue lines around
the robot, indicates the range of the sonar sensors. The lines will change its
position according to what the program requires. If the sonar sensors detect
an obstacle, it will become a light-blue cone. If the light sensors detect a
target, it will become a magenta cone.
14
Figure 3.8: Cooper 1 starts the search for the simulation program
Figure 3.9: Cooper 1 enters the second room, triggering Cooper 2 to start
searching as well
15
Figure 3.10: Cooper 1 and 2 searching the environment
Figure 3.11: Cooper 1 continues on to the second room with the
positioning function
16
Figure 3.12: Cooper 1 locates a target and waits for it to be removed
Figure 3.13: Cooper 2 locates a target as well and waits for its removal
17
Chapter 4: Cooper Robot
4.1
What is a Cooper Robot?
In order to facilitate the search, a robot was designed with new components
as well as components available in the laboratory. This robot is meant for
indoor use, as the experiments will be conducted inside the laboratory. The
capabilities of this robot include being able to change direction of movement
on the spot, having sonar sensors for obstacle avoidance, light sensors for
target recognition and a compass for bearing information. The robot is
controlled by a Brainstem micro-controller, which is in-turn connected to an
iPAQ. The entire robot is powered by 10 AA batteries, with 6 for the controller
and 4 for the servos.
Figure 4.1: The Cooper Robot
4.2
Specifications and Components
4.2.1 Physical Characteristics
The Cooper robot is 37cm tall and 22cm wide. The sonar sensors are
mounted in a layer 28.5cm above ground while the main chassis is 16cm
18
above ground. The overall weight of the robot is 1.78 kg. With the addition of
the 10 AA batteries required to power the robot, the weight of the robot is thus
increased to 2.059 kg. The robot moves at an average speed of about 5cm
per second.
4.2.2 Servos Position
2 MX-400 servos are used to move the robot around the environment. These
2 servos are mounted together in a casing. A HS-311 unmodified servo is
used to turn the casing of the movement servos. This is so that the robot can
turn and move around obstacles or carry out the search operation. A second
HS-311 unmodified is used to lift up the casing and the turning servo. This is
to prevent the wheels from being dragged on the ground when the movement
servos are being turned.
Figure 4.2: The positions of the HS311 servos
4.2.3 Sonar and Light Sensors
There are 8 sonar sensors used by the robot. Each sonar sensor is placed at
45 away from each other. This is to maximize the sensing capability of the
19
robot. The positioning of the sensors at 0, 90, 180, 270 are for obstacle
avoidance. The remaining 4 sensors are positioned in such a way to locate
door openings.
The sonar sensors used for the robots are the Devantech SRF08s. It has a
maximum range of 6m and a minimum range of 3 cm. It has a frequency of
40Hz and a weight of 0.4 oz. These sensors consist of light sensors as well.
These light sensors are used for locating the targets. The positioning of the
targets at 45 to each other is thus to increase the range of the robot and
acquire the target at the earliest possible time.
Figure 4.3: The SRF08 sonar and light sensors
20
Figure 4.4: The sensor positions
4.2.4 Compass
A Devantech CMPS03 compass is used to provide bearing information to the
robot so that it can adjust its position accordingly. The compass has a
resolution of 0.1 degrees and weighs 0.03 oz.
Figure 4.5: The CMPS03 compass
21
4.2.5 Controller
A Brainstem GP 1.0 module is used to control the robot. This module
supports 5 10-bin A/D inputs, 5 flexible Digital Outputs, a GP2D02 port, and 4
high-resolution servo outputs.
Figure 4.6: The Brainstem micro controller
4.2.6 Hewlett Packard iPAQ
The programs for the search are loaded on Hewlett Packard (HP) iPAQs.
These iPAQs are then connected to Brainstem controllers. The coding was
done using Microsoft’s embedded Visual C++. The HP iPAQ also has
wireless LAN capabilities. Hence, the robots will use the iPAQ to send and
receive messages. The iPAQ also provides the ability to play wave files if
sound is required.
Figure 4.7: The HP iPAQ
22
Chapter 5: Experimental Setup
5.1 The Layout
A mock layout of a HDB 3 room flat was constructed in the laboratory. Planks
and joints were obtained from the laboratory to set the layout. The layout was
constructed in such a way so that it will be kept very similar to the HDB floor
plan whenever possible.
Figure 5.1: The mock layout in the laboratory
5.2 Correction of movement
The robots designed use servos to move around the environment. Hence,
there is a high possibility that the robots might drift when moving in a straight
line. Hence, there is a need to correct the error when moving from one
location to another.
The error is corrected by utilizing a compass and a bearing correction
function. The compass will provide the initial bearing reading and the
subsequent bearings as the robot moves. These values are then passed into
23
the correction function. The left or right servo will then increase or decrease
its speed depending on whether an adjustment to the right or left is required.
Another important correction is when the initial bearing is less than 10
degrees or more than 350 degrees. There will be an error when the robot
turns pass 359 degrees as the reading will restart from 0 degrees.
The method adopted to solve this is to take the initial bearing reading and use
this as the guideline. If the initial bearing is less than 10 degrees, then the
subsequent readings taken will have to add 360 degrees. If the initial bearing
is more than 350 degrees, then the subsequent readings taken will have
minus 360 degrees. With this information about the changes in the bearing,
the robot can then adjust itself to move in a straight line.
void compasscheck(robotLink *pRL, int bearing, int bearing1, aErr *err)
{
if ( bearing1 > 3500 )
{
if ( bearing < 100 )
{
bearing += 3600;
}
}
if ( bearing1 < 100 )
{
if ( bearing > 3500 )
{
bearing -=3600;
}
}
}
Figure 5.2: The code used for the correction of the robot’s movements
5.3 Identification of Door, Wall and Target
After experimenting with the range of the sonar sensors, it is noted that there
is a certain range of sonar sensor readings that will optimize the performance
24
of the robot. Certain values must be set so that the robots will be able to
recognize objects in the environment based on its definition in the program.
For the identification of walls or obstacles, if a distance of 35mm or less is
detected, the sensor is considered to be active. For the identification of doors,
the 45-degree sensor readings have to be less than 45mm while the front
sensor must indicate a distance greater than that of the minimum distance of
35mm.
Also, since the width of the robot is 22cm, the doors must be about 30cm
wide. This will facilitate the robot’s entry into rooms.
Figure 5.3: The identification of a wall
As for the acquisition of a target, a light intensity reading of about 130 is
sufficient to differentiate a target from any ambient light sources. For a target
to be considered found, a light intensity of 210 must be recorded by any of
the sensors. The difference of about 80 between the 2 modes is sufficient for
the robots to switch between the Room Search and Light Search functions.
25
5.4 Wireless Communications
Communications between the robots is a crucial element for this project.
Hence, there is a need to ensure that communications is always active.
Messages are printed on the screen of the iPAQs to indicate a message has
been received. The actual message received is also printed to indicate the
status of the other robot in the environment.
Also, IP address for the different iPAQs used, have been assigned. This is to
identify the different robots, which are sending out messages. The IP address
of each robot is included in the program as well.
struct timeval tv;
tv.tv_sec = 1;
tv.tv_usec = 0;
int roboID = 18;
CWLANComms RobotComms(roboID, "0.0.0.0", 6000, 10, tv);
vector<int> msgContents;
RobotComms.Init();
Figure 5.4: The initialization of the wireless LAN
26
Chapter 6: Experimental Results And Analysis
6.1 Single Robot Search
Tests were conducted using a single robot. Two targets were used for the
tests. The robot managed to complete the search of the environment.
Figure 6.1: Door located in a single robot search
Figure 6.2: Discovery of a target for single robot search
27
Table 1: Single robot search results
Run number
Timing, seconds
1
124
2
117
3
130
4
110
5
132
The positions of the targets were varied for the 5 runs. However, the same
target set-up was used for the cooperative search. This is to ensure
consistency and make it easier to compare the results.
6.2 Cooperative Search
Tests were then conducted using two robots. The number of targets used
was kept the same and the two robots managed to complete the search
within a shorter time span.
Figure 6.2: The 2 robots in action. Cooper 2 has acquired a target
28
Figure 6.4: Cooper 1 has found a target while Cooper 2 is searching for a
door
Table 2: Cooperative search results
Run number
Timing, seconds
1
62
2
71
3
80
4
59
5
74
Additional tests were also conducted to see if the cooperative strategy could
be applied to different layouts. A second 3-room layout and a 4-room layout
were assembled for this purpose. The robots managed to complete the tasks
in the new environments as well.
29
6.3 Analysis
Table 3: Comparison of the timings obtained
Run
Single Search
Cooperative
Percentage
Number
Timing, seconds
Search Timing,
reduction in time
seconds
1
124
62
50.0
2
117
71
39.3
3
130
80
38.5
4
110
59
46.4
5
132
74
43.9
Based on the results given in Table 3, it can be seen that the time taken to
complete the search would be faster if cooperative search was employed.
The timesavings could possibly be 50% or less. The actual reduction in time
will depend on the target layout and the robots’ performance.
The completion of the search task in the additional layouts proved that the
strategy would work as long as there is a living room present. The number of
rooms accessible from the living room does not affect the cooperative
strategy.
Some problems were encountered in some runs for both experiments. One of
these problems is the presence of additional magnetic fields in the room. This
affected the performance of the robots in taking the correct bearings. Hence,
the search path taken by the robots were not as straight as intended. This will
in turn affect the robots’ ability to search for doors and targets. A solution
adopted would be to make the correction function more robust and react
faster to changes in the magnetic field or bearing.
30
Another problem encountered is the negative readings obtained by the sonar
sensors. The solution was to ignore all negative readings obtained.
Though the robots perform satisfactorily most of the time, there were times in
which doors were missed or there were sudden changes in the direction of
movement. These incidents occurred due to interference from external
sources. Another reason is because the iPAQ takes some time to process the
commands sent by the program and to return the readings from the sensors.
This delay actually makes the reaction of the robots slower than expected.
Programs were thus kept as small as possible and unnecessary lines in the
code were removed.
The SRF08 sensors also take some time to collect readings. This is more
evident for the light sensors. This was seen when two different programs
were run, with one utilizing the light function while the other program did not.
The program running the light function took a longer time to respond to
changes in the environment compared to the other program. Hence, for
sensors that were not required, they will not be activated. An example is that
when the robot is searching for doors, the light sensors will not be utilized, as
they are not required.
31
Chapter 7: Conclusions And Recommendations
7.1 Conclusion
The cooperative search strategy developed was successfully implemented for
this project. The layouts being studied were also implemented along with the
robots designed for the strategy. The correction function and the calibrations
done helped to improve the testing process. Experiments were conducted to
obtain results to show the effectiveness of the cooperative strategy.
Based on the results from the hardware tests, it can thus be seen that the use
of multiple robots does make the search of the environment much more
efficient. Though both the single search and cooperative search does
complete the task given, cooperative search completes the task within a
shorter time. Reduction in search time ranged from 38% to 50%. Cooperation
via communications is also an important element for multi-robot systems.
Without communications, cooperation would not be as effective as the robots
would not share information available.
The success achieved when deploying the robots in a second 3-room layout
and in a 4-room layout proved that the strategy would work as long as the
layout consist of a living room that leads to other rooms. The number of
rooms linked to the living room is not a factor.
The strategy adopted is thus effective. The robots will cover areas missed out
by its peer. This ensures the entire environment is searched.
Hence, the objectives of this project have been met.
7.2 Recommendations
Over the course of the project, the Brainstem controllers had to be replaced
quite a number of times. The reliability of the Brainstem deteriorates with time
32
as well. Also, the iPAQs used required servicing after a few months. It would
have been better if the iPAQ and controller can be incorporated together in a
single controller. This will require less maintaining and also reduce the overall
size of the robot.
More robots could also be introduced to make the search even faster.
However, better planning and coordination would be required to keep track of
the different robots in the environment. Also, with the numerous messages
sent out by each robot, there is a need for better and faster programs to
process the information.
The sonar sensors used by the robots were not accurate, giving negative
values on certain occasions. The readings obtained were also affected by the
incident angle of the sonar rays sent out and the reflected angle from the
obstacle or wall. Though there were corrections in place, such inaccuracies
can be avoided by utilizing laser sensors for measuring distances. A more
accurate representation of the distance measured can thus be obtained.
Another possible improvement would be to include a global positioning type
of system in the environment. More accurate information on the target, door
or room locations can thus be obtained and be passed to other robots in the
environment. This will help in making the search more efficient as the robots
will know which areas have been searched. Thus repetitions are avoided.
Another reason would be because HDB flats do not have the same layout all
over the country. New designs are constantly being developed.
33
References
1) Tucker Balch and Lynne E. Parker, A Taxonomy of Multirobot Systems,
Robot Teams – From Diversity to Polymorphism by AK Peters, 2002, 3 –
22.
2) Y.UNY Cao, Alex S. Fukunaga and Andrew B.Kahng, Cooperative Mobile
Robotics: Antecedents and Directions, Autonomous Robots by Kluwer
Academic Publishers, 1997, 1 – 23.
3) Katharina Morik, Michael Kaiser and Volker Klingspor, Learning
Algorithms, Making Robots Smarter – Combining Sensing and Action
through Robot Learning by Kluwer Academic Publishers, 1999, 26 – 38.
4) Mark A C Gill and Albert Y Zomaya, Path Planning, Obstacle Avoidance in
Multi-robot Systems by World Scientific Publishing, 1998, 30 – 51.
5) Erol Gelenbe, Nestor Schmajuk, John Staddon and John Reif,
Autonomous Search by Robots and Animals: A survey, Robotics and
Autonomous Systems 22 by Elsevier, 1997, 23 – 24.
6) Hugh F. Durrant-Whyte, Integration, Coordination and Control,
Coordination and Control of Multi-sensor Robot Systems by Kluwer
Academic Publishers, 1988, 141 – 179.
7) Deitel and Deitel, C: How to Program by Prentice Hall.
34
Appendix A – Components of the Robots
Brainstem GP 1.0
The Brainstem GP 1.0 module is for general-purpose use whether running
code stand-alone, tethered to a host computer, or enabling reflexive actions.
This module supports 5 10-bin A/D inputs, 5 flexible Digital Outputs, a
GP2D02 port, and 4 high-resolution servo outputs.
Figure A.1: The Brainstem GP 1.0 module
Some of the features of the module include:
•
40 MHz RISC processor
•
5 channel, 10 bit A/D
•
5 digital I/O lines
•
GP2D02 Driver
•
1 MBit IIC port
•
IIC routing
•
Status LED
35
•
Stores 11 1K TEA programs
•
Runs up to 4 TEA programs concurrently
•
RS-232 serial port
•
Reflex architecture
•
4 high-resolution servo outputs
•
Execution of 9000 instructions per second
•
Access to I/O features via built-in serial command set
•
Convenient power and ground connections for each I/O pin
The supported operating systems are:
•
Windows
•
MacOS X
•
PalmOS
•
WinCE
•
Linux
CMPS03 Compass
The compass uses the Philips KMZ51 magnetic field sensor, which is
sensitive enough to detect the Earth's magnetic field. Two of them mounted
at right angles to each other can be used to compute the direction of the
horizontal component of the Earth's magnetic field.
Voltage
5v
Current
20mA Typ.
Resolution 0.1 Degree
Accuracy
3-4 Degrees approx (after calibration)
Output 1
Timing Pulse 1mS to 37mS in 0.1mS increments
Output 2
I2C Interface, 0-255 and 0-3599
SCL Speed Up to 1MHz
Weight
Size
0.03 oz.
32mm x 35mm
Table A.1: Specifications of the CMPS03 compass
36
Figure A.2: The CMPS03 compass
Figure A.3: Dimensions of the CMPS03 compass
SRF08 Sonar Sensor
This great sonar ranger from Devantech offers a wide range from 3cm to 6m.
The SRF08 is interfaced using the IIC bus. There is an additional photocell
sensor on the front of this detector.
37
Voltage
5v
Current
15mA Typ. 3mA Standby
Frequency
40KHz
Maximum Range 6 m
Minimum Range
3 cm
Max Analogue Gain Variable to 1025 in 32 steps
Connection
Standard IIC Bus
Light Sensor
Front facing light sensor
Timing
Fully timed echo, freeing host computer of task
Echo
Multiple echo - keeps looking after first echo
Units
Range reported in use, mm or inches
Weight
0.4 oz.
Size
43mm w x 20mm d x 17mm h
Table A.2: Specifications of the SRF08 sensor
Figure A.4: Beam pattern of the SRF08 sensor
38
Figure A.5: Dimensions of the SRF08 sensor
HS-311 Servo
The HS-311 servo provides performance and reliability. It uses precise resin
gears and SMT circuitry. The servo holds at the selected position.
Motor Type
3 Pole Ferrite
Bearing Type Nylon Bushing
Torque 4.8/6.0v 42 / 51 oz 3.0 / 3.7 kg.
Speed 4.8/6.0v 0.19 / 0.15 second
Size
1.6"x0.8"x 1.4" 41 x 20 x 37mm
Weight
1.7 oz. 48.5 g.
Table A.3: Specifications of the HS-311 servo
39
Figure A.6: The HS-311 servo
MX-400 Servo
This servo comes with mounting hardware, 6 servo arms, and rubber
mounting grommets. This servo has a Futaba connector which mates directly
with a 0.1" 3-pin header.
The specifications of the MX-400 include:
•
. 0.15 second speed through 60° revolution
•
Great price for legged robots or starter robot drive motors
•
Compatible with any system using 1500 usec. Neutral
•
Strong 44 oz-in operation at 4.8V
•
Weighs only 1.66 oz
40
Figure A.7: Dimensions of the MX-400 servo
41
Appendix B – Cost of Each Robot
Part No
Component description
Quantity Cost/part
1
Sonar Sensor (SRF08)
8
$85.00
2
Servo Motor (HS-311)
2
$18.00
3
Servo Motor (MX-400 from Lab)
2
$0.00
3
Ball Caster
4
$4.00
4
Acrylic Sheet
1
$16.00
5
Electronic Compass (CMPS03 from Lab)(cost $85)
1
$0.00
6
Brainstem (from Lab)(cost $133)
1
$0.00
7
Spacer
130
$0.25
8
Rubber tires (1 pair)
1
$8.00
9
Horns
2
$2.80
10 Screws (packed with tires and spacer)
69
$0.00
11 Nuts (packed with tires and spacer)
42
$0.00
12 Accessories
1
$15.00
13 Rechargeable Batteries (10 pcs)
1
$60.00
Total
42
Amount
$680.00
$36.00
$0.00
$16.00
$16.00
$0.00
$0.00
$32.50
$8.00
$5.60
$0.00
$0.00
$15.00
$60.00
$869.10
Appendix C – Experimental Setup
The pictures shown here are the equipment used to construct the layout
required for the hardware tests. A variety of long and short boards were
joined together with T, L and Straight joints available in the laboratory. The
distances of the doors were measured in an experiment with the sonar
sensors. The speed of the robot was determined by using a rule to measure
the amount of time required to move 1 metre.
Figure C.1: The long board used to form the walls of the layout
43
Figure C.2: The short board used to form the walls of the layout
Figure C.3: Joints used to form the layout
44
Figure C.4: The constructed layout
45
Figure C.5: The set-up for measuring the speed of the robot
Figure C.6: The set-up for measuring the distance required to detect doors
46