Sampling-based Motion Planners
Motion Planning in Robotics
Visual SLAM - An Introduction
Simulataneous Localization and Mapping - An Introduction
Coverage Problem in Mobile Robotics
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.
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 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
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 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.
~$ roslaunch <package_name> <launch_file.launch>
~$ roslaunch turtlebot_teleop keyboard_teleop.launch
~$ rosrun <package_name> <executable_binary>
~$ rosrun &turtlebot_teleop> <turtlebot_joy>
rospackcrawls the ROS_PACKAGE_PATH and ROS_ROOT to extract information from the multiple directories and sub-directories.
~$ rospack list
~$ rospack find <package_name>
~$ rospack profile --length=<number_of_packages>
rosbashis a package with bash/terminal commands and allows for tab-completion and these commands are largely a part of this suite.
~$ roscd <package_name>
~$ rosls <package_name>
pushdto access multiple directories and switch between them seamlessly while also keeping them in the stack
~$ rospd <package_name>
~$ rosed <package_name> <filename>
rosnodeis the package that provides command-line interface to investigate and debug the ROS nodes currently running.
~$ rosnode list
~$ rosnode info <ros_node_name>
~$ rosnode info <ros_node_name>
~$ rosnode kill <ros_node_name>
~$ rosnode kill -a
~$ rosnode ping <ros_node_name>
~$ rosnode machine <machine_address>
rosparamis another ROS package for command-line interface for interaction with the ROS parameters.
~$ rosparam list
~$ rosparam get <parameter_name>
~$ rosparam set <parameter_name> <parameter_value>
~$ rosparam delete <parameter_name>
~$ rosparam dump <file_name.yaml>
~$ rosparam load <file_name.yaml>
(float x, float y, float z)and orientation
(float rw, float rx, float ry, float rz). ROS allows defining messages composed of a collection of different data types.
rosmsgis the ROS package that provides support for messages types and service types.
~$ rosmsg show <message_type>
~$ rosmsg list
~$ rosmsg package <package_name>
rostopicis a command-line tool for investigating into currently operational ROS topics.
~$ rostopic list
~$ rostopic echo <topic_name>
~$ rostopic find <message_type>
~$ rostopic hz <topic_name>
~$ rostopic bw <topic_name>
~$ rostopic info <topic_name>
~$ rostopic pub <topic_name> <msg_type> <msg_data>
~$ rostopic type <topic_name>
rosserviceis a package to provide command-line interface for investigating details about the service. It includes obtaining information about message type, URI or the argument. It eventually also allows to call the service from the terminal.
~$ rosservice call <service_name> <arguments>
~$ rosservice find <service_type>
~$ rosservice list
~$ rosservice info <service_name>
~$ rosservice args <service_name>
~$ rosservice uri <service_name>
rosbagis command-line tool providing inteface with the bags with options to view, modify and observer stored information.
~$ rostopic record <topic_name>
~$ rostopic compress <rosbag_filename.bag>
~$ rostopic play <rosbag_filename.bag>
~$ rostopic check <rosbag_filename.bag>
IF YOU LIKED THE ARTICLE, DON'T FORGET TO LEAVE A REACTION OR A COMMENT!