Book Image

Learning Robotics using Python

Book Image

Learning Robotics using Python

Overview of this book

Table of Contents (19 chapters)
Learning Robotics Using Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

How do we build a robot?


If we try to look at the parts of a robot from the previous part of this chapter in an abstract fashion, there are essentially three processes taking place: sensing (done by sensors), acting (done by effectors), and then planning (if there is any, it's done by controllers). Depending on how we put these three processes together (as they are the building blocks they are also called primitives), we can get different architectures with different properties. Let's at least say something about the three very basic architectures (also called paradigms).

Reactive control

Reactive control is probably the simplest architecture (or paradigm) one can put together with the primitives described previously. In this paradigm, as we can see in the following figure, there is no planning process involved. There is a direct connection between sensing and acting, which means that as soon as some sensory data comes in, the effectors act on the environment in some predefined way:

Just as the reflexes in your body do not send the information about something happening all the way up to the brain (which would be quite slow), but rather just to the nearest spinal cord so that the response could be fast, a reactively-controlled robot will not have any complex computation, but fast, precomputed actions that will be stored somewhere.

Hierarchical (deliberative) control

Suppose you were programming a chess playing robot with the rules of ordinary chess, it would be your robot's turn, then your robot's opponent's, and so on. It's obvious that in a setting like this, your robot does not really need to be extremely fast. However, it will be great if it did some planning about the future so that it can anticipate the future opponent's turns and then adjust its strategy, based on the opponent's current turn.

A set up like this will be perfect for hierarchical (or deliberative) control paradigm. As you can see in the following figure, the loop of planning, acting, and sensing is closed. Thus, the system can actively move towards its goal, whatever that might be:

Hybrid control

So far, we discussed control paradigms that was either fast but not very flexible, or smart but quite slow. What we will really need in many cases is something in between. Also, this is precisely what a hybrid control paradigm tries to offer.

How can we use this in a real-life robot? Suppose we want to build a robotic waiter that would serve drinks in a coffee shop (coincidentally, that is what most of this book is about). Such a waiter would definitely need to have its own internal representation of the coffee shop (where are the tables and chairs located, and so on). Once it's given a task of delivering a cup of coffee to a given customer, it will have to plan its path and then move alongside that path. As we can expect this coffee shop to be quite a good one, there maybe other guests inside too. We cannot let our robot bump into any chair or a table, let alone colliding with a customer randomly while it's trying to deliver coffee. For this, we need a well tuned reactive controller.

The following figure shows the schematics of the hybrid control paradigm. We can see that the robot at first plans its task, but breaks it down it into series of actions that can be executed by the reactive paradigm. One interesting thing to note here is the fact that the sensory data is available to aid the planning (as it needs to do some planning) and the acting (as it does the reactive control) parts of the system:

That's about it! Now, you know what a robot is, what makes it a robot, where it came from, the parts needed to create a robot, and how you can architecturally put it together. It's about time you build one yourself!