Click here to load reader
View
2
Download
0
Embed Size (px)
Simultaneous localization and mapping (SLAM) with an autonomous robot
Md. Shadnan Azwad Khan 13321076
Shoumik Sharar Chowdhury 17141025
Nafis Rafat Niloy 13115001
Fatema Tuz Zohra Aurin 13101025
Supervisor: Dr. Tarem Ahmed
Co-Supervisor: Moin Mostakim
Submitted to:
Department of Electrical and Electronic Engineering
School of Engineering and Computer Science
BRAC University
Declaration
We, hereby declare that this thesis project, neither in whole or in part, has been
previously submitted for any degree. It has been completed based on the knowledge we
have acquired and implemented ourselves. Materials of work accomplished by others and
the references gained from the official websites are mentioned by reference.
____________________________
Md. Shadnan Azwad Khan
____________________________
Shoumik Sharar Chowdhury
____________________________
Nafis Rafat Niloy
____________________________
Fatema Tuz Zohra Aurin
Under the supervision of,
____________________________
Dr. Tarem Ahmed
Assistant Professor
Department of Electrical and
Electronic Engineering
Acknowledgement
We have been, throughout this thesis, fortunate to have the support of our friends, family and
mentors. In particular, we would like to thank our supervisor Dr. Tarem Ahmed for guidance,
patience and for taking immense interest in our work, and Moin Mostakim for sharing his
knowledge and insight on some of the finer algorithms we had to work with. We are grateful
for the support from the esteemed faculties and technicians of the School of Engineering and
Computer Science. This thesis would not have been possible without their help.
List of Figures
1. Rover locomotion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
2. A map produced by the Arduino Rover project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3. Raspberry Pi 3 Model B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14
4. Raspberry Pi 3 Model B pin diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5. Ultrasonic Range Sensor HC SR04 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
6. HC SR04 connection diagram for 3.3V GPIO operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
7. Inertial Measurement Unit (IMU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
8. Figure 8. Wheel encoder with wheel, motor and brackets . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
9. Oscilloscope capture of encoder outputs with the wheel spinning at 630 RPM . . . . . . . . . 18
10. L298N stepper motor driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
11. Pseudocode for sensor sweep . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . .25
12. Pseudocode for dead reckoning . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . 26
13. The movement prediction using rotary angles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
14. The block diagram of the Kalman filter designed for dead reckoning . . . . . . . . . . . . . . . . . 29
15. Applying transform over robot position and sonar measurement to recognize occupied
cells . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31
16. Pseudocode i for navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
17. Pseudocode ii for navigation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
18. An example of what the Matplotlib library does. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
19. Actual map from survey of room. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
20. Map obtained from SLAM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37
List of Tables
1. GPIO connections to sensors and actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2 .Hardware expense. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . .22
3. Sonar uncertainty. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Content
Abstract 1
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2. Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
2.1 SLAM Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3. Hardware Specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . …. . . . . . . . . . . . . . . . . . . .13
3.1.1 Raspberry Pi 3 Model B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.1.2 Sonar Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15
3.1.3 Inertial Measurement Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1.4 Wheel, Gear Motor and Wheel Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1.5 Motor Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1.6 Power Supply Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.2 Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2.1 Robot Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.2.2 Hardware Expense . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4. SLAM Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.1 Relative Positioning and Kalman Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1.1 IMU data handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.1.2 Wheel encoder odometry. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.1.3 Dead Reckoning with Kalman filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.2 Occupancy Grid Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.2.1 Sonar data and uncertainty modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.2.2 Occupancy grid map method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3 Navigation and Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3.1 Motor controller operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3.2 Exploration Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.4 Graphical Representation . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
5. Experimental Results and Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6. Concluding Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.1 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .38
6.2 Limitations and Future work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.3 Conclusion . . . . .