programación robots

What programming language do robots use ?

Every electronic device or machine requires a language both to move and to communicate with other devices, with humans or with the environment.

This is the programming language that a robot uses, in other words, the code or set of instructions -algorithms- that will make the robot execute tasks efficiently.

Of the more than 1,500 coding languages that exist, what coding language is used in robotics? Well, it simply depends. It depends on the applications you intend to develop or the system you use.

Some of the robot programming languages available are: C#, Python, Java, MATLAB or PHP. However, this article focuses on the robot programming language that Robotnik works with for the development of its autonomous mobile robots.

So, if you wonder what programming languaje is used in robotics, come and read.



Currently the most widely used programming language in the robotics sector is C++.

It is probably closely followed by Python. This language is key in the testing of an autonomous mobile robot and also very widespread in the robotics sector due to its relationship with ROS developers.


Known as the language of data, PYTHON is an open source programming language, probably one of the simplest, most popular and most versatile of all.

It is an Object Oriented Programming (OOP) language fully linked to the development of artificial intelligence and virtual reality.

Python is above all a very flexible and fast language for prototyping where the end user will simply have to run the code, without the need to compile. The problem with Python is that perhaps, as it does not take errors into account until it is executed, it can crash in the middle of a program.


C++ emerged as an extension of the C programming language, known as a multi-paradigm language because it is object-oriented, as is Python, but also structured programming and generic programming paradigms.

Although the development of applications in C++ is sometimes more time-consuming because it requires the compilation of the software, it is a robust programming language that allows the creation of complex programs following a solid structure without giving rise to mistakes or errors.


Robotnik uses the robotic programming languages C++ and Python to create routines, algorithms or communication with sensors, motors, drivers, etc., but for the highest level interaction with the robot, this option is avoided, creating an environment that encapsulates these programming languages in a more intelligible and understandable language for someone who bets on mobile robotics in their business, but has no programming skills.

Robotnik provides much of the source code of the robot, as well as simulations of them, through our official GitHub. This allows developers from all over the world to test our robots virtually and make improvements to the code we offer.

But for the end user or customer, this extrapolates to a more intuitive programming environment such as the block programming interface. In fact, the block programming language is already teaching in schools because of its simplicity and functionality.

Instead of the user having to enter a black-and-white terminal or transmit an overly complex command, a block is obtained via HDMI that encapsulates pre-programmed and configurable actions, as in logistics tasks: the mobile robot goes from point X to point Y on the map, transports a load from point A to point B or simply goes to the charger when the battery level is low.

Does a customer need to know how to program a robot?

After more than 20 years of experience of Robotnik, is known that this is the most comfortable option for the end user. Maybe in a company that decides to incorporate autonomous mobile robotics, there is a worker with sufficient technical knowledge that knows how to program at low level the Core or the bases of the robot as Robotnik engineers do, but if this is not the case, this is not an issue. The advantage is that it is not essential to have someone on staff with knowledge of robot programming languages.
Another advantage of these two robot programming languages is that they are the main ones that ROS offers and whose libraries are more developed.
Robotnik has been committed to ROS since its creation, but what is ROS?


ROS is not exactly a robotic programming language but rather a system or framework in which to program robot software.

In other words, a set of open source software frameworks that allow you to abstract the hardware.


Once you know what coding language is used for robotics and you already have the tool for programming, now you also need the environment in which to do it, and that's where ROS comes in. 

Before ROS, when the user changed robots or acquired a different one, he or she had to learn to use new software. Now, however, it is possible to share programs, codes and commonly used functions between robots. It also facilitates integration between systems, which is more costly if you change the paradigm.
It is a set of packages, resources and tools that creates a common ground for all developers so that if someone has made a program that communicates with a driver or does a certain algorithm, they have an interface - ROS - that allows others to use what they need to program their code. ROS is a language of languages that allows you to communicate between different nodes written in any language.

In conclusion, this standard is the most developed among mobile robotics programmers.

If you are interested in reading more in detail about ROS: Learn ROS online?

Did you know that all Robotnik mobile robots support ROS software?



Robotnik, premium sponsor of 3rd ROS Developers Day

Robotnik is going to sponsor the 3rd ROS Developers Day (*formerly named “ROS Developers Conference“), which is a hands-on online event for robot operating system developers. The event aims to connect ROS developers around the world without geographical restrictions and to share and learn the latest ROS applications through real-time practice.

At this conference, the world’s top ROS developers will bring their latest results through a webcast. They will demonstrate their ROS projects in real-time, and the public will practice at the same time.

It's the case of our colleague Alejandro Arnal, software developer from Robotnik. He will make a speech about 'Working with mobile manipulators'. Mobile manipulators are robots composed of a mobile base and a robotic arm. By combining these two, robots are able to interact in human environments, being collaborative robots. Our colleague will teach the audience how to program a mobile manipulator and they will practice using Robotnik’s mobile manipulator RB-KAIROS.

ROS CONTROL, an API to control them all

ROS has been one of the greatest advances of the robotics industry in the past years. Its development began as a way to help the development of robot applications, easing the communication between sensors and algorithms, following the paradigm of “program once, test everywhere”.

This has been the pattern of the last years, and ROS has performed extremely good in that way. For example, you could code an algorithm to take an image as its input, without caring about which model, resolution or connection type, as long as it was supported by ROS and adopted its API.

But this focusing on the high level layer of application development led to an unthinkable oblivion: How was the access to actuators managed? How were the references of the actuators calculated? As in the case of high level applications, where the end user shouldn’t care about the source and destination of the data used and produced by him, in the case of robot control the user shouldn’t care about which type of actuators are used by a robot.

But today, this is not the situation anymore. ROS Control is the API that has been developed by the ROS community to allow simple access to different actuators. Using this standard API, the controller code is separated from the actuator code. For example, one could write a new controller implementing a fancy control strategy, and test it on different hardware without changing a single line of code. Or one could test different control algorithm with same hardware to find the most suitable for its needs.

ROS Control has different features that make it really appealing: real time capabilities, that allows to run control loops at hundreds of hertz; a simple manager interface, that gives access to the actuators and handles resource conflicts; a safety interface, that knows the hardware limitation of the joints and ensures that the commands sent to the actuators are between their limits; and a set off-the-shelf controllers that are ready to be used.

Have you ever thought about the mapping between joint and actuator space? ROS Control already did it. Normally this mapping is one-to-one, i.e. one actuator controls one joint, and their movement is related by a gearbox, so you don’t need to do messy calculations. However, in case of more complex scenarios, e.g. when a differential transmission is used, ROS Control gives us an elegant solution through its transmission interface to cope with this problem.

What about mixing different robot components into one? This is a trend nowadays, where robot components are autonomous and usable on their own, but can also be assembled into a single functional system. In those cases, ROS provides high level coordination between the components, but with ROS Control this coordination is also achieved at the low level, extending the control possibilities to far and beyond, for example, with a more coupled control between a robotic arm and the tool attached to it.

Finally, the separation between controllers and actuators allows an interesting option: simulation. Gazebo, the standard robot simulator used by ROS, implements simulated ROS Control actuators, and one can write and test a controller even before it has the real robot available. This feature of ROS Control is used at Robotnik to test new kinematic configurations for its most edgy robots, allowing for quick prototype delivery.

ROS Control is one of the key parts for the domination of the robotic world by ROS. As a world leading company in the ROS community, Robotnik makes an extensive use of ROS Control to give its customers the best products available on the market.