Really Getting Started
Before getting started with ROS, we should understand
its terminology first. Let’s have a look at the basic ROS
terminologies and concepts:
1. ROS Distributions: Like Linux distributions (e.g.,
Ubuntu), an ROS distribution is a versioned set of ROS
packages. The latest ROS distribution is Kinect Kame.
Previous versions included Jade Turtle and Indigo Igloo. The
purpose of the ROS distributions is to let developers work
against a relatively stable codebase until they are ready to
roll everything forward. If you want to explore the latest
features in ROS, you can use Kinect; if you want stable
packages, use ROS Indigo.
2. Supported OS: As stated previously, the ROS framework
needs a host OS for its operation; one favorite OS for ROS
is Ubuntu itself. The latest version of ROS is compatible
with Ubuntu 16.04 LTS and 15. 10. The ROS Indigo is
mainly supported in Ubuntu 14.04 LTS. Check out this link
for exploring various ROS distributions: http://wiki.ros.org
3. ROS nodes: Nodes are processes which perform some
kind of computation with the help of the ROS
communication framework. For example, one node can
receive data from laser range finders, and one can send
and receive data to an Arduino.
4. ROS topics: Topics are named buses which exchange
data between ROS nodes using ROS messages. The method
of sending data using topics is called publishing; receiving
data using topics is called subscribing. For error free
communication over ROS topics, the publisher node and
subscriber node should handle the same ROS message type.
5. ROS messages: Node exchanges data in the form of
messages over topics. ROS messages are data structures
which can hold primitive types (e.g., integer, floating points,
Boolean, etc.); arrays are also supported. We can write
custom messages for our applications as well.
6. ROS parameter server: This server is a shared multi-variant dictionary for mainly storing static non-binary data.
Each node can store and retrieve parameters to this server
at runtime. ROS parameters are globally viewable and
accessible to all nodes, and it is mainly used for storing
configuration parameters. This can store almost all types of
primitive data types and is mainly designed for low
7. ROS services: ROS services are a kind of RPC (Remote
Procedure Call) reply/request communication paradigm.
Using services, a node provides a service, and the other
client node can call this service. The client has to wait until
the service provider node sends the result back to the
client. Then, only the client can send the next request.
8. ROS client libraries: The ROS client library helps to
create an ROS node by providing a set of APIs (Application
Programming Interfaces) for implementing ROS concepts
such as topics, services, parameters, etc., in nodes. The
programmer can simply use the client library APIs to use the
ROS concepts. The main client libraries are roscpp and
rospy. Programmers can use roscpp along with their C++
code also (rospy for Python programmers). Go to this link
for a list of client libraries available on ROS: http://wiki.ros
9. ROS packages: The software in ROS is organized as
packages. Each package may contain nodes, configuration
files, third-party software, or anything which we can call as
a module. The package in ROS makes the code reusable,
modular, and easy to distribute. The ROS meta packages
are a kind of virtual package which means not having
nodes or other files except package.xml and manifest.xml.
This is a reference for one or more packages which belong
to a particular group.
10. ROS build system: The build system is responsible for
building the target executable or library from the raw
source code inside an ROS package. The build system used
in new ROS distributions is catkin. Catkin uses CMake
macros and Python script to do the building of source code
inside a package.
11. ROS workspace: The workspace is a place where we
organize the ROS packages. We can create, modify, and
install an ROS package from an ROS workspace. We have
to set a catkin workspace before creating a catkin based
How to Interface a Serial Device
(like an Arduino) to ROS
In most robots, the basic sensors will be interfaced to
I/O boards such as an Arduino, STM32, or Tiva C
Launchpad. So, how can we feed this sensor data to ROS
which is running on a PC?
This is the role of rosserial packages (http://wiki
. ros.org/rosserial). The rosserial meta package consists of
sets of packages to receive serial data from a
microcontroller or any other serial device using a standard
rosserial protocol. Here is how the rosserial protocol works.
Rosserial is a standard protocol for communicating
between ROS and a serial device. The communication is
over a serial transmission line and uses serialization/de-serialization techniques for transmitting ROS messages. The
serial device is sending ROS messages as a packet which
has a header and tail that allow multiple topics and services
from a single hardware device. The packet also contains
flags to synchronize the communication between the PC
and device, and vice versa. Figure 1 shows the packet
format using the rosserial protocol.
SERVO 11.2016 29
Figure 1. Rosserial