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

Compilling ROS2 on Rasperry Pi

asked 2018-09-26 04:34:53 -0600

uthinu gravatar image

updated 2018-09-27 03:50:42 -0600

Hi, I try to compile ROS2 on Raspebbry Pi yet it seems that there is not enough memory with colcon's parallel compilation. I tried -executor sequential as in https://colcon.readthedocs.io/en/rele... but I still see cc1plus four times in top.Is there any method of compilling in series?

EDIT: With 3 GB of swap it builds, but due to the used amount of swap space, I guess that making the compilation serial would help.

edit retag flag offensive close merge delete

Comments

Can you share the error you are getting ? and the command used for the compilation ?

pokitoz gravatar image pokitoz  ( 2018-09-26 05:33:44 -0600 )edit

The command was colcon build --symlink-install --merge-install --executor sequential. It seems that these were not compilation errors, but random errors of the build system because there was no more memory. Now I added 2GB of swap on a USB stick and try to build again.

uthinu gravatar image uthinu  ( 2018-09-26 06:25:42 -0600 )edit

At first I though you were talking about RAM memory. Thanks for the added details. My folder containing ROS2 is more than 2GB. so I wonder if this will be enough.

pokitoz gravatar image pokitoz  ( 2018-09-26 07:25:06 -0600 )edit

Yes, I was indeed talking about RAM, thus 2GB of swap.

uthinu gravatar image uthinu  ( 2018-09-26 07:27:28 -0600 )edit

Sorry, I read too quickly -.-'

pokitoz gravatar image pokitoz  ( 2018-09-26 07:29:16 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
6

answered 2018-10-02 09:19:23 -0600

clalancette gravatar image

There are two different multi-build concepts in colcon. The first one is how many executors to use; that essentially limits how many packages colcon will attempt to keep in flight at once, and is controlled by --executor-sequential/parallel. The second one is how many cores each package will use to do the build. That is actually controlled by the underlying CMake implementation (and Make below that). If you want to ensure that only a single C++ file from a single package is built at once, you'll need to make sure both of them are set properly. The following should do what you are looking for:

MAKEFLAGS="-j1 -l1" colcon build --symlink-install --merge-install --executor-sequential

edit flag offensive delete link more

Comments

Updated answer for new colcon argument format:

MAKEFLAGS="-j1 -l1" colcon build -executor sequential

exuberantshark gravatar image exuberantshark  ( 2020-07-18 23:32:38 -0600 )edit

I had the same issues: Colcon failing on BBB when building orocos_kdl and/or some other random packages. I have reduced the number of threads to 2, running executor sequential and added a 1G swap file. Still on going but so far so good. Thanks for hint!

anthares gravatar image anthares  ( 2020-11-27 02:54:35 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-09-26 04:34:53 -0600

Seen: 2,571 times

Last updated: Oct 02 '18