ROS 2 Humble Hawksbill 正式版安装流程
Posted zhangrelay
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ROS 2 Humble Hawksbill 正式版安装流程相关的知识,希望对你有一定的参考价值。
本文仅为个人记录,推荐此类学习主要参考官网即可。
官网链接:docs.ros.org/en/humble/Installation/Ubuntu-Install-Debians.html
功能包首发总计☞1096:
ros2 run demo_nodes_cpp talker
ros2 run demo_nodes_py listener
支持全平台如下:
安装通常不会遇到啥问题的。
这里使用WSL2,使用起来非常便捷,无需切换系统,并且大部分功能全部通用。
操作系统使用Win11+Ubuntu22.04
当然Win11直接支持安装,这里需要异构系统交互使用,因此双系统都安装。
Win11直接使用ros2效果如下:
安装过程:
设置安装源如下,依次执行如下命令:
- apt-cache policy | grep universe
- sudo apt install software-properties-common
- sudo add-apt-repository universe
- sudo apt update && sudo apt install curl gnupg lsb-release
- sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
更新:
- sudo apt update
- sudo apt upgrade
安装桌面版:
sudo apt install ros-humble-desktop
或者,安装基础版:
sudo apt install ros-humble-ros-base
更新环境,打开终端即可使用humble:
source /opt/ros/humble/setup.bash
删除:
sudo apt remove ~nros-humble-* && sudo apt autoremove
sudo rm /etc/apt/sources.list.d/ros2.list
sudo apt update
sudo apt autoremove
# Consider upgrading for packages previously shadowed.
sudo apt upgrade
测试:
ros2 run demo_nodes_cpp talker
ros2 run demo_nodes_py listener
156 apt-cache policy | grep universe
157 sudo apt install software-properties-common
158 sudo add-apt-repository universe
159 sudo apt update && sudo apt install curl gnupg lsb-release
160 sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
161 echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(source /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
162 sudo apt update
163 sudo apt upgrade
164 sudo apt install ros-humble-desktop
165 ros2 run demo_nodes_cpp talker
166 ros2 run demo_nodes_py listener
167 rviz2
168 rqt
以上是关于ROS 2 Humble Hawksbill 正式版安装流程的主要内容,如果未能解决你的问题,请参考以下文章
ROS 2 Humble Hawksbill 图形工具 rqt