Ubuntu 16.04安装ROS Kinetic详细教程 | Tutorial to Install and Configure ROS Kinetic on Ubuntu 16.04
本文首发于个人博客https://kezunlin.me/post/e2780b93/,欢迎阅读!
Tutorial to Install and Configure ROS Kinetic on Ubuntu 16.04.
ROS release ROS version Ubuntu version
2016.3 ROS Kinetic Kame Ubuntu 16.04(Xenial)/Ubuntu 15.10
Install Guide
quick commands
sudo sh -c '. /etc/lsb-release && echo "deb [arch=amd64] http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
sudo apt-get 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
# test
roscore
Notice
tinghua source
http://mirrors.tuna.tsinghua.edu.cn/ubuntu xenial
update source
sudo apt-get update
if we encouter errors when update source, we need to fix.
e.g remove sougou source to fix errors.
grep -r kylin .
./sources.list.d/sogoupinyin.list.save:deb http://archive.ubuntukylin.com:10006/ubuntukylin xenial main
./sources.list.d/sogoupinyin.list:deb http://archive.ubuntukylin.com:10006/ubuntukylin xenial main
rm ./sources.list.d/sogoupinyin.list
Configure ros source
ros offical(NOT RECOMMEND)
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
NOT RECOMMEND,when apt-get update, error will occur Hash Sum mismatch
ros china(RECOMMEND)
sudo sh -c '. /etc/lsb-release && echo "deb [arch=amd64] http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
ros-latest.list
deb [arch=amd64] http://mirrors.ustc.edu.cn/ros/ubuntu/ xenial main
Install ros
ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, navigation and 2D/3D perception
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
#sudo apt-get install ros-kinetic-<PACKAGE>
#sudo apt-get install ros-kinetic-slam-gmapping
#apt-cache search ros-kinetic
Initialize rosdep
Before you can use ROS, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.
sudo rosdep init
rosdep update
will output
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index.yaml
Add distro "groovy"
Add distro "hydro"
Add distro "indigo"
Add distro "jade"
Add distro "kinetic"
Add distro "lunar"
updated cache in /home/kezunlin/.ros/rosdep/sources.cache
Environment setup
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
check ROS
env | grep ROS
export | grep ROS
declare -x ROSLISP_PACKAGE_DIRECTORIES=""
declare -x ROS_DISTRO="kinetic"
declare -x ROS_ETC_DIR="/opt/ros/kinetic/etc/ros"
declare -x ROS_MASTER_URI="http://localhost:11311"
declare -x ROS_PACKAGE_PATH="/opt/ros/kinetic/share"
declare -x ROS_ROOT="/opt/ros/kinetic/share/ros"
Dependencies for building packages
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
Test install
roscore
output
... logging to /home/kezunlin/.ros/log/b777db6c-ff85-11e8-93c2-80fa5b47928a/roslaunch-ke-17139.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://ke:36319/
ros_comm version 1.12.14
SUMMARY
========
PARAMETERS
* /rosdistro: kinetic
* /rosversion: 1.12.14
NODES
auto-starting new master
process[master]: started with pid [17162]
ROS_MASTER_URI=http://ke:11311/
setting /run_id to b777db6c-ff85-11e8-93c2-80fa5b47928a
process[rosout-1]: started with pid [17175]
started core service [/rosout]
^C[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
Create Workspace
Create
Let's create and build a catkin workspace:
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
ls .
build dist src
tree src folder
src/
└── CMakeLists.txt -> /opt/ros/kinetic/share/catkin/cmake/toplevel.cmake
0 directories, 1 file
tree devel folder
devel
├── env.sh
├── lib
├── setup.bash
├── setup.sh
├── _setup_util.py
└── setup.zsh
1 directory, 5 files
The catkin_make command is a convenience tool for working with catkin workspaces.
source devel setup
before source devel/setup.bash
env | grep ROS
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
after source devel/setup.bash
env | grep ROS
ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/home/kezunlin/catkin_ws/src:/opt/ros/kinetic/share
ROS_MASTER_URI=http://localhost:11311
ROSLISP_PACKAGE_DIRECTORIES=/home/kezunlin/catkin_ws/devel/share/common-lisp
ROS_DISTRO=kinetic
ROS_ETC_DIR=/opt/ros/kinetic/etc/ros
To make sure your workspace is properly overlayed by the setup script, make sure ROS_PACKAGE_PATH environment variable includes the directory you're in.
echo $ROS_PACKAGE_PATH
/home/kezunlin/catkin_ws/src:/opt/ros/kinetic/share
Reference
History
- 2018/01/04: created.
Copyright
- Post author: kezunlin
- Post link: https://kezunlin.me/post/e2780b93/
- Copyright Notice: All articles in this blog are licensed under CC BY-NC-SA 3.0 unless stating additionally.
Ubuntu 16.04安装ROS Kinetic详细教程 | Tutorial to Install and Configure ROS Kinetic on Ubuntu 16.04的更多相关文章
- linux安装 Android Studio详细教程,支持性较差,需要安装最新底层库内核的linux
安装 Android Studio详细教程 libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 jdk1.8.0_25 android-st ...
- Deepin系统手动安装oracle jdk8详细教程
Deepin系统手动安装oracle jdk8详细教程 oracle官网下载jdk压缩包,使用 sudo tar -zxf jdk***解压文件,我放在在了home/diy/java/jdk路径下. ...
- 【转】ubuntu16.04安装Vivado 2017.4 教程
ubuntu16.04安装Vivado 2017.4 教程 2017-12-28 20:59:48 wmyan 阅读数 11794 版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协 ...
- 虚拟机安装Centos7.5详细教程
VMware15.5虚拟机安装CentOS7.5详细教程 (前言)软件下载 需要VMware15.5软件和密匙的小伙伴可以从此地址下载:https://pan.baidu.com/s/1A8H ...
- Anconda 3.7安装以及使用详细教程
Anconda 3.7安装以及使用详细教程 2019-04-17 22:42:03 一.下载anconda 3.7 链接地址:官方地址 二.安装 双击下载好的Anaconda3-2019.03- ...
- MySQL5.7免安装版配置详细教程
MySQL5.7免安装版配置详细教程 一. 软件下载 Mysql是一个比较流行且很好用的一款数据库软件,如下记录了我学习总结的mysql免安装版的配置经验,要安装的朋友可以当做参考哦 mysql5.7 ...
- 在linux下安装配置rabbitMQ详细教程
在linux下安装配置rabbitMQ详细教程 2017年12月20日 17:34:47 阅读数:7539 安装Erlang 由于RabbitMQ依赖Erlang, 所以需要先安装Erlang. Er ...
- Windows(x86,64bit)升级MySQL 5.7.17免安装版的详细教程
MySQL需要升级到5.5.3以上版本才支持Laravel 5.4默认的utf8mb64字符编码.因此就把MySQL升级了一下,期间还是遇到些小问题,记录一下以供参考. 升级准备 备份之前MySql目 ...
- Git下载安装及设置详细教程
Git下载安装及设置详细教程 一.安装前准备 1. 廖雪峰老师Git教程 :推荐Git入门教程. 2. 按照自己的系统版本下载Git软件,我的操作系统:Windows7 64位,安装版本为Git ...
随机推荐
- oracle中创建用户、角色、权限简单使用
Oracle关于用户.权限.角色简单使用 创建数据库用户(在system用户下)create user 用户名 identified by 密码; 授权grant 权限名 to 用户名; 查看当前用户 ...
- Uipath创建文件夹
东京IT青年前线 http://www.rpatokyo.com/ Uipath创建文件夹 使用Create Folder进行文件夹的创建 这里可以指定相对路径和绝对路径 如果没有指定文件夹的绝对路径 ...
- 神奇的 SQL 之团结的力量 → JOIN
前言 开心一刻 闺蜜家暴富,买了一栋大别野,喊我去吃饭,菜挺丰盛的,筷子有些不给力,银筷子,好重,我说换个竹子的,闺蜜说,这种银筷子我家总共才五双,只有贵宾才能用~我咬着牙享受着贵宾待遇,终于,在 ...
- java ThreadLocal线程设置私有变量底层源码分析
前面也听说了ThreadLocal来实现高并发,以前都是用锁来实现,看了挺多资料的,发现其实还是区别挺大的(感觉严格来说ThreadLocal并不算高并发的解决方案),现在总结一下吧. 高并发中会出现 ...
- 整理了适合新手的20个Python练手小程序
100个Python练手小程序,学习python的很好的资料,覆盖了python中的每一部分,可以边学习边练习,更容易掌握python. 本文附带基础视频教程:私信回复[基础]就可以获取的 [程序1] ...
- django-URL认识(一)
URL由三部分组成:资源类型.存放资源的主机域名.资源文件名.也可认为由4部分组成:协议.主机.端口.路径 URL的一般语法格式为:(带方括号[]的为可选项): protocol :// hostna ...
- Xbim.GLTF源码解析(二):IFC和GLTF的对应关系
原创作者:flowell,转载请标明出处:https://www.cnblogs.com/flowell/p/10839179.html IFC IFC是建筑信息模型(BIM)数据开放的国际标准,在建 ...
- 如何让OKR实践变得更简单一些
什么是OKR 近几年OKR的概念在国内开始流行起来了,之前公司也有人想实施OKR,但现在看来之前的OKR实施者只是在哪儿看了一下OKR的资料,本着跟老板邀功的想法比较功利的在推进,所以基本没有效果,今 ...
- Python基础入门总结
Python基础入门教学 基础中的基础 列表.元组(tuple).字典.字符串 变量和引用 函数 python视频教程下载 基础中的基础 解释型语言和编译型语言差距: Python概述 解释器执行原理 ...
- Golang 实现华为云 DMS 签名
构造请求 首先构造请求,也就是要对哪个具体接口进行访问,需要提供什么必要的参数.在构造请求(点击查看中可以看到,对 DMS 服务来说必要的请求构成包括以下部分 请求URI,例如 https://dms ...