ROS packages

A typical structure of an ROS package is shown here:

Figure 3: Structure of a typical C++ ROS package

We can discuss the use of each folder as follows:

  • config: All configuration files that are used in this ROS package are kept in this folder. This folder is created by the user and it is a common practice to name the folder config to keep the configuration files in it.
  • include/package_name: This folder consists of headers and libraries that we need to use inside the package.
  • script: This folder keeps executable Python scripts. In the block diagram, we can see two example scripts.
  • src: This folder stores the C++ source codes.

Get Mastering ROS for Robotics Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.