Colcon build crashes ubuntu 22.04

Hi,

I am trying to set up ROS2 in my personal laptop. I am following the official humble documentation. I first did a successful installation following this tutorial. And now I am doing the using colcon tutorial When doing colcon build --symlink-intall from the ros2_ws directory, I get a bunch of warnings (see below), after that, colcon starts doing its thing until it gets stuck in specific packages (see below) to then crash the laptop :smiling_face_with_tear:. Ubuntu immediately reboots in a new session. And it does exactly the same thing a 100% of the times.

Warnings
[0.324s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:  'examples_rclcpp_minimal_action_server' is in: /opt/ros/humble  'examples_rclcpp_minimal_client' is in: /opt/ros/humble     'examples_rclpy_minimal_service' is in: /opt/ros/humble     'examples_rclcpp_minimal_service' is in: /opt/ros/humble    'examples_rclcpp_minimal_publisher' is in: /opt/ros/humble  'examples_rclcpp_multithreaded_executor' is in: /opt/ros/humble     'examples_rclcpp_minimal_timer' is in: /opt/ros/humble  'examples_rclpy_executors' is in: /opt/ros/humble   'examples_rclpy_minimal_publisher' is in: /opt/ros/humble   'examples_rclcpp_minimal_composition' is in: /opt/ros/humble    'examples_rclpy_minimal_action_client' is in: /opt/ros/humble   'examples_rclcpp_minimal_action_client' is in: /opt/ros/humble  'examples_rclpy_minimal_client' is in: /opt/ros/humble  'examples_rclcpp_minimal_subscriber' is in: /opt/ros/humble     'examples_rclpy_minimal_action_server' is in: /opt/ros/humble   'examples_rclpy_minimal_subscriber' is in: /opt/ros/humble If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time. If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:  --allow-overriding examples_rclcpp_minimal_action_client examples_rclcpp_minimal_action_server examples_rclcpp_minimal_client examples_rclcpp_minimal_composition examples_rclcpp_minimal_publisher examples_rclcpp_minimal_service examples_rclcpp_minimal_subscriber examples_rclcpp_minimal_timer examples_rclcpp_multithreaded_executor examples_rclpy_executors examples_rclpy_minimal_action_client examples_rclpy_minimal_action_server examples_rclpy_minimal_client examples_rclpy_minimal_publisher examples_rclpy_minimal_service examples_rclpy_minimal_subscriber

This may be promoted to an error in a future release of colcon-override-check. Starting >>> examples_rclcpp_async_client Starting
Specific packages

Ill modify this post in a min and put the packages

I use Ubuntu 22.04 (the recomended platform for Humble). I could not find anything similar on the internet, although my searching skills are rather poor.

Any help will be greatly appreciated. And thanks in advance!

It appears to be that the laptop is trying to process too many packages at the same time (12) and was running out of memory. In this tutorial the publisher says:

a) Simply running this command would close the terminal window without any extra message. Checking the logs and searching online it seems to run out of memory (12GB… strange…) so I added --parallel-workers 2

All it was needed was running pip install setuptools==58.2.0. It now builds without an issue.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.