DIY Autonomous Vehicle Project

Drive-by-Wire DevelopmentComputer Vision Applications ■ Machine Learning Applications

The notion of fully autonomous vehicles is an exciting one that will require a significant number of technological challenges to be solved in order to become a reality. The vehicles offer the ability to significantly reduce the number of accidents resulting from human error and will also provide a means of independent personal mobility for those unable to drive such as the handicapped or elderly. Self-driving vehicles are a maturing technology with the potential to reshape mobility by enhancing the safety, accessibility, efficiency, and convenience of transportation. The SAE J3016 standard uses a scale from 0 to 5 to assess the level of automation of a vehicle.

SAE J3016 Autonomous Vehicle Standard

The same basic principles that apply to enabling autonomous flight of aerial vehicles also apply to ground vehicles. Fundamentally, the vehicles need to sense their environment, plan their movements, and actuate to maneuver the vehicle based on that plan. Recent advances in sensors, computing technologies, and algorithms have enabled this technology to become truly transformative.

While ground vehicles don’t necessarily have the same level of maneuverability compared to unmanned aerial vehicles, the reduction in the number of degrees of freedom simplifies some of the sensing, planning, and control challenges. Additionally, ground vehicles typically have a larger payload capacity which enables them to carry more energy sources, sensors, and onboard processing power. This makes autonomous vehicles a great research platform to learn about the fields of artificial intelligence, sensor fusion, and path planning.

This series of pages describes the hardware and software development of a Do-It-Yourself Autonomous Vehicle Project. The theory of vehicle modeling, perception, and control can be explored through simulation using ROS and Gazebo. However, applying those theories and algorithms in the real world is a different challenge. The decreasing costs of computational power, storage, and sensors has resulted in a world where anyone can purchase the hardware necessary to build a basic self-driving car. Further, powerful computer vision and machine learning frameworks are now open source in addition to free and open courses to teach the fundamentals of robotics. In this development environment, anyone can create a simple autonomous vehicle platform that can be used to explore topics of interest at an in depth level.

Here’s a quick breakdown of the hardware and software used in this project:

The first section details the construction of the vehicle. For hands on experience, the Elegoo Robot Car V2.0 was used. This is a cheap and simple autonomous vehicle starter kit. The standard kit includes modules for obstacle avoidance, line tracing, IR, Bluetooth, sonar, and an Arduino for processing.
DIY Autonomous Vehicle Elegoo Construction

The next section describes extending the capabilities of the Elegoo kit by integrating a Raspberry Pi 3 for more processing power. The Raspberry Pi is not a microcontroller or microprocessor like the Arduino. Instead, the Raspberry Pi is referred to as a single board computer. The Arduino is optimal for interacting with sensors and motors. The Raspberry Pi runs a modified version of the Linux operating system making it ideal for running computational expensive algorithms like sensor fusion and image processing. Therefore, the combination of the Raspberry Pi and Arduino is ideal for a small, cheap, but powerful autonomous vehicle. The section covers the basic software that needs to be installed on the Raspberry Pi such as OpenCV for computer vision, as well as how to connect to the Raspberry Pi remotely so the vehicle can operate untethered.

DIY Autonomous Vehicle Raspbian Installation

After the Raspberry Pi is set-up, a drive-by-wire system is developed. While the ultimate goal of the project is to enable the vehicle to operate autonomously, it is beneficial to also have a means of manually maneuvering the vehicle remotely. This is often referred to as developing a drive-by-wire system. The goal is to develop a simple piece of software where the user inputs the desired direction for the vehicle to drive. This also enables the user to drive the vehicle in new environments, collecting sample data with the onboard sensors that can be used for testing the algorithms later on.

Once the vehicle can operate remotely manually, it it then possible to enable the vehicle to sense the environment, plan based on some desired goal, and manipulate the motors to try to move closer to that goal. Subsequent sections describe different computer vision or machine learning algorithms that can be used to autonomously navigate the vehicle.

2 thoughts on “DIY Autonomous Vehicle Project

  1. This is very helpful. I’ve been looking for a project to modify my Elego Car and push my abilities. This will work perfect. Thanks for publishing this. Semper Fi.

  2. hello wil. this is a very nice project. thank You for posting. we plan to explore automatized vehicles for race competition (similar to “donkeycars”) and (maybe) for collaborative/social behaviour. our starting point is a simple programmable platform like the legoo car. you post seems to be a valuable link between DIY level and a broader engineering approach, based on ros and gazebo. this is great. thank you. cheers.

Comments are closed.