0
点赞
收藏
分享

微信扫一扫

Ubuntu 安装 Carla仿真环境

天使魔鬼 03-26 18:00 阅读 2

1、系统要求

Ubuntu 16.04/18.04/20.04 CARLA 为 16.04 之前的 Ubuntu 版本提供支持。然而,Unreal Engine需要合适的编译器才能正常工作。 CARLA 服务器至少需要 6 GB GPU,但建议使用 8 GB。

2、安装NIVDIA驱动

  1. BISO设置

      开机F12,进入BIOS。

      设置安全启动为关闭 disable模式

  2. 英伟达官网下载驱动

       英文地址:Official Advanced Driver Search | NVIDIA

       中文地址:官方驱动 | NVIDIA

  3. 更新软件列表和安装必要软件、依赖

 
sudo apt-get update
sudo apt-get install g++ 
sudo apt-get install gcc 
sudo apt-get install make
  1. 禁用默认驱动

    在终端输入命令打开blacklist.conf文件。 
    sudo vim /etc/modprobe.d/blacklist.conf 
    在打开的文件末尾输入并保存: 
    blacklist nouveau 
    options nouveau modeset=0 
    最后更新一下系统的initramfs镜像文件,在终端中输入: 
    sudo update-initramfs -u 
    完成以上步骤后,重启电脑。
    然后在终端中输入: 
    lsmod | grep nouveau 
    如果没有输出的话就说明禁用了nouveau。

  2. 禁用X-window服务

    sudo service gdm3 stop
  3. 安装驱动

    sudo chmod 777 NVIDIA-Linux-x86_64-525.53.run #给下载的驱动赋予可执行权限 
    sudo ./NVIDIA-Linux-x86_64-525.53.run –no-opengl-files -no-x-check #安装 
    会出现的选项: 
    Install Nvidia's 32-bit compatibility libraries? 
    选择 "No" 
    
    Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that the NVIDIA X driver dill be used dhen you restart X? Any pre-existing X configuration file will be backed up. 
    
    选择 "Yes"

  4. 启用X-window服务

    sudo service gdm3 start

  5. 检查安装

    nvidia-smi

  1. 遇到的问题

假如在安装完成carla后,启动carla 显卡不工作,建议安装系统推荐的驱动,安装及设置驱动步骤如下。

#检测可用驱动,查看推荐驱动 ubuntu-drivers devices
 

#安装推荐驱动 sudo apt install nvidia-driver-535

  • Ubuntu界面 打开 Software & Updates,选择 Additional Drivers:

  • 选择一个和电脑显卡匹配的驱动

  • Apply Changes

  • Reboot

  • nvidia-smi

3、安装Carla

参考官方安装文件,以下内容为整理。 https://carla.readthedocs.io/en/latest/start_quickstart/

  1. 安装验证环境依赖

 
#更新 

pip3 install --upgrade pip 

# Python 依赖项 

pip3 install --user pygame numpy 
#在系统中设置 Debian 仓库: 

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1AF1527DE64CB8D9 
sudo add-apt-repository "deb [arch=amd64] http://dist.carla.org/carla $(lsb_release -sc) main"
  1. 安装方式二选一

  • 命令行安装

# Update the Debian package index 
sudo apt-get update 
#列出版本 
apt-cache madison carla-simulator 
#安装 
sudo apt-get install carla-simulator
  • 安装包安装

下载地址: https://github.com/carla-simulator/carla/releases/tag/0.9.14/

  1. 运行carla

解压下载的安装包,进入安装或解压目录 ./CarlaUE4.sh 运行若提示缺库, 安装即可。

  1. 安装客户端库

运行carla demo测试需要安装客户端库及依赖,参考官方文档安装

cd /安装路径/PythonAPI/carla/dist/ 
pip3 install carla-0.9.14-cp38-cp38-manylinux1_x86_64.whl #<wheel-file-name>.whl 不同carla版本 文件名称不同

参考文档

https://blog.csdn.net/huiyoooo/article/details/128015155 https://carla.readthedocs.io/en/latest/start_quickstart/

举报

相关推荐

0 条评论