Read an Excerpt
Chapter 1:This is a book about creating robots with the LEGO@ MINDSTORMS" Robotic Invention System (RIS) If you've always dreamed of building and programming your own robots, this is your big chance-the RIS set makes it easy to get started. There are a lot of enthusiastic RIS owners out there already: other people have built robots that pick up empty soda cans; robots that seek light; robots that play tag; walking robots with two, four, six, or even eight legs; robots that can be controlled over the Internet; working computer peripherals like a plotter and an optical scanner; and robots that simulate a Tsunami and a tornado,* You can build anything you can imagine. RIS gives you a chance to breathe life into LEGO creations, making them move and respond to their surroundings. You can create a tank that scurries into the dark, or a monorail car that traverses your living room on a string. You can create robots that hop, walk, and drive around with a mind of their own.
Furthermore, by owning the RIS set, you become part of a worldwide community of enthusiasts. The RIS set is a common ground for building robots; if you build something cool, other people will be able to build it too. Similarly, you can build and modify other people's creations. LEGO bricks, therefore, are a kind of lingua franca for mechanical design.
You have many options when it comes to building and programming robots. LEGO bricks, of course, can be assembled in many different ways. Part of this book is about building robots; it includes five projects that you can build yourself. But you also have lots of options for programming your robot. Aside from the "official" software that comes with RIS, the inventive MINDSTORMS community has produced a bevy of other options. The most important ones are described in this book.
This chapter describes the basic concepts of robotics and creates a backdrop for the MINDSTORMS product line. I'll also cover different approaches to programming mobile robotics. Finally, I'll describe the RIS set itself. If you're in a hurry to start building something, skip ahead to Chapter 2, Hank, the Bumper Tank.
What Is a Robot?
A robot is a machine whose behavior can be programmed. This is a broad definition -it includes things like VCRs and microwave, ovens, a far cry from the talking androids you might be thinking of. Robots have five fundamental components:
1. A brain controls the robot's actions and responds to sensory input. Usually the brain is a computer of some kind.
2. A robot's body is simply the physical chassis that holds the other pieces of the robot together.
3. Actuators allow the robot to move. These are usually motors, although there are many other possibilities, such as hydraulic pistons.
4. Sensors give a robot information about its environment. A touch sensor, for example, can tell a robot that it has come in contact with something else.
The last component is not always obvious:
5. A power source supplies the juice needed to run the brain, actuators, and sensors.
For example, think about a robot that spraypaints cars in a factory. Its brain is probably a garden-variety desktop computer. The body is a big arm with a paint sprayer at the end. The actuators are motors or pneumatic pistons that move the arm around. Position and rotation sensors are used so the robot knows where the sprayer is and what direction it's pointing. The whole thing is plugged into a wall socket for -power.
Mobile robots present special challenges. These robots can move their bodies around from place to place. Why is this capability difficult? Many more things can go wrong if your robot is free to move around rather than being bolted to one place. Being mobile multiplies the number of situations your robot needs to be able to handle.
Mobile robots actually come in two varieties: tethered and autonomous. A tethered robot "cheats" by dumping its power supply and brain overboard, possibly relying on a desktop computer and a wall outlet. Control signals and power are run through a bundle of wires (the tether) to the robot, which is free to move around, at least as far as the tether will allow.
Autonomous mobile robots are even more challenging. These robots need to bring everything along with them, including a power supply and a brain. The power supply is typically an array of batteries, which adds a lot of weight to the robot. The brain is also constrained because it has to fit on the robot, not weigh a ton, and be frugal about sucking power out of the batteries.
This Is Tough Stuff
The field of autonomous mobile robotics is extremely challenging. Have you ever seen an autonomous mobile robot, besides in the movies? Probably not. If you have been lucky enough to see such a robot, was it doing something useful? Probably not. if the robot was supposed to do something useful, did it work? Probably not.
If it wasn't so hard to make autonomous mobile robots, the world would be full of them. Wouldn't it be nice to have a robot do your laundry or drive you to the airport? But the cold truth is that it's unbelievably difficult to make a robot that can do even the simplest of tasks. It all comes down to one fact: it's very bard to deal with the real world.
To understand this, think about how you might try to make a robot to vacuum your living room. This is a pretty simple task to describe: basically you just want to move the vacuum back and forth over the rug until the whole thing is clean. Suppose you modify your vacuum cleaner so that it can move around on its own, by adding more motors and a small computer brain. just consider the staggering complexity:
- How does the robot keep from getting tangled up in its own power cord, assuming it's a tethered robot? If it's not tethered, you need to find a power supply that will run the robot for long enough to clean at least one room.
- How does the robot know where it's been already? How does the robot know where it is? How does it know where to go next?
- How does the robot navigate around obstacles like table legs and furniture?
- How does the robot recognize things it shouldn't vacuum, like money, or toys, or your cats?