金子邦彦研究室インストールWindows の種々のソフトウェア(インストール)Windows で Carla をソースコードからビルドして、インストールする(Build Tools for Visual Studio を利用)

Windows で Carla をソースコードからビルドして、インストールする(Build Tools for Visual Studio を利用)

Carla は,自動運転用のシミュレータ. オープンソースである.

Carla のドキュメント: https://carla.readthedocs.io/en/latest

Carla の Windows 版,Linux 版は, https://github.com/carla-simulator/carla/blob/master/Docs/download.md からダウンロードできる.

このページでは,Carla をソースコードからビルドする.その手順は,次のページによる.

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

前準備

Python のインストール(Windows 上)

サイト内の関連ページ

関連する外部ページ

Python の公式ページ: https://www.python.org/

Git, CMake, 7-Zip のインストール

Windows での Git, cmake, 7-Zip のインストール手順: 別ページ »で説明している.

Build Tools for Visual Studio 2022 (ビルドツール for Visual Studio 2022),Visual Studio 2022 のインストール(Windows 上)

サイト内の関連ページ

関連する外部ページ

Unreal Engine 4 のインストール

Unreal Engine 4 のインストールは,「別資料」で説明している.

Carla のインストール手順

  1. Windowsシステム環境変数 UE4_ROOT の設定

    C:\Program Files\Epic Games\UE_4.24 に設定

    「4.24」のところは,実際のディレクトリに一致させること.

    [image]
  2. Windowsシステム環境変数 TOOLSET の設定

    msvc-16 に設定

  3. Windowsシステム環境変数 LIB の設定

    C:\boost\lib に設定

  4. Carla のソースコードのダウンロード
    mkdir c:\tools
    rmdir /s /q carla
    git clone https://github.com/carla-simulator/carla
    
  5. アセットのダウンロードのために,ファイルIDを確認

    最新版のファイルのファイルIDを確認する.

    cd carla
    cd Util
    type ContentVersions.txt
    

    [image]
  6. アセットのダウンロード

    20210730_564bcdc」のところは,いま確認したファイルのファイルIDに一致させること.

    cd c:/tools
    curl -O  http://carla-assets.s3.amazonaws.com/20210730_564bcdc.tar.gz
  7. ダウンロード終了の確認

    エラーメッセージが出ていないこと.

    [image]
  8. ダウンロードが終わったら,展開(解凍)する

    Windows での展開(解凍)のためのソフトには,「7-Zip」などがある.

    cd c:/tools
    "c:\Program Files\7-Zip\7z.exe" x 20210730_564bcdc.tar.gz
    

    [image]
  9. いま展開(解凍)したアセットは,所定のディレクトリに置く.
    cd c:\tools\carla
    cd 20210730_564bcdc
    cd Unreal\CarlaUE4
    mkdir Content
    cd Content
    mkdir Carla
    "c:\Program Files\7-Zip\7z.exe" x c:\tools\20200422_ea5179a.tar
    
  10. ファイル(4つ)を書き換え

    上の4つのファイルについて, 「-G VisualStudio 15 2017 Win64」を, 「-G VisualStudio 16 2019」に書き換え

  11. make launch の実行
    cd ..
    make launch
    

    [image]

    これは,サーバをビルドし,Unreal Engine を起動する.

  12. PythonAPI のインストール
    make PythonAPI
    cd PythonAPI/examples
    python spawn_npc.py