Software in ROS is organized into packages (and packages exist inside the catkin_ws folder, your catkin workspace).
Each package might contain a mixture of code (e.g. ROS nodes), data, libraries, images, documentation, etc. Every program you write in ROS will need to be inside a package.
To find the path of a package, you use the rospack command. For example, let’s find the path of the turtlesim package, a pre-installed ROS package.
rospack find turtlesim
Here is the output:
The syntax is:
rospack find [package_name]