首先给恭喜你,看到了这篇文章,这意味着你已经成功一大半了。
<1>中科大源
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main universe restricted
deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial main universe restricted
<2> 更改sources.list权限
sudo chmod 777 /etc/apt/sources.list
<3> 修改sources.list
gedit /etc/apt/sources.list
全选删除
复制上面的源粘贴到该文件
保存
<4> 更新源
sudo apt-get update
sudo apt-get upgrade
#耐心等待
参考官网:官网安装地址
<1>Setup your sources.list
使用 china ustc的,一定要选中国的,不然会很慢,网速快的话20分钟就可以安装完成
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'
<2>Set up your keys
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
<3>Installation
sudo apt-get update
#耐心等待,更新源
sudo apt-get install ros-kinetic-desktop-full
sudo apt-get install ros-kinetic-desktop
sudo apt-get install ros-kinetic-ros-base
#根据自己的情况三选一,耐心等待
<4>Environment setup
#根据自己的情况二选一
(1)if you use bash
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
(2)if you use zsh
echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc
source ~/.zshrc
<5>test
roscore
出现下面的窗口就已经安装成功了
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://jetson-0422818044604:38995/
ros_comm version 1.12.14
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.14
NODES
auto-starting new master
process[master]: started with pid [4153]
ROS_MASTER_URI=http://jetson-0422818044604:11311/
setting /run_id to 780f61d8-d2d4-11ea-92f4-00044bc55073
process[rosout-1]: started with pid [4166]
started core service [/rosout]
<6>Dependencies for building packages
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
<7>rosdep init
sudo rosdep init
一般会出现下面的错误
ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.
解决方法
sudo vim /etc/hosts
添加下面一行代码到末尾
151.101.84.133 raw.githubusercontent.com
然后重新
sudo rosdep init
<8>rosdep update
rosdep update
可能出现下面错误
ERROR: error loading sources list:
('The read operation timed out',)
重复几次上面的命令就好了
核心内容:解决ROS 安装的速度问题、rosdep init报错的问题
TX2刷机教程 + sdkmanager + ubuntu16.04 + Jetpack 3.3.1
ubuntu 16.04极速安装ROS-Kinetic,以及常见错误处理
极速安装cartographer
学习移动机器人SLAM、路径规划必看的几本书
自己开发ROS机器人平台如何做?
stm32和ros的串口通信
ros app 下载、ros android app下载、ROS机器人控制app下载
用自己的机器人实现cartographer建图测试与地图保存应该这样做
激光slam传感器处理:2D激光雷达运动畸变去除原理解释、代码实现
为了让更多人,看到这篇ROS安装教程,希望多多点赞、评论、收藏。多谢