32
$\begingroup$

Can ROS run on a Raspberry Pi?

ROS is resigned to run on a network of machines, with different machines, even different cores on the same machine doing different jobs. Can one of those machines be a Raspberry Pi?

I am considering using an R-Pi as the EtherCAT master on a mobile robot, communicating with the main PC over WiFi, using a dongle.

  • Can an R-Pi even run ROS at all?
  • Would an R-Pi have enough processing power to do some 1kHz servoing?
  • Would it be possible to run some servoing on the host through the WiFi connecion?
$\endgroup$

14 Answers 14

18
$\begingroup$

The official RaspberryPi operating system is a version of Debian, but there's also an ArchLinux version on their website.

Despite ROS's claim of being cross-platform, they only officially support Ubuntu at the moment. However, experimental installations have been made for the following OSes, according to ros.org:

  • OS X (Homebrew)
  • Fedora
  • Gentoo
  • OpenSUSE
  • Debian
  • Arch Linux
  • Windows

While I don't have any first-hand experience (my two Pis are shamefully sitting in the corner), ros.org has a quick and dirty setup guide.

There are similar instructions on answers.ros.org.

In case you run into any problems, the RaspberryPi forums might also be of some help. And, of course, SE's got it's very own PI.SE (Thanks to @Jivings and @ppumkin for the reminder).

Otherwise, just google "ros raspberry pi" and you should find plenty more information.

$\endgroup$
5
  • $\begingroup$ IMO, Debian is the better choice for the Raspberry Pi. I believe you'll find it easier and a better supported from a community perspective as oppose other flavors of the Linux Kernel. $\endgroup$
    – DogEatDog
    Commented Nov 4, 2012 at 1:18
  • 3
    $\begingroup$ @DogEatDog I disagree, Arch is also very well supported. Also, shameless plug here; Any Raspberry Pi issues from this question will be gratefully received at Raspberry Pi as well as the official forums. $\endgroup$
    – Jivings
    Commented Nov 12, 2012 at 0:09
  • $\begingroup$ @Jivings I can't believe I forgot to check RaspberryPi.SE ... Though a quick search for ROS does not throw up any results so far ;-) $\endgroup$
    – ThomasH
    Commented Nov 12, 2012 at 14:22
  • $\begingroup$ @ThomasH - Do you think that you could add to your answer a link to come over to PI.SE We got allot of answers there and possibly some solutions.I don't just want to edit your answers as it is correct. $\endgroup$
    – Piotr Kula
    Commented Nov 12, 2012 at 14:37
  • $\begingroup$ Because ROS runs under BSD - It is not supported until the newest release of FreeBSD- And off course ROS source will have to run on the newest BSD code too. It all to-do with hard float and some driver updates for that specific ARM made by BroadCom (PS - The video driver from BCM is going opensource so there should be allot more support in the future) $\endgroup$
    – Piotr Kula
    Commented Nov 12, 2012 at 17:15
6
$\begingroup$

Robotics is hard enough as it is when all your dependencies are working. The last thing you need are additional problems coming from incompatible components or unsupported combinations.

I looked into this a little and here was my progression:

Raspberry Pi doesn't support Ubuntu because it's ARM CPU uses an older instruction set (ARM v6 I believe?) and the Ubuntu team dropped support for this back in like 2009.

Beaglebone is similar to a Raspberry Pi in many ways and has a newer instruction set so it will run Ubuntu. However the 'best' Ubuntu ARM distribution is coming out of the Linaro project and they dropped support for the Beaglebone a few revisions back (last was Linaro 12.03) because it's using an older TI OMAP 3 processor (welcome to the wonderful world of rapid smartphone progress).

My next step was to look at the TI Pandaboard which uses the newer OMAP 4 processor that is currently supported, but it costs closer to the $200 range.

But now Ubuntu officially released for the Nexus 7. At 200 dollars, the Nexus 7 gets you everything a Raspberry Pi offers plus a lot more. Keep in mind that even with a Raspberry Pi, once you add in the charger, wifi adapter, storage card, and cables you're creeping up closer to 100 dollars than 35 dollars so imho the Nexus 7 is a much better deal.

Lastly, don't try and output a 1 khz signal out of a non real time OS. Attach yourself a cheap microcontroller like the PJRC Teensy (Arduino clone) and let it handle the simple real time tasks for you. This way you dedicate the inexpensive CPU to these simple time sensitive tasks. At 16 MHz with support for multiple timers, a little AVR MCU can handle a half dozen tasks like this without issue.

$\endgroup$
1
  • 1
    $\begingroup$ Running your robot with Ubuntu on a Nexus 7, cool idea! By chance, do you know of any robotics projects using the nexus in this way? $\endgroup$
    – bit-pirate
    Commented Nov 11, 2012 at 23:48
6
$\begingroup$

This question was well-answered by ThomasH, but in addition I just want to suggest the possibility of wireless tethering the quadcopter to a laptop. That is, just write a nice-and-fast wireless (wifi?, bluetooth?) communication protocol for the quadcopter, then do the heavy CPU stuff on a laptop, while transmitting the instructions and sensor queries to the R-PI. We tried many implementations, and settled on a similar setup for all our small robots. Also almost every jaw-dropping quadcopter implementation is set up in this way. It makes life easy, and allows you to use the big-hitter libraries without sacrificing speed.

Let's be honest here, that quadcopter is very likely not going to get outside wireless range of your laptop anyway.

$\endgroup$
3
  • $\begingroup$ To be clear, when you say "heavy CPU stuff" here, you mean high-level controls that involve lots of number crunching, such as SLAM or computer vision. Low-level flight control will have to occur in real-time and at high enough frequencies that it won't be feasible over a wireless connection. $\endgroup$
    – yoos
    Commented Oct 31, 2012 at 7:42
  • $\begingroup$ The flight control, as in servo outputs, will have to be generated by on-board electronics, yes. But the flight commands, like desired rotor speeds and such can be generated by a tethered pc (bluetooth is amazing for this), but there's no reason to if you can run those on the R-Pi. If that's the case, then yes, "heavy CPU stuff" refers to high-level planning, multi-vehicle coordination, SLAM, CV, etc. $\endgroup$ Commented Oct 31, 2012 at 12:35
  • $\begingroup$ "That is, just write a nice-and-fast wireless (wifi?, bluetooth?) communication protocol for the quadcopter" do you know any good protocol that can be adapted i.e. with its implementation library? $\endgroup$ Commented Jan 11, 2021 at 15:58
4
$\begingroup$

Yes it does, but installing ROS on Debian is do-able, yet not trivial.

$\endgroup$
4
$\begingroup$

An experimental repository has just been populated with ROS Groovy packages for Raspbian (wheezy), instructions to use it can be found here:

http://www.ros.org/wiki/groovy/Installation/Raspbian

The repository has 350+ packages and the core ROS packages can be installed in a matter of minutes on a fresh Raspbian install.

$\endgroup$
2
$\begingroup$

I would check out the rosserial project. Basically, it generates some code for Arduino for communicating over serial to a ROS node on the computer. I bet you can convert it to the Raspberry Pi, so that you can use some other protocol to communicate between the Pi and the host computer.

$\endgroup$
2
$\begingroup$

There is a project called ROSpberry Pi you can check out. And a company in Pasadena called Acrobotic is now selling SD images of ROSpberry pre-installed.

$\endgroup$
2
$\begingroup$

Yes. Sure. We've been doing this long time.
ROS is not an "OS" and it's not big. It's just "middleware" which runs well in "Raspbian".
We just burn with the official Raspbian(so we hope it can make us work on a "stable" environment) and compile the ROS with source. Here's the step-by-step link(for ROS Kinetic):
http://wiki.ros.org/ROSberryPi/Installing%20ROS%20Kinetic%20on%20the%20Raspberry%20Pi
you can try ros_comm or desktop.
I tried ros_comm and then add other packages later.

$\endgroup$
7
  • 1
    $\begingroup$ Why don't you use Ubuntu Mate and simply install ROS from the packages? $\endgroup$
    – FooTheBar
    Commented May 15, 2017 at 9:49
  • $\begingroup$ because Ubuntu Mate runs slow on the ARM chip on raspberry, both Pi2 and Pi3. Raspbian is lite debian and runs really good on the ARM chip. @FooBar $\endgroup$
    – Nick Qian
    Commented May 15, 2017 at 13:38
  • $\begingroup$ Any source for that? I haven't experienced any speed problems. $\endgroup$
    – FooTheBar
    Commented May 15, 2017 at 16:58
  • $\begingroup$ I didn't try more after I choosed raspbian. maybe now Ubuntu Mate dist for raspberry is better and smoothly to use. I have interest to try it again because in ubuntu the software management is good. But how about the GPIO? maybe ubuntu new bersion also has gpio support, i don't know.... $\endgroup$
    – Nick Qian
    Commented May 16, 2017 at 1:12
  • 1
    $\begingroup$ So why do you say that it's slow if you haven't tested? $\endgroup$
    – FooTheBar
    Commented May 16, 2017 at 13:22
1
$\begingroup$

In contrast to what has been said in the other (rather outdated) answers, I've successfully tried running ROS on either Raspbian or Ubuntu with a Raspberry Pi 2 Model B.

After some back and forth, I'll stick with Ubuntu: While I didn't managed to access the Raspberry camera module with Ubuntu, I see major advantages in its superior package management and compatibility with ROS. You need some odd new ROS feature? Just sudo aptitude install the package and you're all set.

$\endgroup$
1
$\begingroup$

I have experience installing ROS on a Raspi using Ubuntu Mate as an operating system. It is essentially a regular ubuntu operating system, but on an arm device. It can install ROS through pre-built binaries. It requires no more configuring than a regular Ubuntu laptop. I know that there is one version of the Pi that is not officially supported (I think it is the 3B+, it's been a while since installation thankfully), but somebody figured out how to get around that issue on a forum post I googled.

Update:

With official support for UBUNTU on Raspberry Pi, installing ROS 1 on a Raspberry Pi is a non-issue. You can install Ubuntu following Canonical's docs here.

$\endgroup$
2
  • 1
    $\begingroup$ link to forum post? $\endgroup$
    – drerD
    Commented Aug 15, 2019 at 16:07
  • $\begingroup$ I already linked to the website so that you can download Ubuntu mate. It is literally as simple as a regular ubuntu machine to install ROS. I do not know why you need a forum post link... It was for a school project on private repositories (so, ROS source code not public), but Ubuntu mate is publicly available. Here is another, more specific link. $\endgroup$ Commented Aug 15, 2019 at 16:09
0
$\begingroup$

ROS runs amazingly well on my "Raspberry PI 3B+" with any of the below images from Ubiquity robotics page.

https://downloads.ubiquityrobotics.com/pi.html

It is ROS Kinetic and you can install other packages like Gazebo as well.

$\endgroup$
0
$\begingroup$

As of 2020/2021, the answer is yes, ROS runs on Raspberry Pi.

https://roboticsbackend.com/install-ros2-on-raspberry-pi/ https://www.youtube.com/watch?v=AmuLiA840fA

Both of these resources use Ubuntu; RaspberryPi is a first class target for Ubuntu now. https://ubuntu.com/raspberry-pi

$\endgroup$
-1
$\begingroup$

You can try this tutorial for ROS run on a Raspberry Pi, it works http://www.instructables.com/id/Raspberry-Pi-and-ROS-Robotic-Operating-System/

$\endgroup$
1
  • $\begingroup$ Link-only answers are generally discouraged. You should include the main points in your answer. $\endgroup$ Commented Nov 23, 2017 at 20:11
-2
$\begingroup$

yes,

find the download here:

http://answers.ros.org/question/200504/raspbian-jessie-ros-indigo-download-image/

including framebuffer driver for C-Berry TFT display

$\endgroup$
1
  • $\begingroup$ Sorry Martin, but link only answers aren't really very helpful on Stack Exchange, if you quote the relevant information from the page (it is CC-BY-SA licensed) your answer would be much more useful, and your down votes might get reversed. $\endgroup$
    – Mark Booth
    Commented Jan 21, 2015 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.