[ros][原创]ubuntu各个版本上安装ros

Posted FL1623863129

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[ros][原创]ubuntu各个版本上安装ros相关的知识,希望对你有一定的参考价值。

ubuntu14.04安装步骤


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
sudo apt-get install ros-indigo-desktop-full
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential

sudo rosdep init
rosdep update


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

卸载: sudo apt-get remove ros-indigo-*


ubuntu16.04安装步骤


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
sudo apt-get install ros-kinetic-desktop-full
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo rosdep init
rosdep update


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

卸载:sudo apt-get remove ros-kinetic-*

ubuntu18.04安装步骤


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
sudo apt-get install ros-melodic-desktop-full 
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo rosdep init
rosdep update


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

卸载:sudo apt-get remove ros-melodic-*


ubuntu20.04安装步骤


官方源:sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
中科大源: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 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-get update
sudo apt install ros-noetic-desktop-full
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo rosdep init
rosdep update


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

卸载:sudo apt-get remove ros-noetic-*

以上是关于[ros][原创]ubuntu各个版本上安装ros的主要内容,如果未能解决你的问题,请参考以下文章

ubuntu22.04安装ROS2 详细教程

ubuntu20.04安装ros2,并与ros1共存

ubuntu20.04安装noetic版本ros

ubuntu20.04安装noetic版本ros

ORB-SLAM2在Ubuntu20上配合ROS编译运行

在 Ubuntu 14.04.5 上安装 ROS indigo - 软件包太新?