ros/ros.h header file not found
Hello, I'm pretty new to ROS and I'm implementing a Service node in C++, the problem is, when I try to include the "ros/ros.h" header file, it is not found, and the header file of my service file isn't found either, although it is correctly contained in catkin_ws/devel/include/my_package, I've found that this problem is often caused by an error of configuration in the CMakeLists.txt, but I tried the solutions that were posted in the thread I consulted and it didn't help. My ROS version is Kinetic Kame and I'm using Ubuntu 16.04.
Here's my CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.3)
project(beginner_tutorials)
add_message_files(
FILES
Num.msg
Sensor.msg
)
add_service_files(
FILES
AddTwoInts.srv
CaracteresComunes.srv
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
INCLUDE_DIRS include
LIBRARIES beginner_tutorials
CATKIN_DEPENDS roscpp rospy std_msgs message_runtime
DEPENDS system_lib
)
include_directories(${catkin_INCLUDE_DIRS})
add_executable(talker src/talker.cpp)
target_link_libraries(talker ${catkin_LIBRARIES})
add_dependencies(talker beginner_tutorials_generate_messages_cpp)
add_executable(listener src/listener.cpp)
target_link_libraries(listener ${catkin_LIBRARIES})
add_dependencies(listener beginner_tutorials_generate_messages_cpp)
add_executable(SumarServer src/add_two_ints_server.cpp)
target_link_libraries(SumarServer ${catkin_LIBRARIES})
add_dependencies(SumarServer beginner_tutorials_gencpp)
add_executable(SumarClient src/add_two_ints_client.cpp)
target_link_libraries(SumarClient ${catkin_LIBRARIES})
add_dependencies(SumarClient beginner_tutorials_gencpp)
add_executable(CCServer src/CCServer.cpp)
target_link_libraries(CCServer ${catkin_LIBRARIES})
add_dependencies(CCServer beginner_tutorials_gencpp)
And my package.xml just in case:
<?xml version="1.0"?>
<package format="2">
<name>beginner_tutorials</name>
<version>0.0.0</version>
<description>This package was created to follow the tutorial</description>
<maintainer email="aldo@todo.todo">aldo</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<build_depend>rospy</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>turtlesim</build_depend>
<build_depend>tf</build_depend>
<build_export_depend>roscpp</build_export_depend>
<build_export_depend>rospy</build_export_depend>
<build_export_depend>std_msgs</build_export_depend>
<build_export_depend>tf</build_export_depend>
<build_depend>message_generation</build_depend>
<exec_depend>message_runtime</exec_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>rospy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<exec_depend>tf</exec_depend>
<export>
</export>
</package>
I would really appreciate the help, guys
This could be a result of an unorthodox directory structure. Do you have a "srv" folder and an "include" folder that contains the mentioned files in the src/my_package directory (e.g. my_package/srv and my_package/include)?
Oh, my bad, I forgot to mention that, yes, I'm using the suggested folder structure, but the problem was just my IDE's configuration. Thanks a lot for your help!