I am new to ROS so apologies if it is obvious. I have multiple ROS packages and currently I use them by linking them to my catkin workspace using symbolic links. What I want to do now is use one CMakeList to call and build the required ROS packages. I have different ROS actions stored as packages in a folder and I link the main folder to the workspace and I can build it. I can even link each ROS action directory separately and build it. But when I use add_subdirectory in the main cmake file I want to call, it gives me an error that catkin should be listed as a buildtool dependency in package.xml, which it is.
My current folder structure looks like this
catkin_ws
--build
--devel
--logs
--src
--ros_actions
--action1
--include
--src
--CMakeLists.txt
--package.xml
--action2
--include
--src
--CMakeLists.txt
--package.xml
--main_file
--config
--launch
--include
--src
--CMakeLists.txt
--package.xml
and I want to have something like
catkin_ws
--build
--d开发者_StackOverflow中文版evel
--logs
--src
--main_file
--actions
--action1
--include
--src
--CMakeLists.txt
--package.xml
--action2
--include
--src
--CMakeLists.txt
--package.xml
--config
--launch
--include
--src
--CMakeLists.txt
--package.xml
I did try adding "ros_actions" in the CMakelist include_directories
and find_package
functions but failed.
Is there a way to add a custom ROS package as a dependency to another?
Thank you in advance.
精彩评论