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

"colcon build" fails on ROS2 tutorials

asked 2022-08-02 11:03:34 -0500

cneves gravatar image

I am starting to learn about ROS2, following the tutorials. I'm running Ubuntu 22.04 with ROS2 Humble, on a 12GB RAM laptop.

However, I am facing several issues when running colcon build --symlink-installs in this tutorial

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. It also displays a Warning about overriding underlay packages (since these are examples, they are also included in the humble installation), but I will ignore for now.

b) Running colcon build --symlink-installs --parallel-workers 2 finishes the job, but shows:

[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
>>> examples_rclcpp_cbg_executor Finished <<< examples_rclcpp_async_client [6.01s]   Starting >>> examples_rclcpp_minimal_action_client Finished <<< examples_rclcpp_cbg_executor [12.7s]   Starting >>> examples_rclcpp_minimal_action_server Finished <<< examples_rclcpp_minimal_action_client [7.18s]                                Starting >>> examples_rclcpp_minimal_client Finished <<< examples_rclcpp_minimal_client [4.29s] Starting >>> examples_rclcpp_minimal_composition Finished <<< examples_rclcpp_minimal_action_server [4.89s]                                Starting >>> examples_rclcpp_minimal_publisher Finished <<< examples_rclcpp_minimal_publisher [6.99s]                                Starting >>> examples_rclcpp_minimal_service Finished <<< examples_rclcpp_minimal_service [4.16s]                                Starting >>> examples_rclcpp_minimal_subscriber Finished <<< examples_rclcpp_minimal_composition [15.2s]                                Starting >>> examples_rclcpp_minimal_timer Finished <<< examples_rclcpp_minimal_timer [8.90s]                                Starting >>> examples_rclcpp_multithreaded_executor Finished <<< examples_rclcpp_minimal_subscriber [18.9s]                                Starting >>> examples_rclcpp_wait_set Finished <<< examples_rclcpp_multithreaded_executor [17.1s]                                Starting >>> examples_rclpy_executors
--- stderr: examples_rclpy_executors                                                                                    /usr/lib/python3/dist-packages/setuptools/command/ SetuptoolsDeprecationWarning: install is deprecated. Use build and pip and other standards-based tools.   warnings.warn(
--- Finished <<< examples_rclpy_executors [1.28s] Starting >>> examples_rclpy_guard_conditions
--- stderr: examples_rclpy_guard_conditions        /usr/lib/python3/dist-packages/setuptools/command/ SetuptoolsDeprecationWarning: install is deprecated. Use build and pip ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-08-02 11:17:52 -0500

cneves gravatar image

It seems I posted too soon. I found this thread. Ubuntu 22.04 uses Python 3.10, with a setuptools version where direct calls to has been deprecated.

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

However, I still feel this should be handled at ROS2 level, and not by each individual user.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2022-08-02 11:03:34 -0500

Seen: 664 times

Last updated: Aug 02 '22