Ask Your Question

gazebo.hh not found

asked 2012-08-30 21:43:10 -0500

ccm gravatar image

updated 2012-09-09 17:21:15 -0500

Hi, I'm currently trying to do this tutorial

but at when I compile the code, 'cmake' works fine but 'make' produces the following error

/home/u0905937/fuerte_workspace/sandbox/gazebo_plugin_tutorial/ fatal error: gazebo.hh: No such file or directory

I did a locate and found gazebo.hh in


Does the problem has anything to do with my ROS_PACKAGE_PATH or ROS_WORKSPACE? I've tried adding the above location to my ROS_PACKAGE_PATH but to no avail. My ROS_WORKSPACE is /home/u0905937/fuerte_workspace if that is any help.

I'm running on Ubuntu 12.04

EDIT: Thanks Kai, I've tried using the rosmake method and at least it could partially build the package.

But I still face the problem of the computer not being able to find gazebo.hh. I've tried copying gazebo.hh into /usr/include/ but it came up with a new error of not being able to find the next header which is gazebo_core.hh. So I copy and pasted it again which brought up another new error of not being able to find the next header the previous one referred to. There's got to be an easier way right?

By the way, my system is downgraded to ubuntu 11.10.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2012-09-10 05:54:58 -0500

hsu gravatar image

updated 2012-09-10 06:00:24 -0500

In ROS, you can give this tutorial a try.

Alternatively, give the following prefix to your cmake command:

PKG_CONFIG_PATH=`rospack find gazebo`/gazebo/lib/pkgconfig cmake ..

and things should build correctly.

edit flag offensive delete link more


Okay thanks. It tried on ubuntu 12.04 and your tutorial works perfectly fine.

ccm gravatar image ccm  ( 2012-09-10 21:57:55 -0500 )edit

Where in CMakelists.txt, I should I add it?

cybodroid gravatar image cybodroid  ( 2015-12-05 19:44:36 -0500 )edit

answered 2012-08-30 23:03:15 -0500

Kai Bublitz gravatar image


when using gazebo with ROS you have to do some different steps when building your plugin.

  1. add the dependency gazebo_plugins to the manifest.xml of your package <depend package="gazebo_plugins"/> (I also added gazebo as dependency, but I think you don't need it to compile the plugin)
  2. use rosmake to build the plugin There should be a tutorial for building packages somewhere on in case you don't know how. In short: add "rosbuild_add_library(libname src/sourcefile.cpp)" to the CMakeList.txt and run rosmake.

I think rosmake uses it's own cmake version or settings that adds the directories of dependent packages to the compiler flags. You could add additional include directories to your cmake file, but that's not the "ros way".

edit flag offensive delete link more

answered 2012-09-09 21:20:00 -0500

Andrei Haidu gravatar image


maybe try setting the gazebo paths in the manifest.xml file like this:

<export> <gazebo gazebo_media_path="${prefix}"/> <gazebo plugin_path="${prefix}/lib"/> </export>

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-08-30 21:43:10 -0500

Seen: 6,136 times

Last updated: Sep 10 '12