Introduction: Robot Boot Camp


Image Caution

We who program robots have a special responsibility to make sure that the programming is safe for the public and safe for the robots. The safety of robot interaction with humans, animals, robots, or property is a primary consideration whenever a robot is being programmed. This is true for all kinds of robot programming and especially true for programming autonomous robots, which is the kind of robot programming that we explain in this book. The robot commands, instructions, programs, and software presented in this book are meant for exposition purposes only and as such are not suitable for safe public interaction with people, animals, robots, or property.

A serious treatment of robot safety is beyond the scope of this introductory book. Although the robot examples and applications presented in this book were tested to ensure correctness and appropriateness, we make no warranties that the commands, instructions, programs, and software are free of defects or error, are consistent with any particular standard of merchantability, or will meet your requirements for any particular application.

The robot code snippets, programs, and examples are meant for exposition purposes only and should not be relied on in any situation where their use could result in injury to a person, or loss of property, time, or ideas. The authors and publisher disclaim all liability for direct or consequential damages resulting from your use of the robots, commands, instructions, robot programs, and examples presented in this book or contained on the supporting website for this book.


Robot Programming Boot Camp

Welcome to Robot Programming: A Guide to Controlling Autonomous Robots. This robot programming “boot camp” ensures that you have all the information needed to get started. We have built and programmed many types of robots ranging from simple single-purpose robots to advanced multifunction autonomous robot teams and have found this short robot programming boot camp indispensable for those who are new to programming robots or who want to learn new techniques to program robots.


Image Caution

Although Robot Programming: A Guide to Controlling Autonomous Robots does not assume that you have any previous experience programming robots, to get the most out the book it is assumed that you are familiar with basic programming techniques in standard programming languages such as Java or C++. While the book does present all the final robot programs in Java or C++, the basic robot instruction techniques and concepts are presented with diagrams or plain English first. The book also introduces you to approaches to program design, planning, and analysis such as RSVP (Robot Scenario Visual Planning) and REQUIRE (Robot Effectiveness Quotient Used in Real Environments) .


Ready, Set, Go! No Wires or Strings Attached

There are two basic categories for robot control and robot operation as shown in Figure I.1.

Image

Figure I.1 The two basic categories of robot operation

The telerobot group represents robot operations that are remotely controlled by a human operator using some kind of remote control device or puppet mode. Some remote controls require a tether (a wire of some sort) to be physically connected to the robot, and other types of remote control are wireless (for example, radio control or infrared).

The autonomous robot group represents the kind of robot that does not require a human operator. Instead, the robot accesses a set of instructions and carries them out autonomously without intervention or interruption from a remote control.

In this book, we focus on the autonomous group of robot operations and robot programming. Although we often discuss, explain, and contrast telerobots and autonomous robots, our primary focus is on introducing you to the basic concepts of programming a robot to operate and execute assigned tasks autonomously.

As you see in Chapter 9, “Robot SPACES,” there are hybrids of the two types of robot control/operation with different mixes and matches for operation strategies. You are introduced to techniques that allow for mixing and matching different robot control strategies.


Image Note

All robot instructions, commands, and programs in this book have been tested on ARM7, ARM9 microcontroller-based robots as well as on the widely available and popular LEGO NXT and EV3-based robots. All other robot-based software used in this book was tested and executed in Mac OSX and Linux environments.


Boot Camp Fundamentals

Five basic questions must be answered prior to any attempt to program a robot:

1. What type of robot is being considered?

2. What is the robot going to do?

3. Where is the robot going to do it?

4. How is the robot going to do it?

5. How will the robot be programmed?

Many beginner and would-be robot programmers fail to answer these basic questions and end up with less than successful robot projects. Having the answers to these fundamental questions is the first step in the process of getting any kind of robot to execute the assigned task. In Robot Programming: A Guide to Controlling Autonomous Robots we demonstrate how these questions and their answers are used to organize a step-by-step approach to successfully instructing a robot to autonomously carry out a set of tasks.

Core Robot Programming Skills Introduced in This Book

In this book, we introduce you to the following basic techniques of the Robot Boot Camp shown in Table I.1.

Image

Table I.1 The Boot Camp Notes

These techniques are the core techniques necessary to get a robot to execute almost any assigned task. Make note of these five areas because they represent the second step in building a solid foundation for robot programming.

BURT—Basic Universal Robot Translator

In this book, we use two aids to present the robot programs and common robot programming issues in an easy-to-understand and quick reference format. The first aid, BURT (Basic Universal Robot Translator), is used to present all the code snippets, commands, and robot programs in this book. BURT shows two versions of each code snippet, command, or robot program:

Image Plain English version

Image Robot language version

BURT is used to translate from a simple, easy-to-understand English version of a set of instructions to the robot language version of those instructions.

In some cases the English version is translated into diagrams that represent the robot instructions. In other cases, BURT translates the English into standard programming languages like Java or C++. BURT can also be used to translate English instructions into robot visual instruction environments like Labview or LEGO’s G language for Mindstorms robots.

The BURT Translations are numbered and can be used for quick reference guides on programming techniques, robot instructions, or commands. BURT Translations have two components; an input and an output component. The input component will contain the pseudocode, or RSVPs. The output component will contain the program listing, whether it be a standard language or visual instruction. They will be accompanied with the BURT Translation Input or Output logo as shown in Figure I.2.

Image

Figure I.2 BURT Translation Input and Output logos

In addition to BURT Translations, this book contains BURT Gotchas, a.k.a. BURT’s Glossary of Technical Concepts and Helpful Acronyms. The world of robot programming is full of technical terms and acronyms that may be unfamiliar or tricky to recall. BURT Gotchas provide a convenient place to look up any acronym or some of the more technical terms used in this book. In some cases BURT Gotchas are listed at the end of the chapter in which they are first used, but a complete list of all of BURT Gotchas can be found in the book’s glossary.

BRON—Bluetooth Robot Oriented Network

The second aid is BRON (Bluetooth Robot Oriented Network). We have put together a small team of robots that are connected and communicate through Bluetooth wireless protocols and the Internet. It is the responsibility of this team of robots to locate and retrieve useful tips, tricks, little-known facts, interviews, and news from the world of robot programming that the reader will find interesting and helpful. This material is presented in sections titled BRON’s Believe It or Not and are identified by the logo shown in Figure I.3.

Image

Figure I.3 BRON’s Believe It or Not logo

These sections contain supplementary material that the reader can skip, but often offer additional insight on some idea that has been presented in the chapter. In some instances, a BRON’s Believe It or Not contains news that is hot off the presses and relevant to some aspect of robot programming. In other instances, a BRON section contains excerpts from interviews of individuals making important contributions to the world of robotics or robot programming. In all cases, BRON’s Believe It or Not sections are designed to give you a deeper understanding and appreciation for the world of robotics and robot programming.

Assumptions About the Reader’s Robot(s)

Robot Programming: A Guide to Controlling Autonomous Robots can be read and much can be learned without any access to robots at all. Most chapters explain the concepts in plain English and are reinforced with diagrams. However, to get the maximum benefit from reading this book, it is assumed you will try out and test the commands, instructions, or programs on robots that you have access to.

We used and tested the instructions and programs in this book on several different types of robots, and the ideas presented in this book broadly apply to many classes of robots. If you have access to a robot with at least one capability from each column shown in Table I.2, you will be able to adapt any program in this book to your robot.


Image Note

We do show you how to program a robot to use other sensors beyond those listed in Table I.2. But the main ideas in the book can be tried and tested with only those listed in Table I.2.

Image

Table I.2 The Boot Camp’s Matrix of Robot Capabilities


How Midamba Learned to Program a Robot

In this book, we tell a short story of how free-spirited, fun-loving Midamba found himself in a precarious predicament. As luck would have it, his only chance out of the predicament required that he learn how to program robots. Although Midamba had some basic experience programming a computer, he had very little knowledge of robots and no experience programming them. So throughout the book, we use Midamba’s predicament and his robot programming triumph as an example. We walk you through the same basic lessons that Midamba learned and the steps he had to take to successfully program his first robot.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset