Catkin make isolated: No such file

asked 2021-11-28 14:58:01 -0500

jtoobias gravatar image

So I want to try cartographer which required me to use catkin_make_isolated. This caused an error in a package I clone called lidar_segmentation (link text) to pop up.

The error: fatal error: common/types/object.hpp: No such file or directory #include "common/types/object.hpp" <== Failed to process package 'object_builders_lib':

The .hpp file is in another package called common_lib, and I don't know how to make it aware of this header file/folder it is in.
I have copied the cMakelist.txt below as I think the issue would be in there. Any help will be greatly appreciated.

The object_builders_lib cmakelists.txt:

   find_package(catkin REQUIRED COMPONENTS
    # ROS core
    roscpp
    # ROS messages
    std_msgs
    sensor_msgs
    # ROS PCL
    pcl_conversions
    pcl_ros
    # 3rd modules for ROS, like Eigen
    cmake_modules
    # local packages
    common_lib
)

## System dependencies are found with CMake's conventions
### PCL
find_package(PCL 1.8 REQUIRED COMPONENTS
    common
    common_lib
    io
)
add_definitions(${PCL_DEFINITIONS})
link_directories(${PCL_LIBRARY_DIRS})
### Eigen
find_package(Eigen3 REQUIRED)

###################################
## catkin specific configuration ##
###################################
catkin_package(
    #  CATKIN_DEPENDS roscpp
    #  DEPENDS system_lib
    INCLUDE_DIRS include
    LIBRARIES object_builders_lib
    CATKIN_DEPENDS roscpp std_msgs common_lib
)

###########
## Build ##
###########

## Specify additional locations of header files
include_directories(
    include
    ${catkin_INCLUDE_DIRS}
    ${PCL_INCLUDE_DIRS}
    ${Eigen3_INCLUDE_DIRS}
)

## Declare a C++ executable
add_library(${PROJECT_NAME}
    src/min_box_object_builder.cpp
)

## http://mariobadr.com/creating-a-header-only-library-with-cmake.html
#add_library(${PROJECT_NAME} INTERFACE)
#target_include_directories(${PROJECT_NAME} INTERFACE include/common)

## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}
    ${catkin_LIBRARIES}
    ${PCL_LIBRARIES}
    ${Eigen3_LIBRARIES}
)
edit retag flag offensive close merge delete

Comments

Can you pls clarify why are you using catkin_make_isolated, the package uses catkin buildas per: https://github.com/LidarPerception/se...

osilva gravatar image osilva  ( 2021-11-29 09:22:38 -0500 )edit

Thanks for the reply. The reason I am using catkin_make_isolated is that I want to try the mapping package "Cartographer" which required a catkin_make_isolated. The error was just found to come from the Lidar package. Sorry, I should have put that in the question.

jtoobias gravatar image jtoobias  ( 2021-11-29 14:10:45 -0500 )edit