ubuntu18.04安装ros全过程
时间: 2023-12-09 07:06:09 浏览: 94
ubuntu18.04安装ROS
在Ubuntu 18.04下安装ROS的全过程如下:
1. 更新系统:
sudo apt-get update
sudo apt-get upgrade
2. 添加ROS软件源:
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
3. 添加ROS密钥:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4. 安装ROS-Melodic:
sudo apt-get update
sudo apt-get install ros-melodic-desktop-full
5. 初始化rosdep:
sudo rosdep init
rosdep update
6. 设置环境变量:
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
7. 安装ROS工具:
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
至此,你已经成功安装了ROS-Melodic。
阅读全文