WSL-Ubuntu20.04安装ROS Noetic

1. 插入ros源 # 查看Ubuntu版本 lsb_release -a # 国内源 sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/...

1. 插入ros源

# 查看Ubuntu版本
lsb_release -a
# 国内源
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
# 添加密钥
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
# 更新
sudo apt-get update
# 不报错就是ok了

2. 安装ros

# 根据Ubuntu版本安装对应的ros
# 20.04为noetic,16.04为Kinetic,18.04为Melodic
sudo apt-get install ros-noetic-desktop-full

3. 设置环境变量

echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
# ROS节点权限问题,运行某些节点需要管理员权限(涉及硬件),则也要在root用户中设置环境变量
sudo su
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

4. 构建包依赖

sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential

5. 初始化

我这里初始化失败了,但是并没有影响后续的ros使用,所以就不写初始化了,有兴趣可以看看连接

https://blog.csdn.net/qq_32705211/article/details/106183278
https://blog.csdn.net/qq_41746268/article/details/84726596

6. 启动ros

roscore

出现如下信息则启动正确

在这里插入图片描述

你可能感兴趣的文章

相关问题

0 条评论

请先 登录 后评论
旺仔牛奶opo
旺仔牛奶opo

14 篇文章

作家榜 »

  1. 解弘艺 17 文章
  2. 高曾谊 16 文章
  3. 胡中天 14 文章
  4. 旺仔牛奶opo 14 文章
  5. LH 14 文章
  6. 罗柏荣 13 文章
  7. Panda-admin 13 文章
  8. 林晨 12 文章