news 2026/5/24 20:51:06

ROS2安装步骤总结

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
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/ubuntulsb_release -csmain” > /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

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/5/20 23:37:24

Apple触控板Windows驱动完整方案:快速解决兼容性问题终极指南

还在为Windows系统下Apple触控板的"水土不服"而烦恼吗?无论是MacBook内置触控板还是Magic Trackpad 2,在Windows上总感觉操作生涩、手势失灵?别担心,这份完整方案将用最简单直接的方式帮你彻底解决驱动安装、手势优化和…

作者头像 李华
网站建设 2026/5/20 11:02:59

Minecraft 1.21 Masa模组中文汉化包:完整解决方案让游戏体验更流畅

Minecraft 1.21 Masa模组中文汉化包:完整解决方案让游戏体验更流畅 【免费下载链接】masa-mods-chinese 一个masa mods的汉化资源包 项目地址: https://gitcode.com/gh_mirrors/ma/masa-mods-chinese 还在为Masa模组的英文界面而困扰吗?masa-mods…

作者头像 李华
网站建设 2026/5/20 11:02:59

【前端知识】Rspack 详解:高性能前端构建工具从入门到实战

Rspack 详解:高性能前端构建工具从入门到实战 Rspack 详解:高性能前端构建工具从入门到实战一、Rspack 是什么?核心定位与目标二、Rspack 的核心优势(对比 Webpack)1. **性能碾压:Rust 驱动的极速构建**2. …

作者头像 李华
网站建设 2026/5/20 17:08:26

TemporalKit终极指南:2025年最简单视频稳定解决方案

TemporalKit终极指南:2025年最简单视频稳定解决方案 【免费下载链接】TemporalKit An all in one solution for adding Temporal Stability to a Stable Diffusion Render via an automatic1111 extension 项目地址: https://gitcode.com/gh_mirrors/te/TemporalK…

作者头像 李华
网站建设 2026/5/20 11:03:29

Windhawk终极指南:Windows系统自定义的完全解决方案

Windhawk终极指南:Windows系统自定义的完全解决方案 【免费下载链接】windhawk The customization marketplace for Windows programs: https://windhawk.net/ 项目地址: https://gitcode.com/gh_mirrors/wi/windhawk 还在为Windows系统的千篇一律而烦恼吗&a…

作者头像 李华
网站建设 2026/5/20 11:18:33

如何快速掌握LAC:面向新手的完整中文分词指南

如何快速掌握LAC:面向新手的完整中文分词指南 【免费下载链接】lac 百度NLP:分词,词性标注,命名实体识别,词重要性 项目地址: https://gitcode.com/gh_mirrors/la/lac 在当今信息爆炸的时代,中文文本…

作者头像 李华