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

include ROS into external CMake project (OpentTLD)

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

bajo gravatar image

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

ngrennan gravatar image


I want to extend the OpenTLD project to use it with ros. I'm using the C++ port from Georg Nebehay ( ). 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,


edit retag flag offensive close merge delete


Did you ever get this working?

Kevin gravatar image Kevin  ( 2012-09-25 13:15:12 -0500 )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 -0500 )edit

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

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

2 Answers

Sort by ยป oldest newest most voted

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

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.

edit flag offensive delete link more

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

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


This is great, thanks!

davheld gravatar image davheld  ( 2013-02-24 18:14:05 -0500 )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 -0500 )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 -0500 )edit

With what package(s) is it failing?

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

Question Tools


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

Seen: 1,001 times

Last updated: Aug 08 '12