I have three packages in the same workspace called:
art_msgs (contains messages in art_msgs/msg folder)
art_common (contains some nodes in art_common/srcfolder which depend on messages from art_msgs; and art_common/include/art folder)
art_map (contains nodes in art_map/src which depend on art_common)
I am able to successfully compile art_msgs and art_common. However the nodes of art_map include header files from art_common/include/art which are not included when I catkin_build the workspace.
Based on another post, I have tried installing the header file, by adding the following in CMakeLists.txt of art_common
install(DIRECTORY include/art/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
PATTERN ".svn" EXCLUDE)
which results in the following error:
In file included from /home/amogh/rosws2/src/art_map/src/DrawLanes.cc:2:0:
/home/amogh/rosws2/src/art_map/include/art_map/euclidean_distance.h:20:25: fatal error: art/epsilon.h: No such file or directory
#include <art/epsilon.h>
Also when I add the following, in CMakeLists.txt of art_map:
find_package(catkin REQUIRED COMPONENTS art_common)
The following error arises:
Errors << art_map:check /home/amogh/rosws2/logs/art_map/build.check.044.log
CMake Error at /home/amogh/rosws2/devel/share/art_common/cmake/art_commonConfig.cmake:165 (find_package):
By not providing "Findart_msgs.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "art_msgs",
but CMake did not find one.
Could not find a package configuration file provided by "art_msgs" with any
of the following names:
art_msgsConfig.cmake
art_msgs-config.cmake
Other required dependencies have been resolved in package.xml and CMakeLists.txt. You can see the complete code here.
Originally posted by Amogh Gupta on ROS Answers with karma: 1 on 2017-10-09
Post score: 0
Original comments
Comment by gvdhoorn on 2017-10-09:
Btw: may I suggest a title change? The problem here is that the catkinisation of your pkgs is incomplete/incorrect. Whether or not the headers can be included successfully remains to be seen.