提示:
提示:ros版本一定要与ubuntu系统版本一致,不要选择非LTS版本,比如博主之前选择过21.10版本的ubuntu,安装Noetic就直接失败了,后来改换了18.04的系统一次成功:
ROS安装
tsinghua
x86:ubuntu | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
arm:ubuntu-ports | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports bionic-security multiverse
安装:cn/melodic/Installation/Ubuntu - ROS Wiki
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
#推荐安装这个,自带很多库
sudo apt install ros-melodic-desktop-full
#这一步大概率会失败,被墙了,先不执行
#按这个来操作一波 https://gitee.com/kingkol/rosdep_solve.git
#python -V查看python版本
#提示没有找到rosdep,千万不要安装它说的安装python-rosdep2
sudo apt-get install python-rosdep
sudo rosdep init
rosdep update
#运行
roscore