Adaptación de la librería OpenCat a M2OS para el control de un robot cuadrúpedo
Adaptation of the OpenCat library to M2OS for the control of a quadruped robot
Ver/ Abrir
Identificadores
URI: https://hdl.handle.net/10902/30801Registro completo
Mostrar el registro completo DCAutoría
Odriozola Díaz, PabloFecha
2023-09Derechos
Attribution-NonCommercial-NoDerivatives 4.0 International
Palabras clave
Tiempo real
Microcontroladores
Robot
Arduino
M2OS
Petoi
Real time
Microcontrollers
Resumen/Abstract
Este proyecto tiene como objetivo portar la librería OpenCat para control de robots cuadrúpedos desarrollada por los creadores del perro robot Bittle, perteneciente a la compañía Petoi, al sistema operativo de tiempo real M2OS.
Como el proyecto de Petoi, está escrito mayoritariamente en C/C++ y pensado para su uso a través de un programa Arduino, necesitaremos ser capaces de integrar código C en un proyecto de Ada, que es el lenguaje en el que está escrito y con el que funciona M2OS. Para ello haremos uso de algunas herramientas que M2OS nos brinda para exportar código Arduino (escrito en C/C++) a una librería estática. Dicha librería podrá ser enlazada con los programas Ada del usuario que ejecutan sobre M2OS mediante el uso de un código de adaptación.
Además, para sacar partido de la multitarea proporcionada por M2OS, el código original se fragmentará en distintas tareas que el robot ejecutará según los parámetros que se definan, como la prioridad y el periodo. Esta modularización permitirá establecer la frecuencia de ejecución de cada tarea en función de su importancia, a diferencia de la ejecución puramente secuencial, donde todas las funciones se ejecutan un número fijo de veces en cada iteración del bucle final, la nueva implementación brindará mayor versatilidad y flexibilidad.
El conjunto de tareas abarcará diversas acciones del robot, entre las que destacan: comandar a Bittle, reaccionar en función de los comandos preestablecidos y responder ante situaciones inesperadas, como caídas o inclinaciones.
This project aims to port the OpenCat library for quadruped robot control developed by the creators of the robot dog Bittle, belonging to the company Petoi, to the M2OS real-time operating system.
As the Petoi project is mostly written in C/C++ and intended for use through an Arduino program, we will need to be able to integrate C code into an Ada project, which is the language in which it is written and with which M2OS works. To do this we will make use of some tools that M2OS gives us to export Arduino code (written in C/C++) to a static library. Said library can be linked to the user's Ada programs running on M2OS through the use of an adapter code.
In addition, to take advantage of the multitasking provided by M2OS, the original code will be fragmented into different tasks that the robot will execute according to parameters that are defined, such as priority and period. This modularization will allow setting the execution frequency of each task according to its importance, as opposed to purely sequential execution, where all functions are executed a fixed number of times in each iteration of the final loop, the new implementation will provide greater versatility and flexibility.
The set of tasks will cover various actions of the robot, including: commanding Bittle, reacting to preset commands, and responding to unexpected situations, such as falling or tilting.