Book Image

Raspberry Pi Robotic Blueprints

Book Image

Raspberry Pi Robotic Blueprints

Overview of this book

The Raspberry Pi is a series of credit card-sized single-board computers developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools. The Raspberry Pi is known as a tiny computer built on a single circuit board. It runs a Linux operating system, and has connection ports for various peripherals so that it can be hooked up to sensors, motors, cameras, and more. Raspberry Pi has been hugely popular among hardware hobbyists for various projects, including robotics. This book gives you an insight into implementing several creative projects using the peripherals provided by Raspberry Pi. To start, we’ll walk through the basic robotics concepts that the world of Raspberry Pi offers us, implementing wireless communication to control your robot from a distance. Next, we demonstrate how to build a sensible and a visionary robot, maximizing the use of sensors and step controllers. After that, we focus on building a wheeled robot that can draw and play hockey. To finish with a bang, we’ll build an autonomous hexcopter, that is, a flying robot controlled by Raspberry Pi. By the end of this book, you will be a maestro in applying an array of different technologies to create almost any imaginable robot.
Table of Contents (14 chapters)
Raspberry Pi Robotic Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Robotics have really come into the public spotlight in the past few years. Ideas that, just a few years ago, would have lived only in the government research center or university lab, such as robotic vacuum cleaners, drones that cover the sky, and self-driving cars, are now making their way into everyday life. This movement is fueled, at least in part, by scores of enterprising individuals, without significant technical training, who undertake building their idea with inexpensive hardware and free, open-source software.

This book celebrates this effort by detailing how to get started on building the project that you always wanted to build but didn't think you had the expertise for. The heart of these projects is Raspberry Pi B version 2, a cable microprocessor-based system that can run Linux and provides a platform for a significant number of open source modules. Combine Raspberry Pi with these open source modules and low cost hardware, and you can build robots that can walk, role, draw, and even fly.

What this book covers

Chapter 1, Adding Raspberry Pi to an RC Vehicle, shows you how to add Raspberry Pi to an existing toy, such as an old RC car or truck, to make it "new" again.

Chapter 2, Adding Raspberry Pi to a Humanoid Robot, covers how to add Raspberry Pi to robots, such as the Robosapien line from WowWee, to add voice commands and make them more versatile.

Chapter 3, Building a Tracked Vehicle That Can Plan Its Own Path, explains how to build a tracked robot containing sensors so that it can map the position of a set of objects.

Chapter 4, Building a Robot That Can Play Laser Tag, covers how to use the capabilities of Raspberry Pi to build a wheeled robot that can play laser tag.

Chapter 5, A Robot That Can Draw, introduces the capability of external dedicated servo controllers that can make controlling the arms and legs of the robot much easier. This is done using servos, whose position can be controlled using our system.

Chapter 6, A Robot That Can Play Air Hockey, explains how to use stepper motors and an advanced vision system to build a robot that can plan air hockey using more power and precision.

Chapter 7, A Robot That Can Fly, explains that after building a robot that can walk, talk, or play air hockey, you can build a robot that can fly.

What you need for this book

Chapter

Software

Where Located

Chapter 1

Raspberry Pi Debian

https://www.raspberrypi.org/

 

RaspiRobot Board V2 drivers from Simon Monk

http://www.monkmakes.com/?page_id=698

 

TightVNC Server

sudo apt-get install tightvncserver

 

luvcview

sudo apt-get install luvcview

Chapter 2

Arduino IDE

https://www.arduino.cc/

 

eSpeak

sudo apt-get install espeak

 

PocketSphinx

http://cmusphinx.sourceforge.net/

Chapter 3

RaspiRobot Board V2 drivers from Simon Monk

http://www.monkmakes.com/?page_id=698

Chapter 4

PodSixNet

http://mccormick.cx/projects/PodSixNet/

Chapter 5

Pololu Maestro Control Center

http://www.pololu.com/docs/0J40/3.a

Chapter 6

Arduino IDE

https://www.arduino.cc/

 

OpenCV

http://opencv.org/

Who this book is for

This all-embracing guide is created for anyone who is interested in expanding their horizon in applying the peripherals of Raspberry Pi. If you fancy building complex-looking robots with simple, inexpensive, and readily available hardware, then this is the ideal book for you. Prior understanding of Raspberry Pi with simple mechanical systems is recommended.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Type cd rrb2-1.1—this will change the directory to the location of the files."

A block of code is set as follows:

void loop()
{
  int dt;
  uint8_t logOutput=0;
  debug_counter++;
  timer_value = micros();

Any command-line input or output is written as follows:

volatile int viRobsapienCmd = -1;  // A robosapien command sent over the UART request
// Some but not all RS commands are defined
#define RSTurnRight       0x80
#define RSRightArmUp      0x81

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Now click on Connect on Remote Desktop Viewer."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you with a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from https://www.packtpub.com/sites/default/files/downloads/6282OT_ColorImages.pdf.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.