Introduction To Robotics and Robot Programming (Assignment)
Introduction To Robotics and Robot Programming (Assignment)
Introduction To Robotics and Robot Programming (Assignment)
Introduction
In general term, Robots are considered as machine that mimics a human. However, robots,
now-a-days, are far away from thinking like a human as people still are figuring out how to put
‘common sense’ to a robot to interact with dynamic world. Today we can found robots working
in different industries such as auto, medical, manufacturing and space industries. We have sent
robots to the Moon, the Mars; we have robots that goes underwater. These robots help us
exploring the places which are dangerous for human to step into.
There is no standard way to define a robot. However, it has some fundamental characteristics
to help us to define a robot.
• Defining the problem: Defining a problem generally means identifying the purpose of
construction and identifying specific requirements. First of all, the problem should be
Introduction to Robotics and Robot Programming
determined that needs to be solved before attempting to design and build robot. Then,
it is essential to study all the potential situations that the robot may encounter. Next, a
brief design should be written in a log book.
• Researching and Designing: This step includes gathering information, identifying
specific details, identify possible and alternative design solution, planning and
designing appropriate structure. Gathering information may contain listening, reading,
conducting interviews and observing.
• Creating a Prototype: Testing the design and troubleshooting it form this step. One
should consider at least three solution that can solve the problem and each one should
be analyzed by creating prototypes with the help of drawing, taking photographs and
printing them. Once final solution is decided, it is time to produce some working
drawings. At this step, this planning should confirm to have all the necessary materials
and equipment to complete the project.
• Building the Robot: Now, the construction the robot should be started.
• Programming and Testing the Robot: It is time to put intelligence into the robot. For
primary intelligence, one can use relays, potentiometer, bump switches etc. To increase
level of intelligence, we can introduce more sensors and control elements such as,
microprocessor, that can handle more complex logic. To program the robot, we can use
different languages and tools such as List, Prolog, Python, MATLAB etc. There are
some industrial robot languages which can be used too, such as, RAPID, KRL, PDL2,
URScript etc.
• Evaluating the Robot: This step includes evaluating the design the planning process.
While building and programming the robot, we should carry out tests as we proceed
through our construction. And again, when the whole construction and development is
finished, a final and thorough test should be conducted. An evaluation report should
also be written where success and failure should be noted down in detail.
Programming A Robot
Programming is the most important and fundamental step in designing and building a robot.
How a control software is developed and interacts with its environment and achieve its goal is
described below. A python robot framework is used in this process. The steps, procedures and
components required to program the software are illustrated below.
2
Introduction to Robotics and Robot Programming
In the tutorial, robot control system architecture is described and python code snippets are also
provided.
The Goal
A robot always has a goal as robots are designed and built to perform some specific tasks. The
goal of the robot is kept simple which is to make its way to a certain point called goal point. It
is one of the basic functionality that almost any robots have this functionality. But, to make
things more critical, some obstacles have been introduced in the environment.
Control Input
Hence, the target robot is autonomous mobile robot. So, it needs to keep track of its
environment every moment. This reference robot is equipped with nine infrared sensors,
proximity sensors and pair of wheel tickers.
Control Output
The reference robot is designed to be a differential drive robot. It runs on two wheels.
Movement of this robot depends on the rotating speed of the wheels. When wheels rotate at
same speed it goes straight and rotating speed differs it turns left or right depending on the
wheels.
The Simulator
There is a class file that represent the simulated world including the robot, the goal and the
obstacles. There is also a step function that takes care of evolving the world by implementing
physics rules in the environment, considering collisions between obstacles and with the robot,
and providing new values for the sensors. The step function works in the loop to move the
robot using the wheel speed computed by the supervisor in the previous simulation step.
The Model
The model of the robot has been considered to be simple and it takes many assumptions about
the world. Some assumptions are: obstacles are never round, wheels will never slip,
the sensors will never give false readings or they will never fail.
3
Introduction to Robotics and Robot Programming
In general, the continuous process is, measuring environment through sensors, estimate the
state of the world, and then generate control signals that will minimize its cost and move toward
the goal.
Estimating State
The robot needs to estimate the state of the environment along with its own state. Though it is
supposed to not be perfect; however, the robot should assume the followings:
▪ The direction of obstacles
▪ The direction from obstacles
▪ The position of the robot
▪ The heading of the robot
• Go-to-Goal Behavior: The sole purpose of this robot is to go to its goal position and
this can be easily programmed in python. The simplest solution is to move toward the
goal. However, if it faces any obstacle it may change its course of movement to
overcome the obstacle. The goal state may lie within same axis as the robot stands in,
or it may encounter goal state with an angle. In that case, the turning rate of the robot
should be adjusted.
• Avoid-Obstacles Behavior: While going to the goal point, avoiding obstacles is one
of the most important task that the robot has to perform. Hence, for simplicity, a rule
should be established. When there are no obstacles, move forward at maximum possible
velocity. When an obstacle is encountered, move away from it until it is no longer in
the path. The direction is given by the reference vector and the reference vector can be
calculated by taking weighted sum of the sensor data.
• Hybrid Automata (Behavior State Machine): To successfully go to goal state, we
need to combine previous two behaviors: go-to-goal and avoid-obstacle; thus, it is
called hybrid automata. A hybrid automaton is programmed with different behaviors or
modes, as well as a supervising machine. The general rule in this hybrid automata states
that: When there is no obstacle detected, use go-to-goal behavior. And when there is an
obstacle detected, switch to avoid-obstacle behavior.
• Follow-Wall behavior: For this simple model, one more specialized behavior is
designed with the task of getting around the obstacle and reaching the other side. The
idea is: after encountering an obstacle, we need to set the sensor reading closest to the
obstacle and use then to estimate a surface of the obstacle. Then, the reference vector
is set to parallel to this surface and the robot should keep follow the wall until A) the
obstacle is no longer between the robot and goal, and B) we are closer to the goal than
we started. Now, it can ensure that the obstacle is navigated properly.
4
Introduction to Robotics and Robot Programming
In conclusion, robot control programming is not as easy as it seems. It requires a lot of trial and
error and testing too depending on how an environment can evolve through time. And robots
should keep up with the dynamic environment. This can be possible by providing more
intelligence to the robot and developing more sophisticated techniques and algorithms.