See How This Autonomous Rover Can Navigate Complex Environments All on Its Own

Autonomous navigation is impressive, so this implementation is a fun way to see how a robot can view its environment and travel through it.

The Rover's Capabilities

Building some sort of autonomous robot is what many hobbyists aspire to complete, and that's exactly what GregF10 was able to accomplish with his Autonomous Rover project. It uses an array of sensors to first determine where it's located inside of its environment and then navigate through obstacles and reach an arbitrary destination. This can be a daunting task for anyone, let alone a hobbyist with limited experience and simple components, which is why this project is so impressive.

Required Hardware

Autonomous navigation requires ample computational power, so a Raspberry Pi 3 was selected as the main board. This also helps to speed up prototyping time, since Python code and libraries can be used. Greg went with a customized Scout Robot Chassis kit from ServoCity as his platform of choice. It comes with four 624 RPM motors, but they were swapped out for four 116 RPM motor with rotary encoders to keep track of the robot's positioning. A RoboClaw 2x15A motor driver provides advanced control for interfacing the motors with the Raspberry Pi, and an Adafruit NXP 9-DoF Breakout Board (based on the NXP FXAS21002C) is used to determine the rover's orientation.

Making It Move

Creating a movement requires knowing two things: the desired rotation around the rover's central axis, and how far forward the robot should move. Since the two sides don't move at exactly the same speed, it can be difficult to travel in a straight line for much distance. That's why the gyroscope is used to provide feedback and calibrate the robot to the correct angle.

Commands for the RoboClaw are sent via a serial port, which Greg was able to reverse engineer from a Java class to create a Python port.

Sensing the Environment

In order to navigate within an environment, the robot must first know what the environment looks like. The primary sensor used to achieve this goal is a lidar unit. Lidar uses a focused beam of light to bounce photons off of an object and receive that reflection. By measuring the time between when light is emitted to when it is received and dividing by the speed of light, a distance can be found. But this is only good in one specific direction, so it's mounted on a servo that can rotate the lidar module 180 degrees around.

Creating a Map

On the software side, coordinates are drawn on a plane based on the measured distance and the angle of the servo. Solid surfaces are found by locating collections of points that extend out a certain distance and have a minimum size. Although this system isn't perfect, it helps to greatly reduce the cloud of points into manageable geometries.

Determining Position

After a map has been created by the rover relative to its point of view, it then needs to know where it is absolutely. There is a reference map stored in the program that contains known geometries such as walls and other obstacles that can be pulled from. Then, the generated map gets overlaid on top of the reference map and the found lines are compared. Translating one map relative to the other can determine where exactly the rover is located in a room.

Navigation and Pathfinding

Navigation is perhaps the trickiest part of this project, since the rover must determine where to go all on its own to reach a certain goal or goals. It utilizes a pathfinding algorithm that works by partitioning the map into distinct cells and then finding a path between cells that also avoids running into obstructed ones. The math behind how it works in complex, so go view the original project for more details.

Overall, this project is a great way to explore how robots are able to chart their own course and visualize their environment. It will be exciting to see how this is improved, perhaps by using some kind of computer vision component or through machine learning.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles