Main Content

In the golden age of artificial intelligence and technology, a new subfield is gaining traction: swarm robotics. Swarm robots have a great number of applications, like localized task completion in automation, autonomous navigation, or terrestrial mapping in areas that humans are unable to access. The basis of these robots is a radio-controlled (RC) car. Once multiple cars are built, swarm robotics algorithms can be implemented.

The brain of these cars is Raspberry Pi, a low entry point architecture for experimenting with hands-on robotics and programming. This tutorial walks through the steps to build such a car. It will be equipped with a camera module for remote driving and GPS and compass so that a car knows its own location and heading (this, once again, is extremely useful in swarm robotics algorithms — especially for navigation). Then, with many of them, the cars can potentially communicate to execute swarm algorithms.

This project is a lot of fun to build! There are lots of little details (which can lead to a lot of detours), but isn’t that the fun part? I really like this project because it encompasses a wide variety of concepts in both computer software (Python programming) and computer hardware through the Pi, and definitely the overlap of the two.

This project is also very versatile. You can use these cars for other applications beyond swarm robotics (although they are set up to work well for swarm projects too). It is definitely a great entry-level project that teaches you a lot! In addition, these skills are also useful for similar projects.

I would also really appreciate it if you voted for this project under the Pi Day contest!

Supplies:
For the car:

1 Raspberry Pi board
I recommend using a Pi 4 with 16GB because that gives you the flexibility to use the OpenCV library for object recognition, which will give your car more autonomous capabilities in the future (and it will make it more versatile for whichever direction you choose to drive the project in later on)
You can use the Raspberry Pi 0w too
Make sure the board was a built-in wireless adapter, which is important for remote-control
GPIO pin header (40-pin)
1 Raspberry Pi camera module
1 car chassis set (including wheels and motors)
1 or 2 L298N Motor Drive Controller Board(s)
Each board controls 2 motors.
So, if you go with 1, you will drive 2 of the motors (which will allow the other two wheels to rotate as well). But, when the car turns, it will rotate in an arc about the inner back wheel, which can make future calculations more complicated.
If you go with 2, you will be able to drive all 4 motors, so the car will rotate about its center, so it just keeps things simple.

1 GPS module (with embedded compass)

General:

Soldering gun and wire
A lot of jumper wires (double male, male-female, double female)
Breadboard (not mandatory, but highly recommended for testing before soldering)
Mouse, keyboard, monitor (you will need at least once, then you can run the Pi headless if you want)
A laptop/computer
USB hub, power ports
A power source (it should be portable)
HDMI to mini HDMI adapter
A note: I recommend purchasing a Raspberry Pi starter kit, because that will usually include a heat sink, the GPIO pin header, the Raspberry Pi board, a microSD card, the adapters, many jumper wires, and a lot of the other small parts.”

Link to article