ROS Terminology 01
We will briefly describe most frequently used ROS terms. Many of you may not be familiar with some of these terms and may not understand them at this stage. However, you will understand these concepts when we will cover them in detail later. Right now, it is fine to read the definitions of the terms and move on.
ROS
ROS (Robot Operating System) is an open source framework that provides standard operating system services such as hardware abstraction, device control, implementation of commonly used functionality including sensing, mapping, motion planning, package management, message passing between prcesses libraries, and debugging tools etc.
Master
In ROS , for node to node connections and message communication, there is a name server called “master”. To run master, a command “roscore” is executed.
roscore
After executing this command, master (which is main process) start running that manages all of the ROS system. Without master, node connections and message communication using topics and services is not possible.
Package
A package is the basic unit of ROS. ROS uses packages to organize its programs. A package contains all files that a spedific ROS program can have such as cpp files, python files, configuration files, compilation files, parameter files, launch files, ROS dependency libraries etc. Hundreds of the official packages are available for different versions of ROS. In addition, more than 5000 packages are developed and released by users (i.e. on GitHub, Bitbucket).
The basic structure of ROS package is as follows
- Launch folder: contains launch files
- Src folder: contains source files (e.g. cpp files, python files)
- CmakeLists.txt: List of cmake rules for compilation
- Package.xml: Package information and dependencies
Metapackage
A metapackage is set of packages that have a common purposes. For example, the Navigation metapackage consists of 10 packages including AMCL, DWA and map_server.
Node
A node is the smallest unit of processor in ROS. Basically, ROS node is an executable program. It is recommended to create one single node for each purpose and should be developed for easy reusability. As in case of mobile robots, the program to operate the robot is broken down into specialized functions. Specialized node is used for each function such as sensor drive, sensor data conversion, obstacle recognition, motor drive, encoder input, and navigation.
Upon start-up, a node registers information such as name, message type, URI address and port number of the node. The registered node can act as publisher, subscriber, service server or service client based on the registered information, and nodes can exchange messages using topics and services.
The ROS command to see which nodes are actually running in a computer is
rosnode list
Topic
ROS Topic is like a topic in our conversation. Nodes use topics to publish the information for other nodes in order to communicate. The publisher node (same as speaker in our conversation) publishes the information using the topic, while subscriber node (like listener in conversation) subscribes the topic to receive that information. For this, the publisher node first registers its topic with master and then starts publishing messages on that topic. Subscriber node that wants to receive the topic request information of the publisher node corresponding to the name of the topic registered in the master. Based on this information, the subscriber node directly connects to the publisher node to exchange messages as a topic.
Message
Topics handle information through messages. These can be integers, floating point, Boolean, array of messages, nested messages. We can even create our own messages. However, since ROS provides a lot of different messages, therefore it is recommended to use ROS messages when possible.
Messages are defined in .msg files, which are located inside a msg directory of a package.
To get information about a message we can use the command
rosmsg show <message name>
rosmsg show std_msgs/Int32