ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You definitely should have your messages in the msg folder. I would say you are missing two things:
catkin_package
you should add EXPORTED_TARGETS mobility_generate_messages_cpp
add_dependencies(mobility mobility_generate_messages_cpp)
This way, you are saying that mobility requires the messages generated and thus catkin would build them first. If you do not have these lines, it can compile if, for some reason, catkin decides to build first the messages instead of the executable. But if dependencies are not properly set then this is not guaranteed, and I would say this is what is happening to you.