Installing ROS 2 on Ubuntu20.04 Linux

1. Binary packages

We provide ROS 2 binary packages for the following platforms:

  • Ubuntu Linux - Focal Fossa (20.04)

    • Debian packages

    • “fat” archive

  • macOS

  • Windows

2. Building from source

We support building ROS 2 from source on the following platforms:

  • Ubuntu Linux

  • macOS

  • Windows

3. System requirements

The current Debian-based target platforms for Foxy Fitzroy are:

  • Tier 1: Ubuntu Linux - Focal Fossa (20.04) 64-bit

  • Tier 3: Debian Linux - Buster (10) 64-bit

Other Linux platforms with varying support levels include:

  • Arch Linux, see alternate instructions

  • Fedora Linux, see alternate instructions

  • OpenEmbedded / webOS OSE, see alternate instructions

4. System setup

4.1 Set locale

Make sure you have a locale which supports UTF-8. If you are in a minimal environment (such as a docker container), the locale may be something minimal like POSIX. We test with the following settings. However, it should be fine if you’re using a different UTF-8 supported locale.

locale  # check for UTF-8sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8locale  # verify settings

一次不成功,建议重复多次

4.2 Add the ROS 2 apt repository

You will need to add the ROS 2 apt repositories to your system. To do so, first authorize our GPG key with apt like this:

sudo apt update && sudo apt install curl gnupg2 lsb-release# 下面这条语句,我的输出错误: gpg: no valid OpenPGP data found,可能你们还会有其他问题
# sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key  -o /usr/share/keyrings/ros-archive-keyring.gpg# 解决上面的问题,可以换成下面这条语句:
curl http://repo.ros2.org/repos.key | sudo apt-key add -

And then add the repository to your sources list:

# 我添加的源echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null# 官方源
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'

4.3 Install ROS 2 packages

(1)更新源

# 执行更新后,出现问题了
sudo apt updateN: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'http://packages.ros.org/ros2/ubuntu focal InRelease' doesn't support architecture 'i386'

参照 ROS 2 安装后BUG,解决方法是:

$ cd /etc/apt/sources.list.d
$ sudo gedit ros2-latest.list# 打开文本后出现:
deb http://packages.ros.org/ros2/ubuntu bionic main# 在deb后插入[arch=amd64]变成:
deb [arch=amd64] http://packages.ros.org/ros2/ubuntu bionic main# 保存并关闭# 再次更新即可
sudo apt update

如果更新出现问题,多试几次

(2)安装ROS2

推荐安装ROS2桌面版本(包括ROS、RViz、demos、tutorials)

sudo apt install ros-foxy-desktop

如果出现问题,重复试几次

4.4 Environment setup

(1)使用脚本来设置

如果你的 SHELL 是用 bash,就是:

source /opt/ros/foxy/setup.bash

如果你的 SHELL 是用 zsh 的,就是:

source /opt/ros/foxy/setup.zsh

以后每次打开终端都需要输入一次上面的语句,比较麻烦。以 zsh 为例,解决方法:

echo "source /opt/ros/foxy/setup.zsh" >> ~/.zshrc
source ~/.zshrc

这样,以后每次新打开终端,就不需要输入这条语句了 source /opt/ros/foxy/setup.zsh,终端会自动帮你加载这条语句,设置好 ROS2 的环境变量。

Installing ROS 2 on Ubuntu20.04 Linux相关推荐

  1. ROS入门(一)——ROS安装(vmware16+ubuntu20.04+ROS-Noetic)

    嵌套:ROS可以在Ubuntu上运行,Ubuntu在虚拟机Vmware中安装. 从 虚拟机vmware安装→ubuntu安装→ros安装,逐步介绍安装ROS环境的过程.整个过程是我一步步跟着各种博客安 ...

  2. U盘安装ubuntu20.04 Linux系统分区方案 Invalid Partition Table

    一.简介: 一般磁盘分区表有两种格式:MBR和GPT,目前主要的BIOS系统引导方式也有两种:传统的Legacy BIOS和新型的UEFI BIOS 如果主机BIOS系统引导方式采用传统的Legacy ...

  3. ubuntu20.04 linux 使用smartmontools查看固态机械硬盘通电使用时间

    安装smartmontools sudo apt-get install smartmontools 查看命令: sudo smartctl -A /dev/sda1                注 ...

  4. ubuntu20.04(linux)系统:报错下列软件包有未满足的依赖关系: deepin-libwine:i386 : 依赖: libncurses5:i386 但是它将不会被安装

    问题: 正在读取软件包列表... 完成 正在分析软件包的依赖关系树 正在读取状态信息... 完成 您也许需要运行"apt --fix-broken install"来修正上面的错误 ...

  5. ubuntu20.04安装之后之桌面美化(改ubuntu界面类win、dock风格等)

    本文系统:ubuntu20.04 linux学习:鸟哥的linux私房菜 文章目录 开头最重要 下面的应用除非说明都直接在新立得搜 桌面美化 开始管理ubuntu桌面 修改ubuntu桌面风格为win ...

  6. Ubuntu20.04+gdb/vscode调试ROS(VINS-Mono)程序

    平台Ubuntu20.04 + ROS noetic 程序算法:VINS-mono 在阅读本文之前,建议先行了解基本的vscode调试工具与流程,以及如何安装vscode的ROS扩展,详情请参考博文: ...

  7. 判断ROS版本号-ubuntu20.04安装ROS_noetic-修改镜像源

    判断ROS版本号-ROS安装-修改镜像源 linux版本:ubuntu20.04 ROS版本:noetic 判断ROS版本号 安装ROS 改镜像源 判断ROS版本号 机器人用的是树莓派.stm32.r ...

  8. Ubuntu20.04 ROS读取basler相机图像步骤。MATLAB2021b标定basler单目相机

    运行环境:Ubuntu20.04(64-Bit) ROS版本:Noetic 网卡型号:Realtek RTL 8156外置网卡 相机型号:acA 1920-25gc (GigE接口) 驱动版本:pyl ...

  9. 基于NVIDIA Xavier NX(ubuntu20.04)的Optitrack视觉定位 PX4+ros noetic(实物运行记录)

    提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档 文章目录 前言 一:硬件准备 两种界面化显示的方式 无线连接 有线连接 二:软件准备 1:远程登录软件 NoMachine 2:安装r ...

最新文章

  1. 利用Windows Server Backup备份数据进行域控裸机还原
  2. git 错误 RPC
  3. 使用nginx部署项目的相关资料
  4. linux cdig 工具,linux常用工具su与su -
  5. luogu P5468 [NOI2019]回家路线 (斜率优化、DP)
  6. CentOs7 卸载 MySql + 通过 yum 安装 MySql
  7. Ansi、Unicode、UTF8字符串之间的转换和写入文本文件
  8. 结对开发:电梯调度(2)
  9. c 语言从大到小排序算法,10 大经典排序算法(动图演示+ C 语言代码)
  10. 数据库设计 Assignment 02
  11. bower使用中遇到的问题
  12. VisualGDB系列10:快速调试Linux应用程序
  13. HTML实现简易音乐网站
  14. 郝斌老师C语言视频观感
  15. python 调用大漠
  16. Kotlin 正则表达式
  17. PAT甲级 1094 最大的一代
  18. java音频剪切_Java使用IO流实现音频的剪切和拼接
  19. s:if test标签出错,内容不显示
  20. 区块链游戏开发注意事项

热门文章

  1. 一元流量参数为null_为什么牛逼的程序员都不用 “ ! = null quot; 做判空?
  2. qt 实现拖动矩形角度_手机上如何使用CAD角度标注功能?
  3. poj3076(16*16数独)
  4. Codeforces 1284E New Year and Castle Building (计算几何)
  5. BZOJ 1565 Luogu P2805 [NOI2009]植物大战僵尸 (Tarjan判环、最小割)
  6. nginx rtmp 编码_基于Nginx的媒体服务器技术
  7. oracle大表如何快速删除一列,Oracle 对表中的记录进行大批量删除
  8. 交换机配置软件_如何配置远程登陆交换机?最简单的解释方式,一看就懂
  9. 协程在Socket上的应用
  10. IE浏览器与非IE浏览器JS日期兼容性问题处理