ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

how to: Setting up ROS on RaspberryPi [closed]

asked 2012-05-21 12:40:00 -0600

MarkyMark2012 gravatar image

updated 2014-01-28 17:12:24 -0600

ngrennan gravatar image


This is just a small how to re: getting ROS to work on the Raspberry Pi.
  1. Pi Setup

I'm not going to go into a load of details here - but for me the main thing was to boot the Pi with as much memory as possible. With that in mind set the arm224_start.elf to be your start.elf file.

Also ensure you have a reasonable amount of swap space available (The build of ROS is on the Pi itself - I don't have a x-compiler to hand)

  1. Building ROS

This is largely following the Debian Instruction here With a few notable exceptions:

  • Update the turtlesim.cpp file to the attached one - else compilation problems (static_cast<> issue around std::max())
  • Use just make and not "make -j8" - it's a single core machine and all 8 cpp threads will do it hang everything on waiting on IO - trust me I tried - 8 hrs later and still nothing... This step takes somewhere between 1-2 hrs. Not quite sure I left it to it.
  • Before Section 1.5 (Build Higher Level Tools) type export ROS_OS_OVERRIDE=debian:squeeze is it mentioned later in the install. I found you need it sooner.

Then Finish off up to 1.5's "rosdep install -a". At this time having problems getting past this. However this are the higher level fucntions that might be too much for the Pi.

Once that's done you should be able to run ROS. I've attached a small screen shot of rxconsole; turtlesim etc with a move command being published (from the tutorials).

A word of expectation it's slow. I expect the graphics drivers will have much to do with it (which are due to be changed to take advantage of the GPU).

Screen Shot of ROS on Raspberry Pi

But what the heck it's cool (tm) :)

Hope this is of some use/help


PS - If there is some where this how to would be better suited let me know/feel free to move it there.

turtle.cpp change the extension to cpp

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Kevin
close date 2012-10-07 08:44:34


Great job! Will definitely try as soon as my Pi arrives. Even when it is slow, do you think it is usable when you distribute ROS-nodes over several Raspberry Pis?

TillScout gravatar image TillScout  ( 2012-05-30 20:39:30 -0600 )edit

Yep that's what I'm hoping. As yet (As you'll see below 1.5 is proving troublesome) but I think the lower level stuff - distros will work well. Currently I'm slightly side tracked hoping to install rosjava on it too

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-30 21:13:40 -0600 )edit

ok, I was expecting that. I hope that it is possible to run a full ROS installation on a strong master but have several Pi slaves with only low level functionality that take care of certain tasks only (like a Pi that does only arm navigation in a more complex robot that runs a quadcore master or so)

TillScout gravatar image TillScout  ( 2012-05-31 01:06:46 -0600 )edit

TilScout: Stick with Electric for now. I had ZERO luck getting Fuerte installed, but Electric went smoothly. Also, consider running Raspbian as the OS and doing the 800Mhz OC. That plus running OS off external drive makes things run a LOT smoother. You should be able to do what you're wanting to.

mkopack gravatar image mkopack  ( 2012-05-31 04:25:44 -0600 )edit

@TillScout - yep I think that's a sound plan @mkopack lower level stuff should be working okay - good to hear Electric is a stable install! - rviz working? :)

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-31 05:44:28 -0600 )edit

@TilScout - yep I think that's a sound plan

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-31 05:44:33 -0600 )edit

didn't try Rviz. As you said, everything is rather SLOOOOOOOW. I need to hook up an external USB drive and set up using that as that seems to make the whole Rpi run a LOT faster. on the Plus side, RPi #3 arrived today :) so I should be able to set all 3 up and make them a nice little ROS cluster.

mkopack gravatar image mkopack  ( 2012-05-31 17:21:59 -0600 )edit

Oh, and no dice on using Raspbian with Electric. Electric insists on having libboost1.42-dev-all and that doesn't exist for Raspbian. installing 1.49 (which Raspbian has) wouldn't get me past the error so I gave up for now.

mkopack gravatar image mkopack  ( 2012-05-31 17:23:04 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2012-05-21 12:40:35 -0600

MarkyMark2012 gravatar image

Self answered ...

edit flag offensive delete link more



Please, please, please put this on the wiki. That would definitely be the place to put it. Maybe something like would be a good place?

mjcarroll gravatar image mjcarroll  ( 2012-05-21 13:00:50 -0600 )edit

Perhaps ROSberryPi would be better :)

Eric Perko gravatar image Eric Perko  ( 2012-05-21 14:06:18 -0600 )edit

Up will do this eve - liking the names :)

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-21 19:05:38 -0600 )edit

Can you upload the actual error message? Sounds like std libs are not getting included for some reason.

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-25 17:01:15 -0600 )edit

I've finally set up a Wiki page - hope it's okay @mkopack I added your comments re: Raspbian. Please feel free to edit as needed. It can be found here:

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-31 11:24:23 -0600 )edit

answered 2012-05-31 19:10:30 -0600

MarkyMark2012 gravatar image

This is just a clearer answer to the Wiki page (As mentioned in the comments)

(Credit to @mkopack for the Raspbian info)


edit flag offensive delete link more


have you tried to get any USB cameras to capture video and publish it with image_transport?

Kevin gravatar image Kevin  ( 2012-09-23 04:34:21 -0600 )edit

Yes and it works. Tried is the other day for, rviz on my main PC with usb_cam, custom robot publisher node, and roscore et al all on the pi. Was running about 60% CPU

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-09-23 21:37:17 -0600 )edit

answered 2012-05-26 05:06:07 -0600

mkopack gravatar image

updated 2012-05-26 07:19:44 -0600

Edit: Updating this to include some solutions to get things farther:

The issue here is that I'm running Raspbian for the OS and they had /tmp set up to be in RAM. I had to do the following to fix it:

1) in .bashrc, add: export TMPFS=/var/tmp

2) then edit /etc/default/rcS and comment out the line that reads: RAMPTMP=yes

3) Reboot.

Additionally, it appears there was some sort of error in the install scripts that placed ROS in /opt/ros/fuert not in /opt/ros/fuerte.

I had to do a: sudo mv /opt/ros/fuert /opt/ros/fuerte to rename it, after performing step 1.3.2, and then repeat 1.3.2 to get it to put everything in the right place.

When I got to the "rosdep install -a" step though, I ran into the problems found here:

Unfortunately, I'm stuck again and I need to switch over to doing grad school work today. I'll try to get back to this tomorrow.

edit flag offensive delete link more


Looking at the first space left on device...have you maxed out your SD card? The distro is only 2GB

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-26 05:09:36 -0600 )edit

Also, I'm getting this output when the setup.bash runs: rospack could not be found, you cannot have rosbash features until you bootstrap ros

Not sure if that's part of my problem, nor why I'm getting that.

mkopack gravatar image mkopack  ( 2012-05-26 15:29:11 -0600 )edit

I've not got past rosdep install -a again due to - this doesn't seem to work for me. To be honest I'm not sure how well the pi will get on with these processes.

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-29 11:26:14 -0600 )edit

ok, so you're having the same problem then? I was going to ask how the heck it worked for you but not me!

mkopack gravatar image mkopack  ( 2012-05-30 12:01:41 -0600 )edit

Ok, I'm going to give the instructions for Electric a try. It's a bit older and might have better Debian support.

mkopack gravatar image mkopack  ( 2012-05-30 12:03:14 -0600 )edit

Ok, electric install completed. I'm going to try to run through the tutorials in a bit... Will report once I give it a try.

mkopack gravatar image mkopack  ( 2012-05-30 16:56:45 -0600 )edit

Yep same place as you - (I've edited the original to clarify) at the moment you should be able to set turtle sim etc working?

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-05-30 21:15:36 -0600 )edit

@mkopack I am trying to get ROS Electric on to Raspberry Pi, if you were successful in your efforts then can you kindly put up an image ? Much appreciated

Arkapravo gravatar image Arkapravo  ( 2013-03-10 08:26:15 -0600 )edit

Question Tools



Asked: 2012-05-21 12:40:00 -0600

Seen: 8,159 times

Last updated: May 31 '12