ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A
Ask Your Question

no auto generated config with dynamic_reconfigure

asked 2011-12-04 20:28:19 -0500

momus gravatar image


i am failing to use the dynamic_reconfigure package to configure my program. Although i have a working config file ( its working in another project ), during the make process, no header file is created. It seems like the dynamic_reconfigure part of the make process is skipped.

I have created a simple test project following the dynamic reconfigure tutorial


cmake_minimum_required(VERSION 2.4.6)


#set the default path for built executables to the "bin" directory
#set the default path for built libraries to the "lib" directory

add_executable( blaa main.cpp )



 #include "ros/ros.h"
 #include "blaa/defaultConfig.h"

 int main(int argc, char *argv[])
    ros::init(argc, argv, "blaa");

    return 0;


   <description brief="blaa">
   <review status="unreviewed" notes=""/>
   <depend package="rospy"/>
   <depend package="roscpp"/>
   <depend package="dynamic_reconfigure"/>


Output of make ( with a bit of configure )

 ~/ros/stacks/magv/blaa$ make
 [rosbuild] Building package blaa
 [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake
 [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake
 [rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake
 MSG: gencfg_cpp on:default.cfg
 Finding dependencies for /home/agv/blaa/cfg/default.cfg
 -- Configuring done
 -- Generating done
 -- Build files have been written to: /home/agv/blaa
 [ 50%] Building CXX object CMakeFiles/blaa.dir/main.o
 /home/agv/blaa/main.cpp:2:32: fatal error: blaa/defaultConfig.h: No such      file or directory
 compilation terminated.
 make[2]: *** [CMakeFiles/blaa.dir/main.o] Error 1
 make[1]: *** [CMakeFiles/blaa.dir/all] Error 2
 make: *** [all] Error 2

Ignoring the obvious compilation error at the end. It seems like the build process just skipps the config generation ( it starts at 50%). Any idea why?

Thank you for your time! Manuel

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2011-12-09 00:03:56 -0500

momus gravatar image

updated 2011-12-09 00:05:42 -0500


i finally found the mistake. In the CMakeList.txt i was using the wrong statement to define the target executable.

Instead of

 add_executable( blaa main.cpp )

It must read

 rosbuild_add_executable( blaa main.cpp )

Only if so, ros libraries are linked against the target executable and the pre compilation steps like message and config generation is done.

Thank you or your time.

edit flag offensive delete link more

answered 2011-12-05 00:44:04 -0500

Thomas gravatar image

Did you write the cfg/default.cfg file? Try to run it like this: cd cfg; python default.cfg. You should obtain the following output: Generating reconfiguration files for default in blaa.

It is likely to be caused by a Python error in this file that prevents the files from being generated.

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

The deadline to submit a proposal to present at ROSCon 2017 is June 25, 2017. Submit yours now!

Question Tools


Asked: 2011-12-04 20:28:19 -0500

Seen: 1,100 times

Last updated: Dec 09 '11