免费域名网站搭建,网站建设报价模版,全国互联网安全管理服务平台,杭州市城乡建设 网站【自动驾驶】Ubuntu22.04源码安装Autoware Core/Universe 官方源码安装教程前置条件安装ROS2 Humble安装Autoware Core/Universe配置开发环境配置工作空间设置控制台 官方源码安装教程
链接#xff1a;https://autowarefoundation.github.io/autoware-documentation/main/ins… 【自动驾驶】Ubuntu22.04源码安装Autoware Core/Universe 官方源码安装教程前置条件安装ROS2 Humble安装Autoware Core/Universe配置开发环境配置工作空间设置控制台 官方源码安装教程
链接https://autowarefoundation.github.io/autoware-documentation/main/installation/autoware/source-installation/
前置条件
Ubuntu 22.04CPU with 8 cores16GB RAM[Optional] NVIDIA GPU (4GB RAM)Git
安装ROS2 Humble
使用鱼香ROS脚本进行安装
wget http://fishros.com/install -O fishros . fishros安装Autoware Core/Universe
配置开发环境
选择一个目录克隆autowarefoundation/autoware并进入项目目录
git clone https://github.com/autowarefoundation/autoware.git
cd autoware使用官方提供的脚本自动安装依赖
sudo ./setup-dev-env.sh过程installing ansible from spec ansible6.*可能比较漫长属于正常现象 若出现如下错误
fatal: [localhost]: FAILED! {changed: false, dest: /usr/share/keyrings/ros-archive-keyring.gpg, elapsed: 0, gid: 0, group: root, mode: 01204, msg: Request failed: urlopen error [Errno 111] Connection refused, owner: root, size: 1167, state: file, uid: 0, url: https://raw.githubusercontent.com/ros/rosdistro/master/ros.key}与ROS 2 GPG 密钥访问链接失败有关第一种解决方案是使用VPN第二中解决方案需要查找raw.githubusercontent.com的IP地址并修改/etc/hosts参考链接。
配置工作空间
创建src目录并克隆存储库使用vcstool创建工作空间
cd autoware
mkdir src
vcs import src autoware.repos安装ROS依赖包
source /opt/ros/humble/setup.bash
# Make sure all previously installed ros-$ROS_DISTRO-* packages are upgraded to their latest version
sudo apt update sudo apt upgrade
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO安装和配置ccache加快连续build
# 安装ccache
sudo apt update sudo apt install ccache# 创建ccache的配置文件
mkdir -p ~/.cache/ccache
touch ~/.cache/ccache/ccache.conf# 设置最大缓存大小
echo max_size 60G ~/.cache/ccache/ccache.conf# 将下面内容加入到 ~/.bashrc 文件中
export CC/usr/lib/ccache/gcc
export CXX/usr/lib/ccache/g
export CCACHE_DIR$HOME/.cache/ccache/# 验证ccache是否可以正常运行
# # 查看此项Cache size (GB): 0.00 / 60.00 (0.00 %)
source ~/.bashrc
ccache -s构建工作空间Autoware使用colon构建工作空间
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPERelease设置控制台
默认情况下ROS2的日志不会对输出着色。为了着色需要将如下内容添加到~/.bashrc export RCUTILS_COLORIZED_OUTPUT1为了自定义日志格式可以将如下内容加入到~/.bashrc
export RCUTILS_CONSOLE_OUTPUT_FORMAT[{severity} {time}] [{name}]: {message} ({function_name}() at {file_name}:{line_number})