Control system using ros and embedded microcontroller

The Github link can be found here: Code

Description

This project is part of the C++ Nanodegree in Udacity, where I chose to create a control system using ROS and a 32bit ARM microcontroller. The microcontroller monitors the velocity of the robot via encoders and its configured to send data to a main computer system where the PID system takes it and tells the microcontroller to output

My contribution

Software and Microcontroller

Since this project involves motors and electronics a microcontroller was used to configure the quadrature encoders using its dedicated peripheral, this helps the microcontroller not get saturated and provides an accurate reading. Since this system is a discrete control loop, timing is important and for that an interrupt timer was set up to allow for precise timing when the data is being sent. To communicate between the on-board computer and the microcontroller serial communication was used, to send velocity data and motor output.

Implementation and github documentation

The implementation of the robot can be shown in the video, where ROS is configured, I present the ability to set the reference of the motor plus change the tuning parameters while running the robot. This allows for easy and fast debugging of systems plus keeping a concise structure on how it works. Since this system was created with intention that other programmers can use it, I provided a well-defined documentation of the code and how it works.