Ask Your Question

ROS inside part of a c++ project

asked 2013-06-24 04:36:38 -0500

Verane gravatar image

updated 2014-04-20 14:09:49 -0500

ngrennan gravatar image

Hi. I've a c++ project where I'm using CMakeList with the structure similar to:

Project (inside my ros sandbox)
|___some code
|___some code
|_ROS package folder
|___some code

Inside de main CMakeLists.txt I've something similar to:


add_library(something_static STATIC ${RECRUITER_SOURCES})

Where inside "recruiter" directory is the ROS package, created using "roscreate-pkg".

And I'm getting the following error:

[rosbuild] Error from directory check: /opt/ros/groovy/share/ros/core/rosbuild/bin/ /opt/ros/groovy/stacks/test/noderecruiter 1 Traceback (most recent call last): File "/opt/ros/groovy/share/ros/core/rosbuild/bin/", line 46, in <module> raise Exception Exception CMake Error at /opt/ros/groovy/share/ros/core/rosbuild/private.cmake:102 (message): [rosbuild] rospack found package "test" at "", but the current directory is "/opt/ros/groovy/stacks/test/noderecruiter". You should double-check your ROS_PACKAGE_PATH to ensure that packages are found in the correct precedence order. Call Stack (most recent call first): /opt/ros/groovy/share/ros/core/rosbuild/public.cmake:177 (_rosbuild_check_package_location) server/noderecruiter/CMakeLists.txt:12 (rosbuild_init)

-- Configuring incomplete, errors occurred!

What's happening? THanks.

edit retag flag offensive close merge delete



Are you building with catkin? I think ROS/catkin needs the toplevel.cmake to work.

dornhege gravatar image dornhege  ( 2013-06-24 04:54:50 -0500 )edit

No, I would like to build like a normal project.

Verane gravatar image Verane  ( 2013-06-24 05:54:10 -0500 )edit

Could you please post your CMakeLists.txt file in full? It would be good to see the context of your build output.

allenh1 gravatar image allenh1  ( 2013-06-24 17:55:25 -0500 )edit

What CMakeLists do you want? The file inside the main project or the ros one?

Verane gravatar image Verane  ( 2013-06-25 00:14:29 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-12 12:06:56 -0500

tfoote gravatar image

ROS packages are not designed to simply be included inside CMake packages. This is not a supported use case.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2013-06-24 04:36:38 -0500

Seen: 578 times

Last updated: Aug 12 '13