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)

Advanced and impressive robots

Now you have an overview of robots in general, I'll introduce some specific examples that represent the most impressive robots around, and what they are capable of. These robots are technical demonstrations, and with the exception of the Mars robots, have favored their closeness to human or animal adaptability and form over their practical and repeated use.

Robots that look like humans and animals

Take a look at the following picture and understand the similarities between robots and humans/animals:


A selection of human and animal-like robots. Cog: an Mit Project, Honda ASIMO By Morio, Nao From Softbank Robotic, Boston Dynamics Atlas, Boston Dynamics BigDog (https://commons.wikimedia.org/)

What these robots have in common is that they try to emulate humans and animals in the following ways:

  • The first robot on the left is Cog, from the Massachusetts Institute of Technology. Cog attempted to be human-like in its movements and sensors.
  • The second robot is the Honda ASIMO, which walks and talks a little like a human. ASIMO's two cameras perform object avoidance, and gestures and face recognition, and have a laser distance sensor to sense the floor. It can follow marks on the floor with infrared sensors. ASIMO is able to accept voice commands in English and Japanese.
  • The third robot in this selection is the Nao robot from Softbank Robotics. This rather cute, 58 cm tall robot was designed as a learning and play robot for users to program. It has sensors to detect its motion, including if it is falling, and ultrasonic distance sensors to avoid bumps. Nao uses speakers and a microphone for voice processing. Nao includes multiple cameras to perform similar feats to the ASIMO.
  • The fourth robot is Atlas from Boston Dynamics. This robot is speedy on two legs and is capable of natural looking movement. It has a laser radar (LIDAR) array, which it uses to sense what is around it to plan and avoid collisions.
  • The right-most robot is the Boston Dynamics BigDog, a four legged robot, or quadruped, which is able to run and is one of the most stable four legged robots, capable of being pushed, shoved, and walking in icy conditions while remaining stable.

We will incorporate some features like these in the robot we will build, using distance sensors to avoid obstacles, a camera for visual processing, line sensors to follow marks on the floor, and voice processing to follow and respond to spoken commands. We will use ultrasonic distance sensors like Nao, and experiment with distance sensors a little like Asimo. We will also look at pan and tilt mechanisms for camera a little like the head used in Cog.

The Mars rovers

The Mars rover robots are designed to function on a different planet, where there is no chance of human intervention if something goes wrong. They are robust by design. New code can only be sent to a Mars rover via a remote connection as it is not practical to send up a person with a screen and keyboard. The Mars rover is headless by design. Refer to the following photo:

The Curiosity Mars rover by NASA

Mars rovers depend on wheels instead of legs, since this is far simpler to make a robot stable, and there is far less that can go wrong. Each wheel on the Mars rovers has it's own motor. They are arranged to provide maximum grip and stability to tackle the rocky terrain and reduced gravity on Mars.

The Curiosity rover was deposited on Mars with its sensitive camera folded up. After landing, the camera was unfolded and positioned with servo motors. The camera package can be positioned using a pan and tilt mechanism so it can take in as much of the Mars landscape as it can, sending back footage and pictures to NASA for analysis.

Like the Mars robot, the robot we will build in this book will use motor-driven wheels. Our robot will also be designed to run without a keyboard and mouse, being headless by design. As we expand the capabilities of our robot in this book, we will also use servo motors to drive a pan and tilt mechanism.