ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Where is ros.h supposed to be found? [closed]

asked 2011-04-05 16:58:37 -0600

dave_haddon gravatar image

updated 2014-01-28 17:09:29 -0600

ngrennan gravatar image

I have been trying to compile a c++ ROS node with no luck.

I keep getting an error of cannot find ros/ros.h

I tried creating a new node with roscreate-pkg add pasted in the code from the talker tutorial.

Even though my new package is found by ros, It will not build..

/scratch/ros/publisher/src/publisher.cpp:1:21: error: ros/ros.h: No such file or directory

I have installed ros-diamondback-all from apt on Ubuntu 10.04. The only mention of ros.h is in

/opt/ros/diamondback/stacks/ros_comm/clients/cpp/roscpp/include/ros/ros.h
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by ahendrix
close date 2017-01-31 18:13:02.359782

1 Answer

Sort by ยป oldest newest most voted
11

answered 2011-04-05 17:58:33 -0600

dave_haddon gravatar image

I'll answer my own question...

It doesn't matter where ros.h is.

In the manifest.xml for the package, add

<depend package="roscpp"/>

And all will be well...

edit flag offensive delete link more

Comments

Hello.. im sorry I am totally new with this.. I have the same error.. where is the manifest.xml file supposed to be? I dont have anything similar in my package folder :(

Andrea019 gravatar image Andrea019  ( 2016-07-17 20:15:41 -0600 )edit

Did you find out manifest file? It is the package.xml file for your package.

Equaltrace gravatar image Equaltrace  ( 2016-07-31 12:04:01 -0600 )edit

But for that it need to be <build_depend>roscpp</build_depend> (according to the description of the generates package.xml). This still did not solve the problem for me though :-(

Paddre gravatar image Paddre  ( 2017-01-31 15:48:05 -0600 )edit
2

@Paddre: this is a VERY old question and refers the the manifest.xml that was used with rosbuild. If you're using catkin the instructions are different; you need a build_depend in your package.xml, and you need to add roscpp in your CMakeLists.txt .

ahendrix gravatar image ahendrix  ( 2017-01-31 18:12:30 -0600 )edit

If you're still having trouble please ask a new question instead of reopening an old question.

ahendrix gravatar image ahendrix  ( 2017-01-31 18:12:53 -0600 )edit

Question Tools

Stats

Asked: 2011-04-05 16:58:37 -0600

Seen: 10,816 times

Last updated: Aug 02 '12