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

use chroot to rosmake

asked 2013-06-11 06:01:53 -0600

jmueller gravatar image

updated 2014-01-28 17:16:50 -0600

ngrennan gravatar image

Hi everyone,

I read on multiple places about using chroot and qemu to compile ROS on a Raspberry Pi (the same will probably be done for other systems). There, it comes down to somehow map the calls of gcc to use the ARM-gcc and produce ARM binaries. Now what I want to do is compile new ROS nodes for ARM, actually using the convenient rosmake. Is that possible?

I went down some roads, none with actual success (for reference:, and also this: modified for ubuntu to my best belief - I apologize for the inconvenience, but I am not allowed to post links here). So instead of stating what I tried here right now and listing the errors I encountered (which would be cumbersome for everyone involved, as I don't really know what I am doing, but could be done) I wanted to ask if someone already managed to get ros commands running on an emulated system or has set up a cross-compile variant of rosmake? There might be a documented way out there, but I am lost right now.

All hints are appreciated :)

Edit: This one will not work for what I intend: It says so explicitly: "No Nodes!"

Another Edit: So I finally set up sb2 and proved it working by compiling a sample program for ARM (sb2 gcc foo.c -o foo-arm). However, if I run the whole rosmake in sb2, my packages get skipped because of "No rule to make target None". I don't see where this leads me, but I suppose I'd need to pack the individual gcc commands into an sb2 "environment". I also had a look at the rostoolchain.cmake file in $ROS_ROOT, but that seems to be ignored. What do I have to do in order for my distribution to take notice of that one?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-03 22:43:15 -0600

po1 gravatar image

For the RPi you can setup a chroot image with debootstrap and qemu, assuming you are using Debian or Ubuntu, and ROS Groovy on the RPi, you can follow the instructions on the following page:

Then when you are inside the chroot, I would recommend you install ros-groovy-ros following the instructions available on the wiki: as well as build-essential, you should then have all you need to build packages for your RPi.

edit flag offensive delete link more


Oh, this looks very promising- I can't believe I did not think about setting up ROS in the chroot environment, but I am installing it at this moment. I will have to figure out the easiest way to get my executables to the pi later on-this will probably be using the SD card image itself for the chroot

jmueller gravatar image jmueller  ( 2013-07-07 23:26:42 -0600 )edit

So, as expected,this works :) I also used my Pi's SD card (setup described (here)),but did have to comment out the contents of /etc/, as described by kinsa (here)

jmueller gravatar image jmueller  ( 2013-07-08 01:50:23 -0600 )edit

Question Tools


Asked: 2013-06-11 06:01:53 -0600

Seen: 1,292 times

Last updated: Jul 03 '13