Robot Operating System

Aus HSHL Mechatronik
Zur Navigation springen Zur Suche springen

Autoren: Fawad Murad
Betreuer: Prof. Schneider
Art: Praxissemester
Projektlaufzeit: 02.11.2021-20.02.2022


What is ROS?

ROS stands for Robot Operating System and it is an open-source platform that makes it easier for researchers and developers to create and reuse code for robotics applications. ROS is also a global open-source community of engineers, developers, and enthusiasts that work to improve, expand, and make robots more accessible to the general public. ROS is not an actual operating system but it is more like an environment. The big strength of ROS is its ability of connecting nodes together.

Why should we use ROS for robotics?

Due to the following reasons, one can analyze the advantages of using ROS for robotics:

Language-agnostic

A Python node and a C++ node can readily communicate with each other. It implies a lot of reusability and coworking possibilities. Because ROS is primarily focused on C++ and Python, several modules also allow you to use other languages. We can also install a websocket server (rosbridge suite) or an HTTP server on our robot and communicate with it using any language.

Light

ROS's core doesn't take up a lot of space or resources. In only a few minutes, we can install the essential packages and get started. Furthermore, ROS may be used on embedded computers like Raspberry Pi 3 boards. As a result, we may immediately begin a new project with minimal effort.

Packages for everything

Do you need to calculate a robot's trajectory? That is anything for which there is a package. Control the robot using your joystick? There is a package for that as well. Or perhaps you want to use a drone to map out a room? There are numerous software available to accomplish this. If you do a little searching, you'll find a plethora of ROS packages for practically every robotic application.

Great simulation tools

We require simulation tools since we cannot always get our robot to run in real time. Webots, Rviz, and Gazebo are just a few of the fantastic tools available in ROS. For educational purposes or to test in a specific context, the simulation tools can allow us to observe and utilise other robots that we do not own.

Control multiple robots

Multiple ROS masters can be used with ROS. It means that we can have a large number of autonomous robots, each with its own ROS system, and they can all communicate with one another.

Terminologies in ROS

Following are the different terms used in ROS that we come to know about them in deep while walking through tutorials.

Abb.1


Nodes

Nodes are software components that can be written in C++ or Python. They are capable of handling a limited number of jobs. For instance, reading a sensor or controlling a servo are two examples. Each node can communicate with other nodes through topics, services, actions, and parameters.

Publisher

A ROS Node can be either a Subscriber or a Publisher. A Publisher is the person who assigns communications of a certain standard Message Type to a specific Topic.


Subscriber

The Subscriber, on the other hand, subscribes to the Topic in order to receive messages whenever the Topic is updated.

Topics

ROS 2 deconstructs complex systems into a series of modular nodes. Topics are an important part of the ROS graph since they serve as a bus for nodes to communicate with one another. A node can publish data to any number of topics and subscribe to any number of topics at the same time. Topics are one of the primary methods for moving data between nodes and, as a result, between different areas of the system.


Services

Services are another way for nodes in the ROS graph to communicate. Unlike topics, which use a publisher-subscriber paradigm, services use a call-and-response model. While topics allow nodes to subscribe to data streams and receive continuous updates, services only deliver data when a client requests it.


Parameters

A parameter is a node's configuration value. Parameters are similar to node settings. Integers, floats, booleans, texts, and lists can all be stored as parameters in a node. Each node in ROS 2 has its own set of parameters.


Actions

Actions are a sort of communication in ROS 2 that is designed for long-running tasks. There are three elements to them: a goal, feedback, and a result. A client-server model, similar to the publisher-subscriber approach, is used for actions. An "action client" node delivers a goal to a "action server," which acknowledges it and responds with a stream of feedback and a result.


Package

You can think of a package as a container for your ROS 2 code. You'll need to organise your code into a package if you wish to install it or share it with others. You may easily release your ROS 2 work and allow others to build and utilise it with packages. In ROS 2, package creation is done with the ament build system and colcon as the build tool. Although additional build types exist, you can construct a package using either CMake or Python, which are officially supported.