Ask Your Question
0

catkin install missing dynamic reconfigure header file

asked 2020-02-06 08:19:24 -0500

eirikaso gravatar image

updated 2020-02-06 08:24:45 -0500

I've been created a package (named "stereo") that uses dynamic reconfigure for some stereo matching parameters and it has been working fine until i tried to catkin install them instead of just catkin build without the install flag.

I have a file called "stereo_params.cfg" inside a cfg folder. The corresponding header file is autogenerated successfully in "cfg/cpp/stereo/stereo_paramsConfig.h", and a python file is autogenerated in "src/stereo/cfg/stereo_paramsConfig.py".

When I run catkin build I get the following error:

CMake Error at cmake_install.cmake:132 (file): file INSTALL cannot find "/home/eirik/catkin_ws/devel/.private/stereo/include/stereo/stereo_paramsConfig.h".

I've been trying to get this working for hours now but with no succsess.

My CMakeList looks like this:

cmake_minimum_required(VERSION 2.8.3)
project(stereo)

add_compile_options(-std=c++11)


find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
  roscpp
  rospy
  sensor_msgs
  std_msgs
  dynamic_reconfigure
  tf
)

find_package(OpenCV REQUIRED)

find_package(realsense2 2.23.0)
if (NOT realsense2_FOUND)
    message(FATAL_ERROR "REALSENSE ERROR")
endif()



## Generate dynamic reconfigure parameters in the 'cfg' folder
generate_dynamic_reconfigure_options(
   cfg/stereo_params.cfg
)


catkin_package(
  INCLUDE_DIRS include cfg/cpp
  CATKIN_DEPENDS cv_bridge image_transport roscpp rospy sensor_msgs std_msgs dynamic_reconfigure
)


include_directories(
  include
  cfg/cpp/${PROJECT_NAME}
  ${catkin_INCLUDE_DIRS}
  ${realsense2_INCLUDE_DIRS}
)



add_executable(publish_ROS_Y16
  src/publish_ROS_Y16.cpp
  src/stereo_calc.cpp
)

add_executable(publish_ROS_ROV
  src/publish_ROS_ROV.cpp
  src/capture.cpp
  src/measure.cpp
)

add_executable(verify_calibration_node
  src/verify_calibration_node.cpp
  src/stereo_calc.cpp
)

target_link_libraries(publish_ROS_Y16
  ${catkin_LIBRARIES}
  ${OpenCV_LIBS}
  ${realsense2_LIBRARY}
  yaml-cpp
)

target_link_libraries(publish_ROS_ROV
  ${catkin_LIBRARIES}
  ${OpenCV_LIBS}
  ${realsense2_LIBRARY}
  yaml-cpp
)

target_link_libraries(verify_calibration_node
  ${catkin_LIBRARIES}
  ${OpenCV_LIBS}
   yaml-cpp
)

## Mark executables and/or libraries for installation
install(TARGETS publish_ROS_ROV
  ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)


install(DIRECTORY include/${PROJECT_NAME}
  DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  FILES_MATCHING PATTERN "*.h" PATTERN "*hpp"
  PATTERN ".svn" EXCLUDE
)

Build log with error message is displayed here:

[ 26%] Built target stereo
[ 46%] Built target verify_calibration_node
[ 53%] Generating dynamic reconfigure files from cfg/stereo_params.cfg: /home/eirik/catkin_ws/devel/.private/stereo/include/stereo/stereo_paramsConfig.h /home/eirik/catkin_ws/devel/.private/stereo/lib/python2.7/dist-packages/stereo/cfg/stereo_paramsConfig.py
Generating reconfiguration files for stereo_params in stereo
[ 53%] Built target stereo_gencfg
[ 80%] Built target publish_ROS_ROV
[100%] Built target publish_ROS_Y16
Install the project...
-- Install configuration: ""
-- Installing: /home/eirik/catkin_ws/install/_setup_util.py
-- Installing: /home/eirik/catkin_ws/install/env.sh
-- Installing: /home/eirik/catkin_ws/install/setup.bash
-- Installing: /home/eirik/catkin_ws/install/local_setup.bash
-- Installing: /home/eirik/catkin_ws/install/setup.sh
-- Installing: /home/eirik/catkin_ws/install/local_setup.sh
-- Installing: /home/eirik/catkin_ws/install/setup.zsh
-- Installing: /home/eirik/catkin_ws/install/local_setup.zsh
-- Installing: /home/eirik/catkin_ws/install/.rosinstall
CMake Error at cmake_install.cmake:132 (file):
  file INSTALL cannot find
  "/home/eirik/catkin_ws/devel/.private/stereo/include/stereo/stereo_paramsConfig.h".


Makefile:61: recipe for target 'install' failed
make: *** [install] Error 1

I've found someone with a similar error here, but I do not have discrepancies in my naming as was the issue in that post.

edit retag flag offensive close merge delete

Comments

This seems to be a duplicate of #q285772. Could you check if this resolves your issue?

mgruhler gravatar image mgruhler  ( 2020-02-06 08:49:30 -0500 )edit

That was not it, but finally found the error. Will update with an answer

eirikaso gravatar image eirikaso  ( 2020-02-06 09:50:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-02-06 09:52:54 -0500

eirikaso gravatar image

updated 2020-02-06 09:53:27 -0500

At last found the error which was related to the .cfg file where i had imported some old method that seems to be used for rosbuild and not catkin

I imported

from dynamic_reconfigure.parameter_generator import *

while the correct import is

from dynamic_reconfigure.parameter_generator_catkin import *

Now it seems to be working fine

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-02-06 08:19:24 -0500

Seen: 356 times

Last updated: Feb 06 '20