ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, do you have an example_node?

The line

add_dependencies(example_node ${PROJECT_NAME}_gencfg)

ensures, that the the target "example_node" is built after the target ${PROJECT_NAME}_gencfg. If you did not create this target before, you get your error.

In this context: If you don't have any node using your .cfg, then just delete this line. BUT what good is a .cfg file for, if you don't use it in a node?! So I assume that sooner or later you will create a node that will use your .cfg and then you need to make sure the .cfg is processed before the node is built.

Assuming you use c++ for your nodes:

add_executable(my_node src/my_node.cpp)
add_dependencies(my_node ${PROJECT_NAME}_gencfg)

Replace my_node by whatever your node is called and src/my_node.cpp by the according source file.