Building the Future: An Overview of the Robot Operating System
← Back to all case studies

Building the Future: An Overview of the Robot Operating System

Building the Future
Engineering

In the first of our Building the Future series we focused on basic categories of robots and where they fit in the current robotics market landscape. This time we will address the programming interface many of these robots run on: ROS or Robot Operating System.

ROS is an open-source software package, allowing developers to write and reuse freely available code in the C++ and Python programming languages. Despite the name, ROS is not actually an operating system. It was originally designed to run on Ubuntu Linux, but thanks to the release of ROS 2 it can also be used on macOS and Windows 10.

ROS is best described as an architectural framework for robot design that relies on five constructs: Nodes, Topics, Parameters, Services and Actions.

Nodes and Topics are the most important constructs to understand. Nodes are essentially conventional coding scripts. In ROS, these are written in C++ or Python. These scripts control specific functions of a robot, such as actuation or interfacing with sensors. Nodes communicate with each other via Topics. In this way, you can build an interconnected network of Nodes for any action you might want your robot to perform.

Nodes can “publish” (talk) or “subscribe” (listen) to other Nodes through Topics. This is important if the operations of two Nodes rely on each other. For example, you would want a LiDAR sensor to be able to communicate with the system your robot uses for locomotion.

Services and Actions are like topics, in that they also allow Nodes to communicate, but for different purposes. You can use Services to help Nodes call other Nodes to perform functions. Actions are typically used for communicating with Nodes during time-extended tasks, like navigation.

Parameters are essentially attributes of Nodes. For example, how many limbs a robot has, how many sensors, etc. These are integer values.

Origin

ROS has its origins at Stanford University in 2007. Two grad students, Eric Berger and Keenan Wyrobek, developed ROS in an attempt to find a better way to integrate the software and hardware needed to efficiently develop robots. The first iteration of the software was released in 2010.

Maintenance of ROS and control over annual iterations of the software was passed to Open Robotics in 2013, and has remained with the company since. However, Open Robotics relies heavily on the ROS community for maintenance, so the software is essentially a continuously evolving joint effort.

Iterations

ROS 1 refers to the first set of ROS distributions which began in 2010 and has to an expected end-of-life of 2025.

ROS distributions are released annually on World Turtle Day; just one of ROS’s interesting turtle connections. Each distribution is released sequentially with an associated letter of the alphabet and a species of turtle that alliterates to the letter.

ROS 2 is an evolution of the original ROS, also using Python and C++ as its programming languages. The purpose of this new iteration has addressed some of the limitations of ROS 1.

ROS 1 vs. ROS 2

In the years since the release of ROS 1, ROS developers gained a better understanding of the shortcomings of the original software. Instead of continuing to refine ROS 1, it was deemed more efficient to simply develop a new architecture from scratch: ROS 2.

A major shortcoming of ROS 1 was the failure to integrate real-time programming. This is code which guarantees a response from a system, usually within fractions of a second. Real-time programming is incredibly useful and often necessary for real-world computations that need to be completed within short, well-defined time periods. Systems that are not real-time cannot guarantee that any operation takes place within any time frame. As a result, computations can be run endlessly without any response. Because ROS 1 could not integrate with real-time programming, ROS 2 is largely designed for this application.

By tailoring to real-time programming, ROS 2 developers anticipated that the software would be increasingly adopted by robotics and manufacturing companies.

But other than real-time programming, what are some of the more specific differences between ROS 1 and 2?

Unlike ROS 1, ROS 2 now has a base code library: RCL (ROS Client Library). However, developers don’t need to code with this library, as “rclpy” and “rclcpp” allow programming in Python or C++ on top of RCL. RCL simply allows flexibility for a greater number of languages to be adapted into ROS. For example, “rcljava” or others in future.

ROS 2 also now fully supports macOS and Windows, capabilities which ROS 1 lacked.

In addition, ROS 2 is compatible for Object Oriented Programming within Nodes, allowing developers to define classes to make objects. ROS 2 also does away with ROS 1’s “nodelets”, replacing them with “components”. The functionality is essentially the same, but bundling Nodes together as part of one “executable” (action) has been simplified.

More importantly, ROS 2 is now decentralized. The ROS Master from ROS 1 has been removed. Whereas ROS Master was previously needed to help separate Nodes “discover” and connect each other, now individual Nodes are able to discover others independently.

The release of ROS 2 is one of the main reasons that the software has only recently been adopted by major companies in the technology and robotics space.

Industry Use

Widespread use of ROS is still in its infancy, as the first iteration of ROS 2 was only released in December 2017. However, both Amazon and Microsoft adopted ROS soon after for their own applications.

From the get-go, the professed objective of ROS 2 was to account for the shortcomings of ROS 1, which effectively hindered it from being used on an industry-wide scale. Given that many companies have since embraced ROS 2, both Open Robotics and the ROS community have seemingly been effective in accomplishing this objective.

ROS-Industrial is a further expansion upon the ROS architecture for industrial purposes. The ROS Consortium is made up of over 100 companies which use, manage and develop the open-source code for ROS-Industrial.

Since the release of ROS in 2010, hundreds of companies have adopted the software for robotics and industrial use, including:

Getting hands on with ROS

Fitting with ROS’s established turtle connection is the TurtleBot. For those looking to try their hand at using ROS in a domestic setting, this is an incredibly useful tool.

TurtleBot is a collaboration between ROS’s parent company Open Robotics and South Korean manufacturer Robotis. Together, they produce a relatively affordable mobile robotics platform intended for amateur use. The latest iteration is based on iRobot’s Roomba, and can be readily programmed with ROS.

The robot is mostly geared towards helping people gain a better understanding of the ROS software. In the process, they are free to develop a robot with an ability to navigate its surroundings for various household applications.

The Dura Digital takeaway

As one of the most popular tools for robot development, knowledge of ROS, and more specifically ROS 2, is something that will become critical for those looking to get involved in the robotics market. Like Linux took over open-source operating platforms, we believe that ROS will be incredibly important as a core platform to help usher companies into a new era of automation. At Dura Digital we continually invest in future technologies in the hope of providing insights and awareness of new technologies that help you transform your business. Contact us for more details on how we can help you advance your digital transformation.

Previous project
Next project

Building the Future: An Overview of the Robot Operating System

Dura Digital
Dura Digital
July 15, 2022
Building the Future: An Overview of the Robot Operating System

In the first of our Building the Future series we focused on basic categories of robots and where they fit in the current robotics market landscape. This time we will address the programming interface many of these robots run on: ROS or Robot Operating System.

ROS is an open-source software package, allowing developers to write and reuse freely available code in the C++ and Python programming languages. Despite the name, ROS is not actually an operating system. It was originally designed to run on Ubuntu Linux, but thanks to the release of ROS 2 it can also be used on macOS and Windows 10.

ROS is best described as an architectural framework for robot design that relies on five constructs: Nodes, Topics, Parameters, Services and Actions.

Nodes and Topics are the most important constructs to understand. Nodes are essentially conventional coding scripts. In ROS, these are written in C++ or Python. These scripts control specific functions of a robot, such as actuation or interfacing with sensors. Nodes communicate with each other via Topics. In this way, you can build an interconnected network of Nodes for any action you might want your robot to perform.

Nodes can “publish” (talk) or “subscribe” (listen) to other Nodes through Topics. This is important if the operations of two Nodes rely on each other. For example, you would want a LiDAR sensor to be able to communicate with the system your robot uses for locomotion.

Services and Actions are like topics, in that they also allow Nodes to communicate, but for different purposes. You can use Services to help Nodes call other Nodes to perform functions. Actions are typically used for communicating with Nodes during time-extended tasks, like navigation.

Parameters are essentially attributes of Nodes. For example, how many limbs a robot has, how many sensors, etc. These are integer values.

Origin

ROS has its origins at Stanford University in 2007. Two grad students, Eric Berger and Keenan Wyrobek, developed ROS in an attempt to find a better way to integrate the software and hardware needed to efficiently develop robots. The first iteration of the software was released in 2010.

Maintenance of ROS and control over annual iterations of the software was passed to Open Robotics in 2013, and has remained with the company since. However, Open Robotics relies heavily on the ROS community for maintenance, so the software is essentially a continuously evolving joint effort.

Iterations

ROS 1 refers to the first set of ROS distributions which began in 2010 and has to an expected end-of-life of 2025.

ROS distributions are released annually on World Turtle Day; just one of ROS’s interesting turtle connections. Each distribution is released sequentially with an associated letter of the alphabet and a species of turtle that alliterates to the letter.

ROS 2 is an evolution of the original ROS, also using Python and C++ as its programming languages. The purpose of this new iteration has addressed some of the limitations of ROS 1.

ROS 1 vs. ROS 2

In the years since the release of ROS 1, ROS developers gained a better understanding of the shortcomings of the original software. Instead of continuing to refine ROS 1, it was deemed more efficient to simply develop a new architecture from scratch: ROS 2.

A major shortcoming of ROS 1 was the failure to integrate real-time programming. This is code which guarantees a response from a system, usually within fractions of a second. Real-time programming is incredibly useful and often necessary for real-world computations that need to be completed within short, well-defined time periods. Systems that are not real-time cannot guarantee that any operation takes place within any time frame. As a result, computations can be run endlessly without any response. Because ROS 1 could not integrate with real-time programming, ROS 2 is largely designed for this application.

By tailoring to real-time programming, ROS 2 developers anticipated that the software would be increasingly adopted by robotics and manufacturing companies.

But other than real-time programming, what are some of the more specific differences between ROS 1 and 2?

Unlike ROS 1, ROS 2 now has a base code library: RCL (ROS Client Library). However, developers don’t need to code with this library, as “rclpy” and “rclcpp” allow programming in Python or C++ on top of RCL. RCL simply allows flexibility for a greater number of languages to be adapted into ROS. For example, “rcljava” or others in future.

ROS 2 also now fully supports macOS and Windows, capabilities which ROS 1 lacked.

In addition, ROS 2 is compatible for Object Oriented Programming within Nodes, allowing developers to define classes to make objects. ROS 2 also does away with ROS 1’s “nodelets”, replacing them with “components”. The functionality is essentially the same, but bundling Nodes together as part of one “executable” (action) has been simplified.

More importantly, ROS 2 is now decentralized. The ROS Master from ROS 1 has been removed. Whereas ROS Master was previously needed to help separate Nodes “discover” and connect each other, now individual Nodes are able to discover others independently.

The release of ROS 2 is one of the main reasons that the software has only recently been adopted by major companies in the technology and robotics space.

Industry Use

Widespread use of ROS is still in its infancy, as the first iteration of ROS 2 was only released in December 2017. However, both Amazon and Microsoft adopted ROS soon after for their own applications.

From the get-go, the professed objective of ROS 2 was to account for the shortcomings of ROS 1, which effectively hindered it from being used on an industry-wide scale. Given that many companies have since embraced ROS 2, both Open Robotics and the ROS community have seemingly been effective in accomplishing this objective.

ROS-Industrial is a further expansion upon the ROS architecture for industrial purposes. The ROS Consortium is made up of over 100 companies which use, manage and develop the open-source code for ROS-Industrial.

Since the release of ROS in 2010, hundreds of companies have adopted the software for robotics and industrial use, including:

Getting hands on with ROS

Fitting with ROS’s established turtle connection is the TurtleBot. For those looking to try their hand at using ROS in a domestic setting, this is an incredibly useful tool.

TurtleBot is a collaboration between ROS’s parent company Open Robotics and South Korean manufacturer Robotis. Together, they produce a relatively affordable mobile robotics platform intended for amateur use. The latest iteration is based on iRobot’s Roomba, and can be readily programmed with ROS.

The robot is mostly geared towards helping people gain a better understanding of the ROS software. In the process, they are free to develop a robot with an ability to navigate its surroundings for various household applications.

The Dura Digital takeaway

As one of the most popular tools for robot development, knowledge of ROS, and more specifically ROS 2, is something that will become critical for those looking to get involved in the robotics market. Like Linux took over open-source operating platforms, we believe that ROS will be incredibly important as a core platform to help usher companies into a new era of automation. At Dura Digital we continually invest in future technologies in the hope of providing insights and awareness of new technologies that help you transform your business. Contact us for more details on how we can help you advance your digital transformation.

See all posts →