Let’s talk about packages again

From Lofaro Lab Wiki
Jump to: navigation, search

All ros software are organized into packages. A ros package is a collection of files which includes both executable and supporting files. For previous example we used two executable from same packages, which we installed earlier. You can create your own ros packages also where you can put your executable and supporting files. To know about your installed ros packages in your system, the command is

rospack list

it will list all of the packages in your system.


Any package is defined by a manifest, which is a file called package.xml. The file defines some detail about package including its name, version, maintainer, dependencies. The directory contained package.xml is called a package directory. The important thing is that in new catkin build system, compiled executable are not stored in a package directory, but in a separate place. The files are rooted at opt/ros/hydro and stored in a lib sub-directory under this root.

If you want to find the directory of any package use this command

rospack find package_name

if you don’t know the full name of the package, use tab completion. For example, you could type

rospack find turtle 

and before pressing enter, press the tab key twice to see a list of all the installed packages whose names start with turtle.

To view the files in a package directory, command

roscls package-name

To go to a specific packge directory, command

roscd package-name