Accurate Localisation of a Multi-Rotor Using Monocular Vision
Total Page:16
File Type:pdf, Size:1020Kb
Accurate Localisation of a Multi-rotor Using Monocular Vision by Josua Blom Thesis presented in partial fulfilment of the requirements for the degree of Master of Engineering at Stellenbosch University Supervisors: Dr. C.E. van Daalen & Dr. P.G. Wiid Department of Electrical and Electronic Engineering March 2018 Stellenbosch University https://scholar.sun.ac.za i Copyright Copyrig ht J. Blom 01/12/2017 Stellenbosch University https://scholar.sun.ac.za ii Abstract The mid-frequency aperture array (MFAA) is planned for phase two of the square kilometre array project, which has its design phase scheduled for 2018. The MFAA's antenna arrays need to be characterised in their real world environment. The antenna array characterisation can be done with a test source mounted on a multi-rotor which is flown over the antennas. However, the test source needs to be localised accurately relative to the antenna array, which is currently achieved by expensive and cumbersome methods. Accurate vision-based localisation is one possible inexpensive solution, provided artificial ref- erence points can be placed in the environment. Many vision-based localisation methods exist; however, the focus is often on simultaneous localisation and mapping as opposed to localisation only. The problem is simplified significantly when artificial reference points, referred to as land- marks, are manually placed in the environment wherein the multi-rotor needs to be localised. The focus of the research presented in this thesis is therefore on accurate localisation of a multi-rotor aircraft specifically through monocular vision using manually placed artificial landmarks. The multi-rotor's state propagation was described according to a kinematic motion model. Ad- ditionally, a measurement model was designed which relates camera image measurements to the system's states. A localisation algorithm using the unscented Kalman filter (UKF) was designed and integrated. The UKF uses the sensor data from the multi-rotor as well as measurements derived from image processing to best estimate the pose of the multi-rotor. The localisation algorithm was first tested and refined in simulation, after which experimental flight tests were performed and the resulting data sets were analysed. The experimental results are promising; the algorithm localised the multi-rotor with a mean accuracy of around six centimetres relative to a differential GPS (DGPS) that was used as a baseline. A high quality DGPS can localise at an accuracy of up to two centimetres; however, the Piksi DGPS used in this project proved to be intermittently accurate and unreliable. The current accuracy of the localisation algorithm would be suitable for other radio telescope antenna arrays which operate at lower frequencies than the MFAA. However, with some improvements in hardware integration, it should be possible to achieve better accuracy than differential GPS systems at a fraction of the cost, making it a promising solution for localisation in antenna characterisation application on the MFAA. Stellenbosch University https://scholar.sun.ac.za iii Abstrak Die mid-frekwensie stralingsvlak reeks (MFAA) is beplan vir fase twee van die vierkante kilometer reeks (SKA) projek, waarvan die eerste ontwerpsfase beplan is vir 2018. Die MFAA se antennas moet gekaraktariseer word in hul ge¨ınstalleerdeomgewing. Die karaktarisering kan gedoen word deur middel van `n toets-bron wat op `n multirotor geplaas is, en dan oor die antenna gevlieg word. Die toetsbron moet egter akkuraat gelokaliseer word relatief tot die antenna, wat tans deur duur en omslagtige metodes gedoen word. Akkurate visie-gebasseerde lokalisering is een bekostigbare moontlike oplossing, gegewe dat kun- smatige verwysingspunte in die omgewing geplaas kan word. Hoewel baie visie-gebasseerde lokalis- eringsmetodes bestaan, is die fokus meestal op gelyktydige lokalisering en kartering, eerder as slegs lokalisering. Die probleem word heelwat vereenvoudig wanneer kunsmatige verwysingspunte, wat landmerke genoem word, met die hand in die omgewing geplaas kan word. Die fokus van die na- vorsing wat in hierdie tesis aangebied word is dus die akkurate lokalisering van `n multirotor-tuig, deur die gebruik van `n enkelkamera en kunsmatige landmerke. Die multirotor se toestandveranderlikes is beskryf deur middel van `n kinematiese beweginsmodel. Daarbenewens is `n meetmodel ontwerp wat die beeldmetings se verband met die toestande van die multirotor beskryf. `n Lokaliseringsalgoritme wat gebruik maak van `n ongegeurde Kalman-filter ("unscented Kalman filter” of UKF) is ontwerp en ge¨ıntegreer. Die UKF maak gebruik van sensor data vanaf die multirotor, asook van metings wat afgelei word deur beeldverwerking om die toestande van die multirotor te bepaal. Die lokaliseringsalgoritme is aanvanklik getoets en verfyn in simulasie, en daarna is eksperimentele toetsvlugte uitgevoer en die resulterende data ontleed. Die eksperimentele resultate is belowend; die algoritme het die multirotor gelokaliseer met `n gemiddelde akkuuraatheid van rondom ses sentimeter relatief tot `n differensile GPS (DGPS) wat as `n verwysing gebruik is. `n Ho¨ekwaliteit DGPS kan lokaliseer tot en met `n akkuuraatheid van twee sentimeter; maar die Piksi DGPS wat in die projek gebruik is, het met wisselvallige betroubaarheid opgetree. Die huidige akkuuraatheid van die lokaliseringsalgoritme sal geskik wees vir ander radio frekwensie teleskoop antennas wat teen `n laer frekwensie as die MFAA werk. Met sekere verbeterings in hardeware integrasie behoort dit egter moontlik te wees om beter akkuuraatheid as `n DGPS te behaal vir baie goedkoper, wat die oplossing baie belowend maak vir toepassing in antenna karaktarisering van die MFAA antennas. Stellenbosch University https://scholar.sun.ac.za Contents Declaration i Abstract ii Abstrak iii List of Figures v List of Tables viii Nomenclature ix Acknowledgements x 1 Introduction 1 1.1 Overview of Radio Antenna Characterisation . 2 1.2 Problem Definition: Multi-rotor Localisation . 3 1.3 Proposed Solution . 5 1.4 Overview of Thesis . 6 2 Literature Review 8 2.1 Vision-Based Localisation . 8 2.2 Estimator Algorithms . 11 2.3 Image Processing . 13 2.4 Pinhole Camera Model . 15 2.5 Perspective-n-Point Problem . 17 2.6 Sensor Interference . 18 3 Data Acquisition System 19 3.1 Multi-rotor Platform . 19 3.2 Data Acquisition Hardware . 20 3.3 On-Board Sensors . 21 3.3.1 GPS module . 21 3.3.2 Inertial Measurement Unit . 21 3.3.3 Image Sensor . 22 3.3.4 Baseline DGPS . 23 3.4 Summary . 24 iv Stellenbosch University https://scholar.sun.ac.za CONTENTS v 4 System Modelling 25 4.1 System Kinematics . 25 4.1.1 State Variables . 26 4.1.2 Euler Angle Transformations . 27 4.1.3 Axes Transformations . 28 4.2 Motion Model . 31 4.2.1 Process Noise . 32 4.3 Measurement Model . 33 4.3.1 Measurement Noise . 35 4.4 Summary . 38 5 Image Processing 39 5.1 Camera Calibration . 39 5.2 Landmark Design . 41 5.3 Landmark Detection . 42 5.4 Measurement Noise Verification . 45 5.5 Limitations . 46 5.6 Summary . 47 6 UKF State Estimation 48 6.1 Overview of State Estimation . 48 6.1.1 Gaussian Distributions . 48 6.1.2 State Estimation Filters . 50 6.2 The Unscented Kalman Filter . 52 6.2.1 Overview of the UKF . 52 6.2.2 The UKF Algorithm . 55 6.3 Implementation . 57 6.4 Simulation . 61 6.5 Summary . 62 7 Experimental Results 65 7.1 Experimental Test Design . 65 7.2 Localisation Results . 66 7.3 Baseline Reliability . 72 7.4 Summary . 73 8 Conclusion 74 8.1 Summary . 74 8.2 Future Work and Improvements . 75 Appendices 77 A Additional Results 78 Stellenbosch University https://scholar.sun.ac.za List of Figures 1.1 An artist's impression of the MFAA . 2 1.2 A diagram of the physical setup . 3 1.3 A diagram of the proposed solution . 5 1.4 Flow diagram of the proposed solution . 6 1.5 Overview of system . 7 2.1 Different landmark types . 9 2.2 Monocular pose detection . 10 2.3 Localisation through image processing . 14 2.4 The pinhole camera model . 15 2.5 The pinhole camera model projection . 16 2.6 Perspective-three-point problem . 17 3.1 Multi-rotor platform . 20 3.2 Hardware schematic . 21 3.3 IMU axes definition . 22 3.4 Raspicam image sensor . 23 4.1 Euler angle transformation . 27 4.2 Landmark & body-fixed axes definitions . 29 4.3 NED axes to landmark axes transformation . 30 4.4 Observed landmark positions from camera . 31 4.5 Measurement model perspective . 35 4.6 2D two-point projection . 36 4.7 Relationship between range and pixel distance . 37 5.1 Camera calibration . ..