Creating a ROS msg and srv tutorial problems
Hey guys,
I've been stuck on this problem for the last two days and would really appreciate some help.
I'm following the ROS tutorial on msgs ans srv and every time I get to the catkin_make install part I get the following error.
CMake Error at /opt/ros/indigo/share/genmsg/cmake/genmsg-extras.cmake:151 (message):
add_service_files() directory not found:
/home/user_name/catkin_ws/src/beginner_tutorials/src/srv
Call Stack (most recent call first):
beginner_tutorials/src/CMakeLists.txt:9 (add_service_files)
One forum I looked into stated that I can just comment out add_service_files() from the CMakeLists.txt. However, when I do that I get the following error
/home/user_name/catkin_ws/src/beginner_tutorials/src/add_two_ints_server.cpp:2:83: fatal error: beginner_tutorials/AddTwoInts.h: No such file or directory
#include "beginner_tutorials/AddTwoInts.h" //header file generated in the SRV file
^
compilation terminated.
/home/user_name/catkin_ws/src/beginner_tutorials/src/add_two_ints_client.cpp:2:43: fatal error: beginner_tutorials/AddTwoInts.h: No such file or directory
#include "beginner_tutorials/AddTwoInts.h"
Again I appreciate any help I can receive. ROS is giving me a lot of trouble and the tutorials are not always so helpful. Thank you for any feedback!
EDIT: CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)
## Find catkin and any catkin packages
find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs genmsg message_generation)
## Declare ROS messages and services
##add_message_files(FILES Num.msg)
##add_service_files(FILES AddTwoInts.srv)
## Generate added messages and services
##generate_messages(DEPENDENCIES std_msgs)
## Declare a catkin package
catkin_package( CATKIN_DEPENDS message_runtime)
## Build talker and listener
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(talker talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)
add_executable(listener listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(listener beginner_tutorials_generate_messages_cpp)
add_executable(add_two_ints_server add_two_ints_server.cpp)
target_link_libraries(add_two_ints_server ${catkin_LIBRARIES})
add_dependencies(add_two_ints_server beginner_tutorials_gencpp)
add_executable(add_two_ints_client add_two_ints_client.cpp)
target_link_libraries(add_two_ints_client ${catkin_LIBRARIES})
add_dependencies(add_two_ints_client beginner_tutorials_gencpp)