This repository contains a source code and report of a robotics project.
The aim of the project was to design, construct and control a platform that could balance a ball, as well as make it follow a given trajectory.
Constructing a real-world unstable system allowed for a comparison between PID and model predictive control system.
Footage comapring the platform operating with different control systems is uploaded to report
directory
Video below showcases following a circular trajectory with a radius of 7cm using a model predictie control:
GPC_7cm_radius.mp4
Data fed to the control system was heavily preprocessed according to the feedback loop. High-framerate footage from raspberry camera had to be downscaled, converted to HSV color space and analyzed to find the center of and orange ball. Detected pixel coordinates are converted into real-world coordinates. High frequency noise is filtered out by approximating some number of past samples with a polynomial. It is assumed, that the control systems output the desired acceleration of the ball. The acceleration is then converted into desired platform roll and pitch, and the correct servo angles are derived using inversed kinematics.