ubuntu18.04安装CARLA+CARLA-ROS-BRIDGE

一,安装carla(快速安装版本,源码安装实在是。。。电脑带不动)
(1)按照最新的版本的linux build来下载更新依赖,主要是python等一些依赖。建议安装0.9.10-1版本。carla和carla-ros-bridge都安装这个版本。(还是python版本的那些事)

https://carla.readthedocs.io/en/0.9.13/build_linux/
https://blog.csdn.net/qq_45281711/article/details/116608261

sudo apt-get update &&
sudo apt-get install wget software-properties-common &&
sudo add-apt-repository ppa:ubuntu-toolchain-r/test &&
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - &&
sudo apt-add-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" &&
sudo apt-get update
sudo apt-get install build-essential clang-8 lld-8 g++-7 cmake ninja-build libvulkan1 python python-pip python-dev python3-dev python3-pip libpng-dev libtiff5-dev libjpeg-dev tzdata sed curl unzip autoconf libtool rsync libxml2-dev git
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/lib/llvm-8/bin/clang++ 180 &&
sudo update-alternatives --install /usr/bin/clang clang /usr/lib/llvm-8/bin/clang 180
# For Python 3
pip3 install --upgrade pip

# For Python 2
pip install --upgrade pip
pip install --user setuptools &&
pip3 install --user -Iv setuptools==47.3.1 &&
pip install --user distro &&
pip3 install --user distro &&
pip install --user wheel &&
pip3 install --user wheel auditwheel

安装时若出现 launchpadlib 1.10.6 requires testresources, which is not installed.

手动安装:python3.6 -m pip install launchpadlib

(2)安装carla
回到0.9.10-1版本的carla安装:

https://carla.readthedocs.io/en/0.9.10/start_quickstart/

先安装pygame和numpy:

pip install --user pygame numpy
pip3 install --user pygame numpy(把python3的也安装了)
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"
sudo apt-get update # Update the Debian package index
注意:安装0.9.10-1版本
sudo apt-get install carla-simulator=0.9.10-1 # In this case, "0.9.10" refers to a CARLA version, and "1" to the Debian revision
安装位置:
cd /opt/carla-simulator # Open the folder where CARLA is installed

Import additional assets

cd /opt/carla-simulator
 ./ImportAssets.sh
 运行carla:
 ./CarlaUE4.sh

(3)安装carla-ros-bridge前,先安装ros-melodic

https://blog.csdn.net/qq_44830040/article/details/106049992?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1.pc_relevant_default&utm_relevant_index=2

(4)安装carla-ros-bridge
注意:还是版本的问题0.9.10-1

https://carla.readthedocs.io/en/0.9.10/ros_installation/

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"
sudo apt-get update # Update the Debian package index
sudo apt-get install carla-ros-bridge=0.9.10-1 # In this case, "0.9.10" refers to the ROS bridge version, and "1" to the Debian revision  

注:源文件下载的方式一直编译出错,还没解决!!!!

gedit ~/.bashrc 
文末添加:source /opt/carla-ros-bridge/melodic/setup.bash

用ros-bridge运行:

# Option 1: start the ros bridge
roslaunch carla_ros_bridge carla_ros_bridge.launch

# Option 2: start the ros bridge together with RVIZ
roslaunch carla_ros_bridge carla_ros_bridge_with_rviz.launch

# Option 3: start the ros bridge together with an example ego vehicle
roslaunch carla_ros_bridge carla_ros_bridge_with_example_ego_vehicle.launch

接下来进入飞哥的知乎学习吧:

https://www.zhihu.com/people/xie-xiao-fei-78-24/posts

  • 1
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
Ubuntu 18.04上安装UHD GNU Radio,您可以按照以下步骤进行操作: 1. 更新软件包列表和系统软件: - sudo apt update - sudo apt upgrade 2. 安装必要的依赖包: - sudo apt install build-essential cmake libboost-all-dev libgmp-dev swig python3-numpy python3-mako python3-sphinx python3-lxml doxygen libfftw3-dev libcomedi-dev libsdl1.2-dev python3-gi-cairo python3-pygccxml python3-pygraphviz python3-qt4 python3-qwt5-qt4 libqt4-opengl-dev python3-click python3-click-plugins python3-zmq python3-scipy python3-gi python3-gi-cairo gir1.2-gtk-3.0 3. 下载UHD源文件并进行编译安装: - 选择一个合适的文件目录,并进入该目录。 - 使用如下命令下载UHD源文件: - git clone --recursive https://gitee.com/chen_nanda/gnuradio.git - 切换到所需的版本: - cd gnuradio - sudo git checkout v3.7.13.4 - sudo git submodule update --init --recursive 4. 编译和安装UHD GNU Radio: - 创建build目录并进入该目录: - sudo mkdir build - cd build - 运行cmake进行配置: - sudo cmake ../ - 运行make进行编译: - sudo make - 运行make test进行测试(可选): - sudo make test - 运行make install进行安装: - sudo make install - 更新动态链接库: - sudo ldconfig 5. 查看GNU Radio版本信息: - gnuradio_config-info --version 6. 启动GNU Radio的GUI: - gnuradio-companion 7. 对USRP进行相关初始设置: - 根据您的具体需求和硬件配置,进行USRP的相关初始化设置。 以上是在Ubuntu 18.04上安装UHD GNU Radio的步骤。请根据您的需求和具体环境进行操作。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值