Software framework implementation for a robot that uses different development boards

Detalhes bibliográficos
Autor(a) principal: Gomes, Pedro Miguel Francisco
Data de Publicação: 2019
Tipo de documento: Dissertação
Idioma: eng
Título da fonte: Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
Texto Completo: http://hdl.handle.net/10400.1/13376
Resumo: A software framework is a concrete or conceptual platform where common code with generic functionality can be selectively specialized or overridden by developers or users. Frameworks take the form of libraries where a well-defined application program interface is reusable anywhere within the software under development. A user can extend the framework but not modify the code. The purpose of software framework is to simplify the development environment, allowing developers to dedicate their efforts to the project requirements, rather than dealing with the framework’s mundane, repetitive functions and libraries. A differential wheeled robot is a mobile robot whose movement is based on two separately driven wheels placed on either side of the robot body. It can thus change its direction by varying the relative rate of rotation of its wheels and hence does not require an additional steering motion. If both the wheels are driven in the same direction and speed, the robot will go in a straight line. If both wheels are turned with equal speed in opposite directions, the robot will rotate about the central point of the axis. Otherwise, depending on the speed of rotation and its direction, the center of rotation may fall anywhere on the line defined by the two contact points of the wheels. The objective of this thesis, is to create a software framework for a wheeled robot, where we can change its development board, without having to make many changes in the code that is used to control the robot. The composition of the robot is: a development board, that allows the control of any electronic devices, that are connected to it; some sensors to detect obstacles; two motors to move the robot; a motor driver to power and control the motors individually; a chassis to assemble the robot; and a battery to power all the electronic devices. The most important device of the robot is the development board, which allows the control of every single electronic device connected to it through a program. In this project we use three development boards, which are: Arduino UNO rev3, NodeMCU ESP8266 v1.0 and Raspberry Pi 3 Model B+. The programming language used to control the devices and the boards is the C++ programming language, because it can be used with all of them. Since all the boards have a different external/internal design, there are some issues that we need to fix with the help of external hardware. Other important devices are the sensors to detect objects, which are: the sensor HC-SR04, which uses ultrasonic waves; and, the sensor Sharp GP2Y0A41SK0F, which uses infrared light. The framework also covers two types of servo motors: one that can continuously rotate; and the other one that only rotates about half a circle. The servo motors can be used, for instance, to rotate a range sensor. Then we need two DC motors to move the vehicle. To power up these DC motors, which are controlled with a PWM signal, we need to connect them to a device called motor driver which is connected to a battery. Finally, to assemble the robot we just need to connect all the devices to the development board and attach them to the chassis. This software framework was created with the purpose of programmatically connect every device (any sensor, motor or other device) to the development board and allow a user to do minimal code changes when he has the need to change the development board. All the devices that the framework supports have a datasheet explaining their behavior and operation, so that it was possible to develop a library to operate and control the device. By joining all these libraries together we have the framework presented here. The experimental methodology, used in two case studies, will show the features and the limitations of the framework. The first case study shows that the changes the user needs to do when changing boards are minimal but because all the development boards are different, there are some things we can’t program without having to make the user of the framework, sacrifice his GPIO connection choices. The second case study, shows that because of how the development boards work internally, there are some things that aren’t possible to program to work like they were designed as the other development boards.
id RCAP_aa7734d13ae4fbc18adee99dba4501ae
oai_identifier_str oai:sapientia.ualg.pt:10400.1/13376
network_acronym_str RCAP
network_name_str Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
repository_id_str 7160
spelling Software framework implementation for a robot that uses different development boardsFramework de softwareRobô de rodasPlaca de desenvolvimentoRede de sensoresDomínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e InformáticaA software framework is a concrete or conceptual platform where common code with generic functionality can be selectively specialized or overridden by developers or users. Frameworks take the form of libraries where a well-defined application program interface is reusable anywhere within the software under development. A user can extend the framework but not modify the code. The purpose of software framework is to simplify the development environment, allowing developers to dedicate their efforts to the project requirements, rather than dealing with the framework’s mundane, repetitive functions and libraries. A differential wheeled robot is a mobile robot whose movement is based on two separately driven wheels placed on either side of the robot body. It can thus change its direction by varying the relative rate of rotation of its wheels and hence does not require an additional steering motion. If both the wheels are driven in the same direction and speed, the robot will go in a straight line. If both wheels are turned with equal speed in opposite directions, the robot will rotate about the central point of the axis. Otherwise, depending on the speed of rotation and its direction, the center of rotation may fall anywhere on the line defined by the two contact points of the wheels. The objective of this thesis, is to create a software framework for a wheeled robot, where we can change its development board, without having to make many changes in the code that is used to control the robot. The composition of the robot is: a development board, that allows the control of any electronic devices, that are connected to it; some sensors to detect obstacles; two motors to move the robot; a motor driver to power and control the motors individually; a chassis to assemble the robot; and a battery to power all the electronic devices. The most important device of the robot is the development board, which allows the control of every single electronic device connected to it through a program. In this project we use three development boards, which are: Arduino UNO rev3, NodeMCU ESP8266 v1.0 and Raspberry Pi 3 Model B+. The programming language used to control the devices and the boards is the C++ programming language, because it can be used with all of them. Since all the boards have a different external/internal design, there are some issues that we need to fix with the help of external hardware. Other important devices are the sensors to detect objects, which are: the sensor HC-SR04, which uses ultrasonic waves; and, the sensor Sharp GP2Y0A41SK0F, which uses infrared light. The framework also covers two types of servo motors: one that can continuously rotate; and the other one that only rotates about half a circle. The servo motors can be used, for instance, to rotate a range sensor. Then we need two DC motors to move the vehicle. To power up these DC motors, which are controlled with a PWM signal, we need to connect them to a device called motor driver which is connected to a battery. Finally, to assemble the robot we just need to connect all the devices to the development board and attach them to the chassis. This software framework was created with the purpose of programmatically connect every device (any sensor, motor or other device) to the development board and allow a user to do minimal code changes when he has the need to change the development board. All the devices that the framework supports have a datasheet explaining their behavior and operation, so that it was possible to develop a library to operate and control the device. By joining all these libraries together we have the framework presented here. The experimental methodology, used in two case studies, will show the features and the limitations of the framework. The first case study shows that the changes the user needs to do when changing boards are minimal but because all the development boards are different, there are some things we can’t program without having to make the user of the framework, sacrifice his GPIO connection choices. The second case study, shows that because of how the development boards work internally, there are some things that aren’t possible to program to work like they were designed as the other development boards.Um framework de software é uma plataforma conceitual em que um código comum com funcionalidade genérica pode ser seletivamente especializado ou substituído por desenvolvedores ou utilizadores. Os frameworks assumem a forma de bibliotecas em que uma interface de um programa bem definido é reutilizável em qualquer lugar dentro do software em desenvolvimento. Um utilizador pode estender a framework, mas não pode modificar o código. O objetivo do framework é simplificar o ambiente de desenvolvimento, permitindo que os desenvolvedores dediquem os seus esforços aos requisitos do projeto, em vez de lidar com as bibliotecas e funções, comuns e repetitivas, do framework. Um robô com rodas diferenciais é um robô móvel cujo o movimento é baseado em duas rodas acionadas separadamente que estão colocadas em ambos os lados do corpo do robô. Pode assim alterar a sua direção, variando a taxa relativa à rotação das rodas, e portanto, não requer um movimento de direção adicional. Se ambas as rodas forem movidas na mesma direção e velocidade, o robô irá mover-se em linha reta. Se ambas as rodas girarem com velocidade igual e em direções opostas, o robô girará em torno do ponto central do eixo. Caso contrário, dependendo da velocidade de rotação e da sua direção, o centro de rotação pode cair em qualquer lugar na linha definida pelos dois pontos de contato das rodas. O objetivo desta tese é criar um framework de software para um robô de rodas, onde podemos mudar a sua placa de desenvolvimento sem ter que fazer muitas alterações no código que é usado no controlo do robô. A composição do robô é a seguinte: uma placa de desenvolvimento, que permite o controlo de qualquer dispositivo eletrónico que esteja conectado à placa; alguns sensors para detetar obstáculos; dois motores para mover o robô; um driver para os motores, para alimentar e controlar os motores individualmente; um chassi, para montar o robô; e uma bateria, para alimentar todos os dispositivos eletrónicos. O dispositivo mais importante do robô é a placa de desenvolvimento, que permite o controlo de cada dispositivo eletrónico, que está ligado à placa, através de um programa. Neste projeto utilizamos três placas de desenvolvimento, que são: Arduino UNO rev3, NodeMCU ESP8266 v1.0 e Raspberry Pi 3 Model B +. A linguagem de programação usada para controlar os dispositivos e as placas é a linguagem de programação C ++, porque pode ser usada por todas as placas. Como todas as placas têm um design externo / interno diferente, existem alguns proble-mas que precisam de ser salvaguardados com a ajuda de hardware externo. Outros dispositivos importantes são os sensores que servem para detetar objetos, e estes são: o sensor HC-SR04, que utiliza ondas ultrassónicas; e, o sensor Sharp GP2Y0A41SK0F, que usa luz infravermelha. A framework também suporta dois tipos de servo motores: um que pode girar continuamente; e o outro só pode rodar cerca de meio círculo. Por exemplo, os servo motores podem ser utilizados para fazer rodar um sensor que deteta objetos. Também precisamos de dois motores DC para mover o robot. Para energizar estes motores, que são controlados por um sinal PWM, precisamos de liga-los a um dispositivo chamado de driver para motor que está ligado a uma bateria. Finalmente, para montar o robô precisamos apenas de ligar todos os dispositivos à placa de desenvolvimento e montar todos os dispositivos no chassi. Este framework de software foi criada com o objetivo de ligar todos os dispositivos (qualquer sensor, motor ou outro dispositivo eletrónico), em termos de programação, à placa de desenvolvimento e permitir que um utilizador faça alterações mínimas no código que controla robô quando tiver a necessidade de alterar a placa de desenvolvimento. Todos os dispositivos que a framework suporta têm uma ficha de especificações que explica o seu comportamento e como funcionam, e por este motivo foi possível desenvolver uma biblioteca para controlar estes dispositivos. Ao unir todas as bibliotecas temos a framework. A metodologia experimental usada em dois casos de estudo, mostram quais as limitações da framework. O primeiro caso de estudo mostra que as alterações que o utilizador precisa de fazer ao trocar as placas são mínimas, mas como todas as placas de desenvolvimento são diferentes existem sempre algumas coisas que não podemos programar sem ter que fazer com que o utilizador da framework, sacrifique as suas opções de ligação aos pinos GPIO. No segundo caso de estudo é mostrado que devido à forma de como as placas de desenvolvimento trabalham internamente, existem algumas coisas que não podem ser programadas para funcionar como se fossem as outras placas de desenvolvimento.Daniel, Helder Aniceto SousaSapientiaGomes, Pedro Miguel Francisco2019-11-28T16:26:13Z2019-02-152019-02-15T00:00:00Zinfo:eu-repo/semantics/publishedVersioninfo:eu-repo/semantics/masterThesisapplication/pdfhttp://hdl.handle.net/10400.1/13376TID:202244776enginfo:eu-repo/semantics/openAccessreponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãoinstacron:RCAAP2023-07-24T10:25:29Zoai:sapientia.ualg.pt:10400.1/13376Portal AgregadorONGhttps://www.rcaap.pt/oai/openaireopendoar:71602024-03-19T20:04:32.326598Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informaçãofalse
dc.title.none.fl_str_mv Software framework implementation for a robot that uses different development boards
title Software framework implementation for a robot that uses different development boards
spellingShingle Software framework implementation for a robot that uses different development boards
Gomes, Pedro Miguel Francisco
Framework de software
Robô de rodas
Placa de desenvolvimento
Rede de sensores
Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática
title_short Software framework implementation for a robot that uses different development boards
title_full Software framework implementation for a robot that uses different development boards
title_fullStr Software framework implementation for a robot that uses different development boards
title_full_unstemmed Software framework implementation for a robot that uses different development boards
title_sort Software framework implementation for a robot that uses different development boards
author Gomes, Pedro Miguel Francisco
author_facet Gomes, Pedro Miguel Francisco
author_role author
dc.contributor.none.fl_str_mv Daniel, Helder Aniceto Sousa
Sapientia
dc.contributor.author.fl_str_mv Gomes, Pedro Miguel Francisco
dc.subject.por.fl_str_mv Framework de software
Robô de rodas
Placa de desenvolvimento
Rede de sensores
Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática
topic Framework de software
Robô de rodas
Placa de desenvolvimento
Rede de sensores
Domínio/Área Científica::Engenharia e Tecnologia::Engenharia Eletrotécnica, Eletrónica e Informática
description A software framework is a concrete or conceptual platform where common code with generic functionality can be selectively specialized or overridden by developers or users. Frameworks take the form of libraries where a well-defined application program interface is reusable anywhere within the software under development. A user can extend the framework but not modify the code. The purpose of software framework is to simplify the development environment, allowing developers to dedicate their efforts to the project requirements, rather than dealing with the framework’s mundane, repetitive functions and libraries. A differential wheeled robot is a mobile robot whose movement is based on two separately driven wheels placed on either side of the robot body. It can thus change its direction by varying the relative rate of rotation of its wheels and hence does not require an additional steering motion. If both the wheels are driven in the same direction and speed, the robot will go in a straight line. If both wheels are turned with equal speed in opposite directions, the robot will rotate about the central point of the axis. Otherwise, depending on the speed of rotation and its direction, the center of rotation may fall anywhere on the line defined by the two contact points of the wheels. The objective of this thesis, is to create a software framework for a wheeled robot, where we can change its development board, without having to make many changes in the code that is used to control the robot. The composition of the robot is: a development board, that allows the control of any electronic devices, that are connected to it; some sensors to detect obstacles; two motors to move the robot; a motor driver to power and control the motors individually; a chassis to assemble the robot; and a battery to power all the electronic devices. The most important device of the robot is the development board, which allows the control of every single electronic device connected to it through a program. In this project we use three development boards, which are: Arduino UNO rev3, NodeMCU ESP8266 v1.0 and Raspberry Pi 3 Model B+. The programming language used to control the devices and the boards is the C++ programming language, because it can be used with all of them. Since all the boards have a different external/internal design, there are some issues that we need to fix with the help of external hardware. Other important devices are the sensors to detect objects, which are: the sensor HC-SR04, which uses ultrasonic waves; and, the sensor Sharp GP2Y0A41SK0F, which uses infrared light. The framework also covers two types of servo motors: one that can continuously rotate; and the other one that only rotates about half a circle. The servo motors can be used, for instance, to rotate a range sensor. Then we need two DC motors to move the vehicle. To power up these DC motors, which are controlled with a PWM signal, we need to connect them to a device called motor driver which is connected to a battery. Finally, to assemble the robot we just need to connect all the devices to the development board and attach them to the chassis. This software framework was created with the purpose of programmatically connect every device (any sensor, motor or other device) to the development board and allow a user to do minimal code changes when he has the need to change the development board. All the devices that the framework supports have a datasheet explaining their behavior and operation, so that it was possible to develop a library to operate and control the device. By joining all these libraries together we have the framework presented here. The experimental methodology, used in two case studies, will show the features and the limitations of the framework. The first case study shows that the changes the user needs to do when changing boards are minimal but because all the development boards are different, there are some things we can’t program without having to make the user of the framework, sacrifice his GPIO connection choices. The second case study, shows that because of how the development boards work internally, there are some things that aren’t possible to program to work like they were designed as the other development boards.
publishDate 2019
dc.date.none.fl_str_mv 2019-11-28T16:26:13Z
2019-02-15
2019-02-15T00:00:00Z
dc.type.status.fl_str_mv info:eu-repo/semantics/publishedVersion
dc.type.driver.fl_str_mv info:eu-repo/semantics/masterThesis
format masterThesis
status_str publishedVersion
dc.identifier.uri.fl_str_mv http://hdl.handle.net/10400.1/13376
TID:202244776
url http://hdl.handle.net/10400.1/13376
identifier_str_mv TID:202244776
dc.language.iso.fl_str_mv eng
language eng
dc.rights.driver.fl_str_mv info:eu-repo/semantics/openAccess
eu_rights_str_mv openAccess
dc.format.none.fl_str_mv application/pdf
dc.source.none.fl_str_mv reponame:Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
instname:Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
instacron:RCAAP
instname_str Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
instacron_str RCAAP
institution RCAAP
reponame_str Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
collection Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos)
repository.name.fl_str_mv Repositório Científico de Acesso Aberto de Portugal (Repositórios Cientìficos) - Agência para a Sociedade do Conhecimento (UMIC) - FCT - Sociedade da Informação
repository.mail.fl_str_mv
_version_ 1799133282214871040