fatal error: ros/ros.h: No such file or directory
I'm getting the error
fatal error: ros/ros.h: No such file or directory
when i'm trying
catkin_make
here is my CPP code
//this progamme publishes randomly-genarated velosity messages for turtlesim
#include "ros/ros.h"
#include "geometry_msgs/Twist.h" //for geometry_msgs::Twist
#include "stdlib.h" // for rand() and RAND_MAX
int main(int argc, char **argv){
//initialize the ROS system and become a node.
ros::init(argc, argv, "publish_velocity");
ros::NodeHandle nh;
//Create a publisher object.
ros::Publisher pub = nh.advertise<geometry_msgs::Twist>("turtle1/cmd_vel", 1000);
//seed the random number genarator
srand(timeO(0));
//Loop at 2Hz until the node is shut down
ros::Rate rate(2);
while(ros::ok()){
//The other four fields, set default to 0
geomatry_msgs::Twist msg;
msg.linear.x = double(rand())/double(RAND_MAX);
msg.angular.z = 2*double(rand())/double(RAND_MAX)-1 ;
//publish the message
pub.publish(msg);
//Send a message to rosout with the details.
ROS_INFO_STREAM("Sending random Velocity command:" <<" Linear = " <<msg.linear.x <<" Angular = " <<msg.angular.z);
//wait till next iteration
rate.sleep();
}
}
And here is my CMakelist file
cmake_minimum_required(VERSION 2.8.3)
project(velocity)
find_package(catkin REQUIRED COMPONENTS roscpp geometry_msgs)
catkin_package()
include_directories(include${catkin_INCLUDE_DIRS})
add_executable(vel pubvel.cpp)
target_link_libraries(vel ${catkin_LIBRARIES})
and here is the package.XML
<?xml version="1.0"?>
<package format="2">
<name>velocity</name>
<version>0.0.0</version>
<description>The velocity package</description>
<maintainer email="aklinahs@todo.todo">aklinahs</maintainer>
<license>TODO</license>
<build_depend>roscpp</build_depend>
<build_depend>geometry_msgs</build_depend>
<exec_depend>roscpp</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<buildtool_depend>catkin</buildtool_depend>
<export>
</export>
</package>
what could be the wrong here,....
Please don't add these sort of things to questions.
We already know you're looking for help, otherwise you wouldn't be posting here.