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

ROS 2 Crystal in 16.04 fails to build ros2_overlay_ws

asked 2019-01-11 18:03:42 -0500

coxjacob gravatar image

updated 2021-04-24 03:14:01 -0500

miura gravatar image

I am trying to follow the tutorials for working with ROS 2 Crystal. I completed instructions for installing ROS 2 Crystal on an Ubuntu 16.04 VM using the instructions from here. It appears that this worked as I was able to execute the following commands and get the expected outputs.

. ~/ros2_ws/install/local_setup.bash
ros2 run demo_nodes_cpp listener &
ros2 run demo_notes_cpp talker

I am now following the tutorial located here for setting up an overlay. Since I already created ros2_ws, I skipped to the "Develop Your Own Package" section. After creating a ros2_overlay_ws, moving to that directory and cloning examples from ~/ros2_ws/src/ros2/examples into it, I attempted an colcon build using

colcon build --symlink-install

The result is the following:

Starting >>> examples_rclcpp_minimal_action_client
Starting >>> examples_rclcpp_minimal_action_server
--- stderr: examples_rclcpp_minimal_action_client
CMake Error at CMakeLists.txt:13 (find_package):
By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"ament_cmake", but CMake did not find one.

Could not find a package configuration file provided by "ament_cmake" with
any of the following names:

ament_cmakeConfig.cmake
ament_cmake-config.cmake

Add the installation prefix of "ament_cmake" to CMAKE_PREFIX_PATH or set
"ament_cmake_DIR" to a directory containing one of the above files.  If
"ament_cmake" provides a separate development package or SDK, be sure it
has been installed.

Failed   <<< examples_rclcpp_minimal_action_client  [ Exited with code 1 ]
Aborted  <<< examples_rclcpp_minimal_action_server

Summary: 0 packages finished [0.24s]
1 package failed: examples_rclcpp_minimal_action_client
1 package aborted: examples_rclcpp_minimal_action_server
1 package had stderr output: examples_rclcpp_minimal_action_client
11 packages not processed
[0.338s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f821c06f7b8 state=finished returned 
NoneType>
Traceback (most recent call last):
File "/usr/lib/python3.5/concurrent/futures/_base.py", line 297, in _invoke_callbacks
callback(self)
File "/usr/lib/python3.5/asyncio/futures.py", line 442, in _call_set_state
dest_loop.call_soon_threadsafe(_set_state, destination, source)
File "/usr/lib/python3.5/asyncio/base_events.py", line 532, in call_soon_threadsafe
handle = self._call_soon(callback, args)
File "/usr/lib/python3.5/asyncio/base_events.py", line 506, in _call_soon
self._check_closed()
File "/usr/lib/python3.5/asyncio/base_events.py", line 334, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
[0.345s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f821c08cc88 state=finished returned 
NoneType>
Traceback (most recent call last):
File "/usr/lib/python3.5/concurrent/futures/_base.py", line 297, in _invoke_callbacks
callback(self)
File "/usr/lib/python3.5/asyncio/futures.py", line 442, in _call_set_state
dest_loop.call_soon_threadsafe(_set_state, destination, source)
File "/usr/lib/python3.5/asyncio/base_events.py", line 532, in call_soon_threadsafe
handle = self._call_soon(callback, args)
File "/usr/lib/python3.5/asyncio/base_events.py", line 506, in _call_soon
self._check_closed()
File "/usr/lib/python3.5/asyncio/base_events.py", line 334, in _check_closed
raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
[0.508s] ERROR:asyncio:Task was destroyed but it is pending!
 task: <Task pending coro=<_fd2callback() done, defined at /usr/lib/python3/dist- 
packages/colcon_core/subprocess.py:220> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() 
at 
/usr ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-11 18:20:34 -0500

coxjacob gravatar image

There is clearly some magic I don't fully understand going on here. In ROS 2 Crystal in 16.04 - failing, Dirk Thomas mentioned source as a problem, so I entered:

source ~/ros2_ws/install/local_setup.bash

After this, I tried to build again. This time it worked. I'm not sure why it did? I didn't have the option to source when I built the ros2_ws underlay.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-01-11 18:00:02 -0500

Seen: 1,348 times

Last updated: Jan 11 '19