Basic Elements of ROS

From Lofaro Lab Wiki
Jump to: navigation, search

ROS is an open source environment for robotics which includes numerous software libraries and tools those can help building a robot application. A robot application consists of sensors and actuators which needs software to control their activities and give the system intelligence. ROS has specific file system which needs to be known by any robot developers in order to program their robot using ROS and test it on different simulator. To think generally ROS has number of components which are explained below:

Master: This is at beginning of ROS hierarchy. It is called the master node. It takes care all the present nodes by registering them with the system and making communication between them when possible.

Node: Node are executable file which can be written using C++/Python. The program is written for node so that the node can control a sensor or any working component of the robot. For example: if we want to get some data via the camera in order to come to a decision, we need to program the camera then need to process images. In this case we need a node for the camera and one for image processing. The image processing node is dependent on information from the camera, so we need to make a communication channel between the nodes where image processing nodes can get specific information from the camera. Node can do it by publishing and subscribing to topics, and post or listen messages from the topic. It can also provide or use services.

Message: Message is what Node can publish or subscribe to get or distribute node data. Messages are simple text file that describe the fields of ROS messages. They can establish a transportation if data type matches.

Topic: Topic are the way through which nodes are communicating with each other. Messages are published on topic and the node subscribed to the topic can get the message.

Service: It is also a kind of message which has reply and request interaction capabilities. There would be only one reply for one request.

Packages: It is the file system consist of Nodes, Messages, Services, Libraries, tools. Packages are there to help a robotics developer to access and organize his program easily.

Stacks: Stack is the collection of packages. A stack can have several packages.