Converting a hoverboard into a self-driving mobile robot with ROS
This summer I’ve build my first mobile robot, Robaka v1. It was a nice experience, but the platform I’ve chosen was too weak to carry the Jetson Nano computer. The next milestone was building a more capable robot, ready to carry the real payload and potentially drive outdoors.
In search of the suitable drivetrain I’ve stumbled upon the github repo of Niklas Fauth. Niklas has summarized the reverse engineering efforts on hoverboards and shared the opensource firmware, as well as instructions on reprogramming the controller. Another project, called bipropellant, extends Niklas’ firmware, enabling hoverboard control via serial protocol.
A hoverboard with custom firmware looked like a great starting point for Robaka 2: get a board, build the platform around it and add a ROS-enabled controller for the motors. As of August 2019, it seems like nobody has yet built a ROS integration for this hardware.
I was surprised to find out that hoverboards are quite capable vehicles. Equipped with two 350W motor-wheels, they can drive for up to 20 km on one charge, carry up to 100 kg payload and have a top speed of 15 km/h, all this for just under 100 EUR on eBay.
Just as Niklas on his Transpotter project, I’ve decided to build the platform on the Eurobox-System: a set of versatile, modular, stackable containers in multiple forms and sizes. I wanted to maintain the indoor driving capabilities for my robot and went for the smaller size container base of 30x40 cm — so that my robot would still drive through doorways. Modular structure of the containers would let me place all the robotic components in the flat bottom box, and add payload containers on top of it as needed.
I’ve decided to use 20 mm thick wooden plate as a base for motors, but unlike Niklas in his Transpotter, all the electronics will be placed in the box on top, protecting components from the environment.
You can see some of the assembly steps in the gallery.
Unlike the first robot, Robaka 2 does not use Arduino anymore, so the design is much cleaner now. IMU and hoverboard controller are connected directly to Jetson Nano GPIO ports — and there’s still one more free UART to use for Bluetooth or debugging the STM32.
Current version still uses a separate 20Ah power bank for the Nano, but it will be replaced by the power line from the main battery through a 5V/5A DC-DC converter. NVIDIA recommends a 4A power source for running GPU-intensive operations, like realtime inference — which I will use for road edge detection and path following outdoors, using the 8MP front-mounted Raspberry Pi Camera v2.
LIDAR is currently mounted on the box lid, but eventually will move to its own mast, keeping the box surface clear for stacking the payload containers. The same mast will host the 10Hz GPS receiver.
Adapting the software to Robaka 2 was easier than building it. Here’s the beauty of modular ROS design: compared to Robaka 1, I just replaced the motor control with the new implementation, and everything else runs as before. Bipropellant protocol and its API required a few changes to make it work on 64-bit Nano (originally it was tested on 8-bit Arduino) and to control motor speeds via the protocol, but other than that implementing the control was straightforward. Probably the best part was dynamic reconfiguration of motor control parameters using the ROS’ dynamic_reconfigure feature — you can change robot’s motor characteristics just by moving sliders on your desktop, how cool is that?!
Robaka is driving confidently around my house and is getting prepared for demo drives in new environments.
Behind the scenes