ROS
By Adil Najib
11401048
BACHELOR’S DEGREE in
MECHANICAL ENGINEERING – MECHATRONICS CONCENTRATION FACULTY OF ENGINEERING AND INFORMATION TECHNOLOGY
SWISS GERMAN UNIVERSITY The Prominence Tower
Jalan Jalur Sutera Barat No. 15, Alam Sutera Tangerang, Banten 15143 - Indonesia
Revision after the Thesis Defense on 16 July 2018
Adil Najib STATEMENT BY THE AUTHOR
I hereby declare that this submission is my own work and to the best of my knowledge, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma at any educational institution, except where due acknowledgement is made in the thesis.
Adil Najib
_____________________________________________
Student Date
Approved by:
Dr. Rusman Rusyadi, B.Sc., M.Sc
_____________________________________________
Thesis Advisor Date
Dr. Irvan Setiadi Kartawiria, S.T., M.Sc
_____________________________________________
Dean Date
Adil Najib DEVELOPING OBJECT DETECTION ALGORITHM FOR DELTA ROBOT AS
AUTOMATIC SORTING, PICKING, AND PLACING ROBOT USING ROS
By Adil Najib
Dr. Rusman Rusyadi, B.Sc., M.Sc, Thesis Advisor
SWISS GERMAN UNIVERSITY
This thesis describes automatic sorting robot system based on computer vision technology, which will be implemented to the delta parallel robot with revolute actuators. The idea was to create an object detection algorithm which could easily detect multiple objects with various forms, location, and orientation. Computer vision library, OpenCV, will be used in the image processing process. Besides, the image processing algorithm will be written via C++ program in Qt framework. Contours feature with orientation algorithm is used for objects location and orientation detection solution and transform the object location in the image into the coordinate system. Furthermore, Kalman Filter features is applied to estimate prediction position and orientation of the objects in the delta arm robot area. In addition, a conveyor belt is used to transport the objects towards delta robot area. The delta parallel robot with revolute actuators is used to perform all the pick and placing works. And the robot operating system (ROS) is used to control the communication system in the delta robot, therefore the delta robot can receive objects location and orientation coordinate. In conclusion by developing object detection algorithm using ROS and Kalman filter for delta robot, a robot sorting system is built so the delta robot can sort up to 3 objects based on shape by picking and placing the object into the predefined position.
Keywords: ROS, OpenCV, Delta Robot, Automatic Sorting Robot, Object Detection, Kalman Filter.
Adil Najib
© Copyright 2018 by Adil Najib All rights reserved
Adil Najib DEDICATION
I would like to dedicate my work to my advisor, my lecturers, my family, and my friends for support, advice, understanding, and assistance they provide during the
process of this thesis.
Adil Najib ACKNOWLEDGEMENTS
I would like to thank my advisor, Dr. Rusman Rusyadi, B.Sc., M.Sc., for the patient guidance, support, and advice he has to provide during the process of this thesis work.
I would also like to thank my family and colleges for the supports and presence through the process of this thesis work.
I would also like to thank all the member of staff at SGU workshop who helped me with this thesis works.
Completing this work would have been more difficult were it not for the support and friendship provided by the other members of the mechatronics students in SGU. I am indebted to them for their help.
Adil Najib TABLE OF CONTENTS
Page
STATEMENT BY THE AUTHOR ... 2
ABSTRACT ... 3
DEDICATION ... 5
ACKNOWLEDGEMENTS ... 6
TABLE OF CONTENTS ... 7
LIST OF FIGURES ... 9
LIST OF TABLES ... 11
CHAPTER 1 - INTRODUCTION ... 12
1.1 Background ... 12
1.2 Objectives ... 13
1.3 Hypothesis ... 13
CHAPTER 2 - LITERATURE REVIEW ... 14
2.1 Vision Technology ... 14
2.1.1 The Basic Elements of Vision System ... 14
2.1.2 Application of vision technology ... 17
2.2 Image Processing ... 18
2.2.1 Digital Image ... 18
2.2.2 Fundamental Steps of Image Processing ... 20
2.2.3 Basic Components of Image processing system ... 22
2.2.4 OpenCV library ... 24
2.2.4.1 Grayscale ... 26
2.2.4.2 Gaussian Blur ... 26
2.2.4.3 Erode and Dilate ... 27
2.2.4.4 Canny ... 29
2.2.5 Kalman Filter ... 31
2.3 Robot Operating System (ROS) ... 33
2.3.1 Qt Creator with ROS Plugin ... 35
2.4 Previous Work of Delta Robot Bachelor’s Thesis at SGU ... 36
Adil Najib
3.1 The Existing Model of Delta Robot ... 38
3.2 Vision System Equipment ... 41
3.2.1 Personal Computer ... 41
3.2.2 Camera ... 42
3.3 Vision System Software ... 45
3.3.1 PS3Eye package ... 47
3.3.2 Shape_detector package ... 48
3.3.2.1 Image Filtering And Enhancement ... 50
3.3.2.2 Image Segmentation ... 52
3.3.2.3 Representation and Description ... 53
3.3.2.4 Speed and Angle Detection ... 54
3.3.2.5 Prediction Process ... 57
3.3.3 Coordinate_publisher package ... 59
3.3.4 Communication system ... 62
CHAPTER 4 – RESULTS AND DISCUSSIONS ... 64
4.1 Camera Calibration ... 64
4.2 Image Filtering and Enhancement Result ... 65
4.3 Object Detection ... 70
4.3 Object Orientation ... 74
4.4 Speed Detection ... 76
4.5 World Coordinate ... 85
4.6 Prediction Position ... 86
4.7 Pick and Place ... 87
CHAPTER 5 – CONCLUSIONS AND RECOMMENDATIONS ... 91
5.1 Conclusions ... 91
5.2 Recommendations ... 92
APPENDIX – PROGRAM CODE ... 95
CURRICULUM VITAE ... 105