Self-driving RC car using Robotic Operating System(ROS)

Dhanoop Karunakaran
Intro to Artificial Intelligence
3 min readJan 3, 2018
Self-driving cars

During my childhood, I dreamed about cars drives itself and never thought world would achieve such a great technology. Nowadays, lots of companies are working hard to bring the self driving cars into realities.

I was very interested to learn about the technology, but wasn’t sure where to get started. Finally, I decided to join Udacity’s Self-driving Car Engineer course to know the technology in depth.

In order to get the practical exposure to the projects did for first term, started building self driving technologies in remote controlled car using Robotic Operating System(ROS). My motivation to use ROS in the project for learning the framework so that I can use them in other projects down the track.

I managed to create a framework on top of ROS and implemented Behavioural Cloning task of the first term. There are two components for this project: hardware and software platform. Hardware is based on the open source team called donkeycar and I have built the software platform.

My remote controlled(RC) car

As explained, Software for this project is built on top of ROS so that communication between different nodes are easy in ROS.

General ROS structure

In ROS, ROS Master holds the information about nodes and all the nodes should registered with the master to publish/subscribe messages. Nodes are individual components which does the particular tasks. For example, camera node is responsible for capturing the image.

I have created below architecture based on the above concept. The architecture is distributed across different devices and all of them controlled by one ROS master.

High level architecture

Raspberry pi holds the camera node and actuator node which capture the image and control the car respectively. Laptop has few nodes which act as central unit for self driving and training the car.

It took few weeks to setup the ROS framework as I do not have prior knowledge about it. After setting it up, most of my time spent in building algorithm for self driving. Initial task was to implement Behavioural Cloning task completed as part of Udacity’s Self-driving Car Engineer nanodegree and here is the video of RC car driving by itself through the track using behavioural cloning concept.

Self-driving Robo car

Future State

From David Silver’s medium post

The above diagram depicts how self driving car works. Currently, I am trying to apply computer vision technology to my project. Down the track, aiming to implement other self-driving car technologies to my project such as localization, path planning etc.

If you want to see the code in action, please visit the Github repo.

If you like my write up, follow me on Github, Linkedin, and/or Medium profile.

--

--