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

Did you copy and paste it? In the tutorial for adding the message and service files it says

add_message_files(FILES Num.msg)
add_service_files(FILES AddTwoInts.srv)

but you have

add_message_files(DIRECTORY msg FILES Num.msg)
add_service_files(DIRECTORY srv FILES AddTwoInts.srv)

Notice the difference? Yours says DIRECTORY while the tutorial says FILES.

Did you copy and paste it? In the tutorial for adding the message and service files it says

add_message_files(FILES Num.msg)
add_service_files(FILES AddTwoInts.srv)

but you have

add_message_files(DIRECTORY msg FILES Num.msg)
add_service_files(DIRECTORY srv FILES AddTwoInts.srv)

Notice the difference? Yours says DIRECTORYDIRECTORY msg and DIRECTORY srv while the tutorial only says FILES.

Did you copy and paste it? In the tutorial for adding tutorial, the message and service files it saysCMakeLists.txt has the following lines

add_message_files(FILES Num.msg)
add_service_files(FILES AddTwoInts.srv)

but you have

add_message_files(DIRECTORY msg FILES Num.msg)
add_service_files(DIRECTORY srv FILES AddTwoInts.srv)

Notice the difference? Yours says DIRECTORY msg and DIRECTORY srv while the tutorial only says FILES..

Also, the Writing a Simple Publisher and Subscriber (C++) presumes that you completed the Creating a ROS msg and srv tutorial where the msg and srv folders and definitions for the custom message and service are created.