So far I had no problems building our project. I'm sure I built it successfully containing several _gencfg targets
. Now, suddenly, with no obvious reason, catkin_make
fails on all _gencfg
targets. The only thing that's changed is I did apt-get upgrade
, but I don't think it touched any ROS-related packages.
We're using Indigo on 14.04. The .cfg files have the executable bit set.
After running catkin_make
and receiving the error, I look into /home/peckama2/tradr-git/tradr-ws/devel/include/optris_camera/
, and the .h file has not been generated.
Here is the compile log (shortened):
$ catkin_make
Base path: /home/peckama2/tradr-git/tradr-ws
Source space: /home/peckama2/tradr-git/tradr-ws/src
Build space: /home/peckama2/tradr-git/tradr-ws/build
Devel space: /home/peckama2/tradr-git/tradr-ws/devel
Install space: /home/peckama2/tradr-git/tradr-ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/peckama2/tradr-git/tradr-ws/build"
####
####
#### Running command: "make -j4 -l4" in "/home/peckama2/tradr-git/tradr-ws/build"
####
... shortened ...
[ 1%] [ 1%] Built target std_srvs_generate_messages_py
Generating dynamic reconfigure files from cfg/camera_nodelet_params.cfg: /home/peckama2/tradr-git/tradr-ws/devel/include/optris_camera/camera_nodelet_paramsConfig.h /home/peckama2/tradr-git/tradr-ws/devel/lib/python2.7/dist-packages/optris_camera/cfg/camera_nodelet_paramsConfig.py
: Directory or file does not exist
make[2]: *** [/home/peckama2/tradr-git/tradr-ws/devel/include/optris_camera/camera_nodelet_paramsConfig.h] Error 127
make[1]: *** [tradr-payload/optris_camera/CMakeFiles/optris_camera_gencfg.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Built target std_srvs_generate_messages_lisp
[ 1%] [ 1%] Built target std_srvs_generate_messages_cpp
Built target _optris_camera_generate_messages_check_deps_AutoFlag
make: *** [all] Error 2
Invoking "make" failed
The .cfg file:
#!/usr/bin/env python
PACKAGE='optris_camera'
#import roslib
#roslib.load_manifest(PACKAGE)
from dynamic_reconfigure.parameter_generator_catkin import *
gen = ParameterGenerator()
# Name Type Level Description Default Min Max
gen.add("frame_id", str_t, 0, "Camera frame ID.", "thermo_camera")
gen.add("framerate", int_t, 0, "Camera frame rate. [Hz]", 10, 1, 120)
gen.add("recali_time", int_t, 0, "Time for recalibration of camera. [s]", 0, 0, 120)
gen.add("timestamp_offset", double_t, 0, "Camera timestamp offset. [s]", 0, -2, 2)
gen.add("use_ros_time", bool_t, 0, "Switch between ros time and time monotonic.", False)
exit(gen.generate(PACKAGE, "optris_camera", "camera_nodelet_params"))
And an excerpt from CMakeLists.txt (comments and some unnecessary code removed):
cmake_minimum_required(VERSION 2.8.3)
project(optris_camera)
find_package(catkin REQUIRED COMPONENTS
roscpp
std_msgs
std_srvs
sensor_msgs
image_transport
message_generation
camera_info_manager
nodelet
dynamic_reconfigure
)
generate_dynamic_reconfigure_options(
cfg/camera_nodelet_params.cfg)
catkin_package(
INCLUDE_DIRS
include
LIBRARIES
optris_camera_nodelets
CATKIN_DEPENDS
roscpp
std_msgs
std_srvs
sensor_msgs
image_transport
message_runtime
camera_info_manager
nodelet
DEPENDS
libudev-dev
Boost
)
include_directories(include)
add_executable(thermo_node src/thermo_node.cpp src/camera.cpp src/error.cpp)
add_executable(thermo_colorconvert_node src/thermo_colorconvert_node.cpp)
add_library(optris_camera_nodelets src/thermo_processing_nodelet.cpp src/error.cpp)
## Specify libraries to link a library or executable target against
target_link_libraries(
thermo_node
Imager
ImageProcessing
udev
${catkin_LIBRARIES}
)
add_dependencies(thermo_node ${PROJECT_NAME}_gencfg ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(
thermo_colorconvert_node
PIImager
PIImageProcessing
${catkin_LIBRARIES}
)
target_link_libraries(
optris_camera_nodelets
${catkin_LIBRARIES}
)
Thanks for any help.
Originally posted by peci1 on ROS Answers with karma: 1366 on 2014-10-21
Post score: 0
Original comments
Comment by ahendrix on 2014-10-21:
Is it possible that it's complaining about python itself being missing for some reason? What do you get if you run /usb/bin/env python
?
Comment by peci1 on 2014-10-21:
That was also my try, but when I run the command after shebang, I get a normal python console.
Comment by Dirk Thomas on 2014-10-21:
Please try it with a minimal CMakeLists.txt file:
project(optris_camera)
find_package(catkin REQUIRED COMPONENTS dynamic_reconfigure)
generate_dynamic_reconfigure_options(cfg/camera_nodelet_params.cfg)
catkin_package()
This works fine for me.
Comment by peci1 on 2014-10-21:
Same result :( What could go wrong?
Comment by Dirk Thomas on 2014-10-21:
Please post your version number of dynamic_reconfigure. Also consider putting your minimal package in a GitHub repo to share - may be something is wrong which is not obvious from your posted code.
Comment by peci1 on 2014-10-22:
ros-inidigo-dynamic-reconfigure 1.5.37-0trusty-20140905-0110-+0000
Comment by peci1 on 2014-10-22:
I've created a whole new catkin workspace to test this thing. I've properly sourced its setup.bash, and the problem is the same. Here is the minimal workspace with the buildfiles included: https://app.box.com/s/af4foufx341jfk6rlzjz