Converting a hoverboard into a self-driving mobile robot with ROS

Alex Makarov
Sep 19, 2019 · 5 min read

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.

Eurobox-System

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.

1. Battery, main board and sensor boards still installed. 2. Naked chassis — claimed payload is 100 kg! 3. Heart of the hoverboard — a clone of STM32F103 microcontroller.
1. Eurobox container and wooden base plate. 2. Chassis plates had to be cut to fit in 30 cm wide base. 3. Battery and all the electronics will be on top.
1. First spin! 2. Final assembly

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?!

Results

Autonomous driving! Robaka drives itself towards the goal set on a map.

Robaka is driving confidently around my house and is getting prepared for demo drives in new environments.

References

As before, Robaka source files are available as open repositories on GitHub: main repo and hoverboard driver repo.

Behind the scenes

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade