CMake Error: File /cmake/setup_custom_pythonpath.sh.in does not exist.
I have the following lines in my CMakeLists.txt and I am not able to use catkin_make
.
generate_dynamic_reconfigure_options(
config/dyn_reconf.cfg
)
The full error message:
CMake Error: File /cmake/setup_custom_pythonpath.sh.in does not exist.
CMake Error at /opt/ros/melodic/share/dynamic_reconfigure/cmake/dynamic_reconfigure-macros.cmake:42 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
../project/CMakeLists.txt:94 (generate_dynamic_reconfigure_options)
Here is my dyn_reconf.cfg
:
#!/usr/bin/env python
PACKAGE = "project"
from dynamic_reconfigure.parameter_generator_catkin import *
gen = ParameterGenerator()
gen.add("Resizing Factor", double_t, 0, "A float parameter to make the original image's resolution", 0.3)
gen.add("Hough Circle Upper Threshold", int_t, 0, "One of the Hough parameters", 100)
gen.add("Hough Circle Lower Threshold", int_t, 0, "One of the Hough parameters", 30)
gen.add("Hough Circle Min Radius", int_t, 0, "One of the Hough parameters", 10)
gen.add("Hough Circle Max Radius", int_t, 0, "One of the Hough parameters", 30)
exit(gen.generate(PACKAGE, "project", "dyn_reconf"))
and this is how I imported it:
from dynamic_reconfigure.server import Server
from dyn_reconf.cfg import dyn_reconf
EDIT: Adding the rest of CMakeLists.txt
:
EDIT2: Updated CMakeLists.txt
:
cmake_minimum_required(VERSION 2.8.3)
project(project)
find_package(catkin REQUIRED COMPONENTS
image_geometry
rospy
sensor_msgs
std_msgs
dynamic_reconfigure
)
generate_dynamic_reconfigure_options(
config/dyn_reconf.cfg
)
catkin_package(
CATKIN_DEPENDS image_geometry rospy sensor_msgs std_msgs dynamic_reconfigure
)
include_directories(
${catkin_INCLUDE_DIRS}
)
add_dependencies(project ${${PROJECT_NAME}_EXPORTED_TARGETS})
Can you show your
CMakeLists.txt
? Did this ever work, or is it a new package / have you just added dyn recfg to it?According to this,
${dynamic_reconfigure_BASE_DIR}
would have to be empty for this to happen, if I interprete things correctly.My package has been working all OK. Now that I want to use dynamic reconfigure, it doesn't compile. In other words, I am facing this error while trying to use dynamic reconfigure for the first time.