Home | Tutorials | Wiki | Issues
Ask Your Question
1

How to install ros-indigo-gazebo-ros-control with Gazebo 5

asked 2015-04-25 22:37:47 -0500

Cerin gravatar image

updated 2015-04-25 22:51:18 -0500

I'm trying to follow this tutorial to build a myrobot_gazebo package for Indigo with Gazebo 5.

I create my package with:

catkin_create_pkg myrobot_gazebo gazebo_msgs gazebo_plugins gazebo_ros gazebo_ros_control myrobot_description

then, when I try to update my dependencies with:

rosdep update
rosdep install --from-paths . --ignore-src --rosdistro indigo

I get the error:

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-indigo-gazebo-ros-control : Depends: gazebo2 but it is not going to be installed
                                 Depends: libsdformat1 but it is not going to be installed
                                 Depends: ros-indigo-gazebo-ros but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ERROR: the following rosdeps failed to install
  apt: command [sudo -H apt-get install ros-indigo-gazebo-ros-control] failed

I also tried building my package with the explicit gazebo5 dependencies with:

catkin_create_pkg cheetahbot_gazebo gazebo5_msgs gazebo5_plugins gazebo5_ros gazebo5_ros_control cheetahbot_description

but that results in a similar error, with rosdep being unable to locate "gazebo5roscontrol".

I'm assuming this is because I'm using Indigo, which is built for the old Gazebo 2, while I'm using Gazebo 5. How do I fix this?

I saw this page in the Gazebo tutorials that make a brief mention to this problem:

I need to use gazebo4/gazebo5 and ROS Indigo, what can I do?

Warning!: Using this option, you won't be able to use any ROS Indigo package related to Gazebo from ROS deb repository. The way to go is to build them from source. Thanks to catkin workspaces this is quite easy to do.

If you need some features only present in version 4.x or 5.x of Gazebo, there is a way of installing gazebo4 or gazebo5 and ROS Indigo. Please follow the instructions about how to use ROS with gazebo4 package or gazebo5 which are in this same docuement.

However, I can't find any clear instructions about how to use ROS with gazebo5 in that document. They mention installing the ros-indigo-gazebo5-ros-pkgs package, but I already have that installed.

A similar question, "how to use Gazebo 3.* with Indigo is mentioned, and it links to here, but that's just a landing page and there are no instructions on how to make it work with Indigo.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted
1

answered 2015-04-28 22:28:21 -0500

winston gravatar image

I have already installed gazebo5 and ROS indigo and works well. Here is what I have done: 1. If you want to use gazebo5 instead, you should first remove gazebo2.0 in indigo. 2. Install gazebo5 from the official website. 3. install ros-indigo-gazebo5-ros-pkgs and ros-indigo-gazebo5-ros-control

sudo apt-get install ros-indigo-gazebo5-ros-pkgs ros-indigo-gazebo5-ros-control

therefore gazebo5 can connect to ROS.

Hope it helps.

edit flag offensive delete link more

Comments

Hi, thank you for your comment. However, I am unable to solve the dependences for ros-indigo-gazebo5-ros-pkgs and ros-indigo-gazebo5-ros-control. Here is my output. E: Unable to locate package ros-indigo-gazebo5-ros-pkgs E: Unable to locate package ros-indigo-gazebo5-ros-controlsudo E: Unable to locate package apt-get E: Unable to locate package install E: Unable to locate package ros-indigo-gazebo5-ros-pkgs E: Unable to locate package ros-indigo-gazebo5-ros-control. Any suggestions?

Filippo Sanfilippo gravatar imageFilippo Sanfilippo ( 2016-05-06 09:42:33 -0500 )edit
2

answered 2015-04-27 17:51:36 -0500

Jose Luis Rivero gravatar image

updated 2015-04-27 17:55:41 -0500

For getting the ROS Wrappers on gazebo5, it is highly recommended to use the ros-indigo-gazebo5-ros-pkgs, as Steve proposes.

If you still have a goo reason for trying to make rosdep work on this situation, you will need to override the default conversion of gazebo rosdep key. It is resolving to gazebo2 by default, and you will need it to resolve to libgazebo5-dev.

You can use our 00-gazeob5.list rosdep file to make it work:

$ sudo wget https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gazebo5/00-gazebo5.list -O /etc/ros/rosdep/sources.list.d/00-gazebo5.list
$ rosdep update
# checking
$ rosdep resolve gazebo

That should make rosdep to resolve gazebo to gazebo5 instead of gazebo2. I have never found the use case of converting also sdformat, but you could need to add an entry to the gazebo.yaml file.

Please use with caution :)

edit flag offensive delete link more

Comments

+1, but when it comes to ROS Jade, I'm having [another issue](http://answers.ros.org/question/208334/gazebo-version-collides-bw-indigo-and-jade/).

IsaacS gravatar imageIsaacS ( 2015-05-01 21:39:40 -0500 )edit

I just installed gazebo7 with ros and used this methode and it is working. hurray, uhooo, thank u mr. Jose, for ur answer.

hari1234 gravatar imagehari1234 ( 2016-08-31 23:45:00 -0500 )edit
1

answered 2015-04-27 00:52:10 -0500

scpeters gravatar image

I don't think using gazebo5 with ros indigo will work with rosdep. You should be able to install the debian ros-indigo-gazebo5-ros-pkgs directly.

edit flag offensive delete link more

Comments

1

The official Gazebo version for Indigo is 2.x (source). If you want to give Gazebo 5 a try, expect some migration effort (building from source, patching) of gazebo_ros_control, if the parts of the Gazebo API it uses have changed.

Adolfo Rodríguez T gravatar imageAdolfo Rodríguez T ( 2015-04-27 02:47:37 -0500 )edit

100% agree with Adolfo, go with ROS + Gazebo5 should only happen when you have a good reason to do it.

Jose Luis Rivero gravatar imageJose Luis Rivero ( 2015-04-27 17:53:18 -0500 )edit
1

I went with Gazebo5 because Gazebo2 is very dated and missing a lot of features. Plus a lot of the new Gazebo tutorials are written for Gazebo5.

Cerin gravatar imageCerin ( 2015-04-29 19:37:48 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2015-04-25 22:37:47 -0500

Seen: 6,918 times

Last updated: Apr 28 '15