0
$\begingroup$

Rosanswers logo

Hi,

what's the correct way for installing Gazebo in a system with ROS2 Crystal?

The following instructions are not working at the moment

$ docker run -it osrf/ros:crystal-desktop bash

$ apt-get update
$ curl -sSL http://get.gazebosim.org | sh
The following packages have unmet dependencies:
libgazebo9-dev : Depends: libavdevice-dev but it is not going to be installed
              Depends: libignition-fuel-tools1-dev but it is not going to be installed
              Depends: libignition-common-dev but it is not going to be installed
              Depends: libgazebo9 (= 9.8.0-1~bionic) but it is not going to be installed
              Depends: gazebo9-plugin-base (= 9.8.0-1~bionic) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Note that I get a very similar error also if I run

$ apt-get install -y ros-crystal-gazebo-ros-pkgs

As a solution, I have explicitly installed some dependencies before calling the gazebo install command

$ apt-get install -y \
   libwayland-egl1 \
   libsdl2-2.0-0 \
   libavdevice57
$ apt-get install -y \
   libgazebo9-dev \
   gazebo9
$ apt-get install -y  ros-crystal-gazebo-ros-pkgs

This works, but as a result I can't run rviz2 anymore.


Originally posted by alsora on ROS Answers with karma: 1322 on 2019-03-29

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Using the following commands I am able to install and run both:

docker pull osrf/ros:crystal-desktop
docker run -it   -e DISPLAY   -e QT_X11_NO_MITSHM=1   -e XAUTHORITY=$XAUTH   -v "$XAUTH:$XAUTH"   -v "/tmp/.X11-unix:/tmp/.X11-unix"   -v "/etc/localtime:/etc/localtime:ro"  osrf/ros:crystal-desktop
apt -qq update
apt -qq upgrade -y
apt install -y ros-crystal-gazebo-ros-pkgs
rviz2
gazebo

I'm not familiar with the content of the get.gazebosim.org script but it may be trying to pull a newer version of gazebo (from http://packages.osrfoundation.org) than the ubuntu version (9.0.0).

HTH,


Originally posted by marguedas with karma: 3606 on 2019-03-29

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by alsora on 2019-03-29:
This works and it's better than my command. Actually I think that my problem was also due to the use of a not up-to-date base image

Comment by tfoote on 2019-03-29:
BTW @marguedas you might find rocker useful if you're running gui's inside docker https://github.com/osrf/rocker it's available from the ROS repos as python3-rocker or via PIP.

Comment by gvdhoorn on 2019-03-30:
If you don't need all of the isolation of Docker (but are using it more as part of a deployment system), you could also take a look at Singularity. Wrappers like rocker aren't really needed with it.

Comment by marguedas on 2019-03-30:
Wow that's really cool I didnt know about rocker! Thanks guys for sharing!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.