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

ROS in arm/v7, Docker, and Limited Storage Robot

asked 2023-04-03 03:38:16 -0500

Yuval Aharoni gravatar image

updated 2023-04-04 01:08:29 -0500

gvdhoorn gravatar image

Hello all,

I have searched online for solutions to my problems but am still seeking a suitable answer. I am running ROS Humble on our company's custom robot with Yocto Kirkstone build. Our robot architecture is arm/v7. Since the robot has limited storage, I can not use the official ROS image, which wights 3GB. I thought of using Docker to install ROS in a container for many benefits. I plan to do three images as a solution:

  1. An image to build the ROS with build tools and Colcon as the compilation container.
  2. An image of slim ROS installation to load in the robot as the runner container.
  3. A container to run the following:
    1. Take the compilation container.
    2. Clone my robot code from my repositories.
    3. Build the code with Colcon.
    4. Take the runner container.
    5. Copy the binaries from the compilation container to the runner container.
    6. Save the new container in Artifactory Storage.

However, I am facing two issues:

  1. There is yet to be an official container (any of the three) available for this platform (arm/v7).
  2. I cannot find a guide for installing ROS with minimal dependencies to run the code without compilation (The runner container).

If someone could help me get through this, it would be great. If someone could say that my plan is legit, it would be great too. Thank you all.

edit retag flag offensive close merge delete


quick comment:

I can not use the official ROS image, which wights 3G.

ros:humble on my machine is around 750MB.

Not the smallest image by far, but certainly not 3000MB.

There is yet to be an official container (any of the three) available for this platform (arm/v7)

there likely never will be, as anything but arm64 is Tier 3 and build-from-source only (see the arm32 row in the table and see this for a discussion about the tiers).

gvdhoorn gravatar image gvdhoorn  ( 2023-04-04 01:09:58 -0500 )edit

As @gvdhoorn mentioned, you can build from source. A nice thing about building from source is that you can choose the external libraries you want. A good choice is to eliminate all the graphics capabilities and to log in to your robot via ssh. Also, you might want to take a look at purging the apt cache in order to save some disk space. Hope this helps :)

sampreets3 gravatar image sampreets3  ( 2023-04-04 02:56:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2023-04-07 10:35:08 -0500

ruffsl gravatar image

Here is an example that builds all of ROS2 from source, but only packages that a colcon overlay workspace would require. You could then copy over the install folders from the colcon workspace into a new stage that only has the runtime dependencies for your application installed on the system:

As for bootstrapping a builder stage for the target platform architecture, that may take a bit more legwork.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2023-04-03 03:38:16 -0500

Seen: 104 times

Last updated: Apr 07 '23