The main components of a robot
For the purpose of this book, we will define a robot as a machine that can autonomously and intentionally interact with its environment. This definition directly provides the three key capabilities that a robot must have:
- Sense its environment
- Reason about the state of its environment and compute its appropriate reaction
- Physically move to interact with the environment
Sense-Reason-Act is a commonly cited robotics paradigm and is visualized in Figure 1.2:
Figure 1.2 – The Sense-Reason-Act paradigm of robotics for Arduino robots
A robot needs to sense the aspects of its environment that are relevant to its task. If you build a robot to water your plants, the robot needs to sense the moisture of the soil, for example. If you build an automated transporting robot that needs to follow a line on the floor, it needs to sense the position of the line between its wheels. Choosing the right sensors for your robot is an important step in the design process. This book will introduce you to a variety of readily available and easy-to-use sensor types that work with Arduino robots, along with examples of how to use and integrate them into your robot.
Reasoning, based on sensor signals, is the task of the program that you implement on your Arduino. Your Arduino can run programs just like a real computer, although, typically, with much tighter restrictions on computational power and available memory. We will keep these limitations in mind when we write our Arduino programs. In practice, there is often a trade-off between choosing sensors and implementing the control logic. Adding more and better sensors can make controlling your robot easier, but also leads to more complex hardware and higher cost. More advanced software that runs on your robot can often make up for the lack of high-quality sensor data but is more difficult and time-consuming to develop. An example of this is the combination of the human eye and brain: the eye is not a very good image sensor. It has a blind spot, variable resolution and color sensitivity across its field of view, and a less-than-ideal lens. Yet our brain turns this all but perfect sensor data into crystal clear images under a wide variety of conditions (enabling you to read this book, for example). Here, the capabilities of the software in our brain make up for the rather poor sensor. In contrast, most robots that heavily rely on image data for their tasks (autonomous cars, for example) have very good camera sensors, and they can use this image data without much post-processing.
Your robot will need motors (or more generally, actuators) to physically act. These can be electric motors, pneumatic or hydraulic cylinders, gasoline engines, or even rocket thrusters. In this book, we will focus our attention on electric motors, but let’s keep in mind that there are many more actuator types to explore. In contrast to sensors that can often be directly connected to an Arduino and even powered from it, motors typically need some form of driver (or amplifier) in between the Arduino and the motor. This is because motors tend to require much more power than an Arduino alone can provide. You can imagine the motor as a big and complex piece of machinery, and the driver electronics as the specialist operator of this piece of machinery. The Arduino will communicate with the driver/operator to tell them what the machine should be doing, but it leaves the actual operation of the machine to the operator. There is a similar trade-off between the quality and capabilities of your robot’s actuators and the complexity of the robot program that we mentioned earlier with the sensors. It is generally easier to work with very precise, fast, and strong actuators, but more sophisticated software can often make up for imperfect actuators. The human brain is again a good example: humans can perform incredibly precise and dynamic movements, even though there is quite a bit of latency in our nervous system. The brain’s software can make up for the shortcomings of the hardware.
What different types of robots are there?
There are many types of robots that fall under our broad definition of a robot. The content of this book is relevant for all of them, so no matter whether you want to build a flying robot or your own 3D printer, this book will be very useful for you. In fact, there are so many different kinds and types of robots built for a diverse range of applications that it is not at all straightforward to classify them consistently. At a very high level, it is common to differentiate between mobile robots that can move around in the world and stationary robots. Prominent examples of mobile robots are self-driving cars, and prominent examples of stationary robots are robotic arms widely used in industrial manufacturing, for example, to weld car parts together.
Mobile robots can be divided into subcategories based on whether they are ground-based, flying, or swimming, how they propel themselves (for example, with wheels or legs), and whether they have the means to manipulate their environment with an arm and a gripper. Using these categories, you could describe a humanoid robot (one that looks like a human) as a ground-based, legged, dual-arm, mobile manipulator.
In this book, we will primarily use ground-based, wheeled, mobile robots as examples. This type of robot is easy and inexpensive to build, can be tested virtually everywhere, and exemplifies the key concepts that apply to almost every category of robots.