← Back to projects

Navigation and object detection with iRobot Create® 2

Image of the CPRE288 iRobot Create 2 in the navigation field surrounded by the cylinders used as environmental hazards.
Figure 1: The CPRE288 iRobot Create 2 platform and the cylinders used as environmental hazards.

Project Overview

For the final project in CPRE288 (Embedded Systems), I wrote the embedded software in C that allowed the Texas Instruments ARM-based Tiva microcontroller to interface with the various peripherals included on the iRobot Create 2-based platform used throughout the CPRE288 lab. The Goal of this project was to provide the means with which this robot could be steered through an obstacle course from a remote location.
When Complete, my robot was able to perform object detection using the infrared and ultrasonic sensors attached to a PWM-controlled servo motor. Remote navigation was also added using the SPI-connected WIFI board and the iRobot Create 2's UART-based interface. This WIFI interface was also used to transmit object detection data and other information to a GUI I created in MATLAB.
A demonstration showing how the robot was controlled using the MATLAB-based GUI is shown in the brief video below.

Figure 2: Demonstration of the GUI's object detection and navigation controls and visuals.

From the video in Figure 2, it may be observed how the GUI provided the controls and visual feedback necessary for piloting the iRobot Create 2 from a remote location. The plot on the right side of the GUI is used to show the robot's current position from a bird's-eye view, the path which it has traveled (the blue line), and the obstacles it has detected in its path (the red dots). The GUI also features visual indicators in the lower left-hand side to show whether the robot's bumper has run up against an obstacle, encountered the field's boundary, or detected a cliff. For simpler navigation, the user is able to click on a point in the field to set the direction and distance the robot should travel.

My Role

I wrote and tested the C code used to read and interface with the various peripherals connected to the Tiva microcontroller's I/O. I was responsible for creating the object detection and navigation code as well as the majority of the MATLAB-based GUI's frontend and backend including the battery level indicator, and the plot for the sensor data (shown on the left of the video in Figure 2) and the bird's-eye view representation of the navigation field.

Skills or Knowledge Gained

This project allowed me to learn how to configure the peripherals on an ARM-based microcontroller such as UART, SPI, PWM, and interrupts. In the process of configuring these devices, I learned how to correctly interpret the technical documentation for the microcontroller and the connected peripheral devices.
Through this project, I also learned how to programmatically create GUIs in MATLAB.

Resources Used