carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.11k stars 3.58k forks source link

Can not run Carla 0.9.15(precompiled/released) by ./CarlaUE4.sh #8043

Open Noah-Zhiyi-Lin opened 1 month ago

Noah-Zhiyi-Lin commented 1 month ago

Hi everyone! I am a student, and I am trying to use Carla for my research on Autonomous Driving. However, I meet a tough problem, which makes me mad now.

The following is my problem: I have tried to launch Carla by ./CarlaUE4.sh which is mentioned in the official documentation, but it can not run normally and report

Disabling core dumps.
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

../src/intel/isl/isl.c:2105: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available.
X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  149 ()
  Minor opcode of failed request:  4
  Serial number of failed request:  296
  Current serial number in output stream:  306
terminating with uncaught exception of type std::__1::system_error: mutex lock failed: Invalid argument
Signal 6 caught.
Segmentation fault (core dumped)

in my terminal.

Here is the information of my environment: OS: Ubuntu 20.04 LTS CPU: Intel i9-11900 GPU: Nvidia RTX-3070 and the Nvidia driver version is 550.107.02 RAM: 32GB

I have tried my best to solve this problem and referred some issues. In #3490, some answers said that such problem can be solved by ./CarlaUE4.sh -opengl, but Carla uses valkan after 0.9.12, so this method can not work. The other method is using ./CarlaUE4.sh -perfernvidia. I tried this and received the same error mentioned above. In #2232, some other answers suggested to try to use export VK_ICD_FILENAMES="/usr/share/vulkan/icd.d/nvidia_icd.json". I found the nvidia_icd.json in /etc/vulkan/icd.d, so I tried to use export VK_ICD_FILENAMES="/etc/vulkan/icd.d/nvidia_icd.json". However, the program reports that Can not find a compatible Vulkan Driver(ICD).

I am very upset now because I actually have no idea to solve this problem. I would be extremely appreciated if you can give me some advice, regardless of whether it ultimately works or not.

PatrickPromitzer commented 1 month ago

Hi, are you local on the computer or do you use ssh?

You can try

./CarlaUE4.sh -RenderOffScreen

which will deactivate the spectator and GUI. If the "-RenderOffScreen" works, your computer can't open the window Carla wants to to show.

Noah-Zhiyi-Lin commented 1 month ago

Hi, are you local on the computer or do you use ssh?

You can try

./CarlaUE4.sh -RenderOffScreen

which will deactivate the spectator and GUI. If the "-RenderOffScreen" works, your computer can't open the window Carla wants to to show.

Hi, thank you @PatrickPromitzer. I want to use Carla on my local computer, and I have tried your method, ./CarlaUE4.sh -RenderOffScreen. The terminal did not report any error, and no window was opened. So, I think you are right. But do you have any idea that why my computer can not open the window which Carla wants to show?

I thought the problem was caused by the Nvidia driver at first, so I reinstalled the OS and Nvidia driver today. However, this did not work and the terminal reported the same error which was mentioned in the issue.

PatrickPromitzer commented 1 month ago

Hi, are you using the same account you are logged in with? If you use switch account on your machine in the terminal ("su username"), it can't show a window, too.

You can try if other gui software work in your terminal, and look if it is only a carla problem or a Ubuntu terminal problem.

xeyes
Noah-Zhiyi-Lin commented 4 weeks ago

Hi, are you using the same account you are logged in with? If you use switch account on your machine in the terminal ("su username"), it can't show a window, too.

You can try if other gui software work in your terminal, and look if it is only a carla problem or a Ubuntu terminal problem.

xeyes

Hi, thank you for your reply! I indeed used the same account I was logged in with.

I have tried xeyes and it worked (I saw a pair of cute eyes). So, do you think it is only a Carla problem?

PatrickPromitzer commented 3 weeks ago

Hi, could be, or could be something difference. It is hard to tell with the different parts which could create an problem.

I know that Carla works, but it could be a special case which could give Carla an error. For me it looks like some kind of GUI or graphic card problem. Could be permission, driver, software,or something else.

You could try to run Carla with ./CarlaUE4.sh -RenderOffScreen and start an example script from

path/to/Carla/PythonAPI/examples/

Maybe it crashes with an example, too, and showing the GUI was the limit which pushed Carla the crash in the first place.

Noah-Zhiyi-Lin commented 2 weeks ago

Hi, could be, or could be something difference. It is hard to tell with the different parts which could create an problem.

I know that Carla works, but it could be a special case which could give Carla an error. For me it looks like some kind of GUI or graphic card problem. Could be permission, driver, software,or something else.

You could try to run Carla with ./CarlaUE4.sh -RenderOffScreen and start an example script from

path/to/Carla/PythonAPI/examples/

Maybe it crashes with an example, too, and showing the GUI was the limit which pushed Carla the crash in the first place.

Hi! I have tried your method ./CarlaUE4.sh -RenderOffScreen to run the Carla server without rendering and I found something interesting. I ran the automatic_control.py by

python automatic_control.py

and the simulation window could be shown normally.

It seems that the Carla server can not be rendered but the Carla client can be rendered.

PatrickPromitzer commented 2 weeks ago

Hi.

The script you tried is using pygame, which creates the pictures with a camera sensor. At this point we know, the simulation itself works, but the preview window doesn't.

You look try if Carla is using GPU resources.

While the simulation is running, repeat the "nvidia-smi" command. Carla should use GPU resources. You can try the same without "-RenderOffScreen"