A Brief Introduction to ROS
There are many different challenges when creating a robot. You need to process your inputs and perhaps transform your sensor data to a more usable format. You need to localize where your robot is in the world based on the sensor data. You need to plan a path through your environment. There are many more things you need to do for a robot to function. We don’t have time to reinvent the wheel for every vehicle.
ROS provides a common framework so people can create independent robotics programs that can easily communicate with one another, allowing for reuse. ROS provides various robotics tools and enables the communication between robotics programs, both within computers and between devices on networks.
Intro to Robotics Software
This playlist covers the software background, motivation, and basic functionality of ROS
Other robotics middleware and communication frameworks
Communication Between Programs
ROS has several key concepts which describe how programs communicate:
- Topics: A topic is a virtual bus for data which can be thought of as similar to a shared variable between programs. It has a pre-defined format or data structure called a message type, and any data that is sent to the topic must be the correct message type.
- Nodes: A node in ROS is a program (executable) which may execute some action or behavior, such as converting an image from color to greyscale. A node can publish data to a topic and subscribe to retrieve the latest data from a topic.
- Publisher: A publisher is a process that can be created inside of a node to push data to a topic
- Subscriber: A subscriber is a process that can be created inside of a node to retrieve the latest data from a topic automatically and execute a callback function to handle that data.
- Service: A service is similar to a subscriber but works more similarly to a function call. A client node can send a service message to a service which will take the input message and return a (typically) transformed output.
- Action: Actions are a special message type which can be sent from a client to an action server which functions similarly to a service, but also provides intermittent feedback. An action is used in place of a service when the request is expected to take time and involve multiple states.
ROS Nodes
An Approach for Packaging Robotics Software
<aside>
❓ A commonly asked question is “Why do I need ROS?” Some might even say “ROS makes things too complicated! I want to just write my own software with no strings attached.” Indeed, there are situations where it might not make sense to use ROS, if what you are building is limited in scope. In some production systems, it might make more sense to use the underlying communication architecture DDS instead. When working on a complex robot, however, being able to plug-and-play (with some tweaks no doubt) other people’s software is essential.
</aside>
More resources