You want to start learning robotics by the programming way, but you don’t know where to start ?
Robotics is huge, there are so many things to do and to learn. It can be quite discouraging to see everything you can do, but only to start learning by programming a LED to blink.
We have some good news for you : ROS is certainly the way you are looking for. In this post, we’ll see what is ROS, what you can learn from it, and give you some guidelines about how to start learning it, and create some cool robotics applications !
What is ROS ?
ROS (Robot Operating System), is a framework for writing robot software. This project started in 2007 by Willow Garage, to provide roboticists a standard set of configuration and tools, so they can write better software, faster.
ROS is now powering many kinds of robots, such as drones, autonomous cars, human-like robots, robotic arms, and many more… Check out Niryo One to get an example of a 6 axis robotic arm powered by ROS.
Here is an example of the control of the robot, with the help of ROS. ROS makes it easy to send commands from a web interface to the motors (with some steps between them).
To use ROS, you will need a Ubuntu OS running on your computer (some other OS are supported, but it’s better to start with Ubuntu) . We recommend using Ubuntu 16.04 along with ROS Kinetic (2016 version), as it is, for now, the version which is most developed and maintained.
Why learning robotics with ROS ?
Robotics is hard to develop, and robots are often very complex systems that require an expertise in many fields. The problem with robotics is that people keep reinventing the wheel. Let’s say you have one year to build a robot from scratch (programming part). You will spend almost half the time to create a basic communication and computation system, and at the end of your project, you’ll notice that you didn’t go further that what everyone else is doing.
ROS is here to provide you with a set of tools, and some “plumbing” to start your application from a higher level. You don’t need to worry about how the different parts will communicate. Plus, you’ll get some free integrated tools, such as motion planning, object recognition, 2D navigation, 3D room mapping, etc. This way, you don’t need to re-do what have been done before by hundreds of developers, and you can stick to the core of your project.
What you will learn with ROS
Robotics is about mechanics, electronics, and computer science. With ROS you’ll mostly learn about the last one. You will learn about :
- Programming (C++ / Python) to develop your application.
- System administration and network, to install and maintain ROS on different OS versions, handle source/binary packages, communicate with external devices using various protocols (HTTP, WebSocket, I2C, SPI, …).
- Robotics concepts, such as inverse kinematic, localization, 3D mapping, artificial intelligence, …
By using ROS you’ll have a core base for your robotics application. With this, and the number of tools available, you’ll be able to :
- Communicate between all your sensors, controllers, actuators, user interfaces, …
- Handle big and complex robotics systems. It will be easier to get a global picture of a huge robotics application.
- Extend your robotics knowledge. ROS is powering many kinds of robots. Even if you are programming a drone, you will learn useful things that can apply later to a robotic arm for example.
How to learn robotics with ROS – The basics
The first part is to learn ROS basics. This is quite a tough part, and you won’t get to know everything in one day. But keep motivating yourself, and after a while you won’t regret the time you spent ! We give you here some useful resources that will certainly help you in your learning journey :
- Watch ROSCON 2012 on Youtube. ROSCON is where developers, maintainers, and user meet every year, to discuss the past progress and the way to go. This video series will help you understand some fundamental concepts, and give you tons of application ideas.
- Bookmark ROS wiki, where you’ll find a lot of tutorials for beginners. Those tutorials will teach you how to set up a basic ROS application while using the core communication concepts.
- If you can’t wait to see real and powerful projects running in real life, check out existing robots powered by ROS with open source code, available for you to learn.
First, you will need to understand ROS concepts : how Topics, Services, and Actions are working (well, you can keep Actions for later if you feel overwhelmed). It is important to understand the communication concepts in ROS at the beginning, so you can start to think about your project architecture. After you understand how Nodes communicate with each other, you will be able to go further.
Then we strongly encourage you to find yourself a robotics project, and see how you can use ROS to empower your robot. Having a personal project will keep you motivated and allow you to learn faster.
How to learn robotics with ROS – After the basics
Time for you to do more serious work, with more global and useful packages ! The way you learn now will mostly depend on the kind of robot you want to program. Here are some packages and resources you might want to check out :
- URDF : a XML-like representation of your robot. With that you can easily have a global model of your robot inside your ROS system, and allow other packages to use it.
- Rviz : a simulation tool that will use the URDF format of your robot to show a 3D visualization.
- Moveit : a complete motion planning framework. Moveit will use some commands you give it along with the URDF file, and will compute a full trajectory for your robot.
- ROS control : a set of controllers + an interface for your hardware, and you can also plug it to Moveit !
- Rosbridge : a way to communicate between a ROS system and a non-ROS system, using WebSocket protocol.
- IMU ROS messages, to interface your IMU (Inertial Measurement Unit) data with a ROS system.
- Gazebo : a complete simulation tool, including physical constraints and the environment. You can map out a room with a drone on Gazebo, and reproduce it exactly the same way after in real life !
Well, we could write an entire set of books about this parts. You just need to know that many, many packages are being developed about many different robotics applications. When you need to develop a new part, check out before if someone has already done some work on it ! It will save you some time and allow you to progress more efficiently.
ROS and the community – You are not alone !
What’s great, when learning something, is to share your progress with other people, and get answers from other’s experience.
ROS has a huge and growing community. When learning robotics with ROS, we guarantee you that you won’t be alone. Here’s where you can find some help, and meet new robotics passionates :
- ROS answers, which is the “stack overflow” of ROS. Many existing questions and answers are very useful and will help you understand some concepts and solve your problems. You can also ask any question you have.
- ROS github repositories. For almost each package you can find the code online. If you have a problem, and you think this is related to the package code, you can easily open an issue and start a discussion with the package maintainers. You can also contribute to add new functionalities ! That way you can help other people by sharing your work and your progresses.
- ROS mailing list. We advise you to subscribe to it, you will receive news about any robotics projects, releases, users questions… A great way to keep you up to date about ROS development and new features/applications.
We gave here an overview of what you can do to learn robotics with ROS.
ROS will allow you to stop always reinventing the wheel, and start creating impressive robotics applications, very quickly.
If you want to learn ROS with a real robot that you can manipulate yourself (because most of the time industrial robots are too expensive and you can only learn with 3D simulations), then Niryo One might be perfect for you !