Home | Tutorials | Wiki | Issues
Ask Your Question
0

Adding a GPS sensor in Gazebo 9

asked 2018-05-18 10:12:55 -0500

cmfuhrman gravatar image

I want to add a GPS sensor to my robot model within Gazebo. I saw to use the ROS hector_gazebo_plugins but I cannot seem to get that to work with Gazebo 9. When I try to install I get this message that I assume means that no hector plug-ins are available for use with Gazebo 9:

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

    The following packages have unmet dependencies:
     ros-kinetic-hector-gazebo-plugins : Depends: libgazebo7 but it is not going to be installed
                                         Depends: libsdformat4 but it is not going to be installed
                                         Depends: gazebo7
                                         Depends: ros-kinetic-gazebo-ros but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

Is there a way to add a GPS sensor using Gazebo 9.0?? I am using Gazebo 9 because I am running Ubuntu on VMware from my Macbook.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-05-21 04:58:46 -0500

Raskkii gravatar image

Kinetic's default Gazebo version is Gazebo 7, so if you try you try to install the hector plugins from the command line it expects you to have Gazebo 7.

What you need to do instead is build the plugins from source. To do that, you download the files from here: https://github.com/tu-darmstadt-ros-pkg/hector_gazebo/tree/kinetic-devel/hector_gazebo_plugins

Add it to your catkin_ws/src directory and run catkin_make. (create a catkin workspace if you haven't already done so).

Most likely you'll get loads of errors due to deprecated functions. (since the hector kinetic plugins were made for Gazebo 7 and you're running Gazebo 9). Since you'll be only using the gps plugin you can go ahead and remove all the other plugins from CMakeLists.txt (so that only the gps plugin is built by catkin).

To help you with the deprecated functions take a look at this page: https://bitbucket.org/osrf/gazebo/src/default/Migration.md?fileviewer=file-view-default

edit flag offensive delete link more

Comments

Thank you!

cmfuhrman gravatar imagecmfuhrman ( 2018-05-21 16:58:06 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-05-18 10:12:55 -0500

Seen: 1,534 times

Last updated: May 21 '18