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

Using rosbag c++ code API

asked 2013-02-13 03:48:36 -0600

Josch gravatar image

updated 2014-01-28 17:15:13 -0600

ngrennan gravatar image

Hello everyone,

I am trying to use the rosbag C++ code API in my own node. For that I need to refer to the rosbag sources (rosbag::Bag etc.). By default only the binaries from rosbag were installed. So I cloned the ros_comm git into my local ros stack ros_comm. Now the stack contains the src files, but I still can't refer to them in my eclipse project for the node.

Where do I have to put the source files from rosbag to let Eclipse and the maker recognize them?

One solution would be to include them via their absolute path, but don't feel like this would be a good solution.

Best regards, Josch

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-02-13 08:32:35 -0600

Lorenz gravatar image

The rosbag package installs not only the binaries but also the header files and the libraries. Just add a dependency on rosbag in your CMakeLists.txt and link against the rosbag library. You should not download the sourcecode and add it manually.

edit flag offensive delete link more

Comments

I didn't think it would be that easy. The solution was even more simple: I just had to add the rosbag dependency to my manifest.xml file. Everything working fine now, thanks!

Josch gravatar image Josch  ( 2013-02-13 20:57:21 -0600 )edit

Can I get an ELI5? I do "locate CMakeLists.txt" and there are literally hundreds of them. Which one do I add the dependency too?

acollins gravatar image acollins  ( 2017-06-07 11:33:38 -0600 )edit

Question Tools

Stats

Asked: 2013-02-13 03:48:36 -0600

Seen: 1,317 times

Last updated: Feb 13 '13