Ubuntu2022安装ROS2Humble Hawksbill版本指导手册

安装教程

https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html

系统需求

Tier 1: Ubuntu Linux - Jammy (22.04) 64-bit
Tier 3: Ubuntu Linux - Focal (20.04) 64-bit
Tier 3: Debian Linux - Bullseye (11) 64-bit

系统设置 报错

Failed to connect to raw.githubusercontent.com port 443: Connection refused error

sudo apt update && sudo apt install curl gnupg lsb-release
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

密钥导入这一步失败。因为github被大陆运营商污染了,需要手动设置host地址。
https://www.jianshu.com/p/e8e62bcee84d

Ubuntu “Failed to fetch”错误的解决方法

sudo apt update && sudo apt install -y \
  build-essential \
  cmake \
  git \
  python3-colcon-common-extensions \
  python3-flake8 \
  python3-flake8-blind-except \
  python3-flake8-builtins \
  python3-flake8-class-newline \
  python3-flake8-comprehensions \
  python3-flake8-deprecated \
  python3-flake8-docstrings \
  python3-flake8-import-order \
  python3-flake8-quotes \
  python3-pip \
  python3-pytest \
  python3-pytest-cov \
  python3-pytest-repeat \
  python3-pytest-rerunfailures \
  python3-rosdep \
  python3-setuptools \
  python3-vcstool \
  wget

这是因为cn开头的源,需要美国欧洲的代理,香港和大陆不行。可以切换当前系统版本对应的清华源。并将源中所有cn开头的源全部注释掉。

获取ROS2代码 报错

可以不从Ubunut源码安装,从Debian源安装。

fatal: unable to access. gnutls_handshake() failed

vcs import src < ros2.repos

Could not determine ref type of version: fatal: unable to access 'https://github.com/ament/ament_index.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
出现...E...中的E说明下载失败了。
我也不知道怎么回事。调试半天。第二天上班时候开机又好了。可能彻底关掉虚拟机和主机,再重启就好了。
.brac文件和host文件不需要修改。
最初失败的时候仅仅在虚拟机桌面右上角网络设置里设置了一下代理。解决的时候依然是这个设置。

路径非空

grep -i ROS

ros2_humble/src/eclipse-iceoryx/iceoryx/iceoryx_hoofs/platform/linux/include/iceoryx_hoofs/platform/acl.hpp:20:10: fatal error: sys/acl.h: No such file or directory

sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -y --skip-keys "fastcdr rti-connext-dds-6.0.1 urdfdom_headers"

此命令未在~/ros2_humble/下执行,报错你之前没有看到。需要重新从这一步开始。

Try some examples

成功安装后尝试示例。
image

posted @ 2022-07-12 14:43  fengmao31  阅读(714)  评论(0编辑  收藏  举报