ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Both of those lines are correct for now, but the latter will be deprecated.
The _gencpp
is the old style, the _generate_message_cpp
target is the new name (more descriptive).
These targets are created by the generate_messages(DEPENDENCIES ...)
CMake macro call. Calling add_dependencies(my_bin ${PKG_NAME}_generate_messages_cpp)
just tells CMake that the ${PKG_NAME}_generate_messages_cpp
target should be built before the my_bin
target. It does not instruct CMake to generate your messages. So, if you are expecting this line to cause your services to be built, then that's incorrect.
See the ROS tutorials about how to get services generated:
http://www.ros.org/wiki/ROS/Tutorials/CreatingMsgAndSrv#Using_srv
2 | No.2 Revision |
Both of those lines are correct for now, but the latter will be deprecated.
The _gencpp
is the old style, the
target is the new name (more descriptive). _generate_message_cpp_generate_messages_cpp
These targets are created by the generate_messages(DEPENDENCIES ...)
CMake macro call. Calling add_dependencies(my_bin ${PKG_NAME}_generate_messages_cpp)
just tells CMake that the ${PKG_NAME}_generate_messages_cpp
target should be built before the my_bin
target. It does not instruct CMake to generate your messages. So, if you are expecting this line to cause your services to be built, then that's incorrect.
See the ROS tutorials about how to get services generated:
http://www.ros.org/wiki/ROS/Tutorials/CreatingMsgAndSrv#Using_srv