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

Build a bridge to ROS

asked 2011-09-19 03:17:48 -0500

Oryonym gravatar image

Hello All,

I want to create a ROS node to make my tool able to communicate with ROS and on the other way round.

Is there any tutorial explaining how to do so?

Thanks in advance.

Cheers,

Cristina

edit retag flag offensive close merge delete

Comments

Can you be more specific as to what you are bridging to? A lot of groups have done work with bridging ROS to various platforms, perhaps some of your work is already done for you.
mjcarroll gravatar image mjcarroll  ( 2011-09-19 04:58:06 -0500 )edit
I second mjcarroll. Can you edit the question to provide some details? This is a topic of great interest to many people, so some good example use cases (like yours) would be great to have.
Mac gravatar image Mac  ( 2011-09-20 02:20:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2011-09-20 02:02:48 -0500

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!

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-09-19 03:17:48 -0500

Seen: 367 times

Last updated: Sep 20 '11