Arguably my most ambitious project to date, HARVEST, is an autonomous robot for sampling soil and managing gardens. Im working on it for my capstone project in school, and its taught me a lot.
It uses a raspberry pi 5b Running Ubuntu 22.04 LTS. I’m using ROS2 to do most of the actual management. Im using Zerotier to network the pi to my laptop as it makes everything much easier to manage.
For motor control and power im using a somewhat generic raspberry pi UPS and a adeept robot hat. The two synergize pretty well, letting me power everything from one cable going from the battery. The battery also lasts a surprisingly long time. Lithium cells never fail to impress me.
Originally, I was using a raspberry pi 3b, but it wasen’t powerful enough to do computing on board. I wrote a custom python script using flask which let me control the robot through a web interface sending POST and GET requests using htmx buttons.
That raspberry pi was actually broken when I first got it. I plugged it in and it started smoking, so in a hail mary attempt to fix it i desoldered the pull down diode on the board and it somehow fixed it. Pretty proud of that repair.
The limitations of that original script eventually became obvious to me when it came time to implement the autonomous driving. Originally, I planned to write some sort of receiver script on my PC and using it to do the processing, but the response time was far too slow.
That led me to using ROS2. Most of the basic setup was fairly simple. I ssh’d into the raspberry pi and installed it using the commands listed on the website, which went pretty smoothly (originally I installed Ubuntu 22.10 which was giving me errors). Installing the basic cores went equally as easy.
Installing it on my laptop, however, was a significant pain. I use Manjaro for my laptop because in my almost half a decade of using Linux as a daily driver OS Manjaro has given me the least pains. That being said, trying to build ROS2 from source, or install it using binaries simply did not work. I spent about 2 days trying to get it to compile and it kept giving me errors about DDS. Eventually I decided to try using Distrobox to install it under ubuntu 22.4 and it worked perfectly first try. Goes to show, sometimes the simplest solution is the most effective.
The next big hurdle (which im still currently contending with) is making a custom hardware interface. ROS2 uses a system of abstraction to separate hardware from the commands, which seems nice at first, but trying to rewrite a hardware interface has proven to be more complicated than I initially anticipated.
The first step was rewriting the motor controller script in C++. For whatever reason, ROS2 hardware interfaces have to be written in C++, so I had to spend about a day contending with the rewrite. The original control script from ADEEPT basically just writes to GPIO pins to do the control, which I rewrote using the wiringpi library (sidenote: thank you to whoever is still maintaining this library because the alternative libgpio looks way to complicated to work with. ) The main difficulty of the rewrite actually proved to be my own stupidity, as I spent a significant amount of time trying to narrow down which pins control which, which was caused by me using the code written for the ADEEPT motor hat, rather than the robot hat, which caused me significant greif.
As of right now, im trying to intergrate the now-working wiringpi scripts into the hardware interface. I think after thats over with the project will go much faster.
I plan to use ORB-SLAM3 for the actual machine vision, which already has a ROS2 node built, which should help speed things up.




