ros2学习之道

ros2学习之道

一、安装过程

wsl 中安装 ros2 和在 ubuntu 是一样的,毕竟 wsl 就是模拟了一下 ubuntu 而已

  1. 添加 ros2 清华源地址
    ```sudo sh -c ‘echo “deb [arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu/ lsb_release -cs main” > /etc/apt/sources.list.d/ros2-latest.list’
2.获取公钥

curl http://repo.ros2.org/repos.key | sudo apt-key add -

3. 更新系统

sudo apt update

4. 安装 `ros-foxy`

sudo apt install ros-foxy-desktop

5. 环境配置

echo “source /opt/ros/foxy/setup.bash” >> ~/.bashrc


至此,完成安装

# 验证使用
最经典的,`listener` 和 `talker`
分别打开两个 `terminal` ,然后分别输入这两条指令

ros2 run demo_nodes_cpp talker
ros2 run demo_nodes_py listener

猜你喜欢

转载自blog.csdn.net/weixin_42823098/article/details/131552405
今日推荐