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

Rviz2 and Gazebo dependencies conflict

asked 2019-03-29 10:34:58 -0500

alsora gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-03-29 11:17:19 -0500

marguedas gravatar image

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,

edit flag offensive delete link more

Comments

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

alsora gravatar image alsora  ( 2019-03-29 11:25:10 -0500 )edit

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.

tfoote gravatar image tfoote  ( 2019-03-29 14:12:59 -0500 )edit

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.

gvdhoorn gravatar image gvdhoorn  ( 2019-03-30 02:48:35 -0500 )edit

Wow that's really cool I didnt know about rocker! Thanks guys for sharing!

marguedas gravatar image marguedas  ( 2019-03-30 06:31:26 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2019-03-29 10:34:58 -0500

Seen: 781 times

Last updated: Mar 29 '19