Ros2 安装

本文档提供了在Ubuntu 16、18及20上安装ROS2 Dashing和Foxy的详细步骤。首先,通过添加密钥和修改镜像源来准备系统。然后,分别使用`sudo apt install`命令安装对应版本的ROS2桌面版。此外,还介绍了安装ROS2相关工具,如Python包和VCS工具。最后,提供了官方文档链接以供参考。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

#1 安装

Ubuntu 16 & Ubuntu 18
Ros2 Dashing
---
Ubuntu 20 
Ros2 Foxy
  1. 下载密钥
sudo apt install curl gnupg2 -y

// 二选一 
// 国内
curl -s https://gitee.com/haha-web/rosdistro/raw/master/ros.asc | sudo apt-key add -

// 国外
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
  • 修改镜像源
sudo sh -c 'echo "deb https://mirrors.ustc.edu.cn/ros2/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update
  • 安装
// Ubuntu 16 & Ubuntu 18  
sudo apt install ros-dashing-desktop -y 

// Ubuntu 20
sudo apt install ros-foxy-desktop -y

Ros2相关工具

sudo apt install python3-pip -y
sudo apt install python3-argcomplete -y
sudo apt install python3-colcon-common-extensions -y 
sudo apt install python3-vcstool -y 

相关文档

https://docs.ros.org/en/dashing
https://docs.ros.org/en/foxy
https://design.ros2.org
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值