ROS inside part of a c++ project
Hi. I've a c++ project where I'm using CMakeList with the structure similar to:
Project (inside my ros sandbox)
|
|_Folder1
|___some code
|___CMakeLists.txt
|
|_Folder2
|___some code
|___CMakeLists.txt
|
|_ROS package folder
|___some code
|___CMakeLists.txt
|
|_CMakeLists.txt
Inside de main CMakeLists.txt I've something similar to:
add_subdirectory(recruiter)
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/check_same_directories.py /opt/ros/groovy/stacks/test/noderecruiter 1 Traceback (most recent call last): File "/opt/ros/groovy/share/ros/core/rosbuild/bin/check_same_directories.py", 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.
Are you building with catkin? I think ROS/catkin needs the toplevel.cmake to work.
No, I would like to build like a normal project.
Could you please post your CMakeLists.txt file in full? It would be good to see the context of your build output.
What CMakeLists do you want? The file inside the main project or the ros one?