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

gazebo.hh not found

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

ccm gravatar image

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

Hi, I'm currently trying to do this tutorial http://gazebosim.org/wiki/tutorials/plugins/simple_world

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

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

I did a locate and found gazebo.hh in

/opt/ros/fuerte/stacks/simulator_gazebo/gazebo/gazebo/include/gazebo-1.0.2/gazebo/gazebo.hh

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
1

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

hsu gravatar image

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

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

Comments

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

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

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

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

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

Kai Bublitz gravatar image

Hi,

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 ros.org 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
0

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

Andrei Haidu gravatar image

Hi,

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

Question Tools

Stats

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

Seen: 8,371 times

Last updated: Sep 10 '12