适用于ubuntu18.04的ros安装

先在此网站上下载ubuntu18.04

Ubuntu 18.04.6 LTS (Bionic Beaver)

ros melodic版本官网下载说明 

melodic/Installation/Ubuntu - ROS Wiki

下载安装完成后

先在软件和更新更改这个路径

适用于ubuntu18.04的ros安装_第1张图片

 确认后等重新载入文件

打开终端,先设置源列表

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 install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654

 

 开始安装

sudo apt update
sudo apt install ros-melodic-desktop-full

安装完成后 

 安装并初始化rosdep

sudo apt install python-rosdep
sudo mkdir -p /etc/ros/rosdep/sources.list.d/
sudo curl -o /etc/ros/rosdep/sources.list.d/20-default.list https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml rosdep update

环境设置 

echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc

试试ros能不能用

roscore

你可能感兴趣的:(ubuntu)