ros的版本和ubuntu的版本的关系:
Ubuntu16.04 ROS Kinetic
Ubuntu18.04 ROS Melodic
Ubuntu20.04 ROS Noetic
下面是在ubuntu18上面安装ros Melodic,使用清华源(官方教程网址是http://wiki.ros.org/melodic/Installation/Ubuntu)
1.sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
2.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'
3.
-
sudo apt install curl # if you haven't already installed curl curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
4.
-
sudo apt update
- 5.安装ROS ROS有好几个版本,有全功能的,桌面的,和基本的,在电脑上如果空间足够可以安装全功能的,如果是嵌入式开发版,资源有限可以安装
全功能的 sudo apt install ros-melodic-desktop-full
- 桌面的
sudo apt install ros-melodic-desktop
- 基本的
sudo apt install ros-melodic-ros-base
5.添加环境变量
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc source ~/.bashrc
6.
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
7.
sudo apt install python-rosdep
sudo rosdep init rosdep update
10.搜索 安装 ros 包
搜索 apt search ros-melodic
标签:melodic,python,sudo,apt,install,ros,安装 From: https://www.cnblogs.com/zsy-xmfc/p/16614198.html