Ask Your Question
1

Using Threading Building Blocks with ROS

asked 2012-07-06 05:13:36 -0500

christiank gravatar image

Hi,

I couldn't find any information about how to use ROS with Threading Building Blocks (TBB). If I add

<rosdep name="tbb" />

to my manifest.xml and do "rosdep install" I get the error "Failed to find rosdep tbb for package ... on OS:ubuntu version:natty". Do I have to create my own rosdep.yaml file? I'm working with ROS Electric on Ubuntu Natty.

Thanks for your help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-07-06 05:58:00 -0500

joq gravatar image

updated 2012-07-09 07:33:32 -0500

This is confusing, because rosdep changed significantly between Electric and Fuerte.

  • On Fuerte it resolves to libtbb-dev.

  • On Electric, it needs to be defined in some stack's rosdep.yaml.

What does this show?

$ rosdep where_defined tbb

UPDATE: your result shows that tbb is not defined by any stack in your $ROS_PACKAGE_PATH.

If you are developing a stack of your own, add a rosdep.yaml containing something like this stanza:

tbb:
  arch: intel-tbb
  ubuntu: libtbb-dev
  fedora: tbb-devel
edit flag offensive delete link more

Comments

the output is:

$ rosdep where_defined tbb
tbb defined in set([])
christiank gravatar image christiank  ( 2012-07-08 23:04:23 -0500 )edit
2

thanks, this works :)

Finally, I had to add a command to link against tbb to my CMakeLists.txt:

target_link_libraries(mynode tbb)
christiank gravatar image christiank  ( 2012-07-09 08:25:17 -0500 )edit
0

answered 2012-07-06 05:56:04 -0500

allenh1 gravatar image

You get that error because Threading Building Blocks is not part of ROS (as far as I can tell). Try implementing it in your code like you normally would (you may need to change some CMake configuration).

edit flag offensive delete link more

Comments

Also, QT is implemented in ROS and has some very nice Threading libraries if you want to go another direction with it.

allenh1 gravatar image allenh1  ( 2012-07-06 05:57:11 -0500 )edit

If you like TBB, then use it. If you are just looking for a well-supported threading library, most of ROS uses boost threads.

joq gravatar image joq  ( 2012-07-06 06:00:38 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-07-06 05:13:36 -0500

Seen: 866 times

Last updated: Jul 09 '12