Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carla-client error while trying to connect to server running in local docker container #4188

Closed
dbersan opened this issue May 10, 2021 · 2 comments

Comments

@dbersan
Copy link

dbersan commented May 10, 2021

Doing:

sudo nvidia-docker run -it --rm carlasim/carla:0.9.10 /bin/bash

and then:

SDL_VIDEODRIVER=offscreen ./CarlaUE4.sh -carla-world-port=2000 -opengl

I get these results:

4.24.3-0+++UE4+Release-4.24 518 0
Disabling core dumps.
sh: 1: xdg-user-dir: not found
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_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:4528:(_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:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_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:4528:(_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:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default

Do these errors mean anything? The process is still running. When checking nvidia-smi it appears carla is using the graphics card:

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A    195271      G   /usr/lib/xorg/Xorg                217MiB |
|    0   N/A  N/A    195623      G   /usr/bin/gnome-shell               51MiB |
|    0   N/A  N/A    196004      G   ...AAAAAAAAA= --shared-files       85MiB |
|    0   N/A  N/A    197882      G   ...AAAAAAAAA= --shared-files       48MiB |
|    0   N/A  N/A    215670    C+G   ...x/CarlaUE4-Linux-Shipping      993MiB |
+-----------------------------------------------------------------------------+

However, I am unable to connect to the carla-server using a local client:

Traceback (most recent call last):
File "set_environment.py", line 100, in main
world = client.load_world(args.town)
RuntimeError: time-out of 5000ms while waiting for the simulator, make sure the simulator is ready and connected to 127.0.0.1:2000

The container doesn't use any TCP ports also:

> sudo docker ps

CONTAINER ID   IMAGE                   COMMAND       CREATED         STATUS         PORTS     NAMES
a20a562d3171   carlasim/carla:0.9.10   "/bin/bash"   2 minutes ago   Up 2 minutes             distracted_hoover

Originally posted by @dhiegomaga in #3431 (comment)

@dbersan
Copy link
Author

dbersan commented May 10, 2021

I found the problem. It was discussed here.

When running the docker, the port should be specified:

sudo nvidia-docker run -p 2000-2002:2000-2002 -it --rm  carlasim/carla:0.9.10 /bin/bash

Then carla can be started headless on the docker, and accessible on port 2000:

SDL_VIDEODRIVER=offscreen ./CarlaUE4.sh -opengl

@corkyw10
Copy link
Contributor

@dhiegomaga, glad you got it working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants