当前位置: 首页 > news >正文

Autoware Universe 安装记录

前提: ubuntu20.04,英伟达显卡。

ROS2-Galactic安装

wget http://fishros.com/install -O fishros && . fishros
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
选择galactic(ROS2)版本,桌面版

ROS2-dev-tools安装

sudo apt install python3-testresources

sudo apt update && sudo apt install -y
build-essential
cmake
git
python3-colcon-common-extensions
python3-flake8
python3-pip
python3-pytest-cov
python3-rosdep
python3-setuptools
python3-vcstool
wget

python3 -m pip install -U
flake8-blind-except
flake8-builtins
flake8-class-newline
flake8-comprehensions
flake8-deprecated
flake8-docstrings
flake8-import-order
flake8-quotes
pytest-repeat
pytest-rerunfailures
pytest
setuptools

rmw-implementation安装

sudo apt-get -y update
sudo apt-get -y install git
mkdir autoware_universe
cd autoware_universe/
git clone https://github.com/autowarefoundation/autoware.git -b galactic
./setup-dev-env.sh

cd autoware_universe/
source amd64.env
#For details: https://docs.ros.org/en/galactic/How-To-Guides/Working-with-multiple-RMW-implementations.html
sudo apt update
rmw_implementation_dashed= ( e v a l s e d − e " s / / − / g " < < < " (eval sed -e "s/_/-/g" <<< " (evalsede"s///g"<<<"{rmw_implementation}")
sudo apt install ros- r o s d i s t r o − {rosdistro}- rosdistro{rmw_implementation_dashed}

#(Optional) You set the default RMW implementation in the ~/.bashrc file.
echo ‘’ >> ~/.bashrc && echo “export RMW_IMPLEMENTATION=${rmw_implementation}” >> ~/.bashrc

pacmod安装

#wget -O /tmp/amd64.env https://raw.githubusercontent.com/autowarefoundation/autoware/galactic/amd64.env && source /tmp/amd64.env
cd autoware_universe/
source amd64.env

#Taken from https://github.com/astuff/pacmod3#installation
sudo apt install apt-transport-https
sudo sh -c 'echo "deb [trusted=yes] https://s3.amazonaws.com/autonomoustuff-repo/ ( l s b r e l e a s e − s c ) m a i n " > / e t c / a p t / s o u r c e s . l i s t . d / a u t o n o m o u s t u f f − p u b l i c . l i s t ′ s u d o a p t u p d a t e s u d o a p t i n s t a l l r o s − (lsb_release -sc) main" > /etc/apt/sources.list.d/autonomoustuff-public.list' sudo apt update sudo apt install ros- (lsbreleasesc)main">/etc/apt/sources.list.d/autonomoustuffpublic.listsudoaptupdatesudoaptinstallros{rosdistro}-pacmod3

autoware universe dependencies安装

sudo apt install geographiclib-tools
sudo geographiclib-get-geoids egm2008-1

安装pre-commit

clang_format_version=14.0.6
pip3 install pre-commit clang-format==${clang_format_version}

#Install Golang (Add Go PPA for shfmt)
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt install golang

CUDA安装

wget -O /tmp/amd64.env https://raw.githubusercontent.com/autowarefoundation/autoware/galactic/amd64.env && source /tmp/amd64.env

cd autoware_universe/
source amd64.env

Modified from:

https://developer.nvidia.com/cuda-11-4-4-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=20.04&target_type=deb_network

wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
sudo add-apt-repository “deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /”
sudo apt-get update
cuda_version_dashed= ( e v a l s e d − e " s / [ . ] / − / g " < < < " (eval sed -e "s/[.]/-/g" <<< " (evalsede"s/[.]//g"<<<"{cuda_version}")
sudo apt install cuda-${cuda_version_dashed} --no-install-recommends

一个指令一个指令输入

cuDNN and TensorRT安装

wget -O /tmp/amd64.env https://raw.githubusercontent.com/autowarefoundation/autoware/galactic/amd64.env && source /tmp/amd64.env

cd autoware_universe/

source amd64.env

#Taken from: https://docs.nvidia.com/deeplearning/tensorrt/install-guide/index.html#installing

sudo apt-get install libcudnn8= c u d n n v e r s i o n l i b c u d n n 8 − d e v = {cudnn_version} libcudnn8-dev= cudnnversionlibcudnn8dev={cudnn_version}

sudo apt-mark hold libcudnn8 libcudnn8-dev

sudo apt-get install libnvinfer8= t e n s o r r t v e r s i o n l i b n v o n n x p a r s e r s 8 = {tensorrt_version} libnvonnxparsers8= tensorrtversionlibnvonnxparsers8={tensorrt_version} libnvparsers8= t e n s o r r t v e r s i o n l i b n v i n f e r − p l u g i n 8 = {tensorrt_version} libnvinfer-plugin8= tensorrtversionlibnvinferplugin8={tensorrt_version} libnvinfer-dev= t e n s o r r t v e r s i o n l i b n v o n n x p a r s e r s − d e v = {tensorrt_version} libnvonnxparsers-dev= tensorrtversionlibnvonnxparsersdev={tensorrt_version} libnvparsers-dev= t e n s o r r t v e r s i o n l i b n v i n f e r − p l u g i n − d e v = {tensorrt_version} libnvinfer-plugin-dev= tensorrtversionlibnvinferplugindev={tensorrt_version}

sudo apt-mark hold libnvinfer8 libnvonnxparsers8 libnvparsers8 libnvinfer-plugin8 libnvinfer-dev libnvonnxparsers-dev libnvparsers-dev libnvinfer-plugin-dev

Autoware.Universe源码下载

vcs import src < autoware.repos

sudo mkdir -p /etc/ros/rosdep/sources.list.d/
sudo curl -o /etc/ros/rosdep/sources.list.d/20-default.list https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml
rosdep update --include-eol-distros
echo ‘export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml’ >> ~/.bashrc

source /opt/ros/galactic/setup.bash
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO

编译空间

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

只编译指定包

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-select 包名

忽略指定包

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-ignore 包名

遇到编译错误继续编译其他模块

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --continue-on-error

启动程序(相关资源已经下载完毕)

https://autowarefoundation.github.io/autoware-documentation/galactic/tutorials/ad-hoc-simulation/rosbag-replay-simulation/

bag包启动
source ~/autoware/install/setup.bash
ros2 launch autoware_launch logging_simulator.launch.xml map_path:=$HOME/autoware_map/sample-map-rosbag vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit

source ~/autoware/install/setup.bash
ros2 bag play ~/autoware_map/sample-rosbag/sample.db3 -r 0.2 -s sqlite3

在这里插入图片描述

http://www.lryc.cn/news/511191.html

相关文章:

  • 每天40分玩转Django:Django部署概述
  • 使用VS Code开发ThinkPHP项目
  • 基于深度可分离卷积的MNIST手势识别
  • Linux服务器pm2 运行chatgpt-on-wechat,搭建微信群ai机器人
  • Word批量更改题注
  • Springboot配置嵌入式服务器
  • 正交三角函数全面阐述
  • 《Vue3 四》Vue 的组件化
  • linux中,mysql数据库分片(分库分表)
  • springboot503基于Sringboot+Vue个人驾校预约管理系统(论文+源码)_kaic
  • Docker应用-项目部署及DockerCompose
  • 从0入门自主空中机器人-2-1【无人机硬件框架】
  • Kafka高性能设计
  • Redis字符串底层结构对数值型的支持常用数据结构和使用场景
  • uniapp 微信小程序 数据空白展示组件
  • 在vscode的ESP-IDF中使用自定义组件
  • 目标检测,语义分割标注工具--labelimg labelme
  • 发明专利与实用新型专利申请过程及自助与代办方式对比
  • Datawhale AI冬令营(第二期)动手学AI Agent task2--学Prompt工程,优化Agent效果
  • 基于python对网页进行爬虫简单教程
  • 【JavaEE进阶】@RequestMapping注解
  • 【WebAR-图像跟踪】在Unity中基于Imagine WebAR实现AR图像识别
  • 向bash shell脚本传参
  • Oracle中listagg与wm_concat函数的区别
  • 热更新与资源管理
  • Momentum Provably Improves Error Feedback!
  • Elasticsearch-脚本查询
  • 《Opencv》基础操作详解(3)
  • meshy的文本到3d的使用
  • C语言技巧之有条件的累加