ROS is a framework for developing software for robotic systems. It allows for parallel execution of many different programs, called nodes, that communicate with each other by publishing and subscribing to topics. ROS also comes with simulation tools, such as Gazebo and RViz, which help simulate an actual robot and help visualize sensor data (respectively).
ROS uses a publisher-subscriber (pub-sub) system to enable communication between parallel programs called nodes. Nodes can publish and subscribe to multiple topics. Shown below is an example of how ROS would work on an SCR robot:
The first thing you'll notice in the above image is all of the nodes. Some nodes take in sensor data (either through a topic like the collision avoidance node, or through electrical connection like the sensor fusion node). Nodes can output messages to a topic, like with the path planning node sending the next goal position to the navigation node. Nodes can run on embedded systems, like the arduino node, and can output commands to actuators.
Oftentimes, a device with a real-time operating system is used to collect sensor data, and then sends it to a sensor fusion system on a more powerful board. We do this in SCR as well, so instead of the sensor fusion node connecting directly to the sensors, it can communicate with an Arduino that sends it sensor data over one topic. The format of this data is called a message. Here is an example of a message:
float64 gps_lat
float64 gps_lon
float64 vel
float64 accel_x
float64 heading
float64 steer_ang
Message data is read by a subscriber node every time a topic gets a new message from a publisher node, so nodes don't have to wait on each other as much. This way, we can execute path planning activities (which are time consuming) without blocking the execution of navigation or obstacle avoidance (which both need to be quick so we don't crash).
There are a few reasons we use ROS:
Since ROS nodes all execute in parallel, we can develop modular code for handling specific tasks. For example, we can figure out where the robot is (localization) in parallel with planning a path. This is really powerful because it would be sub-optimal to figure out where you are, and THEN plan a path. Your robot would have to stop, figure out its location, plan and then move. With ROS, we can do that essentially all at once.
Since all of these ROS nodes are their own programs, we can give project ownership to more than one software developer. Instead of writing one big application for the entire system, the process can be broken out into different parts and programmers can work on things aligned with their strengths or interests easier. In the above diagram, we can easily have five programmers working on five completely different components of the project without interfering with each other. At the same time, the software architecture gets adequate attention, because everything is set up in a distributed manner.
ROS has a lot of default packages that speed up development time considerably. For example, RViz is a useful tool that comes with ROS that allows you to visualize perception data (camera/depth camera, LiDAR, etc.) in real time, and do advanced things like SLAM, which would otherwise require significant effort to implement on your own.
Additionally, there is a ton of community support for ROS. A lot of sensors have ROS drivers, and there are open source packages provided by the community to help do different things. If you ever run into trouble with something, you should see if there is a ROS package that can do it for you. There often is a package for the problem you are trying to solve.
ROS is growing in adoption, and is becoming a go-to tool in the tech industry when it comes to automation and robotics. At SCR, we want to give our members the most important skills that will help them in their future careers. If you want to work on robot software professionally, ROS is a key framework to understand and be able to work within. Even if you are more interested in other areas of software development, ROS has other benefits, such as understanding the importance of software architecture.
The following is a non-exhaustive list of companies that use ROS.
Many robotics research institutions also use ROS
To get started using ROS, it is best to install it(see below). Then, with the above concepts in mind, take a look at the following tutorials and resources to get started learning ROS:
Coming soon!
As of 2019 in SCR, we use ROS Melodic (In the past we used ROS Kinetic). To install this, you'll need a Linux OS - a lot of our members have experience with Ubuntu, so the choice operating system for ROS Melodic will be Ubuntu 18.04
Details about how to install ROS Melodic are on the ROS website. Check out the Linux Dual Booting guide for help with Linux installations if you haven't dual booted your computer before.
We used to use ROS Kinetic, but once ROS Melodic got enough traction to support all the ROS packages we like, we made the switch to the newer version. The below instructions are out of date, but still can be useful for personal projects or understanding how we use ROS
Here is a link that will lead you to an image for installing ROS Kinetic on a raspberry pi. It also has a guide, which is linked further below.
This is the link to instructions on how to install the above image. Read below to understand how to do particular steps in the process
ROS has many helpful packages for our robots. When you find one that is cool, just list it below! Also, please post a link if the package is hard to find by its name
ROS has a lot of terminal commands, some of which are **extremely useful **for debugging. A list of the most useful ones is below, along with a short description of what they do.