• No results found

Collective Decision-making and Surface-Color Identification

N/A
N/A
Protected

Academic year: 2021

Share "Collective Decision-making and Surface-Color Identification"

Copied!
128
0
0

Loading.... (view fulltext now)

Full text

(1)

M A S T E R ' S T H E S I S

Collaborative Actuation in Micro-Robotic Swarm

Collective Decision-making and Surface-Color Identification

Glenn Zetterström

Luleå University of Technology MSc Programmes in Engineering

Electrical Engineering

Department of Computer Science and Electrical Engineering Division of Robotics and Automation

2007:026 CIV - ISSN: 1402-1617 - ISRN: LTU-EX--07/026--SE

(2)

Collaborative actuation in micro-robotic swarm;

collective decision making and surface-color identification

Glenn Zetterström

(3)

Living organisms fascinate by their ability to use available physical, chemical or optical systems for ensure their survival in environment. Social insects use chemical perception system not only for sensing, but also advanced it for communication purposes. The leaved pheromone enable ants to find the shortest distance between a food source and the colony, to coordinate insect activities or to elaborate behavioral strategies. In order to mimic this capability in robotic systems, robots have to be equipped with the sensor and actuator systems as well as possess corresponding behavioral algorithms.

The presented work is inspired by the capability of social insects to com- municate through physical pheromone. Instead of spreading chemical sub- stances, robots can leave, recognize and follow a colored ink trail. The topic of this thesis is a optoelectronic sensor system, capable of reliable recogniz- ing colored trails and colored objects. Using the developed optoelectronic solution, four behavioral algorithms (say, finding and following a colored line) are developed and tested in real-time experiments. The experiments are based on three different scenarios (say, searching for a food source). The outcome of the experiments, done in a swarm of micro-robots Jasmine, prove the chosen solution are successful.

Keywords: Swarm-robotics, Micro-robots, Color recognition, Self-organization, collective actions, Decentralization

1

(4)

The work in this thesis was performed at the Institute of Parallel and Dis- tributed Systems (IPVS), University of Stuttgart, Germany. One of their projects deal with micro robotic swarms, were the present robot, the Jas- mine III, should get similar abilities to detect the environment as the insects have. This was in order to use and investigate the concept of decentralization and self-organization seen in insect swarms such as the ants or the wasps.

A useful trait is the ability to distinguish different colors which then can be implemented in different scenarios.

With this thesis, performed between the 1st of June and the 1st of De- cember 2007, I end my long journey that started the autumn 2000 in Luleå in the north of Sweden. This journey has brought me to Australia and Ice- land and finally to Universität Stuttgart. Under those years i have gathered plenty of different experiences, that will help me on my way towards the unknown life after the thesis, and met lots of interesting people that have left marks on me as a person, you all know who you are.

I would like to thank my supervisors Olga and Sergey Kornienko from the Institute of Parallel and Distributed Systems (IPVS). Furthermore, I would like to thank Åke Wernersson, my professor in Robotics, for opening my eyes for this field.

I also like to thank my family for their support during this work, without

you I would not have manage to finish.

(5)

1 Introduction 7

1.1 Swarmrobotics . . . . 7

1.2 Color Related Scenarios . . . . 9

1.2.1 Scenario I . . . . 10

1.2.2 Scenario II . . . . 11

1.2.3 Scenario III . . . . 12

1.3 State of the Art of Color Sensors in Micro Robots . . . . 13

1.3.1 EM the M&M T M Sorting Robot Made by Vinh Trinh 13 1.3.2 M&M Bot . . . . 15

1.3.3 M Sorter Kit From Parallax Inc. . . . 16

1.4 Goal of the Thesis . . . . 18

1.5 Thesis Structure . . . . 18

2 The Robot: Jasmine 3 20 2.1 Analysis of the Jasmine III Robot . . . . 20

2.2 Mainboard . . . . 22

2.2.1 IR-Sensors . . . . 22

2.2.2 Beamer Sensor . . . . 24

2.3 Power Management . . . . 25

2.4 Motorboard . . . . 25

2.5 Communication Between the Boards . . . . 27

2.6 Robot Chassis . . . . 27

2.7 Motors . . . . 27

2.8 Other extension boards . . . . 27

3 Collective Behavior 29 3.1 Agents . . . . 29

3.2 Cooperative Decision Making . . . . 30

3.3 Collective Decision Making . . . . 31

3.4 Pheromone Approach . . . . 34

3

(6)

3.4.1 Physical Pheromone . . . . 35

3.4.2 Virtual Pheromone . . . . 36

3.4.3 Combined Pheromone . . . . 36

4 Basics of the Color Theory 37 4.1 Basic Principle of Light and Color . . . . 37

4.1.1 Reflected Light . . . . 40

4.1.2 Bidirectional Reflectance Distribution Function, BRDF 42 4.2 Color Description . . . . 44

4.2.1 RGB Color Space . . . . 45

4.2.2 HSL Color Space . . . . 45

4.3 Color Transformation . . . . 48

5 Color Sensor Board 51 5.1 Different Possible Solutions . . . . 51

5.2 Four Separated Diodes . . . . 53

5.3 Integrated Color Sensor Combined with a White LED . . . . 54

5.3.1 Color Sensor TCS230 from TOAS . . . . 55

5.3.2 The White Diode . . . . 57

5.3.3 The Sensor Board . . . . 58

5.4 Experimental Part of the Color Sensor . . . . 60

5.4.1 Forward Placed Sensor . . . . 63

5.4.2 Downward Placed Sensor . . . . 69

5.4.3 Test with the Downward Placed Sensor on a Moving Robot . . . . 73

5.5 Program Code for the Color Sensor . . . . 73

5.6 Conclusion on the Color Sensor . . . . 77

6 Experimental Results 79 6.1 Robot Roles in the Experiments . . . . 79

6.1.1 Pheromone-dropper . . . . 79

6.1.2 Pheromone-finder . . . . 80

6.1.3 Follower . . . . 83

6.2 Experiment 1: Detecting and Moving Colored Objects . . . . 84

6.3 Experiment 2: Initialized Pheromone Test . . . . 94

6.4 Experiment 3: Color as Pheromone Based Approach . . . . . 98

6.5 Conclusions of the Experiments . . . 107

6.5.1 Experiment I . . . 107

6.5.2 Experiment II . . . 108

6.5.3 Experiment III . . . 108

(7)

7 Conclusion 111 7.1 Future Work . . . 113 Bibliography . . . 114

Appendices 118

A Measurements From the Forward-looking TCS230 118

B Beamer and Proximity ADC-Values 125

(8)

1 The EM color detecting algorithm. . . . 15 2 Transformation algorithm from RGB to HSL given in the

Color Classification with the TCS230 brochure. . . . 49 3 Transformation algorithm from HSL to RGB. . . . 50 4 Test algorithm for trying the effect of ambient light under

execution . . . . 73 5 Algorithm for the forward-looking color sensor . . . . 76 6 Algorithm for the down-looking color sensor . . . . 77

6

(9)

Introduction

Before the thesis was started there was a vision that the robots or at least some of them should be able to detect colors. In their environment there was a assumption that there were no glowing objects or any objects that send out light beams parallel to the ground. The robots should also detect the colors under various light conditions and at a not too narrow range, so that it worked more like the vision of other living creatures. This color detection should be done with the help of the light reflected from the objects, as will be shown in Chapter 4.1. Two tasks were desired which meant that two different variants needed to be developed, one for detecting colors on the standing objects and one for detecting colors on the ground. This ability to detect colors can be used to mimic abilities that the insects have like leaving and detecting pheromone or finding food sources in the environment.

To equip a robot with the ability to detect color is not a new idea, but if more robots have this ability and they can transfer the information between them and to other members that lack this ability. The robots forming the swarm will use all the information that each single unit is contributing, -this might be light conditions, pressure, distance to the hive or the food source and distribute this information among its members. When all participating members have the accurate knowledge, a decision will be made based on the available data.

1.1 Swarmrobotics

In the field of swarm robotics, as for example [32] or [33], the robots are inspired by the social insects such as bees or ants. Those insects have de- veloped an incredible specialization in solving tasks as a swarm, rather then other creatures which do this on individual basis. The behavior of those

7

(10)

insects is decentralized and self-organized.

Definition of: decentralize from [13]:

1. To distribute the administrative functions or powers of a central au- thority among several local authorities.

2. • To bring about the redistribution of (an urban population and industry) to suburban areas.

• To cause to withdraw or disperse from a center of concentration:

decentralize a university complex; decentralize a museum.

v.intr.

To undergo redistribution or dispersal away from a central location or au- thority.

Definition of: Self-organization from [13]:

"Self-organization is a process in which the internal organization of a system, normally an open system, increases in complexity without being guided or managed by an outside source. Self-organizing systems typically (though not always) display emergent properties."

Self-organization usually relies on four basic ingredients:

1. Positive feedback 2. Negative feedback

3. Balance of exploitation and exploration 4. Multiple interactions

In a centralized organization like the typical structure of a company there are top units controlling other units bellow them and those units are con- trolling other units and so it goes on until the bottom layer. Questions or information goes from the lower levels up in the hierarchy to the level that has the right to make a decision. This means that it often goes all way to the top. As soon as a decision is made, the action ordered goes the whole way back to the level that asked for a decision and there it is being performed.

The main drawback of this organizational structure is that the information flows through levels which do not have the right to make decisions, but they still need to forward the information to the higher level.

Micro robots usually have more limited memory, actuation and percep-

tion abilities compared to other types of robots. This is due to their small

(11)

size which puts harder restraints on what components can be used. It is often a matter of priority. For bigger robots that can be equipped with a personal computer or a notebook, they are able to perform much more impressive actions with the calculative power of a computer. The bigger robots have a broader selection of how they should be constructed. Micro robots usually have a microcontroller as the controlling device with limited memory and performance. From the viewpoint of how insects are organizing themselves, this makes the self-organizational structure interesting to use.

If one looks at cockroaches they are light sensitive and when enough bright light is in their environment they intend to run away. Insects tends to cluster in groups when the outer causes are changing. How is this collabora- tive actuation performed and what matters are needed to take in account?

This will be discussed in Chapter 3.

1.2 Color Related Scenarios

In what situations can the color sensing ability be useful? The insects have

different tools for receiving information about the environment, like light

conditions, pressure or various types of pheromone. The color sensing ability

can be used to simulate some of those abilities, like pheromone for guiding

other members or letting some desired objects have a certain color. Three

possible scenarios for the use of an ability to detect colors will be described

next.

(12)

1.2.1 Scenario I

In this scenario the swarm needs to search and detect some special objects of certain colors, this might be a food source or some material needed within the hive, see Figure 1.1. The objects are located somewhere in the environ- ment. The swarm needs to find those objects. When that is done the swarm needs to determine how many individuals are needed for moving the objects depending on their shape, form and weight. The swarm will then allocate members to move the objects with the guidance of the other swarm mem- bers. They have to transfer information between the participating members, because not all of them have the ability to judge the color of the object.

All of them can detect that it is an object and where it is. The experiment

Figure 1.1: The micro robotic swarm in finding different colored objects.

derived from this scenario is for a group of robots to find a special colored

object. As soon as this is found it has to be moved to a certain point within

the experimental field. They should collectively judge how many robots are

needed for this task. This will be examined in Chapter 6.2

(13)

1.2.2 Scenario II

This scenario is inspired by the pheromone which is used by insects such as the ants, see Figure 1.2. Pheromone will be discussed in Chapter 3.4.

When the individuals move around in the environment they leave a trail of pheromone behind them in order to inform the other members what path they have taken. Different members will leave a different pheromone trail so that the individuals coming after them will know which task it was to do. At this stage the pheromone trail is already formed by other members.

Depending on the needs of the swarm the different paths will have different priorities. Some of the members lack the ability to detect the pheromone consequently this information needs to be spread within the swarm.

Figure 1.2: Robots guiding each other to follow pheromone trails.

The experiment related to this scenario is: a robot with the ability to de-

tect colors on the ground shall follow a colored trail. This robot should trans-

fer the information about where the path is to another robot and thereby

guide it to follow the colored track. This will be investigated in Chapter 6.3.

(14)

1.2.3 Scenario III

The third scenario will use the same prerequisites as in scenario 2, but now there are some individuals that are leaving a pheromone trail as they are moving, see Figure 1.3. This will guide the individuals in the surrounding area to follow the individual that is leaving the track. The swarm members have different ways for communicating, not all of the members react to the same stimuli. This means that members noticing the pheromone trail need to leave some other marks or spread information about the trail to other swarm members that do not react to the same stimuli. The swarm will make sure that the members detecting the trail will guide members that do normally not respond to this form of information.

Figure 1.3: Robots solving different pheromone based tasks.

The boarders for the experiment based on this scenario is that the color

drawing robot will leave a trail of one color. Two robots will be equipped

with this ability to draw a colored line as they move, one will leave a red

colored track on the surface while the other will leave a green track. The

robot with the color sensing ability will follow one color at a time. It shall

also be tested if it is possible to ignore the other track when they cross.

(15)

1.3 State of the Art of Color Sensors in Micro Robots

There are different solutions for equipping robots with the ability to detect colors. For small robots and micro robots the tasks are more restricted, in most cases it is for judging and separating the chocolate sweets so called

"M&M’s" according to their colors. The common criteria is to keep the R

distance between the color sensing part and the object constant. The idea behind this color identification is applicable to other tasks as well. The available solutions can be summarized into two main theories:

1. The robots that are using colored diodes to illuminate the object and measure the reflected light with the help of a single photodiode, as the M&M bot

2. Those that let one white diode illuminating the object and then use three photodiodes that are specified for detecting certain wave length ranges, as the M sorter.

1.3.1 EM the M&M T M Sorting Robot Made by Vinh Trinh This M&M sorting robot has a length of 9,5 inch, width of 7,5 inch and a height of 8 inch, this makes it a rather big robot compared with the micro robot Jasmine.

Figure 1.4: EM The M&M T M Sorting Robot.

[36]

It moves around in the environment and has the ability to avoid the edges.

When M&M’s are found in the environment it will be from the front of the

(16)

robot. Those are funneled towards a light beam located on the end of the sorting arm. This light beam is transmitted from a IR-LED to a photodiode on the other side of the structure. As soon as the light beam is broken the sorting arm turns to a position of 90 degree. The M&M then travels to the color sensing part of the robot which is consisting of one CdS Cell (Cadmium Sulfide cells) for measuring the reflected light intensity, a 47k Ohm Resistor and four LEDs, one each of; ultra bright blue, ultra bright green, ultra bright yellow, and ultra bright white. Since the sensing part is placed inside the sorting arm, the effect of the ambient light is minimal.

The sorting arm together with the color sensing part, that is placed on the middle of Figure 1.5.

Figure 1.5: The sorting arm of the EM M&M sorting robot.

[36]

After the sample has come to the color sensing part, one LED is turned on at each time and the measurement is stored. The first LED that is turned on is the green diode, then the white, the blue and the last one is the red diode. The algorithm for investigating which of the 6 colors the M&M has, is based on simple mathematics addition and subtraction, see Figure 1 for the code.

This algorithm has a rate of success close to 100% which is an acceptable

rate. After the color has been decided the sorting arm is turned to have the

right container out of six, one for each of the M&M colors yellow, red, blue,

green, brown and orange; behind the sorting arm. Then turns to the angle

of 180 degree seen from the floor.

(17)

Algorithm 1 The EM color detecting algorithm.

[36]

1.3.2 M&M Bot

This M&M bot uses three colored diodes facing the ground underneath the

robot. This position limits the direct interference from the ambient light. For

the color detection it uses one red, one green and one blue diode to illuminate

the object. It is getting three measurements that later on is processed with

the help of the reflected light. Then it moves the M&M to the edge of

the surface where the robot is standing and shoots them of the surface. in

Figure 1.6 one can see the reflection of three green diodes. Unfortunately,

there is no technical data available for this M&M bot, except the name of

the 10 second long video clip with it performing a sorting task. The video

clip was a good source for inspiration.

(18)

Figure 1.6: The unnamed m&m bot that served as a source of inspiration.

1.3.3 M Sorter Kit From Parallax Inc.

Parallax Inc. [25] produced a m&m sorter that uses a TCS230 color sensor from TOAS. For details of this sensor see Chapter 5.3.1. This kit consists of a rotor with a servo that is moving the sweets, eight small tubes placed under the baseboard, one bigger feed tube for the unsorted M&M sweets and a TCS230 color sensor evaluation kit that is a TCS230 color sensor, two white LEDs for illuminating the sample and a collimator lens.

Figure 1.7: The m&m sorter from parallax inc.

[25]

The eight tubes are placed with an angle of 15 degrees between each of

them. The M sorter is controlled with a microcontroller. The color sensing

(19)

part, consisting of two diodes placed on opposite sides of the collimator lens, is placed on top of the baseboard, see Figure 1.8. This means that the light will fall on the sample from above and that the direct influence of the background light on the sample and there by to the sensor is be minimized.

The color detecting process starts with one M&M being dropped down from the feed tube to the rotor. The rotor moves the sweet to the color sensing part. Then the microcontroller activates the LEDs and the light is emitted to the sample and from the surface it is reflected upwards through the collimator lens which is focusing the light beam to the TCS230 color sensor. The microcontroller controls the changing between the four, red, green, blue or the clear filters that are currently in use. With the help of the three RGB-values the color of the sample can be detected. The measured values are compared with some values predefined for the different colors.

After the color has been decided the rotor moves the sample to the right tube and as it goes backwards the sample slides down in that container.

Figure 1.8: Sketch of the color sensor board from below . [25]

Before the M&M sorter can start sorting the M&Ms it needs to be white calibrated. This is necessary, because the different color sensitivities of each of the red, green and blue filters. In the program as it is described, the micro- controller takes only one measurement for each of the filters,and determines the color of the sample with an accuracy of 90%.

One possibility of increasing the accuracy would be to take more mea-

(20)

surements and take the median or average values. However, the RGB-values of the sample depends on the intensity of the reflected light which also de- pends on the placement of the sample, that means that the values vary even if two samples have the same color. The variance of the RGB-values is 5 units.

1.4 Goal of the Thesis

Parts of the goal with this thesis is to develop color sensing abilities for the Jasmine III robots. It is important for detecting colored surfaces that objects are standing in the environment as well colors on the ground. It would be handy if there was a solution that could be used for both tasks so that just one hardware needs to be developed as this will save time reduce the costs and if something gets broken it will be easier to arrange spare components.

The following need to be taken in account:

• What is effecting the color?

• How can those causes be controlled in order to minimize the unwanted influences?

• What solutions are available?

• How can those solutions be implemented or can they serve as motiva- tion for some other solutions?

• The solution should not decrease the current characteristics of the robot.

The other part is to implement and make this solution efficient so that it can be used to increase the capacity of the swarm, in a collective decision making where the outcome will direct the actuation of the each of participat- ing members. As mentioned earlier those two parts were described in three scenarios and from those scenarios three experimental tasks were made.

1.5 Thesis Structure

The remainder of this thesis is organized as follows. Chapter 2 introduces

the hardware platform, the Jasmine III micro robot and focuses on its limi-

tations and abilities. Chapter 3 is introducing the agent concept and later on

the needs of the collective behavior and how the individuals can distribute

the information between them. A description of what pheromone is and

(21)

what usages it has will also be described. Chapter 4 explains the necessary

definitions used in this thesis of ’light’, especially ’reflected light’. Some the-

ories about light and color perception will be introduced. In Chapter 5 the

possible approaches to the color sensor board is explained as well as some

experimental results concerning the chosen solution. In Chapter 6 the three

experiments are described and handled. In the end of this chapter the results

of the experiment will be discussed as well as improvements on the sensor or

the program. And finally, in Chapter 7, the work will be summarized and

concluded. Potential further works will be briefly discussed.

(22)

The Robot: Jasmine 3

"This survival of the fittest, which I have here sought to express in mechanical terms, is that which Mr. Darwin has called ’natural selection’, or the preservation of favoured races in the struggle for life."

[31]

Herbert Spencer, 1820-1903 English Philosopher In this chapter the present Jasmine III robot will be scrutinized. First the differences compared to the preceptor will be on focus, then the components that it is consisting of as well as their performances. A short presentation on which other special boards exist and are on the planing stage for the Jasmine III robot.

2.1 Analysis of the Jasmine III Robot

The swarm robot project came to life as an offspring from the I-swarm project [14].

On the recent version of the Jasmine robot, the Jasmine III [15], [32], the robot uses its own control board. This construction allows putting all sensors and a microcontroller into one PCB. Moreover, the following improvements were done from the precursor:

1. Increased program memory.

2. The number of wires that needed to be soldered was decreased.

20

(23)

Figure 2.1: An old version of the Jasmine III robot.

3. The supply voltage for the robot was reduced to 4,2 V.

4. The cost and the complexity of assembling allowed for the robot was decreased.

5. A few standard solution allowing simple extension of the robot was made.

1. Jasmine I and II used an ATMEL88 which has 8kb of total memory.

The BIOS used about 4k memory for all functionalities, that is hardware setup, simplest "operational system", navigation, collision avoiding, com- munication, sensing and simplest perception. 1k memory is reserved for the BOOTLOADER and 2k memory for the user-defined code. If not all the BIOS functionalities are required, part of them can be removed, so that at most about 3k is available for user-defined code.

However 2-3kb correspond to approximately 100-200 code-lines in C code, when this is written efficiently. Since there is no simple way to increase the memory additionally, the solution was to use ATMEL168 with 16k. It has the same package.

2. Assembling of SBII requires soldering of at least 16 wires in the size of 23 x 23mm. The wires come from the top-side, but need to be soldered on the bottom-side.

3. The H-Bridges of Megabitty [6] provide the whole supply voltage (7,2

(24)

volt given by two batteries) to the DC motors. As a result the motors get hot and the inductive resistance decreases. This can cause the H-bridge to burn. The microcontroller can work with a power supply of 3 volt, and with an internal oscillator on 8MHz.

Due to the lower power consumption only one battery needs to be used, which also reduces the hight of the robot.

4. Additional control boards are relatively expensive and this increases the cost of the robot, but when all components are put together on one board, the cost will be reduced.

The ATMEL168 was put on the top of the sensor board, and the H- bridge was placed on the extension board, the motorboard. Between those two boards only five wires are needed for the power and communication see TWI. This reduced the height of the robot with 10mm from around 30 mm, for Jasmine II, down to 20mm. This modification with just two boards reduces the cost and complexity of assembling.

2.2 Mainboard

A ATMEL ATMega168 microcontroller, 6 IR-Sensors, used for communica- tion and distance detection, one beamer sensor, used for distance measure- ment, and three LEDs with the colors red, green and blue are placed on this board. Figure 2.2 shows a top view of the mainboard.

2.2.1 IR-Sensors

The Jasmine III robots are using the same IR-transmitters, TSKS5400-FSZ IR-diodes from Vishay, and IR-receivers, TEFT4300 phototransistor from Vishay, that was developed under the second Jasmine prototype. The six diodes are shown in Figure 2.2. The data sheets can be found on [37], [38].

The IR-system is used for both communication between the robots and en- vironment detection. When used for environmental detection it is receiving a signal retransmitted from the object and transfer the ADC-value to a cor- responding distance. If the task is communication between the robots, there can be three cases:

Here are the description of each of the three possible situations:

1. Bi-directional communication, where both of the participants can send

and receive messages.

(25)

Figure 2.2: Main board of the Jasmine III robot.

[32]

Figure 2.3: Picture of the three communication possibilities.

[32]

2. One-directional communication, that is when one of the robots can receive data, but the receiving robot can not answer back.

3. No communication is possible. In this case there is no overleaping between the two robots communication zones

The maximum distance over which the robots can communicate is gen-

(26)

Figure 2.4: ADC values with corresponding distance for the IR-sensor.

[28]

erally around 250 mm, but not all ranges within this distance are covered, when the robots stand to close to each other, that is bellow 25 mm, it is not possible to communicate messages.

The proximity value differs depending on the distance. Figure 2.4 shows the ADC-value that responds to a certain distance to a white wall. The values in tabular form are given in Appendix B. This value goes from 0 to 255 where 255 is the maximum, meaning that everything is send back. Worth noting is that even at close distance the maximum value will not go above 240 and that the distance accuracy is decreasing rapidly with the increasing distance.

The ADC-value is achieved with calling the Readdistance() function in the JasmineBasicV4 file.

2.2.2 Beamer Sensor

The Jasmine robot is also equipped with a beamer sensor, TSAL6100 from Vishay, facing directly forward. See [37] for the data sheet. The ADC-value for the beamer sensor has a slower rate of decrease than the IR-sensors. This is shown in Figure 2.5, for the ADC-values in tabular form see Appendix B.

The beamer sensor is also called with the Readdistance() function in the

JasmineBasicV3 file.

(27)

Figure 2.5: ADC values with corresponding distance for the beamer sensor.

[28]

2.3 Power Management

The Jasmine III robot uses 4,2 v LiPoly battery. This battery is placed between the main board and the motorboard. It has a recharge management circuitry. That is a single layer board connected directly to the battery. The circuit has a low resistance PCB resistor that works like a fuse and therefore will go off when it get short circuited, leaving the battery unharmed. For supplying the microcontroller a regulated voltage of 3 is used. On each side of the robot chassis there is a metal connector pin that is separated from the chassis with a piece of plastic, see Figure 2.8. On the right side is the positive connection and on the left is the negative. They are located on different heights, the right one is located higher than the left one, this makes the docking station more efficient. The LiPoly cell regulated with a controlling chip can be safely charged with a simple 5V input, or the docking station developed by Afshin Attarzadeh [1] and Kristof Jebens [17].

2.4 Motorboard

On this board there is an ATMEL ATMega88 microcontroller [3] with 8kb

memory that controls the movement of the robot with the help of an odo-

metrical system. For each of the two motors there is a low range IR-sensor

(28)

Figure 2.6: Battery pack.

[32]

measuring the turning of the wheels. On this board there is also an IR- based low-range touch sensor on the front of the robot and 4 free in-/output ports that can be configured for the desired functionality of the robot, as for this thesis, a color sensing board. For the motorboard program code see Appendix ??.

Figure 2.7: The motorboard of the Jasmine III robot.

[1]

(29)

2.5 Communication Between the Boards

The communication between the robot’s mainboard, with its ATMEL168, and the motorboard, with its ATMEL88 microcontroller, is done with a TWI, 2-wire serial interface. This communication interface has to be at least 16 times slower then the microprocessors. The following mathematical formula is used to calculate the 2-wire serial Interface Clock frequency, SCL frequency:

SCL frequency = CP U clockf requency

(16+2∗T W BR)∗(Prescaler value) []

• TWBR = value of the TWI Bit Rate Register.

• Prescaler value = value of the prescaler see table 8 on page 207 in ATmega48-15AZ used for Atmel48, 88 and 168.

At the moment a TWBR value of 11 is used and a prescaler value of 1, this gives the SCL frequency of 21 052 Hz (8 000 000/(16+2*11)).

This, however, is the theoretical value. In reality one has to take in calcula- tion that it will differ.

2.6 Robot Chassis

The robots chassis is made of aluminium and has the bottom dimensions of 26 x 26 mm and the highest point is 26 mm, but this varies between each individual robot. Placed on this chassis is, besides the recharging connectors, the two wheels and the motors controlling the velocity and direction. This chassis is seen in Figure 2.8.

2.7 Motors

The moving is done by two GM15 motors from Solarbotics [30]. They need 3 volts, and are using 100mA for 1200RPM. The direction and how fast the motors should turn is controlled by the motorboard, with the help of the H-bridge.

2.8 Other extension boards

The information given above is valid for all Jasmine III robots, but there

are some specific boards that a limited number of robots are equipped with.

(30)

Figure 2.8: The Jasmine III robot chassis.

[32]

Those different boards specify some robots within the swarm for different purposes, just like in a swarm of insects where the members have different functions and not all of them are visible for an untrained observer. As an example look at a beehive, some bees react on the light conditions and spread that information to further members in the group.

At the moment the Jasmine III robot has the following different extension boards: a light board that detects the strength of the light coming from above, a gradient light board and the color-sensor which is described later on in Chapter 5.

There are ideas of other equipment for the robots, like a gripper in or-

der to make them able to manipulate their environment further or a GPS-

positioning sensor.

(31)

Collective Behavior

"Coming together is a beginning.

Keeping together is progress.

Working together is success."

- Henry Ford, 1863-1947 American industrialist and pioneer of the assembly-line production method This chapter will start by analyzing the work of Marvin Minsky [22].

Furthermore it will be discussed how this can be used to explain how one individual is build up. From this point the focus will go towards the group or collective. In the end the pheromone will be represented: how it is working and what it can be used for.

3.1 Agents

Marvin Minsky [22] describes how each action is built up by specific agents under various degrees of cooperation. As an illustrating example he men- tions pick up a cup of tea!:

The GRASPING agents want to keep hold of the cup.

The BALANCING agents want to keep the tea from spilling out.

The THIRST agents want you to drink the tea.

29

(32)

The MOVING agents want to get the cup to your lips.

Each of the agents have their own function and limited contact with other agents, that is, they only have contact with the agents with which they perform their task. This applies to the whole hierarchy, which means that the desired action will be well described but much more complicated then after the initial analysis.

Consider the task pick up a cup of tea! and imagine that the mind contains a host of smaller minds, those can all be called mental agents. At the moment there is an agent called Thirst in control. This agent wants to drink the tea, but this task is to complicated for any single, simple agent, so in order to fulfill this task it ask for help from several other agent. Lets consider three of them:

• Find: an agent that finds the cup of tea.

• Grab: an agent that grabs the object.

• Move: an agent that wants to move the object.

However both Find and Grab need to call other agents to help them in their tasks. As seen in this example many agents are interacting and might be used in other steps of the chain as well. Initially, Thirst calls Find in order to locate the tea cup, as soon as this task is done Thirst calls Move to get the hand to the cup. When the hand is there, Thirst calls Grab to close the hand and then Move gets called again. Before the description for the action is done, there would be more agents than would fit in any diagram.

With this description the individual has been taken apart to a number of agents that interact with each other to solve tasks presented to them.

The next step is to combine many of those individuals into a group or a society. Those groups need each other in order to solve tasks that they are not able to solve on there own.

3.2 Cooperative Decision Making

Considering higher independent animals, they can gather in packs, such as wolves, or in groups, such as sheep. In those configurations there is a leader controlling the group and assigning the various roles among the members.

Those animals are assured on their own individuality, but they are interacting

under cooperative basis since they all gain benefits from the grouping. The

different causes for forming a group might be the reduced predation risk,

(33)

increased productivity per individual, availability of mates or easier access to food. The last cause can be seen with wolfpacks for example, some members of the pack are taking care of the young chubs while the others are hunting.

The leader or the dominant role is not naturally assigned, often it is followed by contests for achieving this role of dominance and control, some contests are violent fights leading to serious, permanent or fatal damages on the competitors. Other contests are settled with the passive recognition of a dominant and a subordinate, this can be done in a more or less ritual way, like in a "simulated" fight between two individuals just to measure their abilities. Depending on the size of the group and the species the contests are initially frequent before becoming fewer and ultimately being replaced by a state of dominant-subordinate in equilibrium [7], [9]. Once the roles within the group are settled, they last for a long time, with few and generally unsuccessful attempts to take over a role by subordinates. During this time of a stable dominance-submission relationship, hierarchy, the group becomes organized in such a way that a conflict within the group does not completely disturb the advantages of group living.

3.3 Collective Decision Making

The major difference between higher animals and insects is that the insects are not aware of them selves as individuals. This means that they need each other in order to survive. Therefore the decentralized and self-organized behavior gives them benefits, without leaders that control the actions of the swarm or assigning different roles. If this special leader individual should vanish then the whole swarm would start to fade away.

As the individuals do not need anyone to direct or organize them, they become more flexible if the environment where they are is changing or the present conditions are shifting. They will automatically try to adapt to the new conditions with a minimum on lose in time, in order to solve their task.

Members currently occupied with the task will communicate the change to other members and together make a decision from whatever data they posses, without asking non-participating members, as Figure 3.2 shows. A decision is emerging from within the collective, which is a compound of a certain numbers of interacting members, figure 3.1 shows this behavior in an ant swarm when they are forming a circle.

The discussions in [7], [9], [16] prove that in nature this concept of de-

centralized and self-organizing is a winning strategy for societies consisting

of a couple of insects up to tens of thousands. One can look at the individ-

(34)

Figure 3.1: Ants forming a circle [8]

ual as compound of many small simple agents, as mentioned above, where some activities or responses are triggered by certain stimuli such as light, smell, pressure or other individuals. In most swarms of insects it is hard to distinguish which functions each of its individual members has depending on how they look, with some exceptions like for example the ant queen. Her function is to reproduce and make sure that there will be enough ants for the swarm to exist.

Figure 3.2: Two ants communicating.

[19]

At a first hastened look at the swarm, all of its members seam to be the

same and it appears that they are moving around in a chaotic pattern with-

out any obvious goals. But with more and deeper observations it becomes

(35)

clear that they are divided depending on their specific functions and acting according to some predefined behavioral code. The fine tuning of this code differs from the various species of insects.

In a swarm, where various abilities for observing changes in the environ- ment exist among the individual members, there are two possibilities:

1. Exactly one individual has this ability, or 2. more individuals have it.

In the first case all members in the swarm are depending on the one individual with the special ability. This is automatically given a unique role as a scout, searching for the desired object, or a watcher, detecting some changes in the environment, and then guide the other members or transfer this information among the other swarm members. Since all members are reacting according to the information given to them, their decision might appear as if it was controlled by the only individual. The drawbacks of this case are:

• One individual response will guide the whole swarm.

• If the information given away is not correct, the response emerging from the whole collective will be non-accurate.

• The information will take longer time passing through the group be- cause it is starting from one single individual.

• If the individual is lost the swarm no longer have the benefits supplied by that individual.

When more individuals have the ability it opens up for other possibilities for the entire swarm:

• The swarm has more inputs from different individuals and can make a decision based on many measured results instead of a single one.

• The influence of a false measurement will have less effect on the com- mon decision when more robots are detecting the same result.

• If the information is gathered from different individuals and then dis- tributed within the swarm it will spread faster compared, if each single individual needs to gather that particular information for itself.

• Separate objects can be found or more tasks can be going on simulta-

neously. A broader area can be investigated.

(36)

• The whole swarm becomes less sensitive to the lose of individuals with the special ability.

If more individuals have the same ability they represent a group within the swarm. All of them will have the same role or searching for the same goal, but no one particular within this group has the role of leading and controlling the others. Figure 3.3 shows three identically equipped robots.

Figure 3.3: Three robots with identical special ability.

The swarm will rely on the majority of the observation(s) for making a collective decision. During the phase where the observation(s) are analyzed, the results need to be weighted and compared against each other if they differ. The observations that gets the majority will guide the swarm to a decision. This is a majority based decision. When this decision is made, all members that are needed for performing the task are called. This means that even members with other specializations can help, if they do not have other roles or tasks.

3.4 Pheromone Approach

A pheromone is any chemical or set of chemicals that transmits a message

to other members of the same species [7], [9]. Pheromones are produced

by living organisms both animals and plants. There are various types of

pheromones used for special information such as alarm pheromones, food

trail pheromones, sex pheromones, and many others that affect behavior or

physiology. Figure 3.4 shows one example of how pheromones are used to

organize an ant trail to a food source.

(37)

Figure 3.4: Ants following a pheromone trail.

[29]

3.4.1 Physical Pheromone

Pheromones are frequently used among insects although many vertebrates and plants are also communicating using pheromones. A well documented use is among the ant species which uses pheromone trails for finding food.

Later on, it can locate the path to the nest. This works as following: the ant is dropping pheromone while searching for food, the pheromone center stays on the place where it was dropped but it is expanding until it has reached its maximum radius. The radius and the rate of decay is depending on the components of the pheromone. When a food source is found the pheromone is more frequently spread for two reasons:

1. in order to find the trail back to the food source

2. in order to attract more ants so that they can use the trail to the food source.

The more ants are attracted by the pheromone trail the stronger it becomes because each of the individual ants release pheromones to the trail. If one looks at this it seams that it will increase exponentially without any bounds, but the pheromone concentration is depending on the amount of food at the source as well as on the time from when it was released. However often there is more then one food source within a reachable radius from the nest, and there is just a limited number of ants at a time. All this combined means that ants are often swapping between the trails.

There are also organisms that use pheromone to mark the territorial

boundary of the organisms or groups of organisms. Example of species that

uses this type of pheromones are wolves and cats. Those pheromones give

(38)

more information about the individual(s) than pheromones used of simpler organisms like insects and it lasts for a longer time.

3.4.2 Virtual Pheromone

In simulations it is an easy thing to use pheromones for communicating or as a trigger for certain conditions like simulating the ant trail. One could simulate the hormone drop and tell the others within the range that it is dropped and where the center is. Then one could have a internal counter that is decreasing the value received from the source. However, to use this virtual pheromone in practical physical experiments it is much harder. One might use for example sensors to indicate the drop of a pheromone, but then it will either vanish directly or travel with the pheromone dropper. This is not how it is working in the real environment, see the physical pheromone above.

3.4.3 Combined Pheromone

At Institute for Process Control and Robotics (IPR) at university of Karl-

sruhe [24] they are working on a combined solution where they have a beamer

located under the ceiling directly above the test area. This beamer is pro-

jecting the pheromone given away from the robots directly on the test area

letting the other robots detecting it if they pass by the area where it is lo-

cated. For this to work they are using a computer connected to the beamer

and controlling where the pheromones are released and the rate of decay for

the intensity.

(39)

Basics of the Color Theory

The most technically accurate definition of color is:

"Color is the visual effect that is caused by the spectral composition of the light emitted, transmitted, or reflected by objects." [2]

This chapter is about the light and the color. This will be of importance for understanding the color sensor in Chapter 5. Two color spaces will be described as well as some transformations to transfer the color information between those two systems.

4.1 Basic Principle of Light and Color

Light is a narrow electromagnetic energy that has the shape of a wave.

Depending on the frequency and the amplitude of the electromagnetic energy it is expressed in different forms with different abilities and usage. Light is frequently used in numerous application everyday even though its nature is more complex to describe and measure. As light is a form of energy all characteristics that are valid for energy also apply to light like:

The first law of thermodynamics, or The law of conservation of energy:

Energy is always conserved, it can be changed from one form to another, but it can neither be created nor destroyed.

As seen in Figure 4.1, the light above 780 nm is called infrared light and this can be divided into two forms. Firstly the narrow form of infrared light that sends no heat or thermal energy. This means that humans can not observe it and it can be used for infrared communication as in the case of the Jasmine robot.

37

(40)

Figure 4.1: The frequency spectrum of light.

[12]

The second form of infrared light is emitted from hot objects like the sun or even the bodies of living animals. This form of infrared light is also used in infrared vision which allows the user to see the changes in heat radiance, for example heat emitted from a human body in contrast to the colder environment.

Below 380 nm it is called ultraviolet light. It is used for example in a solarium.

In the visible light spectrum, each color has its own spectral range, for example red lies between 650nm to 780nm, where 650nm is starting to blend more and more with the yellow color and goes towards orange color. The exception to this is the so called white or ambient light that spans over the whole spectrum from ultraviolet to infrared.

In this thesis the visible light that lies within the range from 380 nm to 780 nm will be on focus, see the right side of Figure 4.1.

What definitions are used for describing different light conditions and

what units do they have?

(41)

Definitions of the SI-units used in photometry: [4]

• Luminous intensity, I: has the SI-unit of candela(cd) or millicandela (mcd). One candela is defined as the light emitted from a normal wax candle. This is used to describe the actual light source.

• Luminous flux (or luminous power),Φ: is measured in lumen(lm) or candela times steradian (cd*sr).

• Steradian(sr): is the unit of solid angle. It is defined as a solid angle subtended at the center of a sphere of radius r by a portion of the surface of the sphere having an area r 2 . See picture 4.2.

• Illuminance, E: the light incident on a surface, has the unit of lux(lx) or lumen per square meter (lm/m 2 ).

• Luminance, L: indicates the appeared brightness of the surface from a certain angle and has the unit of candela per square meter (cd/m 2 ), see Figure 4.3.

Table 4.1: Photometry units.

Luminance and illuminance is measured with a photometer.

Figure 4.2: Illustration of how a steradian is defined.

[20]

The luminance is often used to characterize the emission or the reflec- tion from flat, diffuse surfaces and it is calculated with the following formula:

L = srA cos θ I

θ

= A cos θ I

(42)

L = luminance(cd/m 2 )

I θ = candela per steradian(cd*sr) sr = steradian, see Figure 4.2 A = surface area(m 2 )

cos θ = the angle between the normal to the surface and the specified direc- tion.

I = candela

This is shown in Figure 4.3.

Figure 4.3: Defining the luminance.

If one wants to detect the color of an object, one should keep in mind that many things are needed, the luminous intensity of the light source should be higher then the ambient light. The color differs in nuance depending on the light conditions. This means that the angle of the incident light is also important.

4.1.1 Reflected Light

When white light, or close to white light, is illuminated onto a surface some wavelengths will be reflected. The reflected wavelengths are then observed by our eyes which transfer the information to our brain and there they are detected as colors, see Figure 4.4. If the whole spectrum is reflected, it will be understand as white color, and when the whole spectra is being absorbed this will be understand as black color.

The law of reflection states that the angle of incident, θ i , of the light

(43)

Figure 4.4: The color of an object emitted with white light.

beam, that is the angle between the doted normal line and the light beam, is the same as the angle of reflection, θ r ;

θ i = θ r

However, colored objects also reflect colored light, but how much is re- flected and absorbed depends on the color of the light beam and the mate- rial itself. The reflected light will be affected in different ways for example a glossy surface like a mirror, see Figure 4.5, reflects almost all light in the same direction. A matte or rough surface scatters the light beam and makes it spread out in different directions, see Figure 4.6. The shape of the object and the surface itself can concentrate the light in various directions or scatter it out.

Figure 4.5: Reflection on mirror like surface.

Important in all situation is:

(44)

Figure 4.6: Reflection on a rough surface.

[21]

• If the light source are spreading the light evenly in all directions, like a light bulb,

• or if it is focusing it to a ray of light, as for example a light emitting diode, with a certain viewing angle and the angle to the observer.

Beside reflection and absorption there may also be refraction, in case of a less solid material, see Figure 4.7. This is when the incident light passes through the object and changes the direction angle inside the medium. This is called snell’s law. It states that the angle of incident, θ i , times the index of refraction of the upper medium, n1, is equal the angle of reflection, θ r , times the index of refraction of the under medium, n2;

n1 ∗ θ i = n2 ∗ θ r

In materials it is often the case that all three activities, reflection, ab- sorption and refraction, take place but at different degrees of influence.

Since light is a form of energy the first law of thermodynamics states that:

Light incident = light reflected +light absorbed + light refracted

4.1.2 Bidirectional Reflectance Distribution Function, BRDF

BRDF describes how much light is reflected when light makes contact with

a certain material. This is handled in [4] and [41]. The viewer and light

position relative to the surface normal and the surface tangent is controlling

to what degree the light is reflected. If the observer moves , that is changes

the viewing direction, the position of the highlight shifts, as well as if the

observer and the object remain at place but the light source is moved.

(45)

Figure 4.7: Refraction of a light-beam through two different mediums.

BRDF is defined as the ratio of the quantity of reflected light in the outgoing direction compared to the amount of light that reaches the surface from the incoming direction.

BRDF = L out

E in [4]

Figure 4.8: A surface element illuminated by a light source.

[41]

Explanation to Figure 4.8:

W i is the direction of the incoming light.

L out is the light reflected away from the surface.

(46)

E in is amount of incoming light.

The total amount of light arriving at the small surface element will be:

L in ∗ dω i

where dω i is the total area emitted by the light. To determine the amount of light with respect to the surface element, the incoming light must be projected onto the surface element. This projection is similar to that which happens with diffuse Lambertian lighting and is accomplished by modulating that amount by

cos θ i = nω

where n is the normal vector seen in Figure 4.8 This means that E i can be described as

E i = L cos θdω i

This gives BRDF a unit of sr −1 . If the angle is 0 degree, which is when the incoming light source is perpendicular to the surface, this is simplified to:

E i = Ldω i

One needs to remember that the total amount of light arriving at a surface is a compound of the direct light and the ambient light. This description is hard to use in an environment where the ambient light has a high intensity that is also heavily depended on the position, compared to the light from the investigating source.

BRDF also obey the law of reflection which means if the travelling light is reversed the result remains the same.

If the incoming light is known as well as the outgoing the absorbed and the refracted light can be calculated. Unfortunately BRDF does not tell anything of the amount light absorbed by the material.

This is a problem of interest for many people and research groups have been and are currently working on it.

4.2 Color Description

There are many ways to describe how the color is compounded, that can

easily be modulated in a digital environment. The two dominant descriptions

that are of interest for this work are the RGB-colorspace (Red-Green-Blue)

or the HSL-colorspace (Hue-Saturation-Luminance).

(47)

4.2.1 RGB Color Space

This adaptive description of colors build on the principle that each color consists of different amounts of Red, Green and Blue values. Those values range from 0 to 1, if percentages are used 100%, or in the case of a computer 256 bytes. The reason for this value is that it can be described with 8 bits 2 8 = 256 . Where 0 is a really dark color and 1 or 256 are light versions of the color. White color is described in RGB colorspace as Red, Green and Blue having the maximum value (1 or 256). The opposite is black which has a value of Red, Green and Blue value of 0, but both the white and the black value are at its extreme. This representation can be seen as a box in a coordinate system with red, green and blue as its axis with white at origo (0,0,0). Black is at the opposite corner where each value has its maximum.

There is also a subtractive color model where the base colors are yellow, cyan and magenta and when they are mixed in different proportions other colors appear, but the principle is the same as RGB, except that when all colors have there maximum the result will be black instead, as with the RGB color space, white. This description is used in color printing for example.

With those two descriptions a broad spectrum of colors can easily be described and visualize with ordinary paint, for example water colors. This description does however not give an answer to which nuance of the "base color" it has. That one color is more yellow than another for example.

4.2.2 HSL Color Space

This color representation builds on the principle that each color has a Hue, Saturation and a Luminance value. Sometimes Luminance, L, is called Value, V, Intensity, I, or Brightness, B, but they are all different names for the same phenomenon. This representation is often seen as a double cone, see Figure 4.9.

Hue,H, is described as a circle ranging from 0 to 360 degrees, with dif-

ferent colors corresponding to certain angles. This is shown in Figure 4.10,

and in Table 4.2.

(48)

Figure 4.9: HSL colorspace.

[11]

Degree Color

0 Pure red

60 Yellow

120 Green

180 Cyan

240 Blue

300 Magenta

360 Back to red

Table 4.2: Hue value with the corresponding angle.

The Saturation value, S, range from 0 to 100%, where zero percent is representing a grey version of color and at 100% the color has its most intensed Hue value, see Figure 4.11.

The Luminance, L, also range from 0 to 100%. Luminance is controlling the lightness of a particular hue. At zero luminance the color is black and at 100% it is bright. The most intensed color is when the luminance is at 50%

according to the saturation value, see Figure 4.12.

The advantage of this description is that it gives the base color in one

variable, the hue value, that describes what base color it has according to

the angle. This description also separates the luminance, L, which means the

Hue value will be the pure color. This makes it ideal for detecting which color

(49)

Figure 4.10: Different hue values.

[11]

Figure 4.11: Different saturation values.

[10]

the object has more or less independent of the light conditions, but the big

drawback is, that it is harder to calculate than the RGB space description.

(50)

Figure 4.12: Different luminance values.

[10]

4.3 Color Transformation

For different purposes not all color systems are suitable for the color descrip- tion. This might be the case if it is just the color that is to be determined without taking notice of the nuance or the brightness. An example of this is the task to separate all blue objects from non blue. First comes the algorithm for transforming a color expressed in RGB colorspace to HSL colorspace.

This transformation is an easy straightforward mathematical operation: [34]

(51)

Algorithm 2 Transformation algorithm from RGB to HSL given in the Color Classification with the TCS230 brochure.

1. Normalize all three values, that is scale it with a suitable number so that the final result will be between 0 and 100. In the case colors described in a computer the scaling factor will be 256.

2. Determine the maximum(Max) and minimum(min) of the 3 RGB- values .

• If Max == min then H=0 and S=0

• L is calculated with (Max + Min)/2.

• Test L. If L < 0.5, S=(max-min)/(max+min) If L >=0.5, S=(max-min)/(2.0-max-min)

• The hue value is being calculated depending on which of the three colors it was that had the highest value.

If R=max, H = (G-B)/(max-min) If G=max, H = 2.0 + (B-R)/(max-min) If B=max, H = 4.0 + (R-G)/(max-min)

Then this value should be multiplied with 60, this will give hue a value between 0 and 360 degree

If H should be less than 0 add 360 to the value

Second is the transformation from HSL toRGB, and this operation is

harder to perform and demands more calculations, which can easily be done

with the help of a computer:

(52)

Algorithm 3 Transformation algorithm from HSL to RGB.

• L and S should be normalized before any transformation can be done

• If S = 0, define R, G, and B all to L

• If L < 0,5 then temp = L*(1,0 + S) else temp = L + S-(L * S)

• temp2 = 2,0 * L - temp

• checkR = H/360+1/3

• checkG = H/360

• checkB = H/360-1/3

• if checkR, checkG, checkB > 1 then subtract the value with 1

• if checkR, checkG, checkB < 0 then add 1 with to the value.

For all three of the values, CheckR, CheckG, CheckB, investigate the follow- ing step:

• if 6*the value < 1.0 then the value of the color in RGB space will be:

temp+(temp2 -temp)*the value*6.0

• if 2*the value <1.0 then the value of the color in RGB space will be;

temp2

• if 3*the value <2.0 then the color value in RGB space will be:

(temp+(temp2 -temp)*((2.0/3.0)-the value)*6.0)

(53)

Color Sensor Board

"Make everything as simple as possible, but not simpler."

- Albert Einstein, 1879-1955 In this chapter two possible solutions will be discussed. The solution that later on became the winner will be more closely investigated and exper- imented.

5.1 Different Possible Solutions

The swarm should be able to detect colors both on the ground and on stand- ing objects. The major problem with the Jasmine III robot is the question where to place the color sensor so that it can fulfill its purpose without disturbing the other equipment onboard. This makes the limited space un- derneath the motorboard and the chassis the best position. Unfortunately, the space is nothing one can easily increase. This space is approximately 27mm long, 7mm high and 5mm wide, see Figure 2.8 for getting a better view of the total available space underneath. Figure 5.1 shows a photo of a present Jasmine III robot in order to clarify the physical limits on the robot.

There are some general problems for the robot that needs to be taken in account:

• The ATMEL ATMega88 microcontroller on the motorboard only has 4 free input/output ports that can be used for the solution.

• Besides the already limited space there is also a communication line entrance of plastic for communication between the microprocessor and

51

(54)

a PC, directly underneath the touch sensor. This restrains the space available even more.

• The color sensor board must not restrain any of the other mechanical parts being located between the motorboard and the chassis.

• It is important that the IR-sensor for measuring the movement of the wheel is on its correct location. This will limit the placement of the color sensor board.

• The price should be low.

Figure 5.1: The present version of the Jasmine III robot.

There are also restrictions for the diodes used:

• The dimension of the diode shell should be such that it easily fits in the limited space under the robot without causing any problem.

• The viewing angle should be as small as possible, so that the light beam emitted will have a concentrated focus.

• The desired distance for detecting colored objects in front of the robot should be approximately 30 till 45 mm.

• A high luminous intensity, at the voltage of 3, so that the light can illuminate objects at a longer distance.

As stated in Chapter 1.3 there are two main possible approaches for solving the problem with detecting the colors of the objects in the robots’

environment.

References

Related documents

Industrial Emissions Directive, supplemented by horizontal legislation (e.g., Framework Directives on Waste and Water, Emissions Trading System, etc) and guidance on operating

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Detta projekt utvecklar policymixen för strategin Smart industri (Näringsdepartementet, 2016a). En av anledningarna till en stark avgränsning är att analysen bygger på djupa

DIN representerar Tyskland i ISO och CEN, och har en permanent plats i ISO:s råd. Det ger dem en bra position för att påverka strategiska frågor inom den internationella

Av 2012 års danska handlingsplan för Indien framgår att det finns en ambition att även ingå ett samförståndsavtal avseende högre utbildning vilket skulle främja utbildnings-,

Det är detta som Tyskland så effektivt lyckats med genom högnivåmöten där samarbeten inom forskning och innovation leder till förbättrade möjligheter för tyska företag i

Which each segment given a spectral color, beginning from the color red at DE, through the color orange, yellow, green, blue, indigo, to violet in CD and completing the

The purpose of this project is to analyze how a robot with a camera module can respond to objects of different color, then grip and sort them depending on the color identification..