Cross compiling on an ROS Indigo ARM platform

560 views
Skip to first unread message

Shawn Schaerer

unread,
Dec 21, 2015, 5:53:34 PM12/21/15
to ros-sig-embedded
Hi,

is there a wiki page that explains the build environment for ROS ARM?
I would rather not recreate the wheel on this task, so any pointers to to the setup documents would be great.


Thanks,

William Woodall

unread,
Dec 21, 2015, 6:34:15 PM12/21/15
to ros-sig-...@googlegroups.com, Tully Foote, Dirk Thomas
There's this wiki page for cross-compiling ros packages on a host machine for Android: http://wiki.ros.org/android_ndk/Tutorials/BuildingNativeROSPackages

But I'd recommend using an armhf docker base image and building your packages in that (essentially building them natively on an emulated armhf). This is what our build farm does I believe. Maybe one of my colleges could point to where our farm does that as a starting point for you.

Cheers,


--
You received this message because you are subscribed to the Google Groups "ros-sig-embedded" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-embedd...@googlegroups.com.
To post to this group, send email to ros-sig-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ros-sig-embedded.
For more options, visit https://groups.google.com/d/optout.



--
William Woodall
ROS Development Team

Tully Foote

unread,
Dec 21, 2015, 6:42:38 PM12/21/15
to William Woodall, ros-sig-...@googlegroups.com, Dirk Thomas
If you have qemu installed and you use this docker base image: https://hub.docker.com/r/osrf/ubuntu_armhf/ Anything built on top of that will be in an emulated armhf environment. 

That's what we use for the armhf builds on the buildfarm. It's slower than cross compiling but the development speed is much higher. 

I think most people developing for armhf simply use the deb packages we produce and then compile natively their packages on top. Unless you're recompiling some of the larger core libraries this is typically the fastest way to develop. 

Tully

Shawn Schaerer

unread,
Dec 21, 2015, 9:55:59 PM12/21/15
to ros-sig-embedded, wil...@osrfoundation.org, dth...@osrfoundation.org
Thanks,  this is the way I will go

Shawn Schaerer

unread,
Dec 21, 2015, 10:33:00 PM12/21/15
to ros-sig-embedded, wil...@osrfoundation.org, dth...@osrfoundation.org
Hi Tully,

Is there a quick tutorial on how to set this up anywhere?  I have never used docker before, so anything that will speed up the learning curve would be appreciated :)

BTW:  I assume that I cannot run this on OSX

On Monday, December 21, 2015 at 5:42:38 PM UTC-6, Tully Foote wrote:

Tully Foote

unread,
Dec 22, 2015, 12:37:11 PM12/22/15
to ros-sig-...@googlegroups.com, William Woodall, Dirk Thomas
Hi Shawn, 

Ruffin put together some pretty good tutorials for using ROS with docker. The overview is here: http://wiki.ros.org/docker with tutorials here: http://wiki.ros.org/docker/Tutorials

They are not specific to armhf, but should get you going. To use armhf, you just need to use docker containers with a different base image, and have qemu installed. 

There are ways to use docker on OSX, however they basically involve bringing up a linux VM to run docker inside. It's doesn't get all the advantages of docker, but can work for development. 

Tully

Shawn Schaerer

unread,
Dec 22, 2015, 1:41:29 PM12/22/15
to ros-sig-...@googlegroups.com, William Woodall, Dirk Thomas
Thanks for the tutorial links.  This will help a lot.
I might just skip OSX for now and work directly from my Ubuntu machine.

Shawn Schaerer

unread,
Dec 22, 2015, 3:17:16 PM12/22/15
to ros-sig-embedded, wil...@osrfoundation.org, dth...@osrfoundation.org
ok so that is just a barebones ARMhf image.  I still need to put ROS and everyhing else I need to compile on there?


On Monday, December 21, 2015 at 5:42:38 PM UTC-6, Tully Foote wrote:

Tully Foote

unread,
Dec 22, 2015, 6:02:49 PM12/22/15
to ros-sig-...@googlegroups.com, William Woodall, Dirk Thomas
Yeah, unfortunately docker hub doesn't officially support armhf images yet for the autobuilding, so we haven't deployed our standard generated images yet for armhf. The buildfarm machines build and cache them locally. 

The automated image building is done from this repo: https://github.com/osrf/docker_images

I suggest that you grab this docker file: https://github.com/osrf/docker_images/blob/master/ros/indigo/indigo-ros-core/Dockerfile and modify the first line to be "from: osrf/ubuntu_armhf" and it should pull the armhf image as the base. You can the add or remove packages from the apt install at the bottom of the Dockerfile as you need for your application. 

Tully

Shawn Schaerer

unread,
Dec 22, 2015, 11:24:44 PM12/22/15
to ros-sig-...@googlegroups.com, William Woodall, Dirk Thomas
Thanks,

I updated the original image that i pull from docker hub and it did not save all of my work :(  I am just learning all of the quirks.
I will grab the dockerfile and try that.


Shawn Schaerer

unread,
Dec 23, 2015, 3:45:55 PM12/23/15
to ros-sig-embedded, wil...@osrfoundation.org, dth...@osrfoundation.org
I think to keep things simple for now, I might just compile directly on my target machine.
Do you see any issues with this?  It seems that it is faster then using QEMU.

Most of the code that we will write will be python based so I am not sure how much cross compiling we will do.


To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-embedded+unsubscribe@googlegroups.com.
To post to this group, send email to ros-sig-embedded@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "ros-sig-embedded" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ros-sig-embedded+unsubscribe@googlegroups.com.
To post to this group, send email to ros-sig-embedded@googlegroups.com.

Shawn Schaerer

unread,
Jan 5, 2016, 9:28:20 PM1/5/16
to ros-sig-embedded, wil...@osrfoundation.org, dth...@osrfoundation.org
I am compiling directly on the dragonboard for ARM applications.
One note:  You need to create large swap file.  I started out with 1GB, but went to 2GB. 
Without it I had many compiler failures that were not intuitive to debug.

Shawn 
Reply all
Reply to author
Forward
0 new messages