Hi Cedric,<br><br>You can create your own account on the wiki.<br><br> - Ken<br><br><div class="gmail_quote">On Wed, May 5, 2010 at 4:44 PM, Cedric Pradalier <span dir="ltr"><<a href="mailto:cedric.pradalier@mavt.ethz.ch">cedric.pradalier@mavt.ethz.ch</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">Radu Bogdan Rusu wrote:<br>
> Cedric,<br>
><br>
> Thanks for sharing your experiences with ROS on gumstix! There's a lot of valuable information here, and in order for it<br>
> to "live on", would you mind setting up a wiki page? I know there's other people out there working on the same thing, so<br>
> if we could centralize this information, that would be great! :) Thank you in advance.<br>
><br>
> Cheers,<br>
> Radu.<br>
><br>
</div>Hi Radu,<br>
<br>
I'd be happy to create/update the wiki page (I've actually preformatted<br>
the email to make it easy to integrate as wiki page). Can anybody<br>
contribute to the pages, or do I need a specific account?<br>
<br>
Thanks for your positive feedback.<br>
<div><div></div><div class="h5"><br>
> Cedric Pradalier wrote:<br>
><br>
>> Hi all,<br>
>><br>
>> I have been spending some effort on making ROS compiling for the gumstix<br>
>> and I'd like to share the experience:<br>
>><br>
>> First of all, I have tried the approach listed on the wiki, and they are<br>
>> not my favourite but they provide a good basis.<br>
>><br>
>> The first thing I have done is installing ubuntu on the gumstix (a guide<br>
>> for that can be found on<br>
>> <a href="http://johnwoconnor.blogspot.com/2009/04/installing-ubuntu-on-gumstix-overo.html" target="_blank">http://johnwoconnor.blogspot.com/2009/04/installing-ubuntu-on-gumstix-overo.html</a>)<br>
>> This simplifies a lot the process of getting all the 3rd party libraries<br>
>> compiled (in particular boost, xmlrpc++, log4cxx, apr can then just be<br>
>> obtained using an apt-get call).<br>
>><br>
>> Once you have installed ubuntu on the gumstix, you could in theory<br>
>> install all the -dev packages and gcc/g++ and compile everything<br>
>> natively. Needless to say that it might be a little bit long given the<br>
>> performances of the gumstix. However, this is a working solution.<br>
>><br>
>> The second solution is to run a gumstix image using qemu and in<br>
>> particular qemu-system-arm (package qemu-kvm-extras in ubuntu 9.10). To<br>
>> this end, you first need to setup a disk image, mount it, copy the file<br>
>> system created using the link above.<br>
>> #> qemu-img create overo-ros.img 2G<br>
>> #> mkdir overo-ros<br>
>> #> mount -o loop overo-ros.img overo-ros<br>
>> #> cd overo-ros<br>
>> #> sudo tar -zxvf /path/to/armel-rootfs-YYYYMMDDhhmm.tgz<br>
>><br>
>> At this point the file system can be umounted and launched with qemu<br>
>> (get the kernel by following the instruction at<br>
>> <a href="http://people.canonical.com/%7Eogra/arm/qemu/README" target="_blank">http://people.canonical.com/~ogra/arm/qemu/README</a>)<br>
>><br>
>> #> umount overo-ros<br>
>> #> sudo qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.28-versatile<br>
>> -hda overo-ros.img -m 256M -append "root=/dev/sda" -net nic -net user<br>
>><br>
>> I have not tried booting the image while it is still mounted. I suspect<br>
>> it does not work so well.<br>
>><br>
>> Once qemu has started the image, one can easily apt-get arm packages and<br>
>> update the image to get all the -dev packages. It is also possible to<br>
>> install gcc and compile all ros in the virtual gumstix. However, this<br>
>> takes forever, even longer than on the real system.<br>
>><br>
>> However, getting qemu running is not a loss of time. Once all the -dev<br>
>> packets have been installed, the ubuntu image can be used to<br>
>> cross-compile. To this end, I first quit qemu, and remount overo-ros.<br>
>><br>
>> The following will assume you have a a cross compiler installed, for<br>
>> instance through buildroot or open-embedded (check the gumstix wiki). We<br>
>> can then use the -sysroot option of gcc to compile using the overo-ros<br>
>> directory as the root of the filesystem (where /usr/include and /usr/lib<br>
>> are looked for). However, at the time of this writing libtool is not<br>
>> able to pass a -sysroot option to gcc, so I write a set of scripts for<br>
>> gcc, g++ and cpp, respectively called gcc-sysroot, g++-sysroot, and<br>
>> cpp-sysroot. The scripts are as follows:<br>
>><br>
>>  #!/bin/bash<br>
>>  if test -n "$ARM_SYSROOT"<br>
>>  then<br>
>>     SYSROOT=--sysroot=$ARM_SYSROOT<br>
>>  fi<br>
>>  exec ${0/-sysroot/} $SYSROOT $*<br>
>><br>
>> The same script can be used for all the executable as it find which<br>
>> binary to call based on how it was called.<br>
>><br>
>> Once the scripts are defined, I have a special gumstix compilation<br>
>> environment:<br>
>>  export GUMSTIXTOP=$HOME/overo-oe/<br>
>>  export OVEROROOT=$HOME/overobuntu/overo-ros<br>
>>  export<br>
>> PKG_CONFIG_PATH=$OVEROROOT/usr/local/lib/pkgconfig:$OVEROROOT/usr/lib/pkgconfig<br>
>><br>
>>  export ARM_SYSROOT=$OVEROROOT<br>
>>  export CROSSBIN=$GUMSTIXTOP/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin<br>
>>  export PATH=$CROSSBIN:$PATH<br>
>>  export AR=$CROSSBIN/ar<br>
>>  export CPP=$CROSSBIN/cpp-sysroot<br>
>>  export CXX=$CROSSBIN/g++-sysroot<br>
>>  export CC=$CROSSBIN/gcc-sysroot<br>
>><br>
>><br>
>> Once this is sourced in the current shell, you can call rosmake<br>
>> normally, and everything should be able to compile. Obviously, rosdep<br>
>> install does not work (you have to restart the qemu thing and call<br>
>> apt-get from there, or at least that the easy solution I found). I have<br>
>> all the laser and image processing stack working in particular, even<br>
>> libdc1394 with the usb drivers for the pointgrey cameras.<br>
>><br>
>> Please note that you need to recall "cmake ." in all the directories.<br>
>> This can be done for instance with a script such as: (not fully tested)<br>
>><br>
>>  roscd<br>
>>  find . -name "CMakeCache.txt" | while read line<br>
>>  do<br>
>>      cd ${line/build\/CMakeCache.txt/}<br>
>>      cmake .<br>
>>      cd -<br>
>>  done<br>
>><br>
>> Beware that a couple of binary must be compiled native and crossed<br>
>> (rospack, rosstack and rosmsg). To this end, compile them first native,<br>
>> save them (for instance renaming it rospack.intel), then compile them<br>
>> crossed, save the crossed compilation for later installation (for<br>
>> instance renaming it rospack.arm), then make a link to the correct<br>
>> executable for the current architecture, and mark these directory<br>
>> ROS_NOBUILD (touch ROS_NOBUILD). This also applies to libraries such as<br>
>> librospack.so and librosstack.so. I hope the WillowGarage team finds a<br>
>> way to decouple these libraries for cross-compilation.<br>
>><br>
>> It might also be necessary to delete all the .la files installed with<br>
>> the -dev package in ubuntu on the arm image. These files refers libtool<br>
>> to some libraries in /usr/include and /usr/lib, without using the<br>
>> -sysroot option. gcc/g++ sees the risk and does not accept to compile<br>
>> then. This is a problem in particular for libjpeg (compressed image<br>
>> transport).<br>
>><br>
>> Using all the above, I have ros working on both the gumstix overo and<br>
>> verdex. On the overo, using wifi G, the gumstix can downstream telemetry<br>
>> data and video data from an helicopter, using either raw images or<br>
>> jpeg-compressed images (not much framerate gain).<br>
>><br>
>> On the verdex, I need to change the timeout in rospy/client.py (TBC) to<br>
>> 20seconds as it is the time the systems needs to get roscore up and<br>
>> running (The disk access performance are extremely bad on this older<br>
>> board). If someone wants to run ROS on a verdex, please contact me, and<br>
>> I'll check exactly what I had to change to make it happen. Not that the<br>
>> file system mentioned above works for a verdex.<br>
>><br>
>> Check on <a href="http://support.skybotix.com/downloads.php" target="_blank">http://support.skybotix.com/downloads.php</a> for a full filesystem<br>
>> for the gumstix overo, with ros pre-compiled (Skybotix is a company<br>
>> selling micro-helicopter with an embedded gumstix, but the file system<br>
>> should be a good starting point for any gumstix application)<br>
>><br>
>> I hope all this information helps...<br>
>><br>
>><br>
><br>
><br>
<br>
<br>
--<br>
</div></div><div class="im">Dr. Cedric Pradalier<br>
<a href="http://www.asl.ethz.ch/people/cedricp" target="_blank">http://www.asl.ethz.ch/people/cedricp</a><br>
<br>
_______________________________________________<br>
</div><div><div></div><div class="h5">ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</div></div></blockquote></div><br>