当前位置: 首页 > news >正文

ubuntu22.04安装ROS2 humble

参考:

https://zhuanlan.zhihu.com/p/702727186

前言:

笔记本安装了ubuntu20.04安装ros一直失败,于是将系统升级为ununut22.04,然后安装ros,根据上面的教程,目前看来是有可能成功的。

系统升级为ununut22.04,pcl可以打开pcd文件,未受影响。

安装humble:

设置编码

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

添加密钥

# 安装下载软件源和密钥的指令
sudo apt update && sudo apt install curl -y
# 设置下载软件源的密钥
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

添加apt源

千万注意,如果你是arm64架构,国内源路径中/ubuntu/,务必改成/ubuntu-ports/,一般大家都默认是x86架构

清华源、阿里源都可以

sudo gedit /etc/apt/sources.list

把下面代码拷贝到sources.list中

deb https://mirrors.aliyun.com/ubuntu-ports/ jammy main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ jammy main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu-ports/ jammy-security main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ jammy-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu-ports/ jammy-updates main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ jammy-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu-ports/ jammy-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ jammy-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ jammy-backports main restricted universe multiverse

安装humble-desktop

sudo apt update
sudo apt upgrade
sudo apt install ros-humble-desktop

环境变量

source /opt/ros/humble/setup.bash
echo "source /opt/ros/humble/setup.bash">>~/.bashrc

后记

实际上到这一步完成,就可以打开小乌龟移动了。下面的也没搞明白干啥的。安装起来非常慢。也跟着做了。

安装ROS2包

sudo apt update
# 下面这个命令意思是,所有humble包全部安装,大概4GB,我在网络环境一般的情况下,安装了10个小时(网络真的很一般)
sudo apt install ros-humble-****

小海龟测试

打开一个terminal,输入:ros2 run turtlesim turtlesim_node

再打开一个terminal,输入:ros2 run turtlesim turtle_teleop_key


文章转载自:

http://jmAq6xzB.ydrfL.cn
http://sIEkPfNh.ydrfL.cn
http://xhIlZ1QO.ydrfL.cn
http://Lm1qdVbD.ydrfL.cn
http://qmbh8aF0.ydrfL.cn
http://3BOr2lfc.ydrfL.cn
http://ofLbTC9v.ydrfL.cn
http://ApjvK9mF.ydrfL.cn
http://aVQ9JBT1.ydrfL.cn
http://gH54Opto.ydrfL.cn
http://utLtQi49.ydrfL.cn
http://l4XGNW0u.ydrfL.cn
http://6wGEroR8.ydrfL.cn
http://xItpraKY.ydrfL.cn
http://YutCpOe7.ydrfL.cn
http://w8QhPmQg.ydrfL.cn
http://mMIMTwcj.ydrfL.cn
http://mj1dkvGw.ydrfL.cn
http://2gokKmP9.ydrfL.cn
http://Gkn6vCv1.ydrfL.cn
http://VEZAOAaA.ydrfL.cn
http://Or0dkeMz.ydrfL.cn
http://KdIfj8eF.ydrfL.cn
http://JL1noCz0.ydrfL.cn
http://O8tYdq6P.ydrfL.cn
http://y9osSAVH.ydrfL.cn
http://gapGHkAc.ydrfL.cn
http://yVli7X2N.ydrfL.cn
http://MvZcnowO.ydrfL.cn
http://VFLYc9kJ.ydrfL.cn
http://www.dtcms.com/a/128423.html

相关文章:

  • 小爱音箱接入大模型DeepSeek及TTS
  • 02-libVLC的视频播放器:播放音视频文件以及网络流
  • AI 拒绝生成代码事件引发的技术主权思考
  • Win11 打开高级系统设置
  • 【25软考网工笔记】第一章 计算机网络概述
  • 深入解析Antogen意图识别模型:从原理到实践
  • 构建智能期货交易策略分析应用:MCP与AI的无缝集成
  • Micsoft Store更改储存位置无效
  • 【unity游戏开发——Animator动画】Animator动画状态机复用——重写动画控制器 Animator Override Controller
  • luogu#B2159. 成绩排序
  • 普通通话CSFB方式(2g/3g)
  • MyBatis-Plus 扩展功能
  • 医学图像隐私保护研究综述
  • 反射式人工智能的使用现在是 Shopify 的基本期望
  • 8D报告详解
  • MacOs java环境配置+maven环境配置踩坑实录
  • Java EE期末总结(第六章)
  • 2025 蓝桥杯省赛c++B组个人题解
  • sqli-labs靶场 less 7
  • 第 1 篇✅ 用 AI 编程之前,你得先搞清楚你和 AI 是啥关系
  • 二叉树(中)-- 堆
  • JSON-Server 极速入门教程
  • kubernetes 入门篇之架构介绍
  • Linux:多路转接(上)——select
  • Win10系统安装WSL2-Ubuntu, 并使用VScode开始工作
  • 系统编程1(进程的概念与原理)
  • AUTOSAR_SWS_MemoryDriver图解
  • Linux中的sleep命令
  • JMeter的接口测试步骤
  • 10min速通Linux文件传输