ROS2 Using Colcon to build packages error solved

版权声明:本文为博主夏日辉的原创文章,未经博主允许不得转载。 https://blog.csdn.net/shanpenghui/article/details/89303523

错误提示:

colcon build --symlink-install
Starting >>> examples_rclcpp_minimal_action_client
Starting >>> examples_rclcpp_minimal_action_server
Starting >>> examples_rclcpp_minimal_client
Starting >>> examples_rclcpp_minimal_composition
Starting >>> examples_rclcpp_minimal_publisher                                                                                                                            
Starting >>> examples_rclcpp_minimal_service
Starting >>> examples_rclcpp_minimal_subscriber
Starting >>> examples_rclcpp_minimal_timer
Starting >>> examples_rclpy_executors                                                                                                                                      
Starting >>> examples_rclpy_minimal_action_client
Starting >>> examples_rclpy_minimal_action_server
Starting >>> examples_rclpy_minimal_client                                                                                                                                  
Starting >>> examples_rclpy_minimal_publisher
Starting >>> examples_rclpy_minimal_service
Starting >>> examples_rclpy_minimal_subscriber
--- stderr: examples_rclcpp_minimal_composition                                                                                                                                  
CMake Error at CMakeLists.txt:15 (find_package):
  By not providing "Findrclcpp_components.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "rclcpp_components", but CMake did not find one.

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

    rclcpp_componentsConfig.cmake
    rclcpp_components-config.cmake

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


---
Failed   <<< examples_rclcpp_minimal_composition	[ Exited with code 1 ]
[6.221s] ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<_wait_and_close_fds() done, defined at /usr/lib/python3/dist-packages/colcon_core/subprocess.py:253> exception=RuntimeError('cannot reuse already awaited coroutine',)>
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
RuntimeError: cannot reuse already awaited coroutine
Finished <<< examples_rclpy_minimal_client [5.41s]
[6.226s] ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<_fd2callback() done, defined at /usr/lib/python3/dist-packages/colcon_core/subprocess.py:220> exception=RuntimeError('cannot reuse already awaited coroutine',)>
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
RuntimeError: cannot reuse already awaited coroutine
[6.227s] ERROR:asyncio:Task exception was never retrieved
future: <Task finished coro=<_fd2callback() done, defined at /usr/lib/python3/dist-packages/colcon_core/subprocess.py:220> exception=RuntimeError('cannot reuse already awaited coroutine',)>
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
RuntimeError: cannot reuse already awaited coroutine
Finished <<< examples_rclpy_minimal_publisher [5.39s]
Finished <<< examples_rclpy_executors [5.51s]
Finished <<< examples_rclpy_minimal_action_server [5.45s]
Finished <<< examples_rclpy_minimal_action_client [5.48s]
Aborted  <<< examples_rclcpp_minimal_service
Aborted  <<< examples_rclcpp_minimal_publisher
Aborted  <<< examples_rclcpp_minimal_client
Aborted  <<< examples_rclpy_minimal_service
Aborted  <<< examples_rclcpp_minimal_action_server
Aborted  <<< examples_rclpy_minimal_subscriber
Aborted  <<< examples_rclcpp_minimal_action_client
Aborted  <<< examples_rclcpp_minimal_subscriber
Aborted  <<< examples_rclcpp_minimal_timer
                                  
Summary: 5 packages finished [6.02s]
  1 package failed: examples_rclcpp_minimal_composition
  9 packages aborted: examples_rclcpp_minimal_action_client examples_rclcpp_minimal_action_server examples_rclcpp_minimal_client examples_rclcpp_minimal_publisher examples_rclcpp_minimal_service examples_rclcpp_minimal_subscriber examples_rclcpp_minimal_timer examples_rclpy_minimal_service examples_rclpy_minimal_subscriber
  1 package had stderr output: examples_rclcpp_minimal_composition
[7.433s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f672bcb15f8 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
[7.434s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f672baddd30 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
[7.633s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f672baddeb8 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
[7.634s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f672bae37f0 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
[8.102s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f672bcb1c88 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
[8.102s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f673095ea90 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
[8.848s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f672baddba8 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
[8.849s] ERROR:concurrent.futures:exception calling callback for <Future at 0x7f672baddc50 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
[8.867s] 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/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[8.868s] 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/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[8.868s] 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/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[8.868s] 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/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[8.868s] 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/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[8.868s] 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/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[8.868s] 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/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>
[8.868s] 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/lib/python3.5/asyncio/futures.py:431, Task._wakeup()]> cb=[_wait.<locals>._on_completion() at /usr/lib/python3.5/asyncio/tasks.py:414]>

在这里插入图片描述

原因git不对!因为你直接git clone是在master分支上,而我安装的是crystal版本,需要切换到该分支上再编译:

切换分支方法参考:https://blog.csdn.net/shanpenghui/article/details/89303466

猜你喜欢

转载自blog.csdn.net/shanpenghui/article/details/89303523