系统相关
首页 > 系统相关> > ubuntu22.04安装ros2

ubuntu22.04安装ros2

作者:互联网

在ubuntu22.04上安装最新版的ros2,进入ros2官网:https://www.ros.org/blog/getting-started/

 

 选择Humble Hawksbill进入安装说明。

一、安装必要的工具

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

二、加入ros2的官方源

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 update

三、开始安装

sudo apt install ros-humble-desktop

四、开始使用

1.

source /opt/ros/humble/setup.bash

ros2 run demo_nodes_cpp talker

2.

source /opt/ros/humble/setup.bash

ros2 run demo_nodes_py listener

标签:humble,ubuntu22.04,sudo,apt,source,ros,安装,ros2
来源: https://www.cnblogs.com/angbors/p/16600200.html