ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
All the Qt5 setup looks fine. I think your problem is the add_dependencies
line, since it doesn't seem to be properly directing CMake to build your messages before trying to build your node. I use gencpp
instead of generate_messages_cpp
when I do things like this, and it seems to work fine. Therefore, I would try this add_dependencies
command instead:
add_dependencies(demointerface demointerface_gencpp)
On a side note, you can also use the ${PROJECT_NAME}
macro to insert the name of the ROS package. This way, it's typo-proof, and will adapt if you ever change the name of the package for some reason. Using this, the above could be written as:
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencpp)