# WikiRobotics/Printable version

The current, editable version of this book is available in Wikibooks, the open-content textbooks collection, at
https://en.wikibooks.org/wiki/WikiRobotics

# The Future of Robotics
## Robotics and Popular culture

Popular conception, when it comes to robots, is frequently rooted in science fiction stories taking place in the future. We often start from this sort of story-like concept of where we are possibly going, because it is the most familiar frame of reference for those who know little of robotics to begin with. There are some who predict we will serve roles more similar to those in science fiction at some point, perhaps even within the next ten to twenty years. However, the advancement of robotics over the past century can be considered a little underwhelming; most major advances in technology have been more software-based than hardware. This is not entirely a bad thing, since better software means more possible things to program a robot to do.

## Methods

There are two ways to consider the future (of anything). In the first, we can look at a few years down the road and make an educated guess as to what robotics companies are working on now would result in. Secondly, we can consider what it will be like in the longer term, multiple decades later, where things become more fantastic and the technology is more sophisticated overall. In either of these frames of reference, we can consider what purposes tomorrows robots will serve, as well as who is building them.

### Near Future

Most robots being used today and in the near future are usually centered on menial labor or military usage, though these are hardly the only uses. While robots exist that can be able to perform surgery, it is not routine yet; in 10 years it may be. Robots to perform household tasks are roughly 20 years away. Whenever a “new” technology is created, the first to use it are frequently the military. Although there currently aren’t any autonomous robots at the military's disposal, which could change twenty years down the road.

### Long Term

When it comes to who, that question is not just restricted to companies, but countries as well. (Japan, America, South Korea, etc.) While most of the world could expect the types of robots mentioned above in twenty years, there are Japanese companies that plan to make such advancements and more in ten years. One such advancement involves nanorobots. There is the hope of perfecting them to the point where placing these in the bloodstream could make them slow down, and perhaps even stop aging, among other health benefits. South Korea plans to have a robot in every household as soon as they can.
It would be unwise to expect many big steps forward in this field within the next five years. We’re still a quarter of a century away at least from having things like the flying car or the android. Before then, we’ll have to make do with robots that entertain or work for us rather than those that can fly us around. However, given it’ll take less than fifty years for such growth to happen, I’m sure some of us could wait.

# Mathematics of Robot Control
## Introduction

In a previous chapter, we talked about different approaches to how a robot can operate with specific problems. Now we talk about how what it can do relates to mathematics. Mathematics is useful in varying ways to many situations, especially in matters science-related. The more complicated functions and calculations the robot does, the more math is involved, particularly in how the robot can move. For example, if you had a robot that had legs, you'd have to consider the angle of when each foot leaves then touches the ground as well as divide the total weight of the robot by the amount of legs touching the ground at any given time. Factors like these should be considered if you don't want the robot to fall over.

# Programming Concepts
## Programming Crash Course

One of the biggest blessing/curses of computer programming is that it’s so complicated, with so many concepts to apply to it. It’s a curse only that it could be hard to understand for even a novice at programming. But it is a blessing that more different approaches mean more possibilities.
First to understand is the algorithm, which is basically a set of phases in programming to arrive at a certain solution. There’s also the Function which like the algorithm is meant to carry out specific tasks. It also can helps make a program that much simpler to make when it comes to its source code. The source code is the set of instructions the computer understands to run a program. It’s a unique language in that out of context makes no sense to any human being; it serves to be comprehended solely by the computer. It comprehends it by putting it in a compiler, which converts the source code the computer can use to turn into a program.
Data types is how you classify the bits on information in each program, from integers to single characters. Variables work as containers that hold a certain value in a program that can be change, except when it comes to constants in which the value never changes. Another type of variable is the array, which instead of one value contains a list of values.
There can be sets of code in a program that only activate when a certain condition is met. The conditional only executes once when conditions are met, but the loops execute more than once, though not necessarily infinity.
There’s also class, something used in object-oriented programming in that it’s a template for real-world objects.

# Robot Control
## Making Decisions

One of the main differences between man and machine when it comes to how we operate is that when we make a mistake, we try to learn from it so it doesn’t happen again. With a machine, if something goes wrong, it could continue to make it; not because it’s dumb (at least not our definition of it), but because it could lack the programming of what to do in the face of it. Even if it recognizes something is wrong, there’s nothing it can do to fix it short of breaking down. Even if you built the robot perfectly with no huge design flaws and with a source of energy that’s reliable and ready, there’s still the possibility of it not working properly. That’s not to say a gear getting jammed or a wire getting disconnected could be a problem, but they can be solved with minimal difficulty, at least compared to programming issues. Programming a robot to respond in the face of whatever could go wrong is quite difficult.

## Obstacle handling

There are four approaches a robot could take to an obstacle; thinking followed by acting, reacting, thinking and acting simultaneously, and behavior-based acting. There are upsides and downsides to all these approaches; thinking too long can lead the robot having an accident, thinking in itself requires the robot to have accurate information on the world around it, etc. These approaches can be hard to distinguish when not looked at carefully, adding to the challenge. There are many factors like these to consider when programming a robot to interact with its environment.

# Robot Hardware
## Hardware

The type of hardware needed to build a robot is quite diverse. It really depends on what kind of robot you're trying to build. (How heavy is it, what does it need to do, the material that would be best suited, the quantity needed, etc.) While many different types of metal are common material for the parts, it's not always the best choice for certain functions, given it could be too heavy or too expensive, so in some cases, plastic or rubber are used, the latter especially if it's supposed to have wheels. Whatever the case, it has to be sturdy in built, not just in the part alone, but how it fits with the others in order for it to work properly.
Gears are considered by many to be the symbol of not only robotics, but machinery and technology in general, and for good reason. It symbolizes how doing one thing leads to other events happening, while the first action continues. Not only are gears common in robotics, there are different variations of it that can be used. Of course, if you're going to talk about gears, you might as well include chains, pulleys, and belts because not only can they prove just as important, but also in conjunction in gears as a driving mechanism. But when it comes to the power source, what powers the driving mechanism, a power supply is needed for that. Once again, it depends on several factors, (how big is the robot and how hard is it going to need to work) so a proper source could range form a few batteries to being plugged into an outlet at all times.

## Interface

And finally, there's the interface, or the point where human interaction decide what the robot does next. It could be a set of buttons or a connected wire to a computer that holds the program to run the robot, it's a part in the robot's design that hopefully, over time plays a smaller part in how it operates.