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

include ROS into external CMake project (OpentTLD)

asked 2012-08-02 08:56:15 -0600

bajo gravatar image

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

ngrennan gravatar image

Hi,

I want to extend the OpenTLD project to use it with ros. I'm using the C++ port from Georg Nebehay ( https://github.com/gnebehay/OpenTLD ). This project is build with cmake and multiple custom CmakeLists.txt files.

Unfortunately I am not sure how I have to change my own packages CMakeLists.txt to build OpenTLD with the need cmake settings?

Any help would be appreciated.

Kind regards,

Markus

edit retag flag offensive close merge delete

Comments

Did you ever get this working?

Kevin gravatar image Kevin  ( 2012-09-25 13:15:12 -0600 )edit

Yes, but i only have it running with a hardcoded boundary box. If you want i will upload it to github so you can use and modify it.

bajo gravatar image bajo  ( 2012-10-08 04:19:20 -0600 )edit

yes, if you could post it on github I would like that ... thanks!

Kevin gravatar image Kevin  ( 2012-12-31 02:18:16 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-08-08 00:24:14 -0600

bajo gravatar image

Thank you for your answer. In the end i followed another way. I adapted the CMakeLists.txt to reflect to custom CMakeLists.txt files from the OpenTLD package.

Before I didn't know you could do it this way. This site helped me a lot. http://www.ros.org/wiki/rosbuild/CMakeLists

edit flag offensive delete link more
2

answered 2012-08-02 22:15:09 -0600

Thomas gravatar image

I wrote this file to achieve this goal: ros.cmake

It is self-contained. Example:

ADD_ROSPACK_DEPENDENCY(urdf) # check for urdf presence and detect flags.
ADD_LIBRARY(mylib ...) # define some target here... mylib for instance.
ROSPACK_USE_DEPENDENCY(mylib urdf) # link mylib against urdf.
edit flag offensive delete link more

Comments

This is great, thanks!

davheld gravatar image davheld  ( 2013-02-24 18:14:05 -0600 )edit

Actually it seems that this no longer works with groovy (works great with all released up through fuerte though!)

davheld gravatar image davheld  ( 2013-03-09 22:02:30 -0600 )edit

This macro has been designed to detect packages through rospack. I.e. packages built with rosbuild. When packages are using catkin, this is their own responsibility to install files which can be used for compilation flags detection. I.e. a .pc (pkg-config) file or a rosmacro.

Thomas gravatar image Thomas  ( 2013-03-10 00:59:07 -0600 )edit

With what package(s) is it failing?

Thomas gravatar image Thomas  ( 2013-03-10 00:59:25 -0600 )edit

Question Tools

Stats

Asked: 2012-08-02 08:56:15 -0600

Seen: 1,043 times

Last updated: Aug 08 '12