• No results found

Development of a collision avoidance system for a videoconferencing robot.

N/A
N/A
Protected

Academic year: 2021

Share "Development of a collision avoidance system for a videoconferencing robot."

Copied!
87
0
0

Loading.... (view fulltext now)

Full text

(1)

Development of a collision avoidance system

for a videoconferencing robot.

Patrik Björkman pbn05003@student.mdh.se Lars Odens Hedman los05001@student.mdh.se

January 12, 2010

School of Innovation, Design and Engineering (IDT)

Mälardalen University, Västerås, Sweden

Gira technologies AB Västerås, Sweden

Supervisor: Stephen von Rump stephen.vonrump@gira.org

Malardalen University Västerås, Sweden Supervisor: Lars Asplund lars.asplund@mdh.se Examiner: Lars Asplund

(2)

Abstract

The work presented in this paper is about the development of a collision avoidance sys-tem for a mobile telepresence robot developed by the company Gira technologies AB. The robot is designed to extend the length of time elderly can stay in their homes before requiring full-time staed care. The collision avoidance system is needed to help the user to avoid running in to objects or down a stairway. The design must be capable of being implemented at low cost, and should not look overtly "robotic" as this would not result in an appealing industrial design.

Herein, dierent techniques are presented and analyzed to nd the best suitable solu-tion for the robot. In particular a lot of work is done in taking measurements to nd the right characteristics for the sensors according dierent mounting angles, dierent objects and distances. A solution is chosen and calculations are made to nd the best positions to place the sensors to get the best results.

A complete solution is presented and implemented in the current system and tested to work as expected.

Sammanfattning

Arbetet som presenteras i denna rapport handlar om utvecklingen av ett kollisionsund-vikningssystem for en mobil videokonferensrobot utvecklad av företaget Gira technolo-gies AB. Roboten kommer att användas i äldre personers hem så att de äldre kan bo hemma längre. Kollisionsundvikningssystemet behövs för att hjälpa användaren att und-vika att köra in i objekt eller nedför trappor. För att uppfylla kraven som ställts av företaget att sensorsystemet inte får göra roboten mer likt en robot, har tanke lagts för att uppfylla det kravet under utvecklingen av sensorsystemet.

Gira technologies AB är ett nystartat företag som benner sig i ett tidigt stadium i sin utveckling. Ett viktigt krav ställt av företaget är att priset måste hållas så lågt som möjligt, men sensor systemet måste fortfarande kunna upptäcka objekt och trappor. Olika tekniker presenteras och analyseras för att hitta den bästa lösningen för roboten. Mycket arbete med att utföra mätningar för att hitta de rätta egenskaperna för sen-sorerna enligt olika monteringsvinklar, olika objekt och distanser. En lösning väljs och beräkningar utförs för att hitta de bästa positionerna att placera sensorerna för att få de bästa resultaten.

En fullständig lösning presenteras och implementeras i det nuvarande systemet och testas för att fungera som förväntat.

(3)

Preface

The authors would like to thank Gira technologies AB for the opportunity to take part of such an interesting project. Stephen, Roy and Dan, thanks for the party! We owe you a half beer!

We would also like to thank our supervisor Lars Asplund, you had always time for us, maybe because we always sat and waited in your oce until you talked to us.

And last we would like to thank our colleague from Sensyact, Rolf and Christoer, for your fun and interesting discussions.

(4)

Contents

1 Introduction 5 2 Background 6 2.1 Technical background . . . 7 3 Problem description 9 4 Analysis of problem 10 4.1 Dynamic environment . . . 10 4.2 Implementing calculations . . . 10 4.3 User experience . . . 10 5 Theory 12 5.1 Light . . . 12 5.2 Sound . . . 13 6 Method 15 6.1 Sensor system . . . 15 6.1.1 IR . . . 15 6.1.2 Vision . . . 16 6.1.3 Laser . . . 17 6.1.4 Ultrasonic . . . 17 6.2 Software . . . 18 6.2.1 Map building . . . 18 7 Solution 19 7.1 Sensor system . . . 19

7.1.1 Stairway avoidance system . . . 20

7.1.2 Obstacle avoidance system . . . 21

7.2 Software . . . 22

8 Results and analysis 24 8.1 Stairway avoidance system . . . 24

8.1.1 Sensor system . . . 24

8.1.2 Software . . . 38

8.1.3 Implementing and testing . . . 39

(5)

8.2.1 Sensor system . . . 39

8.2.2 Software . . . 43

8.2.3 Implementing and testing . . . 44

9 Future work 45 9.1 Noise . . . 45

9.2 Develop a new sensor . . . 46

9.3 User experience . . . 46

9.3.1 Dealing with false positives . . . 46

9.4 Future sensor systems . . . 47

10 Summary and conclusions 48 10.1 Stairway avoidance system . . . 48

10.1.1 Sensor system . . . 48

10.1.2 Software . . . 49

10.1.3 Implementing and testing . . . 49

10.2 Obstacle avoidance system . . . 49

10.2.1 Sensor system . . . 49

10.2.2 Software . . . 49

10.2.3 Implementing and testing . . . 50

References 51 A Matlab code for the sensor positioning calculations 52 A.1 main_positioning_of_two_IR_sensors_calc.m . . . 52

A.2 main_positioning_of_three_IR_sensors_calc.m . . . 56

A.3 plotRobotBaseInCurrentGraph.m . . . 61

A.4 getSensorBeam.m . . . 62

A.5 plotTestRoomInNewGraph.m . . . 63

B List of all valid sensor beams 65 B.1 Forward side sensors . . . 65

B.2 Backward sensors . . . 71

(6)

1 Introduction

Collision avoidance systems are commonly used in dierent robot solutions to help an autonomous or remotely controlled robot to navigate through an area with dierent ob-stacles. In areas where obstacles are generally time-invarient, sensors often are used to create a map over the area that the robot later can navigate by. If the robot is going to be used in a dynamic area, especially if it is going to interact with people, it need a way to easily update the environment around itself to be able to avoid obstacles or stairways. Gira technologies AB is commercializing a remotely controlled videoconferencing robot for elder care known as the Gira. The task for this project is to design a collision avoid-ance system for the Gira. At this time safety is completely dependent on the skill of the person operating the Gira and has no sensors at all helping the user. There are two main actions by the user that can cause harm to humans, the interior, or the robot itself. These actions are driving the robot over a precipice like a stairway and driving into obstacles at high speed.

There are several dierent solutions to create a collision avoidance system and in this report we are trying to nd the best suitable solution for the Gira. Common techniques to locate objects are to use IR, ultrasonic, laser, vision or a combination of techniques. All the dierent possibilities mentioned are discussed in this report. Due to the require-ments from the company some of the solutions are rejected early on, but the solutions that fulll the requirements are processed and the most suitable solution is selected for the Gira. The report also explains the basics of all techniques that are mentioned and the construction of a fully working system. The system is also integrated with the current hardware and software and fully tested to work properly.

The work is divided in-to three parts:

∙ First, a background about the dierent techniques that are possible for our use is presented. The main goal is to fulll the requirements that are stated by Gira technologies AB.

∙ Second, is to test dierent solutions to determine which system best suits the re-quirements and perform tests that will determine the pros and cons of each sensor system

∙ Finally, integrate the complete system with current hardware and perform tests to verify that the system works properly.

(7)

2 Background

Gira AB is a 4 year old company, started in San Francisco, developing a telepresence robot. The company is focusing on the health care business and were drawn to Sweden because of its government-operated health care system. The company is now developing and marketing the robot for elderly care that is intended to extend the time elderly can live in their own homes. The robot can also be used for other applications such as teaching form a remote location.

The Gira Robot

Figure 2.1: The Gira robot in action. The Gira robot is composed of a video

screen and camera and can be driven around. Using the robot, the user can see and hear people on the lo-cation through the camera and loud-speakers.The people at the other loca-tion can also see and hear the user. The user can move the Gira from re-mote location using the client applica-tion.

The robot is currently under development and in the future the robot also is going to have an adjustable screen height that can be controlled by the user. Answer and call buttons are going to be added so the care recipients can answer a call and call out. The Client Application

Figure 2.2: The Gira is operated using a regular computer.

The software runs on a standard PC with web camera, microphone and loud-speaker. The client application connects the user to the Gira through the In-ternet using a standard wireless inIn-ternet connection. From the client the Gira is controlled using the mouse to point and click on the screen to move for-ward.

(8)

When a user want to connect to a Gira, the care taker must authorize the connection by answering the call initiated by the calling user. In this way the Gira can not be used as a spy device.

When the Gira is not in use it rests in a docking station where it charges its batteries. The user has to drive the robot into the docking station.

2.1 Technical background

The Gira system consist of two microcontrollers and a main computer. One of the microcontrollers, an ATtiny26L, handles the charging sequence and the other microcon-troller, a ATmega644, handles the motor actuation and sensors. It communicates with the main computer using UART. The main computer controls everything else in the system including camera, screen, wireless transfer and communicates with the microcontroller. The current system have software and hardware to support four analog Sharp IR sensors, which are not currently in use.

The microcontroller is currently busy and adding a lot of code and calculations to it is not possible. In the main computer there is much room and calculation power left.

Figure 2.3: A schematic overview over the Gira.

Two of the robots four wheels are powered using two DC motors. The front and back wheels are castor wheels that can rotate 360 degrees. The powered driving wheels have rubber "tires" that gives good traction on most surfaces.

The Gira has a low center of gravity and is therefore very stable. It can drive down from steps as high as 5cm without cause any harm to itself. Other specications can be seen below.

Top speed of the Gira 0.72𝑚/𝑠

Height of obstacle it can climb 3𝑐𝑚 Distance to stop from max velocity 35𝑐𝑚 Distance to stop when driving backwards 3𝑐𝑚

(9)

The user controls the Gira with his/her mouse and points on the video where he/she wants to go. As long as the left mouse button is pressed, the Gira will move. The user can go forward or backwards at dierent velocities and in any direction. If the user wants to increase the velocity he/she points the mouse further away from the Gira, and closer if he/she wants to lower the velocity. When the Gira is turning the top speed is decreased to maintain safety.

The user has also the possibility to turn 360 degrees in place.

Figure 2.4: The new design of the Gira with its screen at the lowest position.

During this project the company is devel-oping a new version of the Gira robot that looks slightly dierent from the cur-rent version. A height adjustment feature is added and because of that a box of alu-minium is added to the design. The box is designed to be a Faraday cage and there-fore all electronics at the base is moved into this box. Due to this, the design of the sen-sor system must be able to be mountable on both versions of the Gira robot.

(10)

3 Problem description

There are two main actions by a Gira user that can cause harm to humans, the interior, or the robot itself. These actions are driving the robot over a precipice like a stairway and driving into obstacles at high speed. The collision avoidance system should be designed to prevent the operator for making mistakes that could cause harm.

The collision avoidance subsystem must prevent the robot from damaging objects or itself during normal use. Therefore the subsystem must prevent (1) crashing into objects or people and (2) falling o edges or down stairways. The robot is intended to sell at a low price, and the collision avoidance feature is critical to the success of the project. Therefore, whatever solution is arrived at must be capable of being implemented both quickly and inexpensively.

∙ The Gira must be able to detect stairways and prevent the user to drive down a stairway.

∙ The Gira must be able to detect objects and prevent(by limit the speed) the user from driving into them at high speed.

∙ The user must be able to drive the Gira into the docking station.

∙ The sensor system needs to be as cheap as possible and to have a maximum cost of 1000SEK

∙ The sensor system must be implementable in current systems.

The sensor system should be as easy to use as the rest of the robot. No complicated or time-wasting conguration should be required when the robot is placed at a new loca-tion/home, one should only have to start the robot.

A requirement from the company was that the user experience should be unaected by the sensor system to the extent possible. The user should not notice the system be-fore it engages and even when it is activated, the user driving the robot should feel that he or she has control over it.

Another requirement is that the sensor system should be built in a way that makes the Gira look and behave less like a robot. That is because the Gira is going to be used in homes and should be as unimposing as possible.

(11)

4 Analysis of problem

There are several issues to solve when constructing a collision avoidance system for a remotely controlled robot. As the robot is teleoperated, there is essentially no limit on the range of locations that the robot may be commanded to go. A requirement from the company was that the sensor system should not aect the user's driving experience. Therefore the robot can not for example stop every meter and scan the area in front of it and then process the data. The sensor system must always adopt to the user's intent and still be able to detect the obstacles and stairways.

4.1 Dynamic environment

The robot is going to be operated in homes, and one problem is that home environments can be quite dierent. The home environment puts high demands on a sensor system. There are dierent kinds of furniture in all sizes and shapes, the oors and carpets can have any coloration. And of course, the Gira is going to interact with people, who function as dynamic obstacles from the perspective of a sensing system.

4.2 Implementing calculations

The microcontroller currently used in the robot is already heavily loaded with motion con-trol calculations. This prevents the sensor system from implementing memory-intensive or computationally expensive calculations in the microcontroller. So either the calcula-tions have to be placed in a separate microcontroller or be kept small and ecient. The main computer has a lot of calculation power left but the problem with doing the cal-culations in the main computer is that data needs to be transported through the UART. If too much sensor data is sent, this can impact the latency of other time-critical tasks like motor actuation.

4.3 User experience

Gira Technologies AB does not want their product to be viewed as a traditional robot and therefore the sensor system should not have the appearance of a "robotic" sensor system. For example, any kind of visible light to measure distance or detect objects can

(12)

not be used. People could be intimidated if a visible light beam sweeps in front of the robot. For the same reason any moving part, for example a servo that turns, can be excluded if it can not be hidden in some way.

Another part of the problem is that the user should always feel that they have con-trol over the Gira's movement. Therefore the collision avoidance system can not steer the robot if an object is detected. If the robot simply slows down, or eventually stops, the user still perceives that they have controlled the Gira's movement. If the robot starts to turn in a dierent direction than the user want it to, the feeling that they have full control over the robot is lost.

(13)

5 Theory

Non-contact active obstacle detection sensors emit energy which travels through a medium to the target object(s), where a part of the energy bounces back to the sensor. The two most common energy sources used for these sensors are sound and light. Since the Gira robot is intended to be used inside homes (sometimes outside where the climate allows it) the medium is ambient temperature air.

5.1 Light

Light is the optical region of the electromagnetic radiation. The dierence between electromagnetic oscillations is denoted by frequency and wavelength. Most widely used sensors transmit visible or infrared light. The Gira can not transmit visible light due to the impact it would have on the user experience. Only infrared light, which is not visible to the human eye, can be used. Humans can see wavelengths between 380nm-750nm. Above 750nm the infrared spectrum starts.

Reectivity

Reection of infrared light near the visible spectrum is color and surface dependent. Most surfaces are diuse to the short wavelength of the light except very shiny objects and mirrors. The most critical part is the reectivity to dierent wavelengths that the surfaces have, the color of the surfaces. When working with wavelengths outside human visibility it gets harder to predict the reectivity since one can not see it. Close to the visible spectrum the reectivity of infrared light is similar to the reectivity of visible light.

(14)

Sunlight

Figure 5.1: Sunlight energy(%) vs. wave-length graph.[1]

The Gira will mainly be operated in-side homes but it may also occasionally be operated outside. The sun emit a wide range of wavelengths including infrared light. The energy for dierent wavelengths is shown in gure 5.1. When working in visible or close to visible light the energy from the sun is high and can overwhelm a light sensor, producing false readings.

5.2 Sound

Sound is a longitudinal pressure wave trav-eling through a medium and is

character-ized by the density and elasticity of the medium. Sound as an emitting energy source is widely used both in high-tech scanning medical systems as well as cheap distance sensors. A common characteristic of these sensors is that they are transmitting ultrasound -sound with higher frequency than the human ear can detect, -above 20kHz. When choosing or constructing an ultrasonic sensor there are a few interesting parameters that need to be considered. The relationship between the frequency of the transmitter and the wavelength is given by the equation:

𝑓 = 𝑠

𝜆 (5.1)

where:

f = operating frequency.

s = speed of sound, approximately 343m/s in room temperature and air. 𝜆 = wavelength.

Beam width

The width of the beam is calculated by using the formula: Θ = 1.22𝜆 𝑑 (5.2) where: Θ = dispersion angle. d = transducer diameter. 𝜆 = wavelength.

The denition of beam width is the angle between the two points were the power have been reduced to half its peak value. For cheap ultrasonic sensors this denition is not very useful in reality. Instead the manufacturers often species the beam width where an

(15)

Reectivity

Most targets are specular to the relatively long wavelength of cheap ultrasonic distance sensors, approximately 0.7cm at 50kHz[2]. This makes most surfaces act like a mirror acting on light, the sound just bounces on the surface. For example, if an ultrasonic sensor is aimed at a wall with a certain angle there is a critical angle were no energy, or very small amount of energy, is reected back to the transducer. For sound with these frequencies this angle is small.

Manufacturers often specify the beam width using a dowel as a reference object. The dowel is round which means that the sensor always will have a small surface which is perpendicular to the beam. Because of that, -a dowel is easier to detect than an object with its entire surface facing away from the sensor.

(16)

6 Method

The collision avoidance system is divided into two dierent parts, the sensor system and the software part. The sensor system gets inputs from the environment and forwards that information to the software that processes the data. It is the software that prevents the vehicle from colliding with objects.

6.1 Sensor system

There are several dierent sensors that can be used for detecting obstacles. The dierent solutions discussed below are those that are suitable for this system. The solutions include not only dierent types of sensors, but also dierent combinations of sensors.

6.1.1 IR

Infrared light lies outside of the humans eld of view with a wave length between 1mm to 750nm. When using IR to measure distance the two main techniques are Time-of-Flight and triangulation. Infrared distance sensors are cheap and precise but color sensitive which limits their utility.

Time-of-Flight

The Time-of-Flight(TOF ) method is about measure the time for a certain beam, particle or similar to travel a distance. IR distance sensors that use TOF send out a beam of infrared light and then measure the time it takes for the light to reect back to the sensor. By dividing that time by two, and with knowledge of the speed of the beam, the distance to the object that reected the beam can be calculated.

(17)

Triangulation

Figure 6.1: Due to the distance to the ob-ject more or less of the receiving elements are covered by the reecting beams.

The sensor consist of an emitter and a re-ceiver, an array of receiving elements, that are placed with a known distance between them. The emitter sends out a beam of light and when the beam hits an object the beam reects back and hits the elements of the receiver. The distance to the object di-rectly correlates to the angle that the light reects back with (see Figure 6.1). Due to that angle, dierent elements on the re-ceiver sense the reected light. If the ob-ject is close to the sensor, the angle

be-comes big and less of the elements are covered. When the object is far away the angle gets narrow and more of the elements are covered. From that the distance can be calcu-lated.

6.1.2 Vision

Stereo vision

When constructing a stereo vision system the target is to simulate how the human eyes work. By using two cameras that are displaced from each other, two dierent perspectives of the scene are obtained. The two dierent scenes are compared to create a disparity map to obtain the relative depth. From that, one can calculate the distance to dierent objects. This technique is color independent, precise and rather cheap. On the other hand it is dicult and time consuming to develop a good system that works properly. IR camera

An IR camera is a camera that only detects infrared light. It is used in object detection systems because of its color insensitivity and that it could work without visible light. It is possible to use the IR camera where there is infrared light, for example in sunlight which contains infrared light. If there is no external infrared light source, or only a small one exists, an IR emitter can be used in combination with the camera. That guarantees that the camera will have a good image.

The IR emitter may also be used in a dierent way. If the emitter used is a narrow beam IR emitter, the emitter beam will appear as a dot in the camera view eld. De-pending on the position of the dot the distance to it can be calculated. It is also possible to use a lens in front of the IR emitter to split the beam into dierent shapes, called structured light, and then be able to calculate the distance to more then one spot. The development time for this system is most likely shorter than stereo vision but still long.

(18)

Time-of-Flight camera

A Time-of-Flight camera is a system that consists of an ir emitter and a camera. The emitter sends out a narrow pulse of IR-light which bounces back to the camera. By measuring the time it takes between the light pulse emission and the correlated detection at the pixels in the CCD-array of the camera, the distance to each pixel can be calculated. By combining the distance to each pixel with the color of each pixel a real time 3D view can be generated of the surface. This technology is at this time too expensive both to buy and develop a new sensor. The reason why the technique is so expensive is the it uses the speed of light, therefore the components need to be fast enough to detect the time dierence.

6.1.3 Laser

Laser is very good for dierent types of distance sensing, object recognition and other vision applications. The light can be either visible or invisible, but for the Gira only the invisible can be used due to the user experience. The drawback though is that the price for a infrared laser sensor is much higher than for non-laser or ultrasonic sensor.

Time-of-Flight

When using Time-of-Flight with a laser source there are two dierent methods. One is the same as earlier mentioned where a beam is sent out and the time it takes to reect back divided by two is the distance to the object. The other method is to compare the phases on the emitted light and the reected light. The phase dierent is then used to calculate the distance to the object.

Triangulation

The triangulation method for laser diers a bit from the triangulation method described for the infrared sensor. Instead of checking how many elements in the array that are covered to get the angle, and further the distance, the element in the array that have the most intense light gives the distance. Other elements also get some reections back, but by using thresholds the correct distance is calculated.

6.1.4 Ultrasonic

Ultrasonic sensors are as infrared light commonly used for distance sensing. Ultrasonic sensors sends out a beam of ultrasonic sound. Then it measures the time it takes for the echo to come back, in other words it uses Time-of-Flight. Ultrasonic sensors are color independent but are dependant on the surface the sound echoes against. If the sound bounces against a sound absorbing material, the worst case scenario is that the sound is completely absorbed and no echo returns. The beam that the sensor sends out is quite wide. If a narrower beam if preferred one can combine several ultrasonic transmitters in an array. A lot of research has been done in that area and the result is that the beam becomes narrower and also the reach is increased. [2]

(19)

6.2 Software

There are basically two ways of avoiding obstacles with the data received from the sensors. One way is to place the sensors in a way so they can detect obstacles as the robot is driven around. The other way is to make a map of the sensor data and then the robot remembers were the obstacles are. Both techniques have their pros and cons that may be suitable for this sensor system.

6.2.1 Map building

Several approaches to build a map of the environment has been presented through the years. Some [3] uses a predened map of the area that the robot are going to operate in. They are using a sensor system on the robot to navigate through the area and the robot keeps track of where it is in the area by getting the data from the sensor system and compare that data with the predened map.

Elfes [4] describes a technique where he is using several sensor placed as a ring to get data from the surroundings and from that build a map divided in to regions, the technique is called certainty grid. The map is being divided into several regions that can be one of three states, probably occupied, probably empty and unknown. If the robot has seen that an object is in a certain region several times from dierent locations the regions get the state probably occupied. Same thing if the robot has seen that a region is free from objects from several locations the region get the state probably empty. Others [5]have combined a certainty grid with another known technique called potential eld method. The Potential eld method describes a method where the workspace is lled with an ar-ticial potential eld in which the robot is trying to get to the goal and at the same time is repulsed away from the objects.[6] The combined solution, named Vector Field His-togram(VFH), showed good results when experimenting with a high speed, 0.7m/s, robot. Another approach that have been proposed is to take continuous measurements and extract key features that later are compared and clustered.[7]To test their technique they use a robot with sixteen ultrasonic sensors placed in a ring that they rotate. They take measurements, extract key features, then move forward a known distance and then take new measurements and extracting new key features. The new key features are then com-pared with the old ones and by that they generate a map of the environment.

A solution using a 2D laser range nder is presented using an algorithm where the map is built using simple geometrical shapes. [8] Detected shapes that are longer than 300 millimeter is approximated by a line, and detected points that are close together but are not fullling the 300 millimeter criteria, called clusters, are represented by a circle. They use a PLS-scanner with a scanning angle of 180 degrees with a 0.5 degree resolution. The detection range is 5cm-50m and a full scan takes 600 milliseconds.

(20)

7 Solution

The solutions chosen for the sensor system and software are based on several things. The biggest challenge was to keep the prize low and at the same time nd the most robust system possible.

7.1 Sensor system

The fact that the robot is intended to sell at a low price reduces the number of possibil-ities dramatically.

All complete laser solutions are too expensive given the cost requirements. The only solution found [9] that could work theoretically costs $30 to manufacture but is not presently commercially available. It does illustrate that the components to construct a laser distance sensor are not inherently expensive. The reason for not choosing this path is because the construction of such sensor will take to much time in regards to the time it will take to construct a complete working collision avoidance system. Furthermore the Gira or the sensor needs to be laser safety classed and have a warning sign according to the international standard IEC60825-1[10], this will also aect the user experience as a laser sign can appear frightening to people. The cost to get such product laser safety classed is approximately 5000SEK according to SP Technical Research Institute of Swe-den, which are working with classifying lasers according to national and international standards. The safety classication must be done each time there is a change made to the emitted beam.

This master thesis is 20 weeks long, and within that time, Gira Technologies expects delivery of a working system. This removes the more advances systems like stereo vision TOF-camera system which would take more then 20 weeks to develop into a working system.

The solution using a camera with structured light is possible to design for a reason-able price. It will reduce the amount of calculations for the processor depending on the structure of the light and therefore also the time it takes to implement a working system. The problem with this system is that dierent surfaces reect dierent amounts of light. More calculations needs to be added to determine where the line is if the camera can not clearly detect it. Sunlight could also be a problem because it contains all wave lengths, and therefore could interfere with a structured light transmitter.

(21)

time nor the resources to explore this solution at this point.

The beam of a cheap ultrasonic sensor is wide which is not good when detecting a hole, like a stairway. The risk is high that the beam hits the oor, the wall or the railing and therefore does not detect the stairway. Another bad thing with using an ultrasonic sensor to detect a stairway, in this case, is that a sensor needs to detect a stairway at least 35cm in front of the Gira. Due to the mounting possibilities for sensors on the Gira the sensor needs to be aimed downwards with an angle towards the oor. To be sure to detect an object an ultrasonic sensor needs to be aimed almost perpendicular to the target surface. The sensor would never detect the oor or detect the oor at all time. This means that a stairway is impossible to detect.

For object detection, the shortest distance to the object closest to the Gira is of interest. The best solution for this problem is the use of ultrasonic distance sensors. They have a wide beam that will not miss as many objects as a sensor with narrow beam and it is aordable. The drawback though is that it could miss objects in certain angles.

For stairway detection IR distance sensors are the optimal solution. A very low price combined with a narrow beam width makes it suitable for detecting stairways. The drawback for inexpensive IR sensors are their color dependance.

IR sensors is not suitable for detecting other obstacles than stairways, a sensor with a wide beam is needed. A possibility is to have many IR-sensors aimed dierently but the price for that many sensors is unaordable.

The solution for the sensor system therefore consists of two subsystems. One subsystem that uses IR-sensors for stairway detection, will be referred to as the stairway avoidance system. The second subsystem which uses ultrasonic sensors to detects other obstacles, will be referred to as the obstacle avoidance system.

7.1.1 Stairway avoidance system

Sensor choice

Sharp is the only manufacturer of cheap and widely used IR distance sensors. Distances from 10cm up to 200cm with analogue or digital output is available. Our work focuses on two Sharp sensors in particular. The GP2Y0A21 detects a distance from 10cm to 80cm with a continuous analog output and the GP2Y0A02YK detects a distance from 20cm to 150cm with an analogue output. One drawback with these sensors is that the manu-facturer does not specify how the sensors react at dierent angles to dierent surfaces. Only two dierent reection ratios, white paper(90% reective ratio) and grey paper(18% reective ratio), are stated in the data sheets.

(22)

Figure 7.1: Analogue output vs. distance to object curves for GP2Y0A02YK to the right and GP2Y0A21 to the left.

Another drawback is that the analog voltage vs. distance to object curve is at least a 3rd order polynomial. This is not optimal for a micro controller as the software must be linearized in software. Distances shorter than the specicated lowest value for the sensors are also a possible problem. As picture 7.1 shows, if the distance is 5cm the sensor will output the same voltage as if the distance is about 50cm.

Both these sensors are very inexpensive. The GP2Y0A21 can be bought for $7.95 and the GP2Y0A02YK for $9.545. It might be cheaper to construct a new sensor, but time and the fact that Gira technologies AB wants to have a nished system makes it better to use a sensor that already is on the market. More about this in the future work section.

7.1.2 Obstacle avoidance system

Sensor choice

There are a couple of manufacturers of cheap ultrasonic distance sensors. One factor to consider is the output format of the sensors since they must interface with current Gira system. Maxbotix US sensors is the only one found with an analogue output which could easily be implemented in current system. The other output types found is TTL, IC2 or serial bus which will be more complicated to implement because all clocks are used in the microcontroller and the serial pins are used for communicating with the main computer.

(23)

As stated earlier in this report a dicult part with the characteristics of the sensor and beam is that manufacturers characterize the beam using a round dowel, while this system is going to measure on an innite number of dierent objects with varying shapes. The low development budget and the prices of US sensors basically allows testing of one or maximum two dierent sensors. Maxbotix sensors are chosen because they are widely used and they have analog output which makes them easy to implement.

There are basically two generations of Maxbotix sensors and two dierent parameters to consider. The old generation named LV is outputs around 30mW of sound energy while the new generation named XL outputs 500mW of sound energy. After asking Maxbotix technicians about which sensor they recommend for this kind of system they highly recommend the new XL series. Another parameter is the beam width of which they have 5 dierent types. We want the widest beam so we are choosing the widest one, the EZ0. The analog output of the XL series is output (Vcc/1024)/cm which is optimal for a 10 bit AD-converter, which is included in the ATmega644. The converted value is the distance without further calculations. The price for the sensor is also aordable, as 100 Maxbotix XL EZ0 can be bought for under $3996, that is under $40 per sensor. The price could be lower if a new sensor is developed from scratch as with IR sensors, see the future work section for more information.

7.2 Software

The main question with the software is if a map is needed to develop a good system to avoid objects and detect staircases. A positive thing when using the technique of building a map is that when the robot returns to a place where it already has been it have the information and can avoid the detected objects. The drawback for such sensor system is that the Gira is going to interact with people and therefore will detect people (objects) and bookkeep them into the map. Because of that, the system with a predened map [3] can be excluded. The Gira is going to be operated in dierent homes which are changing over time and it would be impossible to create a predened map over the home. Even if the system use the same technique with certainty grids as [4] and [5] the probability that the robot will bookkeep a person as a static object is still very high.

The solution chosen for the sensor system does not use a map to help avoid objects and staircases due to the reasons stated in the previous paragraph. Another advantage of not using a map is that the amount of persistent environment data is low compared to if a map based algorithm is used.

Instead a solution where the speed is limited depending on the distance to the object is presented.

By limiting the speed depending on the distance to the object detected and keeping that speed for a short distance the system helps the robot from crashing into objects at full speed. A requirement stated by the company is that the speed should never be reduced to zero as long as the system does not detect a stairway. The reason is that if a person is situated in front of the robot, and the sensor system reduces the speed to zero,

(24)

there is no way to drive past the person. But if the robot is slowly moving forward, the person will move out of the way. Other benets include being able to push on a door to open it or move other objects. For obvious reasons when a stairway is detected, the speed must be reduced to zero.

The collision avoidance system is time dependent and needs to work at all time. It can not depend on the network connection or the serial communication. If the data is delayed, that time could be enough for a collision. Therefore the calculations and the data handling for the sensor system are placed in the microcontroller. If the calculations were handled by the main computer they could be more advanced, but now they have to be kept as small and ecient as possible.

(25)

8 Results and analysis

8.1 Stairway avoidance system

8.1.1 Sensor system

Sensor measurements

To make it possible to eciently take many measurements, especially at many angles towards an object, the sensors are mounted on a servo which can be turned 120 degrees. The servo, a Hitec HS-81, is controlled by an ATmega16 which is also communicating with a computer through the serial port. The code for the ATmega can be found in appendix C. To connect an ATmega to the computer a converter between the 5V serial signal used by the ATmega and the serial TTL level used by the computer is needed. In this case a STK500 card, which includes a MAX202 IC, is used.

In the computer a program that can receive and transmit serial data needs to be installed. There are many free versions of these programs. We have selected "Putty". The following settings are used in the program:

Baudrate 4800𝑏𝑖𝑡𝑠/𝑠 Data bits 8𝑏𝑖𝑡𝑠 Stop bits 1𝑏𝑖𝑡𝑠 Parity bits 𝑁𝑜𝑛𝑒

The program written for the servo takes the height of the servo and which sensor to use as input. This to make it possible for the ATmega to calculate the expected distance to the object.

(26)

The sensor is positioned a distance d from the rotating point of the servo and the height of the sensor plus half the height of the mounting plate will give the height h in the other direction. The angle 0 is when the sensor is perpendicular to the object, see (gure 8.1(a)) and 90 degrees is parallel to the object, see (gure 8.1(b)). 𝐷1 is the distance to

the object when the sensor is perpendicular to the object. The beam width of both Sharp infrared sensors are small and are modeled as line beams, with zero width. The distance between the sensor and the object is calculated from equation (8.1) and is included in all measurement results.

𝐷(𝜃) = 𝐷1+ (𝑑 ∗ sin 𝜃) − (ℎ ∗ cos 𝜃) (8.1)

where:

𝜃 = sensor angle

D = calculated distance

𝐷1 = distance to object when perpendicular

d = distance from sensor to servo rotating point

h = height of sensor and half the thickness of the mounting plate

(a) The sensor is perpendicular (0

de-grees) to the object (b) The sensor is parallel (90 degrees) tothe object

Figure 8.1: Measurement rig. The object is placed to the left in both pictures. The objects used to measure the sensors are a black carpet, a blue carpet(same as the black carpet except the color) and a shiny whiteboard. The black carpet is chosen to test a black surface and the blue carpet is to conrm that it is the color and not the structure of the carpet that is impacting the measurements. The whiteboard is to measure against a shiny object.

(27)

Sharp GP2Y0A02YK(20-150cm)

The results of the measurements (Figure 8.2) of this sensor is showing some interesting facts. Figure 8.2(a) illustrates one of the drawbacks of the Sharp sensor. When the dis-tance is below 20cm it returns invalid disdis-tance measurements. It also indicates that it is hard to predict when an invalid reading occurs since the distance read could have any value. The color of the object also aects the reading which makes it impossible, without knowing the color of the object, to determine if the reading is valid or not.

The whiteboard and the blue carpet shows similar results and the measurement error increase with distance but can be considered as constant and angle independent.

The black carpet, as expected, returns the worst results. The results in gures 8.2(b)-8.2(d) shows both angle and distance should be kept as low as possible to avoid wrong readings.

(a) Starting distance 1cm (b) Starting distance 17cm

(c) Starting distance 27cm (d) Starting distance 37cm

(28)

Sharp GP2Y0A21(10-80cm)

Compared to the previous Sharp sensor this one is better at short distances, shorter than 20 cm. The distance reading is correct down to 10cm and below that distance the error is quite small compared to the longer sensor. It is also easier to predict when a false reading occur since the value never exceeds 20cm. On the other hand, this sensor has a larger error when the distance is around 35cm and above that. Black color is still the main problem but even the error when measuring on the blue carpet is larger when distance increases. The result is that this sensor can be used if the distance measured is a bit shorter than the longer sensor, 35cm and below.

(a) Starting distance 2cm (b) Starting distance 18cm

(c) Starting distance 27cm (d) Starting distance 37cm

Figure 8.3: Measurement data for GP2Y0A02YK(10-80cm). Positioning

The results of the measurements show that the positioning of the sensors for staircase detection will be severely constrained. Because of the distance it takes to stop the Gira the sensor needs to be aimed at least 35cm in front of the Gira. The results of the measurements states that the sensor beam needs to be kept as short as possible, no more than 40cm. The only place available to fulll these requirements is on the plastic base. The number of sensors needs to be minimized to keep the total system cost as low as possible. Using only one sensor may be rejected right away because the Gira needs to detect stairways when approaching from the front and from the side. A Matlab calcu-lation was done to calculate whether it is possible to just use 2 sensors. To solve these calculations there are a few things that needs to be taken in consideration.

There are no building rules that dene a minimum width of a stairway. According to SSC Skellefteå AB, a company that designs and builds stairways, there is no minimum

(29)

width of a stairway inside a home. Where it is possible they design it to minimum 90cm, otherwise they narrow it down. When the stairway gets smaller also the walls and the railing gets closer if driving close to a stairway. This means that the obstacle detection system would benecially slow the robot down so the system does not have to detect the stairway until it is closer to it.

The height of the sensor relative to the oor is a parameter that needs to be as short as possible. The plastic base of the Gira is the only place were the beam can be placed low enough to have sucient range along the oor. The lowest position to still have a reasonable fastening possibilities is 10cm. This is a xed value in the calculations but can be changed as long as the beam length is as short as required.

There are a innite number of approach paths to a stairway with the Gira. There are also a tremendous number of stairway designs. Our solution space can manage by considering a few edge cases when calculating the number of sensors needed. To make it easier to see the results of the calculations a 3D room is simulated and visualized in Matlab. The room contains a stairway that is 80cm wide and a few walls. The lower part of the Gira base is also plotted into the room at the chosen positions.

(a) Top view of the 3D room (b) 3D view of the room

(30)

Figures 8.5(a) and 8.5(b) shows the dierent variables used in the calculations. Beta is the angle that the sensor is facing where 0 degrees is dened as pointing straight forward. We simulate 46 dierent beta angles for each sensor, which means we are simulating in two degree increments. We also simulate 51 positions (values of g) on the base for the sensor, two positions per cm since the robot base radius is 25cm. The sensors are to be placed symmetrically on both sides which means that the calculations only need to be done on one side. This gives 51*46 = 2346 possible beam location to test for the edge cases. 𝛼 and the height h is xed in this test and can be changed if required. In the rst test case 𝛼 is chosen so that the beam is as close as possible to the stairway edge without hitting it. In theory a distance longer than 40cm would indicate a stairway. Due to the fact that the infrared sensor are color dependent and the sensor readings varies with the color the distance 40cm can not be used to distinguish a stairway. A black carpet would make the sensor reading vary around 40 cm and therefore a threshold value of 55cm is used to compensate for that.

(a) Variables used when calculat-ing sensor placement uscalculat-ing two sensors

(b) Variables used when calculating sensor placement, from side

(31)

Two sensor calculations

The rst edge case is when the Gira is going full speed towards the stairway, gure 8.6. All possible sensor beams are plotted in dierent colors depending on the result of the cal-culation.

Figure 8.6: Result of edge case 1 in the two sensor calculation.

∙ Blue = The beam does not hit the stairway area.

This means that the beam hits the area outside of the stairway area, ei-ther a wall or the oor.

∙ Red = The beam is not long enough to detect a stairway. The threshold value needs to be ex-ceeded for the sensor to detect a stairway. The red beams is shorter then this threshold value.

∙ Cyan = The beam length is originally to long, longer than 40cm.

The beam length when driving on regular oor needs to be maximum 40cm. A cyan beam means that this is not fullled.

∙ Green = Beam is ok.

A green beam means that the beam satises the constraints for this case and may be used.

The result of this calculation showes that the only beams possible to chose from are the ones that point either straight forward or nearly straight forward. Thirty-seven beams satisify all the constraints. These green beams are run through the next edge case.

(32)

The second edge case is when approaching the stairway from the side. In this case the distance it takes to stop the Gira is decreased by the obstacle detection system due to the fact that a stairway always has a railing or a wall next to it. The distance to stop in this case is 15cm. All sensor beams that were valid from case 1 is now tested again in this case with the following result:

Figure 8.7: Result of edge case 2 in the two sensor calculation.

∙ Blue = The beam does not hit the stairway area.

This means that the beam hits the area outside of the stairway area, ei-ther a wall or the oor.

∙ Magenta = The beam hits the nearest wall.

The beam hits the nearest wall.

∙ Yellow = The beam hits the

oor before the stairway area. The beam goes through the oor and then into the stairway area.

∙ Green = Beam is ok.

A green beam means that the beam satises the constraints for this case and may be used.

The result of this shows that there is no possible way to place two sensors in a manner that covers the edge cases. There is no way moving the sensor up or change the angle 𝛼 to overcome this limitations. Because of these calculations, a three sensor solution must be considered.

Three sensor calculations

Figure 8.8: Variables used when calculating sensor placement using three sensors

The third sensor is positioned at the front facing straight forward. This removes the case were the Gira going straight towards the stairway in full speed, in other words edge case 1 in the calculations for two sen-sors. The calculations are now done with the two side sensors to conrm that there is a placement that fulll the requirements. As with the previous calculations, symme-try is applied and only calculations for one of the sensors have to be made.

(33)

In these calculations, 51 𝜉 values is used instead of 51 g values to get a equal distri-bution over the base. 𝛼 is chosen so the Gira can detect a stairway if it drives 20cm or closer to a stairway sideways. 20cm is chosen because if the sensor system allows the user to drive closer it can feel dangerous.

The rst edge case is the same as the second edge case as for the calculations for two sensors.

Figure 8.9: Result of edge case 1 in the three sensor calculation.

∙ Blue = The beam does not hit the stairway area.

This means that the beam hits the area outside of the stairway area, ei-ther a wall or the oor.

∙ Magenta = The beam hits the nearest wall.

The beam hits the nearest wall. ∙ Red = The beam is not long

enough to detect a stairway. The threshold value needs to be ex-ceeded for the sensor to detect a stairway. The red beams is shorter then this threshold value.

∙ Cyan = The beam length is originally to long, longer than 40cm.

The beam length when driving on regular oor needs to be maximum 40cm. A cyan beam means that this is not fullled.

∙ Green = Beam is ok.

A green beam means that the beam satises the constraints for this case and may be used.

After this edge case there is 355 possible beams left for the next edge case. The next edge case concerns whether there is a wall or a railing separating the stairway from a room. The Gira can be turned around the corner and needs to detect the stairway with a margin. In this case the Gira's left wheel get so close to the stairway that an extra 20 degrees angle to the stairway is chosen for the Gira's stop position. The speed of the Gira in this case is slow and the distance it takes to stop the Gira used is zero.

(34)

Figure 8.10: Result of edge case 2 in the three sensor calculation.

∙ Blue = The beam does not hit the stairway area.

This means that the beam hits the area outside of the stairway area, ei-ther a wall or the oor.

∙ Magenta = The beam hits the nearest wall.

The beam hits the nearest wall.

∙ Yellow = The beam hits the

oor before the stairway area. The beam goes through the oor and then into the stairway area.

∙ Red = The beam is not long enough to detect a stairway. The threshold value needs to be ex-ceeded for the sensor to detect a stairway. The red beams is shorter then this threshold value.

∙ Green = Beam is ok.

A green beam means that the beam satises the constraints for this case and may be used.

This case removed a few of the straight beams. 349 possible beam congurations are now left for the next edge case.

(35)

The last edge case concerns driving towards a stairway when aiming at a point where the middle sensor is close to detecting the stairway but does not detect it. The robot position is calculated so the middle sensor beam is 55cm long and the robot is 35cm from the stairway. In this position the side sensor needs to detect the stairway.

Figure 8.11: Result of edge case 3 in the three sensor calculation.

∙ Blue = The beam does not hit the stairway area.

This means that the beam hits the area outside of the stairway area, ei-ther a wall or the oor.

∙ Yellow = The beam hits the

oor before the stairway area. The beam goes through the oor and then into the stairway area.

∙ Red = The beam is not long enough to detect a stairway. The threshold value needs to be ex-ceeded for the sensor to detect a stairway. The red beams is shorter then this threshold value.

∙ Green = Beam is ok.

A green beam means that the beam satises the constraints for this case and may be used.

The nal result is that we have 148 possible positionings, all of them listed in appendix B. Since fasteners will be a bit easier to make if the angle 𝛽 is chosen to be equal to the angle 𝜉. There are ve possible beams that fulll that requirement:

𝛽 𝛼 𝜉 Beam length(cm) 1 47.9 14.9 47.9 38.8 2 49.9 15.7 49.9 36.9 3 51.8 16.5 51.8 35.2 4 53.8 17.3 53.8 33.7 5 55.8 18.0 55.8 32.3

Table 8.1: The ve beams with the same 𝛽 and 𝜉.

The Gira base would probably not look exactly the same for each robot during the development. Because of this the beam in the middle of the ve beams left is chosen,

(36)

Position of the back sensors

Because of the possibility to drive the Gira backwards in dierent directions sensors needs to be placed at the back as well. The same procedure for the forward sensors is repeated. The dierence is that when driving backwards the top speed is low and the distance it takes to stop the Gira is only 3cm. The distance used in the calculation is 5cm so there is a margin to the stairway.

To use just one sensor is not possible since it is possible to approach a stairway from the side. The calculations for two sensors starts with the case were the Gira is ap-proaching the stairway from the side.

Figure 8.12: Result of edge case 1 in the backward sensor calculation.

∙ Blue = The beam does not hit the stairway area.

This means that the beam hits the area outside of the stairway area, ei-ther a wall or the oor.

∙ Magenta = The beam hits the nearest wall.

The beam hits the nearest wall. ∙ Red = The beam is not long

enough to detect a stairway. The threshold value needs to be ex-ceeded for the sensor to detect a stairway. The red beams is shorter then this threshold value.

∙ Cyan = The beam length is originally to long, longer than 40cm.

The beam length when driving on regular oor needs to be maximum 40cm. A cyan beam means that this is not fullled.

∙ Green = Beam is ok.

A green beam means that the beam satises the constraints for this case and may be used.

There are 1344 possible placements left after this case. Next case is when the Gira is going full speed towards the middle of the stairway.

(37)

Figure 8.13: Result of edge case 2 in the backward sensor calculation.

∙ Blue = The beam does not hit the stairway area.

This means that the beam hits the area outside of the stairway area, ei-ther a wall or the oor.

∙ Yellow = The beam hits the

oor before the stairway area. The beam goes through the oor and then into the stairway area.

∙ Red = The beam is not long enough to detect a stairway. The threshold value needs to be ex-ceeded for the sensor to detect a stairway. The red beams is shorter then this threshold value.

∙ Green = Beam is ok.

A green beam means that the beam satises the constraints for this case and may be used.

There are 522 possible positions for the sensors. The same choice as last system is made and the middle one of all possibilities is chosen, number 4 from table 8.2.

𝛽 𝛼 𝜉 Beam length(cm) 1 30.3 15.5 30.3 37.5 2 32.3 17.1 32.3 34.1 3 34.2 18.7 34.2 31.2 4 36.2 20.4 36.2 28.6 5 38.2 22.3 38.2 26.4 6 40.1 24.1 40.1 24.5 7 42.1 26.1 42.1 22.8 8 44.0 28.1 44.0 21.2

(38)

Calculations of the middle sensor positioning

Figure 8.14: The angle is calculated using the height and the maximum beam length. The placement of the middle sensor of the

three forward pointing stairway detection sensors can not be placed as low as the side sensors due to the construction of the Gi-ra robot. The maximum beam length is 400mm and the sensor needs to be placed as low as possible to get the longest detec-tion range. The placement of the castor wheel makes the lowest attachment point for the sensor 175mm, that combined with the maximum beam length (400mm) gives an angle towards the oor of 25.95 degrees. Sensor recommendation

To get a fully working stairway detection system there are ve sensors that have to be used. The recommended sensors for the dierent positions is that if the beam length is 40cm or close to it then the longer sensor(20-120cm) should be chosen. All sensors pointing forward are having a long beam which means that the longer sensor should be used. The two sensors that are pointing backwards are shorter and the shorter sensor is recommended to use.

Design with two dierent sensors is not preferable from an economic perspective. This because a higher discount is given if more sensors of the same kind are bought. With current distance it takes to stop the Gira the longer sensor is recommended because of the beam length of the front sensor(40cm). If the shorter sensor is chosen to be used it is recommended that the top speed of the Gira is being reduced.

Construction of sensor mounts

Figure 8.15: Figure showing the side sensor mounts mounted on the inside of the plastic base.

Sensor mounts are modeled in SolidWorks and constructed using a CNC-machine. The two mounts for the side sensors are designed so the sensors form a right an-gle with the ground. Several parts to the Gira robot is currently produced using a laser cutter. Therefore the sensor mounts are designed so they can be produced using the same technique, and still fulll their task in a satisfying way.

A hole is cut on both sides at the right lo-cation on the plastic base. 𝜉 was chosen from the previous calculations and there-fore the holes are cut at that angle on both sides of the center of the robot.

(39)

The middle sensor mount consists of two parts, one part that is attached to the robot and has the right angle towards the ground. The other part is a simple mounting plate for the sensor. The two parts are glued together, and the sensor is screwed to the mounting plate.

Visualization of sensors

Figure 8.16: An IR-camera is aimed to get an idea of what the sensors gets back. To get a better idea of the reection of

light on dierent surfaces an IR-camera is made. This is done by changing the lter, which is usually an IR-lter, in a regular web camera to a visible light lter. The lter can easily be made of over exposed photo lm. Three dierent surfaces are studied, a whiteboard, a black carpet and a black blank surface. The two dierent IR-sensors are mounted with the camera above them, gure 8.16. Both sensors are mounted as the forward middle sensor with the beam length 40cm. The result can be seen in gure 8.17. The white surface is the optimal surface and more than enough energy is returned to the sensor. The black surface are shown to reect much less

en-ergy back compared with the white surface. The black blank surface is slightly worse than the black carpet. The measurement values read from the sensors when aiming at the black blank surface is the same as when no object is in front of the sensor, the sensor does not detect it at all. Figure 8.17 shows that even if no distance can be read from the sensor there is still light that is reected back. Therefore a distance sensor that works on black surfaces is certainly theoretically possible.

(a) Whiteboard surface. (b) Black carpet. (c) Black blank surface.

Figure 8.17: Sensor beams watched through an IR-camera.

8.1.2 Software

Writing the software for the stairway avoidance system does not include any complicated features. The Gira robot should stop if one of the ve sensors indicates that a stairway is detected. When positioning the sensors, a lot of work was done to investigate the fact that the infrared sensors could handle black oors. Those measurements gave the results

(40)

that the sensor beam should not be any longer than 40cm, and was therefore placed to fulll that criteria. With this the stairway detection system should not indicate a stairway as long as the sensors give a value that is 40cm. Due to the fact that the IR-sensors are color sensitive, black oors could give a higher value than the calculated and expected value. Because of that the sensors have their threshold value a bit higher, 55cm.

8.1.3 Implementing and testing

Test number one is performed by accelerating the Gira robot to full speed and then driving straight to the stairway edge. The test is done on both a blue carpet and a black carpet.

This test was a success on both carpets, the Gira slowed down and stopped before it fell over the edge. Two other tests were also performed. First the Gira was accelerated to full speed and driven to the stairway with a 45 degree angle, and in the second test with a 30 degree angle. These two tests also gave positive results. Another test with a very dark blue long pile rug was done with excellent results.

Infrared sensors can be aected by the sunlight and give false or wrong readings due to that. Therefore the sensors are tested outside on a clear and sunny day. The test is performed by looking at the sensor values when the robot is placed on dierent locations and on dierent surfaces. First on a black carpet, then a blue carpet and last on a white-board. The result was that the sunlight did not aect the sensor and no false or wrong readings were detected.

The nal analysis is that the stairway avoidance system works well. The only prob-lem found was a pitch black shiny table foot. When the IR-sensors hit this surface the sensor does not get any value back and that is of course not satisfying. Obviously the sensor system will not work on mirrors, or mirror like oors. No deeper research has been performed to investigate the percentage of homes that fulll the worst case scenario, mir-ror like oors and a stairway at the same oor. But when asking around among friends and family no one could remember any home that fullled the two cases. Future research must be done to get a more correct and statistic value to lean on.

Both cases must be fullled to become a problem. If there is a mirror like oor but no stairway is present the system is not needed anyway and can be disabled. If there is a stairway but no mirror like oor, the system works and everything is ne.

8.2 Obstacle avoidance system

8.2.1 Sensor system

Sensor measurements

The measurements are done in the same way as the IR distance sensors. When calculating the distance for the ultrasonic sensors the beam width is taken in consideration. Because of this a new equation is added (8.2) along with the previous one (8.1). The new equation (8.2) is used when the angle of the sensor is larger than half beam angle of the sensor,

(41)

which is approximately 34 degrees. 𝐷 = 𝐷1+ (𝑑 ∗ sin 𝜃) − (ℎ ∗ cos 𝜃) 𝑐𝑜𝑠𝜃 (8.2) where: 𝜃 = sensor angle D = calculated distance

𝐷1 = distance to object when perpendicular

d = distance from sensor to servo rotating point

h = height of sensor and half the thickness of the mounting plate Maxbotix XL-MaxSonar-AE0(MB1300)

The rst measurements are done with the results shown in gure (8.18). The results shows that the calculated value is not correct at large sensor angles and conrms how hard it is to predict the detections area of an ultrasonic sensor. Dierent objects and surfaces will give dierent results. The optimal wide beam US distance sensor would give the same distance independent of angle. The conclusion of these results are that the sensor works well for almost all angles and distances when measuring on a plastic oor. The main issue is around 40-60 degrees when measuring on the longer distances.

The carpet changes the results, especially for the longer distances. Angles over 60 degrees is only detected at short distance and when the distance is 95cm the angle needs to be smaller than 40 degrees to get an accurate measurement. Overall the result shows that angles below 40 degrees should be used as much as possible.

(a) Starting distance 20cm (b) Starting distance 40cm

(c) Starting distance 75cm (d) Starting distance 95cm

(42)

Positioning

It is harder to calculate the positioning and number of sensors in this system. As an innite number of obstacles that could be found in a home, it is unreasonable to ex-haustively test the system with all possible environmental congurations. By picking out some common objects found in a home, an estimation of the best sensor positions can be made.

∙ Tables.

A common height for a table is 80cm but this can vary quite a lot. To just detect a single table for an ultrasonic sensor is easy when the sensor is positioned a distance from a table, around 1m or more and aimed towards the table. This is because the sensor hits the side of the table or the legs. If moving the sensor closer to the table the height of the sensor is critical. If the sensor is under or over the table when getting close, it could miss the table.

∙ Sitting furniture (chairs, sofas etc.).

This is a similar object to the table except the height is usually 40cm. The obstacle is generally detected but often it is not the nearest edge of the object that is detected. For example, the back of a chair is detected and not the seat.

∙ Wall.

A wall is a big at surface and depending on the material of the wall and the angle between the sensor and the wall it could act like a mirror for the ultrasound. Since the height of a table often is 80cm and a the height of a sitting furniture often is 40cm the ultrasonic sensor is placed at a height of 60cm looking aligned parallel to the oor. After some tests it turned out that the sensor did not detect either the tables or the sitting furniture in a satisfying way.

Therefore a new attempt where the sensor is placed at 40cm and tilted 30 degrees up-wards. 30 degrees is chosen because the previous test results showed that the objects always were detected. The test results showed that the sensor detects both sitting furni-tures and tables but it did not detect objects in wide enough area in front of the Gira. Therefore, another sensor needs to be added.

The sensors can not be placed wide enough apart due to the construction of the Gi-ra. Therefore the sensors must be aimed outwards cover a wider area. Due to the fact that the sensors now are tilted in two directions more tests were performed to nd out how the detection area is aected.

(43)

(a) Starting distance 30cm, second angle 30

de-grees (b) Starting distance 30cm, second angle 45 de-grees

Figure 8.19: Measurement data for XL-MaxSonar-AE0(MB1300).

The result of these measurements conrms that we should avoid the angles around 45 degrees. 30 degrees are chosen takeing the measurements in consideration. Both sensors were mounted on the Gira and tests were performed by driving the Gira around. These tests showed that it missed thin objects that are in the area between the sensors. When the angle was changed to 20 degrees, more satisfying results were achieved.

Using more than one Ultrasonic sensor

If more than one ultrasonic sensor is going to be used where they can interfere with each other they need to be controlled so they do not interfere. The sensors need to take turns for the measurements so they do not get any of the other sensors emitted energy back. There are a few ways of doing this control for the Maxbotix ultrasonic sensors. The most ecient way is to connect the sensors is in a Daisy Chain with Constantly Looping[11]. The microcontroller need to "kick start" the chain by giving the rst sensor a start pulse. When that sensor is nished with a reading it will output a pulse on the TX pin which will be the start pulse for sensor number two. To do this connection only one pin of the microcontroller is needed and the only extra thing the microcontroller need to do is to "kick start" the chain.

Figure

Figure 2.1: The Gira robot in action.
Figure 2.3: A schematic overview over the Gira.
Figure 2.4: The new design of the Gira with its screen at the lowest position.
Figure 5.1: Sunlight energy(%) vs. wave- wave-length graph.[1]
+7

References

Related documents

we develop an RL framework for personalisation that allows a robot to select verbal supportive behaviours to maximize user’s task performance and positive reac- tions to the

People who make their own clothes make a statement – “I go my own way.“ This can be grounded in political views, a lack of economical funds or simply for loving the craft.Because

För det här projektet används en IR mottagare för att tolka och läsa in IR signaler, och sedan också en IR sändare för att skicka dessa. Allt detta kommer att styras av en

The project involved construction of series of dimers of the head-to-tail binder by inserting different length peptide linkers between the two identical copies of Affibody ®..

The judicial system consists of three different types of courts: the ordinary courts (the district courts, the courts of appeal and the Supreme Court), the general

I rapporten åberopas till exempel en teoretisk modell för skolkonkurrens, formulerad av MacLeod och Urquiola (2015), som stöd för att skolmarknader inte fungerar väl. Men

The multivariate regression models analyzing the steps towards elected office further drive home the point that the small and inconsistent immigrant–native differences in the

• Företagens enda sociala ansvar är att maximera sin lönsamhet (Friedman, 1970). Vi anser att de fördelar och nackdelar som debatten medför ökar problematiken angående