16.04 Configuration ROS-kinetic environment for Ubuntu

ROS since its inception has gone through 11 editions, the latest version is also the most used ROS Kinetic Kame version, the following is mainly on the Kinetic configuration, the system I use Ubuntu 16.04 LTS

Configuring the system software source
to source software is installed, for example, you first need to configure Ubuntu system allows restricted (not entirely free software), universe (Ubuntu does not provide official support and patches, thanks to community support), multiverse (non-free software, completely provide support and patches) three source software. If you have not done modifications to the system source software, Ubuntu system will default after installation to allow more than three software source. To ensure correct configuration, we recommend open source software Ubuntu Software Center configuration screen and check the options is the same as the figure below.
General default download address is not Ali cloud Ali cloud the proposed change

Here Insert Picture Description
Add source software

Ubuntu sources.list was saved software source address of the file system, the / etc directory under the apt, in this step we need to add / ROS software source address to the file, to ensure that subsequent installations can be found ROS download the correct software address.
Open the terminal, enter the following command can add ROS official software source image:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

In order to improve download speed, we recommend using any of the following domestic source image

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://mirror.sysu.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
sudo sh -c '. /etc/lsb-release && echo "deb http://ros.exbot.net/rospackage/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'

Add Key
using any of the following Add a command key

sudo apt-key adv ——keyserver hkp://ha.pool.sks-keyservers.net:80 ——recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

Installation ROS
first update to add software source

sudo apt-get update

ROS system is very large, the package contains a number of features, libraries and tools, so the ROS official to provide users with a variety of installation version:
the following is recommended this is only one step versions: Desktop-Full

Desktop full version to install (Desktop-Full): This is the most recommended one installed version, in addition to the basic functions included ROS (core function package, build tools and communication mechanisms), but also contains a wealth of general-purpose library robot, Feature Pack (2D / 3D awareness, map modeling robot, autonomous navigation, etc.) and tools (rviz visualization tools, gazebo simulation environment, rqt toolbox).
Use the following command to download and install:

sudo apt-get install ros-kinetic-desktop-full

Initialization rosdep
rosdep ROS is the tool that comes with the main function is dependent on certain functions for the package installation systems, tools but also some of the core functions of ROS package must be used. After completion of the above steps the installation, use the following commands to initialize and update:

sudo rosdep init
rosdep update

Set the environment variable
now ROS has been successfully installed in the computer, the default in / opt path. In subsequent use, since ROS input terminal is frequently used commands, the need before use simple environment variable settings.
Ubuntu default terminal is bash, ROS set environment variables in bash command as follows:

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

If you are using zsh terminal, then zsh to bash into it.
At last

roscore

Will find, ros already run up
Here Insert Picture Description

Published 11 original articles · won praise 0 · Views 3768

Guess you like

Origin blog.csdn.net/weixin_44827364/article/details/103980537