Introduction To Robotics and Robot Programming (Assignment)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

ASSIGNMENT

Advanced Artificial Intelligence (CSE710)


Topic: Introduction to Robotics and Robot Programming
Submitted By: Dipon Kumar Ghosh (ID: 19366007)
Submitted To: Dr. Fazlul Hasan Siddiqui

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.

The fundamental characteristics can be found in a robot are:


• Sensing: A robot is needed to sense its surrounding environment. This can be
accomplished by using sensors such as, light sensors, touch and pressure sensors,
hearing and sonar sensors, chemical sensors etc.
• Movement: Moving around its environment is another important characteristic for a
robot. A robot can roll on wheels, walk on legs, propel by thrusters etc. It can move its
whole body (i.e. Sojourner) or a part of the body (i.e. Canada Arm) to be considered as
a robot.
• Energy: An energy source is a crucial part of a robot. It can be solar powered,
electrically powered or battery powered depending on the environment it will act upon.
• Intelligence: Finally, a robot needs some kind of ‘brainpower’. This is the scope where
programming shines. A programmer is required to program the robot to provide it with
‘intelligence’ and ‘reasoning ability’.
So, we can say that, a robot is considered as a system that contains sensors, control systems,
manipulators, actuators, energy source and software all working together to complete a task.

Curriculum map for Robotics


Designing, building, programming and testing a robot required knowledge from different fields
namely, physics, mechanical engineering, structural engineering, mathematics and computing.
In some specific cases, knowledge of biology, medicine and chemistry is also required. A study
in robotics requires a person to be engage in all of these fields and build a robot that can be put
in problem-solving environment. However, in practice, different individuals from different
disciplines form a team to study and build robots as it requires extensive knowledge from all
the disciplines stated above to build a functional robot able to solve real life problems.

Robot Design Process


There are six steps in robotics design process:

• 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.

The Challenge: Perception vs. Reality, and the Fragility of Control


Knowing the true state of the environment is one of the most rudimentary challenges in all of
robotics. Robot control software can only assume the environment condition and act upon the
environment based on perception through generation of control signals. So, the first step in
control design is to create an abstract representation of the real world which to interpret sensor
readings and provide outcomes. This abstract representation is called ‘model’. The efficiency
of control system software is dependent on how close the model resembles the real world.
Because of this, robots require controlled environment to perform to its maximum potential.

Programmable Robot Simulator


Hence, a simulator is developed in Python which provides an accurate simulation of a mobile
robot and a framework for practicing robot software programming. In real life scenario, due to
complex calculation and fast execution of commands C/C++ used to program a robot control
software. However, python has a trade-off between execution speed and ease of development
and testing. And the process of programing a simulation is similar to programming a real robot.

2
Introduction to Robotics and Robot Programming

In the tutorial, robot control system architecture is described and python code snippets are also
provided.

The Control Logic


The control logic of a robot constrained in classes that can perform different specific task. For
example,
▪ one class is responsible for interaction between the simulated world and robot and the
robot itself.
▪ another class can be responsible for maintain different states depending on the
environment.
▪ and another class can implement different actions of the robot given a particular
situation.

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.

The Control Loop


Control loop is the core of the robot control software. As our environment is dynamic and the
state of the robot, the readings of its sensors, and the effects of its control signal are in constant
flux.
Controlling the way events play out involves the following three steps:
1. Apply control signals.
2. Measure the results.
3. Generate new control signals calculated to bring us closer to our goal.

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

Robot Programming Methods


Hence, programming the robot control software requires three main methods, which describes
the different behavior in different situations of our robot. They are:

• 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.

Final Control Design


The final control design of the robot mostly uses the follow-wall behavior for almost all
encounters with the obstacle. But, in case, if it finds a tight, complex situation with an obstacle,
which may lead to a collision, then the robot can switch to pure avoid-obstacle mode. When it
moves to a safe distance from the obstacle, it again switches to follow-wall behavior. And after
getting around the obstacle completely, it switches to go-to-goal behavior.

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.

You might also like