0
$\begingroup$

Rosanswers logo

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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

If I'm not mistaken, the packages you are referring to were rosbuild packages.

You converted them to Catkin, but if I look at art_msgs/src/art_msgs/CMakeLists.txt, I don't see a catkin_package(..) statement anywhere.

That will cause the error you included in your OP.

If you haven't already, please check the catkin/migrating_from_rosbuild page on the wiki. And check the catkin documentation on how to deal with things like message and service dependencies.


Originally posted by gvdhoorn with karma: 86574 on 2017-10-09

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Amogh Gupta on 2017-10-09:
Yes, I am attempting to catkinise rosbuild packages, I added the following based on your suggestion:

catkin_package(
    DEPENDS
    CATKIN_DEPENDS message_generation nav_msgs geometry_msgs std_msgs sensor_msgs
    INCLUDE_DIRS
    LIBRARIES
)    

Still the same errors.

Comment by gvdhoorn on 2017-10-09:
Order matters for these things. Please remove your build and devel directories, read the pages I linked to carefully, read wiki/catkin/CMakeLists.txt also carefully and try again.

Comment by gvdhoorn on 2017-10-09:\

catkin_package(
    DEPENDS
    CATKIN_DEPENDS message_generation 
    ..

That won't work, and is also described in the pages I linked to: the CATKIN_DEPENDS should be message_runtime.

Comment by Amogh Gupta on 2017-10-10:
I made the change suggested and went through the links in my understanding, however still unable to build the package, it is unable to find the header files from art_common/include/art.

Comment by gvdhoorn on 2017-10-10:
It would help if you could push your current state to your github repository.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.