ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

There's no tutorial I can think of, so here is a list of things off the top of my head. If you let me know which point in particular is of interest to you, I can try to expand that part of the instructions.

Lets say you want to make a driver package for a tool you wrote. The first thing you should consider is how your tool should be included in ROS. I can think of 3 ways to do this "cleanly" (there might be more)

  1. The bridge package can contain all the source of your tool, and build it. This is straightforward, but it means you may end up with two versions of your tool to maintain, and also works only if your tool is open-source and written in one of the ROS supported languages.
  2. You can make an additional meta-package, whose only function is to download the tool and install it locally. See ar_toolkit (the metapackage) and ar_pose (the ROS driver) for this option.
  3. You can provide a binary installation for your tool via apt-get or a similar package manager.

Next, you should write your ROS node. These are the things I can think of that need to be done:

  • Use the ros parameter server for passing any options to your software. If your want to reconfigure some options during run time, you can take a look at dynamic reconfigure
  • If your tool needs to communicate with the rest of ROS, expose its functionality through topics and services. ROS comes with many different message types already defined in different packages, or you can always define your own message type.
  • consider suppressing any console output your tool normally produces, and replacing it with rosconsole logging.

Finally, organize your code into a package (or packages). If possible, add a launch file which shows how your tool should be invoked, with some relevant parameters etc. Create a stack containing your packages, throw it up on the web somewhere, and make a wiki page on ros.org about it so the rest of us can enjoy it!