The Frist ROS Page in Life

This is page designed for ROS beginners. We hope it can help you get begin with ROS and push you forward on your way to success. You can learn the basic knowledge of ROS and be guided for your ROS learning. We prepared a small project for you too, which can be your first ROS project. Enjoy the journey!

ROS stands for Robot Operation System. Its idea came from two PhD students from Sandford University. First published in 2007, ROS provided the developer a well defined communication structure for their robot system. With ROS, you can control a complicated robot with multiple systems. The most common application situations are robotic arms and slam cars.

Learning ROS

 

The best source to begin with ROS is the beginner tutorial provided by ROS Wiki. It is the best way to get basic knowledge and understanding the ROS. ROS Wiki provides 14 different language versions with the tutorial.

Once you done with the 20 beginner tutorials, you will have an idea about what ROS is and how it works. The next step is finding one project from the Internet to play with. You will be more familiarly with what you learn. You can find the one you are interested in here 

If you complete the previous two steps, then congratulations! Now the true journey as a ROS developer just begins. The next step is using ROS to control your own robot. This website will provide one detailed but not completed guideline for you. You could follow the procedures to do our project at your home or create your own project. 

By the date of creating this website, three different versions of ROS are provided at the official website. ROS Melodic Morenia, ROS Noetic Ninjemys, and ROS Foxy Fitzroy. They are supported by different operation systems with different versions. 

When choose your own ROS version, please have this in your mind: the older version will have more sources and more debug suggestions online.

The guideline here is for install ROS Melodc Morenia based on Ubuntu 18.04.

ROS Melodic Morenia is based on Linux. If your computer has Linux as operating system, then you can skip this step.

You do not have to use a virtual machine to run Linux. Having two systems on one machine also works. But be careful when you operate. It is easy to have your original OS be replaced with Ubuntu.

You can download the free VMware player from the official website. For Duke University students, you can download the pro version for free from the school through the link here.

Ubuntu is an operating system based on Linux. Here, we choose Ubuntu 18.04 which is required by ROS Melodc Morenia. 

Download the ubuntu 18.04 from the official website  here, and remember to choose the desktop imagine.

Once you have downloading the installing package, open the VMware player and install the ubuntu 18.04 in it. Here is the instruction you can follow to install the ubuntu in VMware Player.

Now is the final step, install ROS in Ubuntu 18.04. Different from Windows, the installation will be completed by typing several lines of command in the terminal.

When I follow the guideline on the official website, I have met several problems. It seems like the official guideline has several place needs to be updated. This  guideline here would work. 

Install ROS

Basic Concepts of ROS

 

ROS=Plumbing+Tools+Capbility+Ecosystme

Plumbing: ROS has defined a well communication structure for developers. Within its structure, every process would be one node. We only have to define the relationship between each nodes. It is good when dealing with complicated robots.

Tools: ROS has some useful tools. The most popular two are RVIZ and Gazebo, which are useful virtual tools for simulation.

Capabilities: Like Arduino, ROS has a lot of useful capabilities created and posted by developers in ROS communities. You do not have to do from 0 but using capabilities.

Ecosystem: ROS has a big and worldwidly community–ROS Wiki. Also a lot of useful resources could be found on Github.  Knowing how to search recourses from them is a key ability as a ROS developer.

For one single robot, it might have many subsystems with different functions.  When the robot is operated, the robot will have several processes running at the same time. These processes are called Nodes. Nodes are the units of units in the communication structure. To ROS, nodes are executable files.

The Master plays the role of manager of nodes. It also manages the communication between nodes. All the nodes have to register to the master. When we run the whole system, we just need to launch the master and the master will launch all the nodes for us.

The first type of communication bridge is the topic. Between two nodes, there will be one Topic that receives the data from node 1 and publish it to node 2. 

Node 1 is the Publisher. It keeps publishing the data on the topic. The only thing publisher will care about is the topic and the data it publishes. It does not care who is gonna receive the information from the topic and what they are gonna do with this information. The publisher will keep publishing the data and done when there is no more information that has to be published. 

Node 2 is the Subscriber. The way it receives the information is by subscribing to the topic. Like the publisher, the subscriber does not care who is publishing the data. It just keeps receiving information unless no more information is published on the topic. 

Topic is an asynchronous communication type. Information only travels from the publisher to the subscriber. It is a one-direction type of communication. For one topic, it can have many different publishers and subscribers at the same time.

Topic can handle a lot of communication needs of nodes. However, what if Node 2 only needs the information from Node 1 at some particular point? Then we will have the second type of communication bridge–Service

In this type of communication, Node 2 needs to send requests to the Service first and then the Service will send a request to Node 1. Node 1 will reply to the request by sending information to the Service and then Service will send that information to Node 2.  Here we call Node 2 as Client and Node 1 as Server.

Unlike Topic, for one Service, it can have multiple Clients but it can only have one Server. 

 

It seems like Topic and Service could handle all the communication needs. However, there still exists one situation that both Topic and Service can not well handle. For example, in the Service type of communication after receiving the request from Service, Node 2 needs to carry out a  long process that might take half an hour or even longer time depends on the machine’s state. Then how can Node 1 know if Node 2 is still working or stuck at someplace? It is not a wise choice for Node 1 to keep waiting if Node 2 stuck and stops. If so Node 1 will wait forever.

How to solve this problem? If Node 1 can know the status of Node 2 then it can decide to keep waiting or stops and report. There comes the last type of communication bridge–Action

Like the graph shows, Action allows the Client to know the information about Server, like current status. So the Client can decide to cancel the Server’s process when necessary.

The URDF is shorted for Unified Robot Description Format. It is used by ROS to describe the robot. You can create the urdf by just writing the text. You can also use SolidWorks urdf plugin to translate your cad model into urdf files.

The urdf defines the robot as a tree of links, which is also a comb of different chains of links. So as a chain or tree, the relationship between two links would be parent and child. Like in the picture below, link1 is the parent link of link2&3. Link2&3 are two child links of link1. Just like the tree, one parent link could have many child links. However, for one link, it can only have one parent link. This is why we can’t simulate the robots that have two or more chains ending up with one same link.
 
To define a urdf, see the creating URDF files part in the next section.

ROS Sample Project

Click the right picture to go to the ROS Sample Project page, where you will practice your knowledge about ROS to react with robots listed on our website.

This website is built by Yuhua Zhu, an MEng student at Duke Pratt School of Engineering, in Fall 2020 .

If you found any mistakes or have any doubts that you will contact us, please email Dr. George Delagrammatikas:george.delagrammatikas@duke.edu