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

CMakeLists.txt calls CMakeLists.txt -> ROS FAIL [closed]

asked 2012-05-06 11:47:48 -0500

harald gravatar image

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

ngrennan gravatar image

Hello, i want include ROS into an lager project, so there calls a single CMakeLists.txt n CMakeLists.txt's. Structure: workspace/source/Apps/fieldviewer/CMakeLists.txt (with rosbuild_init()) workspace/source/Apps/fieldviewer/manifest.xml workspace/source/Apps/... worksapce/source/CmakeLists.txt workspace/build/

if i call: $ cmake ../source/Apps/fieldviewer everything is fine, but if i call: $ cmake ../source there is an error: [rosbuild] Building package source CMake Error at /opt/ros/electric/ros/core/rosbuild/private.cmake:110 (message): [rosbuild] rospack found package "source" at "", but the current directory is "/home/---/workspace/source/Apps/fieldviewer". 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/electric/ros/core/rosbuild/public.cmake:180 (_rosbuild_check_package_location) Apps/fieldviewer/CMakeLists.txt:17 (rosbuild_init)

Is there anything to configure in worksapce/source/CmakeLists.txt file?

Path config: #!/bin/sh source /opt/ros/electric/setup.bash export ROS_ROOT=/opt/ros/electric/ros export PATH=$ROS_ROOT/bin:$PATH export PYTHONPATH=$ROS_ROOT/core/roslib/src:$PYTHONPATH export ROS_PACKAGE_PATH=~/workspace/source:/opt/ros/electric/stacks:$ROS_PACKAGE_PATH


edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2012-06-03 12:31:58


so the error is ${PROJECT_SOURCE_DIR} != ${${PROJECT_NAME} _PACKAGE_PATH}, but why ... i set before rosbuild_init() the PROJECT_NAME var. with project(fieldviewer). If i set ${${PROJECT_NAME} _PACKAGE_PATH} manuel(before rosbuild_init), the same error happens.

harald gravatar image harald  ( 2012-05-07 00:13:52 -0500 )edit

Please be a lot clearer about what you're trying to do and exactly how you're doing it. Otherwise there's no way for us to reproduce, and as your doing something very different than standard it's not something many of us have experience with.

tfoote gravatar image tfoote  ( 2012-05-17 07:49:26 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-05-14 07:00:57 -0500

Mac gravatar image

If I understand correctly, you want to write a CMakeLists for some other project that includes ROS' CMakeLists directly.

That's not the usual way of using ROS in other projects; the usual way (for a library) is to write a little ROS wrapper package for it or (for a more-general system) implement a ROS node that bridges the two.

Can you explain what problem you're trying to solve in a little more detail?

edit flag offensive delete link more

Question Tools


Asked: 2012-05-06 11:47:48 -0500

Seen: 533 times

Last updated: May 14 '12