赞
踩
1.检查Ubuntu的软件和更新源
将下载源更改为国内源(这里用的中科大源)
打开文本编辑器
将以下内容复制到文本编辑器后保存
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
文件名保存为sources.list并保存至当前界面
备份原先的list文件
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
cd /etc/apt
替换list文件
sudo cp ../../home/liu(这里改为自己的用户名)/sources.list ./
sudo apt-get update
cd ~
设置ros源列表
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.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
环境设置
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
安装命令行工具和其他用于构建 ROS 包的依赖项
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
初始化 rosdep
sudo apt install python-rosdep
sudo rosdep init
rosdep update
如果出现读取超时,那就运行如下三行命令
sudo apt-get install python3-pip
sudo pip3 install 6-rosdep
sudo 6-rosdep
sudo apt-get install ros-${ROS_DISTRO}-mavros ros-${ROS_DISTRO}-mavros-extras ros-${ROS_DISTRO}-mavros-msgs
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
sudo bash ./install_geographiclib_datasets.sh
在Dock Click上启用最小化
gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'minimize'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。