AvoBot

Software

This is a ROS (Robot Operating System) based robot, so the custom software here is mainly used to bridge the hardware to conform to ROS specifications.
AvoBot runs Ubuntu 20.04 with ROS 2 (Foxy Fitzroy) installed on it.
It accepts velocity commands from ROS and passes them to Arduino via a serial port.
Arduino then controls the motors. Arduino has a PID control which attempts to compensate for motors imperfections (further running needed).
RPi also runs an RPLidar node which sends scan results to ROS.
The rest of the software is run on another computer - SLAM, Navigation and RViz.
In theory, after they are tuned these packages can also run on RPi, but for experiments, it's more convenient to run hardware-related nodes on RPi and the rest on another computer.
Due to the distributed nature of ROS 2 design, it doesn't really matter where non-hardware nodes run.
I'm using Balena to deploy updates to RPi. All it takes is a git push to deploy.
Here is the repository with all of the code needed for AvoBot to run.
It's not fully cleaned up yet but should run after small tweaks to folder paths.

© 2020, Leonti Bielski