You are on page 1of 7

Robotics Programming

Languages and Techniques


1 Introduction
Robotics is a promising tool in manufacturing, and it will have a great impact ( ‫ )أثر‬to
increase the efficiency of production equipment. The big obstacle in using it as general
purpose, is the lack of efficiency and not suitable way to communicate between the user
and the machine or the robotic system to allow the user to give the machine direct orders
to accomplish a task. Therefore, robotic programming languages was provided to allow
the users express intended operations(‫)العمليات المقصودة‬, also, express the motion of the
robot(‫)التعبير عن حركة الروبوت‬.[1]

Robots receive orders by computer commands, and this is referred to as off-line program
ming at the manipulator level. Higher-level languages require the use of off-line scripting
( ‫)البرمجة النصية دون االتصال باإلنترنت‬, in which robotic actions are specified by tasks or targets (
‫)حيث يتم تحديد اإلجراءات اآللية حسب المهام أو األهداف‬.[2]

2 Different Types of Robot Programming Languages


There are many programming languages available such as, C/C++, Python, Java etc. The
most common and popular languages used in robotics is Python and C/C++. Python is
very popular because it is used especially in machine learning and used in developing
ROS systems. [3]

2.1 C/C++

For aspiring roboticists (‫)لعلماء الروبوتات الطموحين‬, choosing to learn C and C++ is the best
start, as it is a general programming language that includes imperative ( ‫)الزامي‬, object-
oriented and generic (‫ )عام‬programming functions. C++ facilitates low-level hardware
interaction, and even performance in real time. C and C++ are programming languages
that are very advanced. It will be easier to use C++ to ensure a robot's best performance.
[2]

2.1.1 What is C Language

C is a programming language that is structural or procedural based and is machine-


independent and commonly used in diverse applications. C is the basic programming
language that can be used to transform complicated programs like Oracle database, Git,
Python interpreter, and many more from operating systems (like Windows). As it forms
the basis for other programming languages [4].

‫ ومفسر‬Git ‫ و‬Oracle database ‫ هي لغة البرمجة األساسية التي يمكن استخدامها لتحويل البرامج المعقدة مثل‬C
.‫) نظًر ا ألنها تشكل أساس لغات البرمجة األخرى‬Windows‫ والعديد من أنظمة التشغيل (مثل‬، Python

2.1.2 What is C++ Language

C++ is a programming language for special purposes developed at Bell Labs by Bjarne
Stroustrup circa 1980 (‫ – لغة دانيماركية‬1980‫)يجرني ستروستروب حوالي عام‬. The language of C++ is
very similar to the language of C, and it is so compatible with C that it can run 99% of C
programs without modifying any code source, while C++ is an object-oriented
programming language, making it safer and more well-structured than C.[4]

2.2 Python in robotics (Pyro)

Pyro stands for Robotics Python. One of the aims of the Pyro
project is to include a programming environment that can be
used on many robot platforms and simulators to play with
different types of smart controllers than C[5].

‫ في تضمين بيئة‬Pyro ‫ يتمثل أحد أهداف مشروع‬.Robotics Python ‫ تعني‬Pyro


‫برمجة يمكن استخدامها في العديد من منصات الروبوت وأجهزة المحاكاة للعمل مع أنواع‬
C ‫مختلفة من وحدات التحكم الذكية غير‬

2.2.1 Why Python is the Most Used Programming Language in Robotics?

 It can use fewer lines compared to other languages.


 Python is essential to create autonomous (‫ )تحكم الذاتي‬robot with popular software.
 Python focuses on ease and saving time required for programming
 It is used in designing embedded system and an important part of ROS.
2.3 Java

Java is a good language for general-purpose programming. It is used for developing


desktop and smartphone apps, analyzing big data, embedded devices, and so on. Java
runs on 3 billion computers worldwide, which makes Java one of the most common
programming languages, according to Oracle, the organization that owns Java[6].

Robotics systems must be combined with functions via programming languages to


execute human-like tasks. Java language can be used to allow robots with these functions
as it includes an array of application programming interfaces (APIs) that are suited to
the robotics realm's needs. Using the Java Speech API, command-and-control
recognizers, dictation devices, and speech synthesizers can be created and visual images
.can be received and interpreted using the Java Media Platform

‫ للسماح‬Java ‫ يمكن استخدام لغة‬.‫يجب دمج أنظمة الروبوتات مع وظائف عبر لغات البرمجة لتنفيذ مهام شبيهة بالبشر‬
‫ باستخدام‬.‫للروبوتات بهذه الوظائف ألنها تتضمن مجموعة من واجهات برمجة التطبيقات التي تناسب احتياجات عالم الروبوتات‬
‫ يمكن إنشاء أدوات التعرف على األوامر والتحكم وأجهزة اإلمالء وُم رِّك بات الكالم ويمكن‬، ‫بينية برمجة تطبيقات جافا الكالمية‬
.‫تلقي الصور المرئية وتفسيرها باستخدام منصة وسائط جافا‬

2.4 MATLAB

MATLAB and Simulink are used by robotics researchers and engineers to develop and
tune algorithms, model real-world structures, and produce code automatically, all from
one program environment[7].

‫ لتطوير وضبط الخوارزميات ونمذجة هياكل العالم الحقيقي‬Simulink ‫ و‬MATLAB ‫يستخدم باحثو ومهندسو الروبوتات‬
‫ كل ذلك من بيئة برنامج واحدة‬، ‫وإنتاج الكود تلقائًيا‬
Figure 1Hardware designed platform by MATLAB

2.4.1 Why to use MATLAB in robotics programming?

 You can control your robot with your developed algorithms.


 You can connect your algorithms to the robotics operating system
 Connect sensors and actuators and analyze the signals
 Can be connected to low-cost hardware

2.5 Teaching Pendant

The Teach Pendant is currently the most common


robot programming form. Over 90 percent of robots
are designed using this method, according to the
British Automation and Robot Association. During
its lifespan, the robot teaching pendant has evolved
a lot, but mostly consists of, what looks like, a giant
handheld calculator (‫)آلة حاسبة عمالقة محمولة باليد‬.[8]
2.5.1 Advantages of Teaching Pendant

 Most of traditional robots are designed to work with teach pendant, and it is
familiar for technicians.
 Precise positioning of the robot because it is programmed with numerical
coordinates
 It is used for simple movements.

Summary

Robot programming languages:

Three approaches to communicate with a robot are:

■ Discrete word recognition

■ Teach and play back

■ High – level programming languages

Robot Languages:

■ Microcomputer Machine Language Level: programs are written in machine


language. The level of programming is the most basic and is very efficient.

■ Point- to- point Level: in this level, the coordinates of the points are entered
sequentially and the robot follows the points as specified.

■ Primitive Motion Level ( ‫) مستوى الحركة البسيط‬: in this language, it is possible to


develop more sophisticated programs, including sensory information, branching
and conditional statements.

■ Structured Programming Level ( ‫) مستوى البرمجة المهيكلة‬: most languages of this level
are compiler based , are powerful and allow more sophisticated programs.

■ Task-Oriented Level (‫) المستوى الموجه نحو المهمه‬: Auto pass was proposed by IBM in
1980s, Auto pass was supposed to be task oriented. This means that the user was
simply to mention the task (not by programming) , while the controller would
create the necessary sequence.

You might also like