CARLA

CARLA 설치[Ubuntu 20.04]

JEO96 2022. 6. 28. 14:10
반응형

 

 

1. CARLA란

CARLA는 오픈소스 자율주행 시뮬레이터이다. Unreal Engine 4를 사용하고 있으며 Python API를 제공하고 있고 가상세계에서 LiDAR, Camera, Depth Camera, Segmentation 등 여러가지 센서를 사용하여 데이터를 수집할 수 있다.

 

2. 설치

이 사이트를 들어가면 설치방법이 나오나 Ubuntu 20.04에서만 발생하는 문제가 있어 기록하고자 한다.

https://carla.readthedocs.io/en/latest/build_linux/

 

Linux build - CARLA Simulator

Linux build This guide details how to build CARLA from source on Linux. There are two parts. Part one details system requirements and installations of required software, and part two details how to actually build and run CARLA. The build process is long (4

carla.readthedocs.io

2.1 설치 요구사항

운영체제는 Ubuntu 18.04 or Ubuntu 16.04로 표기되어 있지만 20.04도 설치 가능하다.

130 GB의 저장공간이 필요하고 GPU는 최소 6GB 권장 8GB이다.

2.2 소프트웨어 요구사항

아래 사진에서 표시한 부분은 복붙을 한다.

Ubuntu 18.04에 한줄로 길게 쓰인 부분을 복붙하면 clang-8을 설치하는데 약간의 어려움이 있다.

sudo add-apt-repository -r "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main"

위의 명령어를 터미널에서 실행한후 sudo apt-get install clang-8을 실행하면 설치가 잘 된다. (여기가 Ubuntu 20.04에서 발생하는 문제다.)

아래 보이는 명령어들 차례대로 실행한다.

CARLA는 Unral Engine을 CARLA버전으로 설치해야 한다. CARLA 버전 Unreal을 처음 설치한다면 아래 이미지에 this guide를 클릭하여 설명하는데로 따라서 github 계정을 Unreal Engine에 접근 허가를 받아야 한다.

아래 이미지의 git clone 명령어를 실행하면 github의 username을 입력하고 password를 입력하라고 하는데 password는 token을  여기 github의 문서를 따라서 만들면 된다.

https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token#creating-a-token

 

Creating a personal access token - GitHub Docs

Notes: If you use GitHub CLI to authenticate to GitHub on the command line, you can skip generating a personal access token and authenticate via the web browser instead. For more information about authenticating with GitHub CLI, see gh auth login. Git Cred

docs.github.com

3. Build CARLA

지금까지 CARLA를 설치하기 위한 Unreal을 설치하였다. 이제 CARLA를 설치해보자

우선 아래 명령어로 aria2를 설치

git clone으로 carla 저장소 다운로드

git clone https://github.com/carla-simulator/carla

carla 디렉터리로 이동

cd carla

CARLA Content 파일 다운로드

./Update.sh

~/.bashrc 파일 수정

gedit ~/.bashrc

맨 밑줄에 아래 글씨 추가

export UE4_ROOT=~/UnrealEngine_4.26

터미널에 make PythonAPI 입력

 

make PythonAPI

터미널에 make launch 입력

make launch

설치가 완료되면 Unreal Engine이 실행된다.

반응형

'CARLA' 카테고리의 다른 글

CARLA 설치 0.9.13 [Windows 10]  (59) 2022.07.27