Book Image

Learn Robotics Programming

By : Danny Staple
Book Image

Learn Robotics Programming

By: Danny Staple

Overview of this book

We live in an age where the most difficult human tasks are now automated. Smart and intelligent robots, which will perform different tasks precisely and efficiently, are the requirement of the hour. A combination of Raspberry Pi and Python works perfectly when making these kinds of robots. Learn Robotics Programming starts by introducing you to the basic structure of a robot, along with how to plan, build, and program it. As you make your way through the book, you will gradually progress to adding different outputs and sensors, learning new building skills, and writing code for interesting behaviors with sensors. You’ll also be able to update your robot, and set up web, phone, and Wi-Fi connectivity in order to control it. By the end of the book, you will have built a clever robot that can perform basic artificial intelligence (AI) operations.
Table of Contents (21 chapters)

What does robot mean?

A robot is a machine that is able to make autonomous decisions based on input from sensors. A software agent is a program that is designed to automatically process input and produce output. Perhaps a robot can be best described as an autonomous software agent with sensors and moving outputs. Or, it could be described as an electromechanical platform with software running on it. Either way, a robot requires electronics, mechanical parts, and code.

The word robot conjures up images of fantastic sci-fi creations, devices with legendary strength and intelligence. These often follow the human body plan, making them an android, the term for a human-like robot. They are often given a personality and behave like a person who is in some simple way naive. Refer to the following diagram:

Science fiction and real-world robots. Images used are from the public domain OpenClipArt library

The word robot comes from sci-fi. The word is derived from the Czech for slave, and was first used in the 1921 Karel Capek play, Rossums Universal Robots. The science fiction author Isaac Asimov coined the word robotics as he explored intelligent robot behavior.

Most real robots in our homes and industries have a few cutting edge and eye catching examples standing out. Most do not stand on two legs, or indeed any legs at all. Some are on wheels, and some are not mobile but still have many moving parts and sensors.

Robots like washing machines, autonomous vacuum cleaners, fully self regulating boilers, and air sampling fans have infiltrated our homes and are part of everyday life. They aren't threatening, and have became just another machine around us. The 3D printer, robot arm, and learning toys are a bit more exciting though. Take a look at the following diagram:

The robot, reduced

At their core, robots can all be simplified down to what is represented in the preceding diagram with outputs, such as a motor, inputs, and a controller for processing or running code. So, the basis of a robot, represented as a list, would look something like this:

  • A robot has inputs, and sensors to measure, and sample a property of its environment
  • A robot has outputs, motors, lights, sounds, valves, sounds, heaters, or other types of output to alter it's environment
  • A robot will use the data from its inputs to make autonomous decisions about how it controls its outputs