TurtleBot 2 Tutorial: Installing ROS

Want to install ROS on your desktop PC? It's a lot easier than it sounds

3 min read

Evan Ackerman is IEEE Spectrum’s robotics editor.

TurtleBot 2 Tutorial: Installing ROS

Due to ICRA (among other robot-y things), we had to take a bit of a break from our TurtleBot tutorials, but we're back this week to help get you going with Linux and ROS. The good news is, if you managed to survive the Ubuntu install, getting ROS installed is a cinch. The latest ROS version is called Groovy Galapagos (hence the hippie tortoise above). We'll help you through it, and provide some tips on using Linux, in the next installment of our tutorial. Groovy!

So, Linux. In a lot of ways, Ubuntu is a lot like Windows, and in a lot of other ways, Ubuntu is nothing like Windows at all. Ubuntu has a graphical interface that you can use for some things, but for most of the robot stuff, we'll be dealing with an all-text display mode and a command line. It's a bit of mental shift, and it takes some getting used to, but remembering the basic commands that you need isn't that hard.

If you haven't yet, the first thing you'll probably want to do in Ubuntu (after installing GRUB from our previous tutorial) is find yourself a web browser. Why? Well, any future problems you have can probably be solved with a Google search, and if they can't, there are other web-based ways to get help. More on that later, but let's get Google Chrome up and running so that (among other things) you can keep on reading this tutorial while you install ROS.

As with anything else on Linux, you can install programs via a command line, or you can do it more like you're used to in Windows, by downloading an install file from a website and then running it. We're going to use the latter option; ROS doesn't work that way, but Chrome does, and it's fast and easy. Ubuntu comes with Mozilla Firefox installed, and you're of course free to keep on using that, but we're going to pretend that we only like Chrome just to explore one of the two primary software install options that you'll need to know while using Ubuntu.

Start off in Firefox (you can find it by clicking on the "Dash Home" icon in the upper left of the Ubuntu sidebar), and head on over to www.google.com/chrome/. The website should recognize that you're on Linux and offer you some download options. Choose the one for Debian/Ubuntu, pick the right architecture (32 bit or 64 bit), and download the install file. Once it's finished, you can double click it to run it just like in Windows, and Chrome should install itself. Many applications work in this window-ish way, and even though most of the robot stuff is terminal-based, being able to install things with just a few clicks can help make your overall Linux experience a heck of a lot friendlier.

Once you've got Chrome running, you'll see that a Chrome icon pops up in the Ubuntu sidebar. If you right click that icon, you can make it stick around, like a shortcut. You can also do this with other programs: I have Chrome and a terminal window stickied like that, because they're the two things that I end up using most often.

Ubuntu ROS screen shot.

Okay, so now that we have teh Intarwebs available for help, we can go ahead and install ROS. Like I said up top, it's a cinch, because there's a fantastic step-by-step guide available on the ROS.org Wiki, right here. You really do just have to follow the steps, and there's very little that's complicated. At this point, I'm not exactly understanding most of the commands I'm entering, but what matters is that they seem to work. Make sure and install the full desktop version, and just go on down the guide until you hit the end.

The next step, according to the ROS Wiki, is to run some of the ROS tutorials, but we're not going to go that route. Instead, we're going to swing back around to our TurtleBot, and tackle ROS from there. 

One final tip for today: we'll be dealing with the command line interface (the terminal) a lot more later on, but here's a link to a nice big cheat sheet for terminal commands. Personally, I've started a little Google Doc for myself with a bunch of stuff on it to help me remember things that I end up using often. Sooner or later, we'll all turn into Linux gurus, but until then, it helps to have a quick reference guide to glance at every once in a while.

With a working robot and ROS on our desktop, the next step is to get them to properly talk to each other, which (in my experience so far) is one of the trickiest parts of ROS. Our next tutorial will probably be on basic TurtleBot networking, including how to set your TurtleBot up on your home wireless network and get it to talk to your desktop, along with how to alter your TurtleBot's settings so that it can work away from your home network, which is trickier than it sounds.

The Conversation (0)