본문 바로가기
Autonomous Vehicle/ROS programming

[ROS 시뮬레이터] Autonomous Car Simulator : Carla 환경 구성 및 설치 / 기본 예제 살펴보기 (trouble shooting failed)

by kim.jeff 2020. 8. 15.

  자율주행자동차를 실험하기 위해서 기존의 많은 연구실들은 차량을 개조하여 자율주행 기능을 직접 구현하고 실험에 참여하였습니다. 하지만 여러 시뮬레이터가 나오면서 점차 실험에 쓰일 차량을 준비하거나 시간적인 여유를 줄일 수 있게 되었습니다. 오늘 소개드릴 내용은 Carla라고 하는 자율주행 자동차 실험 시뮬레이터입니다. 본 시뮬레이터는 게임에서 사용되고 있는 물리 엔진을 사용합니다. 물리엔진이라고 하면, 실제 상황에서의 물리 법칙을 가상환경에서 비슷하게 구현해놓은 엔진을 말합니다. 비슷하게 구현하여야 실제 환경에서도 같은 알고리즘으로 동작할 수 있겠죠. ROS를 지원하는 시뮬레이터가 많이 있지만, 오픈소스로 열려있는 Carla가 다른 시뮬레이터 대비 가볍다ㅏ고 합니다. 이번 포스팅에서는 Ubuntu 18.04 의 환경에서 Carla를 실행하는 포스팅을 진행해 보겠습니다. 

실행 환경 specification

OS : Ubuntu 18.04

CPU : Intel i7 8750H

GPU : Nvidia GTX 1060  6GB VRAM

RAM : 16GB

 

 

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

 

carla-simulator/carla

Open-source simulator for autonomous driving research. - carla-simulator/carla

github.com

 

 

https://docs.unrealengine.com/en-US/Platforms/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html

 

Linux Quick Start

Learn how to download, build, and run UE4 on Linux.

docs.unrealengine.com

 

<설치 과정 요약>

1. Epic Games 계정 개설

2. Github 계정 개설

3. 두개의 계정 Link하기

4. 우분투 환경에서 Git 설치

5. Git setting 하기

6. Github에서 Unreal4 엔진 다운로드 받기 (꼭 4.24 ver 이어야 한다)

7. 터미널에서 설치하기 (오래걸림)

< Makefile:252: recipe for target 'CrashReportClient-Linux-Shipping' failed >설치 오류 팁

https://github.com/Microsoft/AirSim/issues/750

 

Makefile:252: recipe for target 'CrashReportClient-Linux-Shipping' failed · Issue #750 · microsoft/AirSim

Getting this error while executing "make" command. OS - Ubuntu 17.10 Running Unreal 4.17

github.com

 

$ sudo chown -R jeff: /home/jeff/UnrealEngine/
$ su jeff
$ make
It's work for meubuntu18.04 && UE4.24
Jeff는 사용자 이름

 

컴파일 실행중인화면 / 언리얼 프로젝트 브라우져 화면

8. CARLA 설치

# Download and install the UE patch  
& cd ~/UnrealEngine_4.24
& wget https://carla-releases.s3.eu-west-3.amazonaws.com/Linux/UE_Patch/430667-13636743-patch.txt ~/430667-13636743-patch.txt
& patch --strip=4 < 430667-13636743-patch.txt
# Build UE
& ./Setup.sh && ./GenerateProjectFiles.sh && make

9. ROS/ Autoware 통합환경

https://drive.google.com/file/d/1uO6nBaFirrllb08OeqGAMVLApQ6EbgAt/view

 

Integration of Autoware and ROS.pptx

 

drive.google.com

https://www.youtube.com/watch?v=ChIgcC2scwU&feature=youtu.be

9-1 Carla 설치

9-2 Carla ros bridge 설치

9-3 Point cloud maps for CARLA Towns 설치

9-4 Autoware 설치

https://github.com/carla-simulator/carla-autoware

 

carla-simulator/carla-autoware

Integration of AutoWare AV software with the CARLA simulator - carla-simulator/carla-autoware

github.com

https://github.com/NVIDIA/nvidia-docker

 

NVIDIA/nvidia-docker

Build and run Docker containers leveraging NVIDIA GPUs - NVIDIA/nvidia-docker

github.com

<참고 : 오토웨어가 하나의 dock임. 독 사용 위해서 독커 설치해야함>

It looks like you're missing rhel-push-plugin.socket unit which is presumably part of a rhel-push-plugin package. You can try fixing that install, or you can install the upstream docker package directly from docker with the following as root:curl -sSL https://get.docker.com/ | sh

root # curl -sSL https://get.docker.com/ | sh

에러발생. 본 내용을 지워주어야 빌드가 완료됨

9-5 Carla server 실행

https://biotech-lab.tistory.com/entry/09-%EB%8F%84%EC%BB%A4docker-run-%EC%97%90%EB%9F%AC%EC%B2%98%EB%A6%AC

 

[09] - 도커(docker) run 과정시 발생하는 Unknown runtime specified nvidia 에러

[주의 사항] 1. 위 포스팅은 타 블로그의 글을 가져와 재가공한 것임을 밝힙니다. 2. 위 포스팅은 개인적인 연구의 빠른 참조를 위한 것이고, 그 외의 목적은 없음을 밝힙니다. 1. 도커(docker) run nvi

biotech-lab.tistory.com

https://nodoudt.tistory.com/50

 

[Linux] nvidia-docker 2 설치하기

1. 준비 사항 GNU/Linux x86_64 with kernel version > 3.10 Docker >= 1.12 NVIDIA GPU with Architecture > Fermi (2.1) NVIDIA drivers ~= 361.93 (untested on older versions) 드라이버 버전에 따라 사용할..

nodoudt.tistory.com

알수없는 이유로 여기서 설치를 진행 할 수 없었다. 다음에 다시 시도해보도록 하겠다. 아쉽군.

 

9-6 Carla autoware bridge 실행

9-7 Agent 실행

9-8 내 차량 설치 (Ego Vehicle Setup)

9-9 센서 설치

9-10 Data publishing Convertion between Carla and ROS data types.

 

 

 

https://pythonprogramming.net/introduction-self-driving-autonomous-cars-carla-python/

 

Python Programming Tutorials

Introduction - Self-driving cars with Carla and Python part 1 Hello and welcome to a tutorial series covering Carla, which is an open-source autonomous driving environment that also comes with a Python API to interact with it. The main idea of Carla is to

pythonprogramming.net