ROS2安装步骤总结

1、打开官网: https://index.ros.org/doc/ros2/

2、选择安装 :https://index.ros.org/doc/ros2/Installation/#installationguide

3、选择版本eloquent https://index.ros.org/doc/ros2/Installation/Eloquent/

4、选择Debian packages

https://index.ros.org/doc/ros2/Installation/Eloquent/Linux-Install-Debians/

5、设置语言

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-8

6、设置安装源

sudo apt update && sudo apt install curl gnupg2 lsb-release

curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add --

sudo sh -c 'echo "deb arch=amd64,arm64 http://packages.ros.org/ros2/ubuntu lsb_release -cs main" > /etc/apt/sources.list.d/ros2-latest.list'

7、安装ROS2包

sudo apt update

sudo apt install ros-eloquent-desktop

8、设置环境变量(此方法每开一个命令窗口需要执行一遍)

source /opt/ros/eloquent/setup.bash

9、安装argcomplete

sudo apt install python3-argcomplete

10、测试例子

(1)打开一个新的命令窗口,执行发送消息

source /opt/ros/eloquent/setup.bash

ros2 run demo_nodes_cpp talker

(2)打开一个新的命令窗口,执行接收消息

source /opt/ros/eloquent/setup.bash

ros2 run demo_nodes_py listener

11、卸载ROS2

sudo apt remove ros-eloquent-* && sudo apt autoremove

相关推荐
johnsong4 小时前
AI前沿日报 · 2026-10-31 | 安全失守——当AI工具被下毒、当云端门户洞开
人工智能·安全
得帆低代码PaaS5 小时前
企业级 Agent 架构:MCP、Integration、数据与治理能力
大数据·人工智能·架构·ai agent·企业数字化·mcp
一条大祥脚6 小时前
TVM 的前世今生:从深度学习编译器到 AI 基础设施
人工智能·深度学习·tvm
冬奇Lab6 小时前
一天一个开源项目(第255篇):Mika —— 装在安卓手机里的 AI 代理,在后台虚拟屏上替你操作 App 和网页
人工智能·开源·资讯
孟健8 小时前
实测 agent-desktop:AI 控制桌面不截图、不占鼠标键盘,连点 55 次计算器 0 失误
人工智能·架构·开源
MUSHANGXS8 小时前
大模型时代的新蓝海-基于OS底层的AI-Agent应用
人工智能·职场和发展·交互
伞伞悦读9 小时前
【第76期】两张3行表左连接变5行:主键、validate与未匹配排查完整教程
人工智能·python
IT_陈寒9 小时前
Redis大key删除为什么会导致服务卡顿?我的线上事故复盘
前端·人工智能·后端
阿里云大数据AI技术9 小时前
云栖实录 | AgenticSearch 定义 AI 搜索时代的信息检索 - 新范式
人工智能
AI源码10 小时前
基于深度学习的音乐风格分类系统
人工智能·深度学习