ADVRHumanoids/xbot2_examples

Problem with the docker during the gazebo launching

Opened this issue · 9 comments

​​​​​​​Hi @alaurenzi ,

I've a problem with the docker when I launch gazebo for this reason:

image

Hi @DavideAntonucci, can you list the exact steps leading to the error?

Hi @alaurenzi ,

  1. I've installed the docker and followed the Post-installation steps for Linux, ONLY this one: Manage Docker as a non-root user.
  2. ./docker/run.sh runs the container.
  3. I tried to launch gazebo as you can see in the first comment. I did this because, ./start.sh (starts roscore and but NOT gazebo).

Unfortunately it looks like an incompatibilty issue with your video drivers.. I cannot reproduce the issue on either of my machines. Did you try

  • to mount your nvidia drivers onto the guest machine as described here (requires editing run.sh and exporting some env variables)
  • to install the nvidia drivers directly on the guest machine as reported here?

Alternatively, you should be able to run just the gazebo backend (replace gazebo with gzserver in the start.sh script). A web frontend server is run by the start.sh script, and should be accessible at localhost:8080 on the host machine.

Unfortunately, for this point:

Alternatively, you should be able to run just the gazebo backend (replace gazebo with gzserver in the start.sh script). A web frontend server is run by the start.sh script, and should be accessible at localhost:8080 on the host machine.

I cannot run gzserver for this reason:
libGL error: failed to load driver: swrast.

Moreover, I cannot reach the localhost:8080, it seems that the docker doesn't have internet connection, How I can resolve it?

Without gzserver, the gzweb probably won't open the connection, probably that's why you can't see anything in the browser.

Same identical problem here, with same steps followed.

  • to mount your nvidia drivers onto the guest machine as described here (requires editing run.sh and exporting some env variables)

With this, nothing change for me

I tried to enter docker as root (adding --user root \ in the run.sh) and installing drivers as described above (apt update && apt install -y nvidia-340 mesa-utils && glxgears).
The problem is not present anymore, but I have this one:

root@72e5d933423d:/home/user# gazebo
No protocol specified
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
No protocol specified
No protocol specified

Maybe related: jessfraz/dockerfiles#6

I tried xhost local:docker and its variants, before running the docker image and after, nothing.

... I have this one:

root@72e5d933423d:/home/user# gazebo
No protocol specified
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
AL lib: (EE) ALCplaybackAlsa_open: Could not open playback device 'default': No such file or directory
No protocol specified
No protocol specified

I am almost sure that I does not have change anything, but this error does not happen anymore.
Instead, a new one is there:

user@3a659e4ca877:~$ gazebo
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  19
  Current serial number in output stream:  20