This section focuses on describing and setting up the hardware that will be used alongside this book. Mechanical parts, including sensors and actuators, microcontrollers, and embedded computers, are the core hardware features of any mobile robot. Installation instructions for the required software in order to run GoPiGo3 with ROS will be included.
This chapter will provide you with a variety of practical assembly guidelines about the mobile robot that the content of this book is based on. With a very practical approach in mind, we'll deep dive into the characteristics of GoPiGo3 and what makes it an ideal platform to learn robotics.
First, we will focus on the hardware and talk about the components that every robot is composed of including the mechanical parts and embedded system, sensor, and motors.
After completing the GoPiGo3 assembly section, you will be acquiring manual skills so that you can start manipulating typical components in robotics. You will also be driven to adopt a systematic approach of applying partial verification tests while assembling your robot, also known as unit tests.
After introducing the GoPiGo3 robot in the first section of this chapter, we will explain these concepts in depth, including the embedded controller, the GoPiGo3 board, and the embedded computer, the Raspberry Pi.
Next, we will describe the sensors and actuators that the robot will use, grouped into what we will call the electromechanics.
Finally, we will provide you with some useful guidelines so that assembling the robot is straightforward. Then, we will test the GoPiGo3 robot using its easy-to-start software, DexterOS. Even though we will adopt Ubuntu as an operating system for running ROS later in this book, it is recommended that you start with DexterOS so that you familiarize yourself with the hardware while avoiding specific software programming tasks, which is something that will be left for later chapters.
In this chapter, we will cover the following topics:
- Understanding the GoPiGo3 robot
- Getting familiar with the embedded hardware – GoPiGo3 board and Raspberry Pi
- Deep diving into the electromechanics – motors, sensors, and 2D camera
- Putting it all together
- Hardware testing using Bloxter (visual programming) under DexterOS
GoPiGo3 is a Raspberry Pi-based robot car manufactured by Dexter Industries. It is intended to be used as an educational kit for learning about both robotics and programming, two complementary perspectives that clearly show the transversal knowledge you should acquire to become a robotics engineer. We'll explain what this means by letting Nicole Parrot, Director of Engineering at Modular Robotics, explain it in her own words:
"The GoPiGo originated from a Kickstarter campaign in early 2014 when the Raspberry Pi was still somewhat new. The first users were hobbyists, but soon teachers and coding club volunteers were sharing their GoPiGo with their students. This lead to various changes being made to the board to make a classroom-ready robot. It's robust, it has a full list of features, and it's still based on the Raspberry Pi! The latest iteration has been around since 2017 and is a stable platform.
A Raspberry Pi-based robot offers quite a few advantages in the classroom. It can be programmed in an array of languages, it can be independent of the school Wi-Fi while not requiring Bluetooth, and it can perform advanced applications right on the board, such as computer vision and data collection. The GoPiGo with DexterOS comes with scientific libraries all preinstalled. The GoPiGo with Raspbian for Robots allows the user to install whatever libraries and tools are required for the project at hand. It comes with two Python libraries: easygopigo3.py and gopigo3.py. Both of these offer high-level control of the robot and low-level control, depending on the user's technical skills.
The GoPiGo has become the premier go-to robot for universities, researchers, and engineers seeking a simple, well-documented robot for the Raspberry Pi."
Ready to dive into robotics? Let's go!
From the robotics perspective, you will learn how to work with the basic parts:
- Motors, which allow the robot to move from one point to another. In GoPiGo3, we have DC motors with built-in encoders that provide a precise motion. This is one of the main upgrades from GoPiGo2, where the encoders were external to the motors and not very accurate.
- Sensors, which acquire information from the environment, such as the distance to near objects, luminosity, acceleration, and so on.
- The controller—that is, the GoPiGo3 red board—handles the physical interface with sensors and actuators. This is the real-time component that allows GoPiGo3 to interact with the physical world.
- A single-board computer (SBC) Raspberry Pi 3B+, which provides processing capacity. As such, it works under an operating system, typically a Linux-based distribution, providing wide flexibility from a software point of view.
Most educational kits stop at a level-3 controller; they do not include a level-4 single-board computer. The software in the controller is a small program (only one) that is embedded in the board. Every time you want to modify the code for the robot, you have to fully replace the existing program and flash the new version from an external computer while using the serial connection over a USB port.
A classic example of this is an Arduino-controlled robot. Here, the Arduino board plays the role of our GoPiGo3 board, and if you have worked with it, you will surely remember how you needed to transfer the new program from the Arduino IDE on your laptop to the robot through a USB cable.
From the programming perspective, GoPiGo3 allows you to start easy by learning a visual programming language, Bloxter, a fork of the open source Google Blockly, that was speci...