Obstacle Detection and Avoidance

download Obstacle Detection and Avoidance

of 64

  • date post

    07-Apr-2018
  • Category

    Documents

  • view

    225
  • download

    1

Embed Size (px)

Transcript of Obstacle Detection and Avoidance

  • 8/6/2019 Obstacle Detection and Avoidance

    1/64

    Christopher A. Ryther

    Ole B. Madsen

    Obstacle Detection and Avoidancefor Mobile Robots

    Bachelors Thesis June 2009

  • 8/6/2019 Obstacle Detection and Avoidance

    2/64

  • 8/6/2019 Obstacle Detection and Avoidance

    3/64

    Christopher A. Ryther

    Ole B. Madsen

    Obstacle Detection and Avoidancefor Mobile Robots

    Bachelors Thesis June 2009

  • 8/6/2019 Obstacle Detection and Avoidance

    4/64

  • 8/6/2019 Obstacle Detection and Avoidance

    5/64

    Obstacle Detection and Avoidance for Mobile Robots

    Report written byChristopher A. RytherOle B. Madsen

    Advisor(s)Nils Axel Andersen (naa@elektro.dtu.dk)Ole Ravn (or@elektro.dtu.dk)

    Project period: February - June, 2009

    ECTS: 15

    Education: Bachelor of Science in Engineering (BSc)

    Field: Electro technology

    Class: 1 (public)

    Edition: 1st edition

    Remarks: This report is submitted as partial fulfillment of the require-ments for graduation in the above education at the TechnicalUniversity of Denmark.

    Copyrights: c C. Ryther & O. Madsen, 2009

    DTU ElektroTechnical University of DenmarkDK-2800 Kgs. LyngbyDenmark

    E-mail: studieadministration@elektro.dtu.dk

  • 8/6/2019 Obstacle Detection and Avoidance

    6/64

    Abstract

    This report details the work performed over five months for a bachelorsthesis at the Technical University of Denmark (DTU). The project presentsan obstacle avoidance plug-in module for a laser scanner application. Acommon wavefront algorithm is used for path planning and a fixed cell sizegrid map is used for the internal representation of the environment. Thefundamental parts of the obstacle avoidance functionality are first testedin simulated environments, and ultimately the entire system is tested ona differential-drive robot mounted with a laser scanner, in three differentscenarios. The report concludes that, under the given conditions, the plug-

    in proves to effectively complete the proposed test missions while avoidingobstacles.

  • 8/6/2019 Obstacle Detection and Avoidance

    7/64

  • 8/6/2019 Obstacle Detection and Avoidance

    8/64

    Summary

    Mobile robots are complex systems comprised of numerous sub-technologies,many of which still have a lot of potential for improvement. Navigation andmission planning, which are some of the most critical aspects of a mobilerobot, are the primary subjects of this thesis.

    Using a small differential-drive robot, mounted with a laser scanner, thisproject seeks to implement an obstacle avoidance system and validate its ef-fectiveness through different test scenarios. For this purpose the two aspectsof greatest importance are the internal representation of the surroundings

    and the search algorithm with which to plan a collision-free route.

    The data received from the laser scanner is transformed and mapped intoan internal fixed cell size grid map. From this map a modified wavefrontalgorithm is used to plan a safe path for the robot. Other functionality suchas relocating the goal when it is unreachable, and resetting the map for longmissions is implemented to increase the number of scenarios the plug-in canhandle.

    The obstacle avoidance system is tested on different platforms throughoutthe development. It is first partially simulated and tested in MatLab andthen in C. Finally the whole program is implemented as a plug-in for the

    laser scanner in C++.

    The entire system is tested as a plug-in on the mobile robot in three scenariosincluding a custom one-way maze and a long obstacle-filled hallway. Missionsof up to 10 meters have been completed in this way.

    In conclusion, the fundamental parts of the plug-in work perfectly underideal conditions and can navigate a mobile robot through many types ofenvironments. However because the plug-in is sensitive to robot odometry,and because the world can present many more scenarios than tested in theproject, there is much potential for future work.

  • 8/6/2019 Obstacle Detection and Avoidance

    9/64

  • 8/6/2019 Obstacle Detection and Avoidance

    10/64

    Contents

    1 Introduction 1

    1.1 Thesis Statement . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1.2 Work by Others . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    2 The SMR Platform 3

    2.1 The Small Mobile Robot . . . . . . . . . . . . . . . . . . . . . 3

    2.2 Laser Scanner . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    3 Map Building 5

    3.1 Map Representations . . . . . . . . . . . . . . . . . . . . . . . 5

    3.2 Fixed Cell Size Grid Map . . . . . . . . . . . . . . . . . . . . 6

    3.3 Bresenham Line Algorithm . . . . . . . . . . . . . . . . . . . 7

    3.4 Map Dilation . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    3.5 Map Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    4 Path Planning 11

    4.1 Types of Path Planning . . . . . . . . . . . . . . . . . . . . . 11

    4.2 Goal Location . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    4.3 The Wavefront Planner . . . . . . . . . . . . . . . . . . . . . 12

    4.4 Planning The Route . . . . . . . . . . . . . . . . . . . . . . . 14

    4.5 Line Finder . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

  • 8/6/2019 Obstacle Detection and Avoidance

    11/64

    5 Program Structure 17

    5.1 Program Structure . . . . . . . . . . . . . . . . . . . . . . . . 17

    5.2 SMRCL Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    6 Results 21

    6.1 Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    6.1.1 Testing the Grid Map and Dilated Map . . . . . . . . 21

    6.1.2 Testing the Wavefront Planner . . . . . . . . . . . . . 22

    6.2 Practical Tests . . . . . . . . . . . . . . . . . . . . . . . . . . 236.2.1 Laser Scan to Grid Map . . . . . . . . . . . . . . . . . 23

    6.2.2 Plan Path from Dilated Map . . . . . . . . . . . . . . 24

    6.2.3 Scenario: Simple Avoidance with a Few Boxes . . . . 24

    6.2.4 Scenario: Maze . . . . . . . . . . . . . . . . . . . . . . 26

    6.2.5 Scenario: Hallway . . . . . . . . . . . . . . . . . . . . 27

    6.2.6 Repeated Runs . . . . . . . . . . . . . . . . . . . . . . 29

    7 Conclusion 31

    7.1 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    7.1.1 Implementation in Autonomous Tractor . . . . . . . . 32

    7.1.2 Gradient Map . . . . . . . . . . . . . . . . . . . . . . . 32

    7.1.3 Odometry Correction Using Pattern Recognition . . . 33

    7.1.4 Obstacle Tracking . . . . . . . . . . . . . . . . . . . . 33

    Bibliography 34

    Appendix 36

    A Command Reference for SMR-CL 37

    B User Manual 39

    C Example SMR-CL script 41

  • 8/6/2019 Obstacle Detection and Avoidance

    12/64

    vii

    D Results from repeated runs 43

  • 8/6/2019 Obstacle Detection and Avoidance

    13/64

    viii

  • 8/6/2019 Obstacle Detection and Avoidance

    14/64

    List of Figures

    2.1 Laser scanner example . . . . . . . . . . . . . . . . . . . . . . 4

    3.1 Variable cell size map . . . . . . . . . . . . . . . . . . . . . . 6

    3.2 Fixed cell size representation of figure 3.1 . . . . . . . . . . . 7

    3.3 Bresenhams line algorithm . . . . . . . . . . . . . . . . . . . 7

    3.4 Scattered measurement points averaged by dilation . . . . . . 8

    4.1 Clearing the area around the robot . . . . . . . . . . . . . . . 14

    4.2 Drawing a circle around the robot . . . . . . . . . . . . . . . 15

    5.1 Program archictecture for control of the SMR . . . . . . . . . 17

    5.2 Temporal diagram . . . . . . . . . . . . . . . . . . . . . . . . 18

    5.3 Flowchart diagram of the plug-in . . . . . . . . . . . . . . . . 19

    6.1 Simulated map dilation and wavefront expansion . . . . . . . 226.2 Testing the grid map with real data . . . . . . . . . . . . . . 23

    6.3 Testing path planning with real data . . . . . . . . . . . . . . 24

    6.4 Photograph of simple setup . . . . . . . . . . . . . . . . . . . 25

    6.5 Grid map from the simple setup . . . . . . . . . . . . . . . . 25

    6.6 Rotated grid map from the simple setup . . . . . . . . . . . . 26

    6.7 Photograph of maze . . . . . . . . . . . . . . . . . . . . . . . 26

  • 8/6/2019 Obstacle Detection and Avoidance

    15/64

    x LIST OF FIGURES

    6.8 Grid map from the maze . . . . . . . . . . . . . . . . . . . . . 27

    6.9 Photograph of the hallway . . . . . . . . . . . . . . . . . . . . 28

    6.10 Combined grid map from the hallway . . . . . . . . . . . . . 28

  • 8/6/2019 Obstacle Detection and Avoidance

    16/64

    Chapter 1

    Introduction

    Mobile robots have until recently primarily been used in