-
Notifications
You must be signed in to change notification settings - Fork 1
Theory and Getting Started
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:
Parallel Execution
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.
Parallel Development
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.
Helpful Packages and Features
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.
Industry Standard
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.
- Amazon
- Aurora
- AutoX
- Boston Dynamics
- Clearpath Robotics
- Cobalt Robotics
- Cruise Automation
- DoorDash
- Exyn Technologies
- FarmWise
- Fetch Robotics
- General Motors
- Houston Mechatronics
- Iris Automation
- Kaarta
- Locomation
- Maidbot
- Marble
- Neato Robotics
- NVIDIA
- Open Robotics
- Pick-it
- RE2 Robotics
- Samsung
- Simbe Robotics
- Torc Robotics
- Udelv
- Vecna Robotics
Many robotics research institutions also use ROS
To get started using ROS, it is best to install it. Then, with the above concepts in mind, take a look at the following tutorials and resources to get started learning ROS:
List of ROS Tutorials and References
- ROS Tutorials: ROS/Tutorials - ROS Wiki
- Make sure to follow the catkin part of the build process, as that is the most recent build tool
- Also, there are some good code examples for writing publishers, subscribers, services, and much more
- CS 4023 - Intro to Intelligent Robotics: CS 4023/5023 - Intro to Intelligent Robotics - Spring 2019
- If you want to learn ROS, the best way is by doing a project in it. Try to do Project 1 (located in Assignments) and if you can get that to work, then you'll be on your way to being a master of ROS
- You'll need to use Homework 2 to help get the turtlebot stuff set up correctly
- Reference the project1 branch of the Yeetbotics code if you run into difficulty
- Yeetbotics D*Lite: GitHub - jkleiber/intro_robotics_ws: Intro to Intelligent...
- This was a class project for CS 4023 - Intro to Intelligent Robotics. It is a ROS project and you can see how it is set up to get inspiration for your own things
- If you take this class in the future, make sure to cite this code if you use it, or else you will get flagged for academic misconduct
- ROS C++ Style Guide: CppStyleGuide - ROS Wiki
Coming Soon!
-
General
-
Robot Theory
-
Software Resources
-
Electrical Resources
-
Mechanical Resources
-
Past Competition Lessons