1. Carla ?
Car Learning to Act 의 줄임말이며, 오픈소스 자율주행 시뮬레이터이다. Unreal Engine4를 사용하고 있으며 C++/Python API를 제공한다.
가상세계에서 LiDAR, Camera, Depth Camera, Segmentation 등 여러가지 센서를 사용하여 데이터를 수집할 수 있고, 건물, 차량, 지도 등을 직접 디자인이 가능하다.
2. Carla 개발 환경
- 하드웨어
① CPU: i5-8세대 이상
② GPU: 메모리 6기가 이상
③ 디스크: 20기가 이상
④ 램: 16기가 이상
- 소프트웨어
① OS: 리눅스, 윈도우
② 파이썬 : 3.7
③ pip: 20.3 이상 버전
3. 패키지 설치
- pip 설치 및 버전 20.3 이상
pip3 -v
pip3 install --upgrade pip
- pygame, numpy 패키지 설치
1. pip 사용 방법
pip3 install --user pygame numpy
2. python 사용 방법
python install pygame
4. Carla 설치
1. Carla 홈페이지 접속

2. Package installation 클릭 후 CARLA repository 방문 또는 아래 링크 접속
https://github.com/carla-simulator/carla/releases/tag/0.9.13/


3. CARLA 0.9.13 해당 OS 맞춰 ZIP 파일 다운로드

4. CarlaUE4.exe 실행


- DirectX Error 뜰 때

↑ 위와 같은 에러 메세지가 뜨면 DirectX가 설치 안 되어 있다는 뜻이기에, 설치를 해주면 된다.
microsoft 사이트에서 다운로드 후 설치하면 된다.
https://www.microsoft.com/ko-kr/download/details.aspx?id=35
- Out of video memory Error 뜰 때

CarlaUE4를 실행 시키면 "Out of video memory trying to allocate a rendering resouce. Make sure your video card has the minimum required memory, try lowering the resolution and/or closing other applications that are running." 에러가 뜬다.
Carla 개발 환경은 그래픽 메모리 6기가 이상으로 내 컴퓨터 같은 경우 8기가로 문제가 없다고 생각했다.
하지만 Carla 실행 시 그래픽 메모리 사용량이 최대로 찍으면서 위 사진과 같은 에러창이 떴다.
구글에 검색을 해보니 나와 같은 문제가 있는 사람들이 몇몇 있는 것 같았다.
현재 DirectX 버전이 12인데, DirectX 버전을 11로 낮춰서 Carla 실행 시 실행된다는 방법을 찾았다.
https://github.com/carla-simulator/carla/issues/4775
Out of video memory trying to allocate a rendering resource (CARLA 0.9.12) · Issue #4775 · carla-simulator/carla
CARLA version: 0.9.12 Platform/OS: Windows 10 GPU: NVIDIA Geforce GTX 1650 (8GB) RAM: 8GB Problem: Running "CarlaUE.exe" gives an error message "Out of video memory trying to allocate rendering res...
github.com
위 링크를 참고하였다.
CarlaUE4.exe 파일 위치가 있는 경로에서 -dx11 옵션으로 터미널에서 실행시키면 된다.
C:\Users\[User이름]\CARLA_0.9.13\WindowsNoEditor\CarlaUE4 -dx11
DirectX 버전이 문제인지 Carla 버전이 문제인지 원인을 알고 싶어서 Carla github repository에서 Discussion에 이슈가 있는지 살펴보았는데 찾지 못하였다.. 나중에 좀 더 문제를 찾아봐야겠다..
참고 사이트
https://carla.readthedocs.io/en/latest/
https://carla.readthedocs.io/en/latest/build_windows/
https://carla.readthedocs.io/en/latest/build_faq/#recommended-hardware-to-run-carla