Header file from "parallel" package not found
Hi there, hope everyone is alright !
Stumble upon a problem that seem to be very easily fixable if you know what you're looking for, but the more I was looking for an answer the further away I got from getting a correct behavior...
I am running ROS Melodic on a Ubuntu 18.04 Distro (patched with Xenomai, but it's irrelevant to the question I think).
I'm trying to build a ROS "stack" for a project, so I first started a ROS package with my utilities with the following architecture :
xddp_utilities/
├── CMakeLists.txt
├── package.xml
├── include
│ └── lib_a.h
│ └── lib_b.h
└── src
└── lib_a.cpp
└── lib_bcpp
xddp_echo/
├── CMakeLists.txt
├── package.xml
└── src
└── node_a.cpp
The xddp_utilities package's CMakeLists - as of now - looks like this :
cmake_minimum_required(VERSION 2.8.11)
project(xddp_utilities)
add_compile_options(-std=c++11 -Wall -Wextra)
find_package(catkin REQUIRED COMPONENTS
cmake_modules
roscpp
std_msgs
)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
roscpp
std_msgs
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
add_library(
${PROJECT_NAME}
src/MinimalPublisher.cpp
src/MinimalSubscriber.cpp
src/ListenerXddp.cpp
src/ChatterXddp.cpp
)
install(
TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)
install(
DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
Note that it has changed A LOT with all the experiments I tried from different answers I found. It has no ROS Nodes in it, it's merely just a helper toolbox. The xddp_utilities package built without any issues.
Now my xddp_echo package's CMakeLists looks like this :
cmake_minimum_required(VERSION 2.8.3)
project(xddp_echo)
find_package(catkin REQUIRED COMPONENTS
xddp_utilities
roscpp
std_msgs
)
catkin_package(
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
xddp_utilities
roscpp
std_msgs
)
include_directories(
${catkin_INCLUDE_DIRS}
)
add_executable(xddp_chatter src/chatter_node.cpp)
add_executable(nrt_thread src/xddp_nrt_thread_node.cpp)
add_executable(xddp_listener src/listener_node.cpp)
add_dependencies(xddp_chatter ${catkin_EXPORTED_TARGETS})
add_dependencies(nrt_thread ${catkin_EXPORTED_TARGETS})
add_dependencies(xddp_listener ${catkin_EXPORTED_TARGETS})
target_link_libraries(xddp_chatter ${catkin_LIBRARIES})
target_link_libraries(xddp_listener ${catkin_LIBRARIES})
target_link_libraries(nrt_thread ${catkin_LIBRARIES})
And produces the following mistake after using catkin_make :
catkin_ws/src/xddp_echo/src/listener_node.cpp:1:10: fatal error: xddp_utilities/ListenerXddp.h: No such file or directory
#include "xddp_utilities/ListenerXddp.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Desperate to hear any leads you may have. I tried deleting devel and build and catkin_make from a fresh environment but it didn't do anything. My devel/include/ folder has nothing in it, if that's a good information to take ?
It's the first time I have an issue like this (usually works) but maybe I've been floating away from a working CMakeLists after my numerous attempts to fix it.
Thanks for the help, if you need more info don't hesitate !
Asked by Guilyx on 2020-06-13 14:31:53 UTC
Comments