Jim is officially functioning. “Functioning” is a loose term but the bot is able to move forward with both motors in different percentages. I can control what those percentages are with the triggers of a xbox controller and it is all remote.
This post is to go over the hardware, current architecture, future plans, and where I struggled the most.
Hardware
The chassis of Jim is a the (devestator chassis)[https://www.dfrobot.com/product-1477.html]. The “kit” came with the chassis, suspension, drive wheels, runner wheels, track, motors, and some random electronics that I didn’t use. Jim’s brain is composed of a (LePotato from Libre computer)[https://libre.computer/products/aml-s905x-cc/] also known as an aml-s905x-cc
. It is running libre computers release of ubuntu which comes with the very handy ldto
tool that creates a hardware overlay for the pins that can be configured. Jim has two batteries, a standard anker usb battery pack that is used to power the potato and a cheap 9v rechargable battery that I got off of amazon. Jim also has a usb wifi dongle since the LePotato does not come with WiFi out of the box.
Architecture
Jim is currently controlled by an “overlord”. The simple way to explain it is that the overlord is a web server hosted on my dev machine that has one endpoint to open a websocket. The overlord uses xinput(TODO: verify this is the package) to recieve the state of our input device (Xbox controller). Then this state is sent over any open websockets in the form of L00R00M00
Where L00
is the Left motor L
at 00
percent power. R
is the Right motor and M
is (will be?) the Mower motor with the same two percentage decimals after. The M
motor isn’t implemented on the bot side as there is no mower moter there yet (This version of Jim can be seen as precurser research before the prototype).
You can check out the code for the overlord here: https://github.com/Rwhytsell/Jims-Overlord
On the bot side, we have a websocket client that takes commands (the same as explained above) and uses that to update the duty cycle of the pwm pins. The pwm pins go to a motor controller that passes the specified percentage of the voltage of a 9v battery to the physical motors. Having a lower voltage makes the motors go slower, causing the differential turning of the bot.
Future plans
Create a useful version of Jim that can actually mow the lawn. First, remotely controlled similar to how this PoC of Jim is controlled with upgraded electronics (ability to go in reverse?). Then, automated to learn and explore perception, planning, and maybe AI if I am feeling frisky.