[Documentation] [TitleIndex] [WordIndex

ros: mk | rosbash | rosboost_cfg | rosbuild | rosclean | roscreate | rosdep | rosemacs | roslang | roslib | rosmake | rospack | rosunit

Package Summary

roscreate contains tools that assist in the creation of ROS filesystem resources. There are currently two tools that it provides: roscreate-pkg and roscreate-stack. roscreate-pkg creates a new package directory, including the appropriate build and manifest files. roscreate-stack computes a stack.xml file from a list of packages in a directory.


roscreate contains the roscreate-pkg and roscreate-stack tools, which are command-line tools for creating new ROS packages and stacks, respectively. Packages are frequently created by people copying an existing package and then modifying it's build and manifest.xml files. This frequently results in errors, so the roscreate-pkg tool is meant to be just as easy, but less error prone. Similarly, stack.xml files are difficult to create by hand as one must correctly specify the union of all package dependencies.

Command-Line Tools


The roscreate-pkg command-line tool creates a new ROS package with common package files: manifest.xml, CMakeLists.txt, mainpage.dox, and Makefile. It addresses the common problem of packages being created using pre-existing packages, which leads to errors in build files and manifests.

IMPORTANT: the directory that you run roscreate-pkg in matters. You must run it in a directory that can be located from your ROS_PACKAGE_PATH (see ROS environment variables). Furthermore, you cannot run it inside of another ROS package.

To create a new package in the current directory:

$ roscreate-pkg pkgname

To test that this worked, you can use roscd:

$ roscd pkgname

You can also specify dependencies of that package:

$ roscreate-pkg pkgname depend1 depend2 depend3


$ roscreate-pkg foopkg roslib roscpp std_msgs

For common dependencies like roscpp and rospy, roscreate-pkg may create some additional common directory structures.


The roscreate-stack command-line tool creates or updates a ROS stack, which mainly involves the creation of a stack.xml file. It is the most convenient way of automatically updating a stack. It's best to use this tool with a directory that already contains the packages you wish to put into your stack. This tool can save a lot of effort in computing the union of all the dependencies for a particular stack, so its use is highly recommended.

To create or update a stack in the current directory:

$ roscreate-stack .


2011-11-19 12:33