LATEST POSTS

Bayesian Methods in Robotics

Sampling-based Motion Planners

Motion Planning in Robotics

Visual SLAM - An Introduction

Simulataneous Localization and Mapping - An Introduction

Coverage Problem in Mobile Robotics



ROBOT OPERATING SYSTEM - COMMAND LINE TOOLS


ROS is an opensource middleware framework providing seamless interaction between software-software and hardware-software components of robots. With features like package management, hardware-level abstraction and support for almost all kinds of software tools and packages needed for robotics; ROS creates a language agnostic environment that allows development under the same umbrella.

The most important features of ROS include software packages for perception, control, data-manipulation and data logging among others and the ability to sustain a system running across multiple machines asynchronously. It also supports 3D visualization and simulation platforms like RViz and Gazebo.

This article explains the important aspects of ROS, common tools and their usage.

NOTE: This article may be best suited for readers with some previous exposure and awareness about ROS as most of content is a concise summary and aimed at covering the breadth of the concepts rather than being thorough.



Introduction


The communication architecture is the backbone of the ROS ecosystem. It supports mainly two paradigms - one, the synchronous RPC-style communication through services and two, the asynchronous publisher-subscriber based communication. Most of the concepts in ROS revolve around deploying multiple software packages for different tasks and use either of the two communication techniques as per requirements to make the distributed robotic system interact and work together.

It is important to understand the ROS filesystem where packages are the easiest to build, release and create code compatible with ROS. Packages have the algorithmic implementations of the concept and all ROS infrastructure along to possibly run nodes(ROS runtime processes) and use other ROS-dependent libraries, datasets, config files.

Also, there are few important concepts about the rules during interactions, limitations of ROS and best practices.

ROS Workspace


ROS uses the concept of a catkin_workspace which basically supports multiple independent ROS packages while handling all the linking with the ROS ecosystem and sharing common resources for the multiple packages within the workspace.

The workspace is essentially a folder where multiple catkin ROS packages can be installed, built and modified. Catkin operates with the meta-build system and uses CMakeLists.txt to build the packages with defined targets, dependencies and integration with the ROS ecosystem.

Create a ROS catkin_workspace

~$ mkdir -p catkin_workspace && cd catkin_workspace && mkdir -p src && catkin_make


Now the ROS workspace is created and the directory structure looks like

Figure 1 - ROS Catkin Workspace Directory Structure

The workspace has 3 main folders:

Source the ROS workspace to make the ROS ecosystem recognize and search the packages define within the package

~$ source catkin_workspace/devel/setup.bash


Create a ROS package

~$ cd catkin_workspace && src && catkin_create_pkg <package_name>     std_msgs roscpp rospy <ros_dependency>


Remember to source the workspace after building the package to register the new developments with the ROS ecosystem.

ROS Computation Graph-Level



Figure 1 - ROS Computation Graph


ROS operates on some fundamental principles involving nodes, messages, topics, parameter server, master, launch files, services and bags..

These components are the essential building blocks of any robotic system working with ROS.

NOTE: On a ROS installed machine, you could try all the terminal commands mentioned below. Package specific commands use the turtlebot package that can be installed with instructions from here.

Figure 2 - ROS Master-Node Integration

IF YOU LIKED THE ARTICLE, DON'T FORGET TO LEAVE A REACTION OR A COMMENT!


Copyright @Akshay Kumar | Last Updated on 05/25/2019

counter
x