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

use chroot to rosmake

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

jmueller gravatar image

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

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: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=8478, http://sentryytech.blogspot.de/2013/02/faster-compiling-on-emulated-raspberry.html and also this: http://pastebin.com/4Jp1WPTb 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: http://www.ros.org/wiki/eros/Tutorials/Partial%20Cross. 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
2

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

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: http://superpiadventures.com/2012/07/development-environment/

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

edit flag offensive delete link more

Comments

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 -0500 )edit

So, as expected,this works :) I also used my Pi's SD card (setup described http://www.raspberrypi.org/phpBB3/viewtopic.php?f=31&t=8478 (here)),but did have to comment out the contents of /etc/ld.so.preload, as described by kinsa http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ (here)

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

Question Tools

Stats

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

Seen: 1,293 times

Last updated: Jul 03 '13