ROS File System
Before getting into the filesystem it is important to understand intrinsically how ROS works on an abstract level so the notions of ROS file system becomes simpler and easier to understand. In the figure as shown on right is a typical working of ROS system.
In any robotic system, there is independent processing happening all the time. This basic structural unit of computation is called a node. These nodes generally communicate with each other (typically using parameter servers and ROS topics) in order to perform a certain task. One typical example of node is the image processing node of the robotic camera to successfully detect a football. So basically, the node computes information about the position of the ball, and publishes it to ROS Master at host computer which further processes the raw data given by robot.
The protocol followed for communication between nodes is said to be a topic. Whatever computation a node performs is advertised in a virtual space called as a topic. Whenever there is some other node which needs to use this output for its computation, it will just subscribe whatever data is being advertised by the above topic and use it for its own computation. Consider the above example of football image processing robot. The image data acquired by the camera is advertised on the topic /image_data_messages which is further used by image processing node located at master computer for image processing
Package are set of nodes which while communicating with one another are able to perform the desired objectives in mind. For example the package leddartech is used from inferring data from a standard leddar and using it for various applications.
There are many useful applications of subscribe advertise model for ROS. But in certain applications there is an inherent need to have a protocol where a node may ask for a reply from another node and then and only then is the need for particular node to reply. One example is that you could use ROSservice to click a good photo for a terrain whenever the need arises.
There are certain configuration parameters that generally all nodes in the robotic system needs to access for various computation processes. These configuration parameters are saved by the parameter server and this is accessible to all nodes in the robotics system. Given below is one of the examples for a parameter server file
######################### /camera/left/name:leftcamera /camera/left/exposure:1 /camera/right/name:rightcamera /camera/right/exposure:1.1 #########################
Bag is just a file storage format to store and save data collected by the robotic system and use it for offline use. Bag files may be used by terrain robots to collect the readings from samples, which can later be used by scientists to analyse the samples.
ROS master is like the lord of all nodes in the system . It sort of overlooks the processes going on in the system for easy debugging. The master node is subscribed to all the topics in a particular robotic system. It is connected to all nodes in the system to make the end user understand and debug the system well.
References and Further Readings
- Tutorial on understanding ROS nodes
- Practical Usage of ROS nodes
- Dynamic Reconfiguring of Node parameters at Run time
- Source of image used at top of page: https://www.clearpathrobotics.com/assets/guides/ros/Intro%20to%20the%20Robot%20Operating%20System.html#general-concepts