Configure ROS Environment
ROS, the robot operation system, is a flexible environment for writing robot software. It is not a traditional operating system but a software development framework including a collection of tools, libraries, and conventions to manage and reduce the complexity of robotic systems.
The following configurations are based on the following environment.
- base: raw Ubuntu 16.04.2 amd64
- ROS release: Kinetic (to be installed)
Configure package source and install packages
configure source
Add
apt
package source list to system and useapt
tools to manage ROS packages.Official source
1sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'Mirror for China
1sudo 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'
set up keys
1sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116install packages
individual package
ROS packages are named with prefix
ros-<version>
(for current version, that isros-kinetic
). Find package and get detail description of specific package usingapt
tools, likeapt show
,apt-cache search
, etc.1sudo apt-get install ros-kinetic-<package name>Some packages of ROS are not included in any meta package and this is the only approach to install them.
base packages
core package(communication tools), build tools as well as other bare bone packages. No GUI packages are included.
1sudo apt-get install ros-kinetic-ros-baseThis is generally a recommendation for robot itself or computer without GUI enabled (using tty to interact with).
desktop package
Include some of common GUI packages for desktop usage, also include full package list of base package.
1sudo apt-get install ros-kinetic-desktopfull installation
Include most components provided by ROS. This option is recommended for development on top of ROS infrastructure.
1sudo apt-get install ros-kinetic-desktop-full(This is a huge list of packages, thus prepare a decent network environment and be patient to wait for the installation steps.)
The following content of this post is based on a full installation of ROS packages (using meta-package ros-kinetic-desktop-full
).
Notice:
- ensure various kinds of sources are of Ubuntu source are configured, including
restricted
,universe
andmultiverse
(which are selected by default); - other mirrors are listed at Ubuntu Mirrors page of ROS wiki.
Initialize ROS Kinetic
After package installation, rosdep
utility should be initialized before using ROS package, which can be done by
following commands.
|
|
In more detail, rosdep
utility assists end user to manage system dependencies required by an specific ROS package.
When compiling a ROS package from source which requires external packages other then ROS itself, rosdep
can be used
to configure system properly with dependencies installed. Currently, rosdep
is a separated command line tool from ROS
core packages (though generally, it will be installed when processing meta packages listed above).
For more information about rosdep
, refer to rosdep
document site.
Setting up environment
Then, when launch ROS packages and interact with ROS node with various ROS utilities, a lot of command are
required. To assist user input long names of various parameters, ROS provides auto-complete feature support
for most widely used shell (bash
, zsh
, etc).
To config shell auto-complete for bash
, add the following item to ~/.bashrc
.
Or use bash script to configure this item:
To config shell auto-complete for zsh
, add the following item to ~/.zshrc
.
Or usr zsh script to configure this item:
Install additional packages
The packages installed above are those required to run core modules. When create new modules or explore modules by others provided in source code, compiling ros package is a required process. Thus, the following additional packages are required for configure a development environment of ROS.
|
|