System for Manipulation of Data Gathered During the 3D Tracking Process of Foam Blocks
Total Page:16
File Type:pdf, Size:1020Kb
FACULDADE DE ENGENHARIA DA UNIVERSIDADE DO PORTO System for manipulation of data gathered during the 3D tracking process of foam blocks Paulo Miguel Curto Marú Mestrado Integrado em Engenharia Electrotécnica e de Computadores Supervisor: Marco Silva FEUP Supervisor: Aníbal Matos October 3, 2017 Resumo Ao longo da história, o homem sentiu a necessidade de continuar a evoluir de modo a maximizar o rendimento dos recursos. Do caçador-coletor até ao homem civilizado dos nossos dias, houve um grande salto que se deve apenas à necessidade. Os avanços em ciência e tecnologia permitiram uma sociedade cada vez mais eficiente. Em particular, o setor industrial que tem foco na produção e pretende minimizar o desperdício, automatizar a produção e, portanto, aumentar o lucro. A análise e manipulação de dados é uma ferramenta eficaz para resolver muitos problemas relacionados com indústria, mas também pode melhorar um sistema que não tinha soluções ante- riormente, principalmente devido à falta de tecnologia específica. Esta dissertação aborda esse problema ao analisar um conjunto de dados totalmente novo que esá a ser adquirido através de uma nova ferramenta que é capaz de retornar coordenadas tridimensionais de pontos detectados por uma combinação de laser e câmara. Esta implementação de uma nova tecnologia está a permitir informações mais complexas e detalhadas, garantindo fiabilidade em cada etapa do processo. O tema de estudo será focado essencialmente na representação 3D. É um dos assuntos mais complexos desta dissertação, dado que foram feitos poucos esforços para melhorar esta tecnologia a nível de programação. A otimização também é um foco principal, uma vez que garante que o processo seja melhorado e, portanto, cumpre o objetivo principal de qualquer empresa industrial. i ii Abstract Throughout history man have felt the need to keep evolving in a way to maximise resource in- come. From the hunter-gatherer up to the civilised man from our days, there was a huge leap that’s due only to need itself. The advances in science and technology allowed for a increasingly more efficient society. In particular, the industry sector has its focus on production which means minimising waste and automate production and therefore increasing profit. Data analyses and manipulation is a power tool to solve many industry related issues, but it can also enhance a system which had no previous solutions before, mainly due to the lack of a specific technology. This dissertation addresses this problem by analysing a whole new data set that is being ac- quired through a new tool that is able to return three-dimensional coordinates of points detected by a combination of laser and camera. This implementation of a new technology is allowing more complex and detailed information, granting reliability in each step of the process. The subject of study will essentially focus on 3D representation. It is one of the most intricate subjects of this dissertation given that little efforts have been made to improve this technology on a programming level. Optimisation is also a main focus since it guarantees that the process is improved and therefore we are fulfilling the main goal of any industrial company. iii iv Acknowledgements First of all I thank FEUP for providing the conditions for me to grow as a person and as an engineer, allowing me to reach my goals in life. I thank professor Aníbal Matos for the supervising this project, clarifying all my questions and keeping me focused. I thank Flexipol for receiving and including me in the company, allowing me to gain experience in the industry. A special thanks goes to Mauro Pereira, Marco Silva and Fernanda Carvalho. To all my closest friend, thank you for the fun moments, they were important to keeping me in the mindset needed to continue and complete this period of my life. A special thanks to Tiago Seabra, with whom I learnt a lot during the three years of our journey together. Specially the last year, as we shared all the projects and grew as engineers. Rita Sousa, you were my biggest support during these five years. You kept pushing me and making sure that I stayed in right path. You are the reason of my success. For all that I thank you! Finally, I thank my family that provided all the conditions that I ever needed, have given me my education and always pushed me into the intellectual world since they realised my potential. Paulo Marú v vi “ Strive not to be a success, but rather to be of value. ” Albert Einstein vii viii Contents 1 Introduction1 1.1 Context . .1 1.2 Objective . .1 1.3 Structure . .2 2 Literature Review3 2.1 Acquisition software and hardware . .3 2.2 3D representation . .5 2.2.1 Delaunay triangulation . .5 2.2.2 Poisson . .5 2.3 Point Cloud Library . .6 2.3.1 A History of PCL . .7 2.3.2 PCL structure . .7 2.4 Software . .8 2.4.1 PCL requirements . .8 2.4.2 Microsoft Visual Studio . .9 2.4.3 Robot Operating System . .9 2.4.4 LabVIEW . .9 2.4.5 Matlab . 10 2.5 Databases . 10 2.5.1 Relational model . 11 2.5.2 Object-oriented model . 12 2.6 Discussion . 13 3 Acquired data analysis 15 3.1 Retrieving acquired data . 15 3.2 Data analysis from block measures . 16 3.2.1 Data organisation for 3D representation . 17 3.2.2 Data analysis for the optimisation method . 19 3.3 Discussion . 20 4 Software developed: SiMBlo 21 4.1 Software structure . 21 4.2 Implementation of 3D visualisation of a block . 21 4.3 Implementation of the optimisation algorithm . 24 ix x CONTENTS 5 Results 27 5.1 Results . 27 5.2 Validation process . 29 6 Conclusion 31 6.1 Conclusions . 31 6.2 Future Work . 32 References 33 List of Figures 2.1 Diagram of a bun measurement . .4 2.2 Example of a Delaunay triangulation . .6 2.3 Illustration of Poisson reconstruction . .6 2.4 Most relevant modules in PCL . .7 2.5 Hierarchical model diagram . 10 2.6 Relational model concept . 11 2.7 Hypothetical relational database tables . 13 2.8 Example of the object-orient model . 14 3.1 Section of the text file which results from the acquisition software . 16 3.2 Distance between consecutive profiles . 17 3.3 Number of points per profile . 18 3.4 Example of a profile reading error . 19 4.1 Example of a raw point cloud from a sample block . 22 4.2 Point cloud example after adding the missing faces of the block . 23 4.3 Surface reconstruction using PCL’s Poisson algorithm . 24 4.4 Scanned profile with areas of allowance . 25 5.1 Full length point cloud representation . 28 5.2 Poisson method in an unprocessed point cloud . 28 5.3 Block representation after voxel grid filtering . 29 xi xii LIST OF FIGURES List of Tables 2.1 Example of SQL queries . 12 xiii xiv LIST OF TABLES Abbreviations 2D Two-Dimensional 3D Three-Dimensional DB Database PCL Point Cloud Library MLS Moving least squares MSVC Microsoft Visual C/C++ MSVS Microsoft Visual Studio IDE Integrated development environment API Application programming interface ROS Robot Operating System DBMS Database management system SQL Structured Query Language ANSI American National Standards Institute ISO International Organization for Standardization JSON JavaScript Object Notation xv Chapter 1 Introduction This chapter is going to have a description of the project. In section 1.1, it’s presented a global analysis of the problem and its context. The objectives will be addressed in section 1.2. Finally, the document structure will be described. 1.1 Context This dissertation was done in a company environment at Flexipol - Espumas Sintéticas, S.A. This company works essentially in the production of synthetic foam for different purposes. This process has multiple stages. Initially a foam block with 60 metres is produced. Since it is a chemical process where a great material expansion occurs, most of the blocks end up with an undesired shape. Therefore, the upcoming step consist in cutting the block to the ideal size and shape. However this produces unwanted waste. To try and correct this issue or even improve the chemical process of foam production, this company has bought and put to use an acquisition tool called Bun Scanner. It reads three- dimensional points on the surface of the block and returns them through a specific file type. Nevertheless, despite being used, this system in not making the process any more efficient than it was before. To do so, we must use the acquired data and manipulate it, creating an algorithm to optimise this process. This algorithm consists in a 3D visual representation of the block to make it easier to spot deformities and, based on those, define the points in which the cut of the block must be made. Based on this changes alone and the statistics it can provide, it is expected to get a huge upgrade in the foam production, as well as the reduction of losses by the company. 1.2 Objective Bearing in mind that, as an industrial company, the ultimate purpose is always to increase the income. Generating more profitable blocks is the objective. This can be achieved either by max- 1 2 Introduction imising the volume of the block after its cut or by improving the production in the early stages, producing a block free of flaws and malformations. The second option, although it looks as the better approach for the long term, has some issues. To begin with, being a chemical process, there will always be multiple variables which are hard to control and this causes inconsistency.