colcon build --symlink-install ros2_example_ws 出错

2023-11-21 02:18

本文主要是介绍colcon build --symlink-install ros2_example_ws 出错,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

用colcon去build packages,出现下面的错误:

sph@sph-System-Product-Name:~/Documents/ros2_example_ws$ 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_action_server                                                                                                
CMake Error at CMakeLists.txt:13 (find_package):By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this projecthas 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" withany of the following names:ament_cmakeConfig.cmakeament_cmake-config.cmakeAdd 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 ithas been installed.---
Failed   <<< examples_rclcpp_minimal_action_server	[ Exited with code 1 ]
--- 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 projecthas 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" withany of the following names:ament_cmakeConfig.cmakeament_cmake-config.cmakeAdd 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 ithas been installed.---
Failed   <<< examples_rclcpp_minimal_action_client	[ Exited with code 1 ]
--- stderr: examples_rclcpp_minimal_client
CMake Error at CMakeLists.txt:13 (find_package):By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this projecthas 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" withany of the following names:ament_cmakeConfig.cmakeament_cmake-config.cmakeAdd 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 ithas been installed.---
Failed   <<< examples_rclcpp_minimal_client	[ Exited with code 1 ]
--- stderr: examples_rclcpp_minimal_composition
CMake Error at CMakeLists.txt:13 (find_package):By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this projecthas 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" withany of the following names:ament_cmakeConfig.cmakeament_cmake-config.cmakeAdd 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 ithas been installed.---
Failed   <<< examples_rclcpp_minimal_composition	[ Exited with code 1 ]
--- stderr: examples_rclcpp_minimal_publisher
CMake Error at CMakeLists.txt:13 (find_package):By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this projecthas 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" withany of the following names:ament_cmakeConfig.cmakeament_cmake-config.cmakeAdd 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 ithas been installed.---
Failed   <<< examples_rclcpp_minimal_publisher	[ Exited with code 1 ]
--- stderr: examples_rclcpp_minimal_service
CMake Error at CMakeLists.txt:13 (find_package):By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this projecthas 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" withany of the following names:ament_cmakeConfig.cmakeament_cmake-config.cmakeAdd 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 ithas been installed.---
Failed   <<< examples_rclcpp_minimal_service	[ Exited with code 1 ]
--- stderr: examples_rclcpp_minimal_subscriber
CMake Error at CMakeLists.txt:13 (find_package):By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this projecthas 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" withany of the following names:ament_cmakeConfig.cmakeament_cmake-config.cmakeAdd 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 ithas been installed.---
Failed   <<< examples_rclcpp_minimal_subscriber	[ Exited with code 1 ]
--- stderr: examples_rclcpp_minimal_timer
CMake Error at CMakeLists.txt:13 (find_package):By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this projecthas 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" withany of the following names:ament_cmakeConfig.cmakeament_cmake-config.cmakeAdd 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 ithas been installed.---
Failed   <<< examples_rclcpp_minimal_timer	[ Exited with code 1 ]
Finished <<< examples_rclpy_executors [1.65s]
Finished <<< examples_rclpy_minimal_action_client [1.64s]
Finished <<< examples_rclpy_minimal_action_server [1.64s]                                                                              
Finished <<< examples_rclpy_minimal_client [1.63s]
Finished <<< examples_rclpy_minimal_publisher [1.63s]
Aborted  <<< examples_rclpy_minimal_service
Aborted  <<< examples_rclpy_minimal_subscriber                               Summary: 5 packages finished [2.06s]8 packages failed: 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_timer2 packages aborted: examples_rclpy_minimal_service examples_rclpy_minimal_subscriber8 packages had stderr output: 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

一般原因都是工作环境变量没设置对,所以在build之前,最好source一下你要在ros1还是ros2的哪个版本上的进行build
解决办法:

source /opt/ros/dashing/local_setup.bash

这篇关于colcon build --symlink-install ros2_example_ws 出错的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/399134

相关文章

MCU7.keil中build产生的hex文件解读

1.hex文件大致解读 闲来无事,查看了MCU6.用keil新建项目的hex文件 用FlexHex打开 给我的第一印象是:经过软件的解释之后,发现这些数据排列地十分整齐 :02000F0080FE71:03000000020003F8:0C000300787FE4F6D8FD75810702000F3D:00000001FF 把解释后的数据当作十六进制来观察 1.每一行数据

基于UE5和ROS2的激光雷达+深度RGBD相机小车的仿真指南(五):Blender锥桶建模

前言 本系列教程旨在使用UE5配置一个具备激光雷达+深度摄像机的仿真小车,并使用通过跨平台的方式进行ROS2和UE5仿真的通讯,达到小车自主导航的目的。本教程默认有ROS2导航及其gazebo仿真相关方面基础,Nav2相关的学习教程可以参考本人的其他博客Nav2代价地图实现和原理–Nav2源码解读之CostMap2D(上)-CSDN博客往期教程: 第一期:基于UE5和ROS2的激光雷达+深度RG

Python安装llama库出错“metadata-generation-failed”

Python安装llama库出错“metadata-generation-failed” 1. 安装llama库时出错2. 定位问题1. 去官网下载llama包 2.修改配置文件2.1 解压文件2.2 修改配置文件 3. 本地安装文件 1. 安装llama库时出错 2. 定位问题 根据查到的资料,发现时llama包中的execfile函数已经被下线了,需要我们手动修改代码后

收藏:解决 pip install 出现 error: subprocess-exited-with-error 错误的方法

在使用 pip 安装 Python 包时,有时候会遇到 error: subprocess-exited-with-error 错误。这种错误通常是由于 setuptools 版本问题引起的。本文将介绍如何解决这一问题 当你使用 pip install 安装某个 Python 包时,如果 setuptools 版本过高或过低,可能会导致安装过程出错,并出现类似以下错误信息:error: subpr

[轻笔记] pip install : Read timed out. (closed)

添加超时参数(单位秒) pip --default-timeout=10000 install ${package_name}

flutter开发实战-flutter build web微信无法识别二维码及小程序码问题

flutter开发实战-flutter build web微信无法识别二维码及小程序码问题 GitHub Pages是一个直接从GitHub存储库托管的静态站点服务,‌它允许用户通过简单的配置,‌将个人的代码项目转化为一个可以在线访问的网站。‌这里使用flutter build web来构建web发布到GitHub Pages。 最近通过flutter build web,通过发布到GitHu

pip install pyaudio sounddevice error: externally-managed-environment

shgbitai@shgbitai-C9X299-PGF:~/pythonworkspace/ai-accompany$ pip install pyaudio sounddeviceerror: externally-managed-environment× This environment is externally managed╰─> To install Python package

maven 指令之package 和install的区别

https://blog.csdn.net/zy103118/article/details/79901357   maven 指令之package 和install的区别 2018年04月11日 19:08:46 brave_zhao 阅读数:2018更多 个人分类: maven maven package 和 install 区别 原创 2016年08月18日 14:55:26

安装Python(install python),安装pip(install pip)

海南副教授陈晶优下台 ,shut down        you are rubbish ,you need study. How to install python environment and pip?   Step 1:Download https://www.python.org/download

4.15 版本内核调用 init_timer()函数出错

linux/include/linux/timer.h4.15 之前版本struct timer_list {14 /*15 * All fields that change during normal runtime grouped to the16 * same cacheline17 */18 struct hl