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

ros2 colcon build

asked 2022-06-16 02:55:15 -0500

passwd gravatar image

When I write the colcon build function, everything closes including the terminal.

edit retag flag offensive close merge delete

Comments

What can you find in the logs of your ROS workspace? Maybe there will be something

ljaniec gravatar image ljaniec  ( 2022-06-16 17:22:08 -0500 )edit

What is in your workspace? And what platform? I've recently seen this building Moveit2 on Arm64 - and have not yet found the cause.

fergs gravatar image fergs  ( 2022-06-19 21:41:41 -0500 )edit

Digging deeper on my end: it's an out of memory issue. Even restarting a build - that is 75% done, very quickly ends up at 10GB of RAM used (I'm in a virtual machine, 8GB actual ram, 2GB swap)

fergs gravatar image fergs  ( 2022-06-19 22:16:11 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-06-19 22:34:15 -0500

fergs gravatar image

updated 2022-06-20 08:18:43 -0500

I have seen this happen when running out of system memory - to confirm that is what is happening you can check /var/log/syslog for a recent out of memory termination of your terminal.

A couple possible work arounds:

  • add "--executor sequential" to your colcon command to reduce how much is build in parallel
  • add more memory if your system is a VM (mine was - bumping from 8gb to 16gb and running sequentially allowed my workspace to build).
  • build highly memory consuming packages individually by adding "--package-select package_name" to your colcon command
edit flag offensive delete link more

Comments

I had a similar experience with fresh Ubuntu 22.04 and ROS 2 Humble during building examples packages. When I executed colcon build --symlink-install, the terminal crashes and the building stopped after a few seconds. However, I was able to build these packages one by one without any problem

ljaniec gravatar image ljaniec  ( 2022-06-20 02:24:55 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2022-06-16 02:55:15 -0500

Seen: 755 times

Last updated: Jun 20 '22