Embedded Robotics
Embedded Robotics
Embedded Robotics
Thomas Bräunl
EMBEDDED ROBOTICS
From Mobile Robots
to Autonomous Vehicles
with Raspberry Pi
and Arduino
Fourth Edition
123
Thomas Bräunl
School of Engineering
The University of Western Australia
Perth, WA, Australia
This Springer imprint is published by the registered company Springer Nature Singapore Pte Ltd.
The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721,
Singapore
PREFACE
T
his book gives a practical, in-depth introduction to embedded
systems and autonomous robots, using the popular Raspberry Pi
and Arduino microcontrollers. We demonstrate how to build a
variety of mobile robots using a combination of these controllers,
together with powerful sensors and actuators. Numerous application examples
are given for mobile robots, which can be tested either on the real robots or on
our freely available simulation system EyeSim.
This book combines teaching and research materials and can be used for
courses in embedded systems as well as in robotics and automation. We see
laboratories as an essential teaching and learning method in this area and
encourage everybody to reprogram and rediscover the algorithms and systems
presented in this book.
Although we like simulations for many applications and treat them in quite
some depth in several places in this book, we do believe that students should
also be exposed to real hardware in both areas, embedded systems and robotics.
This will deepen their understanding of the subject area and, of course, create a
lot more fun, especially when experimenting with small mobile robots.
We started this robotics endeavor over twenty years ago, when we first
interfaced a digital image sensor to our own processor board. The EyeBot-1
was based on a Motorola 68332 and our own operating system RoBIOS. The
controller was soon followed by a variety of driving, walking, flying,
swimming and diving robots that we called the EyeBot family. More powerful
(and more expensive) controller architectures followed, until the availability of
cheap, powerful boards like the Raspberry Pi and the Arduino Uno let us
reconsider our approach. We redesigned our robot family around these popular
controllers, but maintained the look and feel of our easy-to-use operating
software.
Even on the simulation side, we have gone new ways. Our original
stand-alone robot simulation has now been replaced by our new EyeSim VR
package, which uses the Unity game environment with a much more realistic
physics engine. The companion book Robot Adventures in Python and
C (Springer 2020) concentrates on the software aspect of mobile robots and
extends the hardware/software approach of this book.
V
Preface
For any embedded application, the processor power (and cost) needs to
match to the given problem. For low-level control of a mobile robot with two
DC motors and a few simple sensors, an 8-bit controller such as the Arduino
might be sufficient. However, if we want to do image processing or learning,
we need a more powerful controller like the 32-bit Raspberry Pi.
The EyeBot family consists of mobile robots with all sorts of propulsion
systems. We and numerous other universities use these robots and simulation
systems for laboratory experiments in embedded systems as part of the
computer engineering, electrical engineering and mechatronics curriculum.
Acknowledgements
A number of colleagues and students contributed to the chapters, software
systems and robotics projects presented in this book.
Working on the RoBIOS robot operating system were Remi Keat (base
system), Marcus Pham (high-level control), Franco Hidalgo (low-level control)
and Klaus Schmitt (driving routines).
The EyeBot controller board layout was done by Ivan Neubronner, and the
EyeSim VR simulator was implemented by Travis Povey (Unity), Joel Frewin
(robot models and applications), Michael Finn (terrain, underwater, swarms)
and Alexander Arnold (VR).
The following colleagues and former students contributed to this book:
Adrian Boeing on the evolution of walking gaits, Mohamed Bourgou on car
detection and tracking, Christoph Braunschädel on PID control graphs, Louis
Gonzalez and Michael Drtil on AUVs, James Ng on Bug and Brushfire
algorithms, David Venkitachalam on genetic algorithms, Joshua Petitt on DC
motors, Bernhard Zeisl on lane detection, Alistair Sutherland on balancing
robots, Jordan King on traffic sign recognition and Nicholas Burleigh on deep
learning for autonomous driving.
Additional Materials
All system software discussed in this book, the RoBIOS operating system,
C/C++ compilers for Windows, MacOS and Linux, system tools, image pro-
cessing tools, simulation system, and a large collection of example programs
are available free from:
http://robotics.ee.uwa.edu.au/eyebot/
http://robotics.ee.uwa.edu.au/eyesim/
Software specific to the Raspberry Pi and Arduino (Nano) controllers can be
downloaded from:
VI
Preface
http://robotics.ee.uwa.edu.au/rasp/
http://robotics.ee.uwa.edu.au/nano/
As further reading, please refer to our companion book on programming of
mobile robots: Robot Adventures in Python and C. This book makes heavy use
of the EyeSim simulator, so it can be used for practical experiments without the
need for a physical robot.
VII
CONTENTS
IX
Contents
X
Contents
XI
Contents
XII
Contents
APPENDICES
Appendix A: RoBIOS Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 489
Appendix B: EyeBot-IO7 Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
Appendix C: Hardware Description Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503
Appendix D: Robot Programming Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507
XIII