ros/ros.h No such file or directory
I have been running ROS Melodic in my Ubuntu Bionic system. I already had a previous workspace called 'catkin_ws'. Recently, I tried to create another workspace which I named 'ros'. I then created a directory called 'first_package' inside the 'src' folder using the 'catkin_create_pkg' command. I then coded a small segment which I have attached below and named it hello.cpp inside the 'first_package' which I have attached below.
//This is the ROS standard of "hello, world" program//
//This header defined standard ROS classed//
#include<ros/ros.h>
int main(int argc, char **argv){
//Initialize the ROS system
ros::init(argc, argv, "hello_ros");
//Establish this program as ROS node
ros::NodeHandle nh;
//Send some output as log message
ROS_INFO_STREAM("Hello, ROS!");
}
I have changed both the CMakeLists.txt and Package.xml accordingly, but I still receive this error. Could someone please resolve this issue. The error occurs when I use the command 'catkin_make'
This is the CMakeLists.txt file
cmake_minimum_required(VERSION 2.8.3)
project(first_package)
find_package(catkin REQUIRED COMPONENTS roscpp)
catkin_package()
include_directories()
add_executable(hello hello.cpp)
target_link_libraries(hello ${catkin_LIBRARIES})
The package.xml file is as follows,
<?xml version="1.0"?>
<package format="2">
<name>first_package</name>
<version>0.0.0</version>
<description>The first_package package</description>
<maintainer email="danish@todo.todo">danish</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<exec_depend>roscpp</exec_depend>
<export>
</export>
</package>