Robotics needs developers
Robotics needs software engineers and software developers in general. A lot of them. This article is for those software developers who have never considered programming for robots. In this article we are going to discuss:
- some reasons why you should become a developer for robotics
- what that would entail for you
- how you can start.
Why become a robotics developer?
The first question you may want to ask is why should you consider becoming a robotics developer. I can think of the following reasons:
- Programming robots has a big future. The number of robots used in the world is increasing exponentially.
I’m not just talking about industrial robots, but also robots targeting commercial and consumer spaces. I’m talking about robots that interact with humans and help them with their tasks. I’m talking about service robots.
Even if the industrial and military robot sectors are growing, the one that is growing even faster is service robotics.
- Not enough engineers… yet. Due to the increasing demand for robots, many companies are considering having a robotics division. I know that because every week we get companies as clients of our academy (Robot Ignite Academy) who want to start providing training to their engineers on how to program robots. These are companies that do not have robotics divisions, but are considering creating one, and cannot find properly trained people that know how to program robots.
What is starting to happen in robotics already happened very recently with data engineers and deep learning just a few years ago. Today, every company wants to have a machine learning engineer, and hence, you can find machine learning engineers everywhere. The machine learning space is now too crowded.
However, that is not the case for robotics programming. There are very few robotics developers in the world. Now is the best time to jump onto the robotics wagon and be one of the first in this field.
- The demand for robotics engineers is very high. You only have to take a look at the robotics-worldwide mailing list to see how many job offers relating to robotics programmers are posted every day. The offers include all kinds of working offers: you can work for companies, for startups, for research institutes, or even do an internship, PhD or Post-Doc on the subject.
Just to let you know, on every official ROS conference I attend (the ROSCON), all the companies attending are indicating that they were hiring. All of them!
- Salaries. Salaries for programming robots are quite good. You can check the salary on different countries on this website. Here an example for the United States:
Salary for an actual robotics software developer job offer (as per May 2022)
- It is super cool! Let’s face it, saying that you are developing software for robots is a lot cooler that programming accountant software or an app to request pizza on the beach. Society considers robots to be one of the coolest things in technology.
- You can make a difference. What is especially interesting with service robots is that the key to having a useful robot is not the hardware, but the software. The hardware that allows a robot to clean your house already exists. The biggest limiting factor for having service robots is software. So, your job can contribute to finally bringing robots to real life.
Why are there not enough developers for robotics?
In general, software developers do not like to deal with the hardware. It is very likely that you are a developer and have never thought about entering into the robotics realm. You probably think that by programming for robots, you would need to know about electronics, and maybe even mechanics. You probably think that hardware and software are so coupled in robots that you cannot touch one without touching the other. That interaction with the hardware is something that many software developers don’t like. After all, they decided to become developers of software, not hardware!!
Fortunately, that hardware interaction is not required at present.
Roboticists programming robots
Due to that lack of software developers, robot programming is done by roboticists, which are the people that build the robots. Perhaps some of the programmers are not directly involved in the creation of the robot, but they definitely have no problem getting into the hardware and trying to fix it when something goes wrong, in order to make their program work. But let’s face it, most roboticists are not as good programmers as developers are. That is why robotics could benefit so much from having lots of expert programmers entering the field. The good news is that getting developers into the field is easier than ever. Thanks to the Robot Operating System (ROS), you can completely abstract the hardware from the software, so you can program a robot just by knowing the robot’s ROS API and test on a simulation. By using the ROS API, you can forget about the hardware and just concentrate on the software that makes the robot do what you want.
What is the robot’s ROS API?
The ROS API is the list of ROS topics, services, action servers, and messages that a given robot is providing to give access its hardware, that is, sensors and actuators. If you are not familiar with ROS, you may not understand what these terms mean. But simply put in developer’s language, topics/services/messages are like the software functions you can call on a robot to get the data from the sensors and make the robot take actions. It also includes the parameters you can pass to those functions.
Most modern robot builders are providing off-the-shelf ROS APIs; for example, ROS-Components shop, which provides all its hardware running with a ROS API.
If the robot you want to work with does not run ROS, you can make the robot work with ROS by ROSifying it. To ROSify means to adapt your robot to work with ROS. To ROSify a robot usually requires knowledge to access the hardware. You need to learn how to communicate with the electronics that provide the sensor data or access the motors of the robot. In this post, I’m not dealing with that subject because it’s out of the scope for developers. We assume that you will be working for a robot which is already ROSified.
What is ROS anyway?
ROS stands for Robot Operating System. Even if it says so, ROS is not a real operating system since it goes on top of Linux Ubuntu. ROS is a framework on top of the O.S. that allows to abstract the hardware from the software. And that is good news for you because this implies that you can actually create programs for robots without having to deal with the hardware. Yay!
You can learn more about the history of ROS in this post
ROS for service robots
ROS is becoming the standard in robotics programming, at least in the service robots sector. Initially, ROS started at the University level, but is quickly spreading into the corporate world. Every day, more and more companies and startups are basing their business in ROS.
Before ROS, every robot had to be programmed with the manufacturer’s own API. This means that if you changed robots, you had to start the entire software again, apart from having to learn the new programming environment. Furthermore, you had to know a lot about how to interact with the electronics of the robot in order to understand how your program was doing. The situation was similar to the computers of the 80s, when every computer had its own operating system and you had to create the same program for every type of computer.
ROS is for robots like Windows is for PCs or Android for phones. By having a ROSified robot, that is, a robot that runs on ROS, you can create programs that can be shared among different robots. You can build a navigation program, which is a program that makes the robot move around autonomously without colliding, for a four-wheel robot built by company A and then use the same exact code to move a two-wheel robot built by company B… or even use it on a drone from company C.
ROS for industrial robots
ROS is being used in many of the service robots that are created at present. On the other side, industrial robotics companies are still not completely convinced about using it, mainly because they will lose the power of having a proprietary system. However, several years ago, an international group called ROS-Industrial was created whose aim is to make industrial manufacturers of robots understand that ROS is for them, since they will be able to use all the software off-the-shelf that other people have created for other ROS robots.
ROS for agricultural robots
In the same line as ROS-Industrial, ROS-Agriculture is another international group that aims to introduce ROS for agriculture robots. I highly recommend that you follow this group if you are interested in agriculture robots, because they are a very motivated team that can do crazy things with several tons of machines by using ROS. Check out, for instance, this video about an autonomous tractor running ROS, built by Kyler Laird of the ROS-Agriculture group.
How to develop for robots with ROS
Now, if you are convinced about becoming a robotics developer, here are the steps that you can take to become a robotics developer:
- Setting Up
The first thing is to set your system up so that you can get ROS installed in your development system. Let’s see how to set up your machine for programming for robots with ROS. You basically have two options:
- Install everything on your computer, see below.
- Use our online ROS Development Studio which already provides everything set up and requires only a web browser.
Which operating system should you use with ROS?
ROS works on Linux Ubuntu or Linux Debian. ROS also can work on Windows and Mac but the development in those systems is not so mature. What I recommend is for you to install one of the latest versions of Ubuntu in your computer. As of today, May 2022, I recommend installing Ubuntu 20.04. You can skip this step if you use the ROS Development Studio.
But I’m using Windows/Mac, not Linux. Can I still develop in ROS?
If you still want to use Windows or Mac for ROS development, you have two options:
- Full support already exists for OSX, Gentoo and Windows, but I really don’t recommend you use them yet. I’ve never met anyone that has installed ROS on Windows or Mac without lots of trouble. If still, you wan to go that way, check this page for more information about ROS on those systems.
- Use the ROS Development Studio, where you can fully develop for ROS using only a web browser. This is our online platform that provides a full ROS environment working with your web browser, and requires no installation. I specially recommend this if you are teaching and need your students to be quickly on track.
Which ROS version should I install?
At present, there are two different versions of ROS: ROS1 also called Classic, the original, the one that started. And ROS2, the more modern and oriented to building robotics products. If you are new to ROS, my advice is that you go straight to ROS2, but depending on your goals, you may prefer to go for ROS1. I created a video to help you decide which one to go for.
Once you have an Ubuntu system working, you need to install ROS. Both versions of ROS are published in distributions. A distribution is a new release of ROS, usually once every 2 years. Every distribution has a specific name.
- Here are the instructions to install ROS1. Go for Noetic distribution.
- Here the instructions to install ROS2. Go for Galactic distribution.
You can skip this step if you use the ROS Development Studio.
ROS Development Studio
Now is the moment to start learning ROS.
First, you need to be comfortable using the Linux shell. Also, you need to know in advance how to program in either C++ or Python. If you still don’t know any of these, I recommend you start with the following free online courses:
- Learn Linux shell for robotics online
- Learn Python for robotics online
- Learn C++ for robotics online
As I already mentioned, ROS can be programmed in C++ or Python. However, if you don’t know C++ very well, do not try to get into ROS with C++. If that is your situation, please learn ROS with Python. Of course, you can start learning C++ now because C++ is the language used in the industry and you will need to do the transition from ROS Python to ROS C++ later, but your initial learning of ROS should be done by programming in Python.
I know you are going to think that you can handle it and take both things (learn ROS and C++) at the same time, but… Bad decision. And good luck.
Final comment, bindings also exist for other languages, like Prolog, Lisp, Nodejs, or R. Find a complete list of currently supported languages here. I do not recommend that you learn ROS with any of those languages. ROS is complicated enough without you complicating it more with experimental languages.
If you have the basics of programming in any of those languages and in the use of the shell, the next step is to learn ROS. In order to do that, I recommend that you read this post that describes the 5 methods to learn ROS.
From all the methods there, I’m going to recommend to you our online Robot Ignite Academy because it is the fastest and most comprehensive route to learn it. This is not something that I say, but what our customers say. Our online academy has a cost, but it will speed up your learning of ROS considerably.
On the other side, Open Robotics, the organization that builds and maintains ROS, provides a long list of tutorials here for ROS1, and another list of tutorials here for ROS2. The list is so big that it can be overwhelming. If you decide to use this method to learn ROS, then I recommend that you go by the following order for the tutorials, for optimal learning:
- Navigating the ROS file system
- Creating a ROS package
- Understanding topics
- Writing publishers and subscribers
- Examining publishers and subscribers
- Writing service client
- Examining service client
- Creating Msg and Srv
- Understanding service params
- Defining custom messages
- Recording and playing back data
- ROS TF
- ROS URDF
- ROS Control
- ROS Navigation
Here you can find a complete summary of the main topics you need to learn to know the basics of ROS.
As a final recommendation, apart from being a ROS teacher at the Master of Industry 4.0 of UPC University, I am delivering a live online class about ROS every Tuesday at 18:00 CEST/CET. I recommend that you attend and practice a new ROS subject with me every Tuesday at the ROS Developers Open Class. It is free and a good opportunity to master a single subject of ROS with a simulated robot.
You will need a C++ or Python code editor. Follow this page to get an overview of the main IDEs you can use for writing ROS code. However, I recommend you only two of the available options:
- If you want to install the editor in your computer, use the VSCode editor with its ROS extension. It is by far the best editor for ROS coding.
- If you want to skip this step, use instead the ROS Development Studio since it comes with an integrated IDE in your browser, requires no installation and allows the easy sharing of projects.
How can you test the programs you are developing for a robot? I am assuming here that you do not have access to a robot; actually, that you do not want to have access!! Remember: developers!! Well, you have several options to test your ROS programs without having to use a robot.
You use mocks
If you are a developer, you already know what mocks are. You can create your own mocks that emulate the connection to the different parts of the ROS API of your robot.
On this page, you will find some information about how to use mocks in ROS.
Working with mocks in ROS is not an easy option since it requires a lot of preparation work. Also, it is of very limited usefulness since it can only produce what you have put on it previously. Using mocks is an option that I don’t really recommend for developing. Use it only if you cannot use any of the other options below or if you are creating unit tests. In my personal experience, I have never used them. I have always used one of the next two options.
You use ROS bags
ROS provides a way to record in a log file the full ROS API of a robot while running in a real life situation, and then run it back later on another computer. This log file is called a ROS bag. When you run a ROS bag on another computer, the computer will be showing the same ROS API to your programs that was recorded. You can learn how to use ROS bags here: record and replay of ROS bags.
ROS bags are a limited system in the sense that you can only use them for when you want to create an algorithm that does something from sensor data. This means that you cannot generate commands to the robot because it is only a reproduction of data, so you can get the same data as the robot got when recorded, but you cannot decide new actions for the robot.
You use simulations
So if you want to go pro without having to use a real robot, you should use simulations of robots. Simulations are the next step in software development.
Simulations are like having the real robot on your side, but without having to care for the electronics, hardware, and physical space. Roboticists consider simulations to be the ugly brother of robotics. Roboticists usually hate to use the simulation because it is not the real robot. Roboticists like the contact with the real thing. But fortunately, we are here talking with the opposite kind of people, those who want to keep their hands off the hardware. For those, simulations are key.
Let me tell you one thing: even if roboticists do not admit it, robot simulations are the key to intelligent robots. More on that in future posts, but remember you read it here first!
In the case of simulations, you have a simulation of the robot running in your computer that can run and act like the real robot. Once the simulation is running, your computer will present to your programs the same ROS API that you would have had if you were in the computer of the real robot. That is exactly the same as in the case of the ROS bags, with the advantage that you can now actually send commands to the robot and the simulated robot will reply accordingly to your commands. That is awesome!
To use robot simulations, ROS provides the Gazebo simulator already installed. You only need to have the simulation of the robot you want to program it for running. Usually, the companies’ creators of the robot provide the simulation of their robot that you can download and run on the Gazebo simulator.
Installing simulations and making them run could be a little more of hassle. If you want to avoid all that work, I recommend using our ROS Development Studio that contains the simulations ready to be launched with a single click, as well as having ROS, IDE, and other useful tools. Everything executed on a web browser, requires no installation.
An example of the ROS Development Studio working with a simulation, ROS navigation stack, Rviz and a terminal recording a ROS bag:
Additional robotics concepts you need to master
The final step to becoming a robotics developer is to master some robotics subjects. I’m sure that as a software engineer, you already understand many of the subjects above because they closely relate to the normal job of a software developer. However, there are still some concepts closely tied to robotics that a software engineer needs to master (in the same sense that if you need to create invoices, you need to understand some concepts of accounting). Robots are living things, I mean, things that move around. That entails a series of new concepts that you need to learn (your program is not going to stay in a fixed place anymore). What follows is a list of concepts that you need to understand to be able to create programs for robots. I have included a link to online courses that teach these subjects:
- Basic maths for robotics
- Wheeled robots kinematics
- Robot arm kinematics
- Rigid body dynamics
- URDF robot model description
- Robot navigation (including Kalman Filters and SLAM, localization, path planning, and obstacle avoidance)
- Robot manipulation
- What is a frame reference system?
- Robot joint control
- Robotics perception with OpenCV
- Machine Learning basics for robotics
In this post, I have shown the future of becoming a robotics developer and how you can become one. Let me know in the comments what doubts you may have and which problems you encounter when following this path.
Related articles about ROS that may clarify things for you
Here are some additional links that can provide you with more information about the future of ROS and how to become a developer of ROS.
- ROS Developers Days: an online conference where you can learn by practice with Robotics developers from worldwide universities and companies.
- ROS Best Practices
- The ROS Developers Podcast
- The amazing story of how ROS was born (an amazing video series made by RedHat)
Amazing in-depth article!
I want to ask that the additional concept which you added needs to know before starting Ros or after it??
Thank you in advance.
Learn first the basics of ROS. Then you can attack the concepts of kinematics, dynamics, kalman filters and so. It will be easier for you to integrate it
The construct has everything i need . But i face difficulties with how we study on it . It has to be online. All commands online.
We have a limited internet speed in my location.
I would like to know as a graduate student doing Artificial Intelligence and a diploma of Mechanical Engineering as undergrad how can I best move forward to acquire the software skills needed to land a job. The mechanical part of robots is easy for me (CAD, Kinematics, fabrication) but most Robot jobs require C++ 2 or 3 years python skills. Would it be wise to just buckle down and wait, or a alternative route?
Aw, this was an extremely nice post. Taking a few minutes
and actual effort to create a top notch article… but what can I
say… I put things off a whole lot and don’t manage to get anything done.
Nice Article Thank you for sharing this informative article.
Just amazing. What i was looking for. Thank you
Thank you sharing valuable information this will helps me alot