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

Your CMakeLists.txt is missing the dependency which tells cmake that it needs to do message generation before it tries to compile your program.

Add the following to your CMakeLists.txt, to inform CMake that your program needs the generated messages in order to compile:

add_dependencies(my_package my_package_generate_messages_cpp)

Have a look at this question for a more detailed discussion of how this works and why it is necessary.