Ubuntu22.04中ROS2-humble的CMake与anaconda库冲突

news2024/12/26 20:19:33

在创建ros2 humble中创建msg并用colcon build编译过程中出现以下警告:

(yolov) sss@sss:~/cnn/ros/ws$ colcon build
Starting >>> interfacedxp
Starting >>> testdxp
Finished <<< testdxp [0.62s]                                                  
--- stderr: interfacedxp                             
CMake Warning at /opt/ros/humble/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:166 (add_library):
  Cannot generate a safe runtime search path for target
  interfacedxp__rosidl_generator_py because files in some directories may
  conflict with libraries in implicit directories:

    runtime library [libpython3.10.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/sss/anaconda3/envs/yolov/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  /opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
  /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
  CMakeLists.txt:14 (rosidl_generate_interfaces)


CMake Warning at /opt/ros/humble/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:226 (add_library):
  Cannot generate a safe runtime search path for target
  interfacedxp__rosidl_typesupport_fastrtps_c__pyext because files in some
  directories may conflict with libraries in implicit directories:

    runtime library [libpython3.10.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/sss/anaconda3/envs/yolov/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  /opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
  /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
  CMakeLists.txt:14 (rosidl_generate_interfaces)


CMake Warning at /opt/ros/humble/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:226 (add_library):
  Cannot generate a safe runtime search path for target
  interfacedxp__rosidl_typesupport_introspection_c__pyext because files in
  some directories may conflict with libraries in implicit directories:

    runtime library [libpython3.10.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/sss/anaconda3/envs/yolov/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  /opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
  /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
  CMakeLists.txt:14 (rosidl_generate_interfaces)


CMake Warning at /opt/ros/humble/share/rosidl_generator_py/cmake/rosidl_generator_py_generate_interfaces.cmake:226 (add_library):
  Cannot generate a safe runtime search path for target
  interfacedxp__rosidl_typesupport_c__pyext because files in some directories
  may conflict with libraries in implicit directories:

    runtime library [libpython3.10.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/sss/anaconda3/envs/yolov/lib

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  /opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
  /opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
  CMakeLists.txt:14 (rosidl_generate_interfaces)


---
Finished <<< interfacedxp [2.22s]

Summary: 2 packages finished [2.28s]
  1 package had stderr output: interfacedxp

借鉴了以下解决方案,但有人在评论区说没有解决问题​​​​​​,其实还剩一点没弄完,就是把原有export注释掉​

直接贴出我系统里面conda与ros2全部的.bashrc文件内容

# >>> fishros initialize >>>
source /opt/ros/humble/setup.bash
# <<< fishros initialize <<<

# >>> conda initialize >>>
__origin_path=$PATH #添加此行
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/sss/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/home/sss/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/home/sss/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/home/sss/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
export  PATH="$__origin_path:/home/sss/anaconda3/bin:/home/sss/anaconda3/bin" #添加此行
#export  PATH=$PATH:/home/sss/anaconda3/bin  #把这里注释掉
conda activate yolov

# <<< conda initialize <<<


export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/extras/CPUTI/lib64
export CUDA_HOME=/usr/local/cuda/bin
export PATH=$PATH:$LD_LIBRARY_PATH:$CUDA_HOME

source /home/sss/cnn/ros/ws/install/setup.bash



本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2254160.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

IS-IS的原理

IS-IS的基本概念&#xff1a; 概述&#xff1a; IS-IS&#xff0c;中间系统到中间系统&#xff0c;是ISO国际标准化组织为它的无连接网络协议设计的一种动态路由协议 IS-IS支持CLNP网络和IP网络&#xff0c;采用数据链路层封装&#xff0c;区别于ospf只支持IP网络&#xff0…

华为ACL应用笔记

1、基本ACL 2000-2999 基本ACL&#xff08;Access Control List&#xff0c;访问控制列表&#xff09;是一种网络安全技术&#xff0c;它根据源IP地址、分片信息和生效时间段等信息来定义规则&#xff0c;对报文进行过滤。 规则&#xff1a; ACL由一系列规则组成&#xff0c;每…

点云标注软件SUSTechPOINTS的安装和使用,自测win10和ubuntu20.04下都可以用

点云标注软件SUSTechPOINTS的安装和使用 github项目源码&#xff1a;https://github.com/naurril/SUSTechPOINTS gitee源码以及使用教程&#xff1a;https://gitee.com/cuge1995/SUSTechPOINTS 首先拉取源码 git clone https://github.com/naurril/SUSTechPOINTS最好是在cond…

大模型评测中的基础指标都包括哪些

大语言模型&#xff08;LLM&#xff09;评测是LLM开发和应用中的关键环节。目前评测方法可以分为人工评测和自动评测&#xff0c;其中&#xff0c;自动评测技术相比人工评测来讲&#xff0c;具有效率高、一致性好、可复现、鲁棒性好等特点&#xff0c;逐渐成为业界研究的重点。…

SystemUI修改状态栏电池图标样式为横屏显示(以Android V为例)

SystemUI修改状态栏电池图标样式为横屏显示(以Android V为例) 1、概述 在15.0的系统rom产品定制化开发中&#xff0c;对于原生系统中SystemUId 状态栏的电池图标是竖着显示的&#xff0c;一般手机的电池图标都是横屏显示的 可以觉得样式挺不错的&#xff0c;所以由于产品开发…

最长最短单词

最长最短单词 C语言实现C实现Java实现Python实现 &#x1f490;The Begin&#x1f490;点点关注&#xff0c;收藏不迷路&#x1f490; 输入1行句子&#xff08;不多于200个单词&#xff0c;每个单词长度不超过100&#xff09;&#xff0c;只包含字母、空格和逗号。单词由至少一…

C++【PCL】点云数据平移 旋转,对点云进行刚体变化

//头文件 #include <iostream>#include <pcl/point_cloud.h>#include<pcl/io/pcd_io.h>#include <pcl/common/transforms.h> #include <pcl/io/ply_io.h>//主函数int main() {pcl::PointCloud<pcl::PointXYZ>::Ptr source_cloud(new pcl::…

2024第六届金盾信安杯Web 详细题解

比赛一共4道Web题,比赛时只做出三道,那道文件上传没有做出来,所以这里是另外三道题的WP 分别是 fillllll_put hoverfly ssrf fillllll_put 涉及: 绕过exit() 死亡函数 php://filter 伪协议配合base64加解密 一句话木马 题目源码&#xff1a; $content参数在开头被…

006 MATLAB编程基础

01 M文件 MATLAB输入命令有两种方法&#xff1a; 一是在MATLAB主窗口逐行输入命令&#xff0c;每个命令之间用分号或逗号分隔&#xff0c;每行可包含多个命令。 二是将命令组织成一个命令语句文集&#xff0c;使用扩展名“.m”&#xff0c;称为M文件。它由一系列的命令和语句…

Delphi Web前端开发教程(9):基于TMS WEB Core框架

3、REST Servers服务端(后端)框架 REST服务端特点&#xff1a; – 为远程资源提供一个REST API接口。也可以为其他网络内容提供服务&#xff1b; – 包括在Delphi Enterprise & Architect企业版和架构师版中的RAD服务器、DataSnap、WebBroker&#xff1b; – 开源框架&a…

SPC三种判定准则的算法

1.连续6个点递增或递减 //传入数据列表 //返回连续X个及以上递增或递减的数组下标int n = array.Length; int X = X_in; List<int> regions_start = new List<int>(); List<int> regions_end = new List<int>();if(Open){for (int i = 0; i < n - (…

AI一键生成原创圣诞印花图案

一、引言 随着科技的飞速发展&#xff0c;AI 已经深入到我们生活和工作的各个角落&#xff0c;为创意设计领域带来了前所未有的变革。在圣诞即将来临之际&#xff0c;想要设计独特的圣诞印花图案却又担心缺乏灵感或专业技能&#xff1f;别担心&#xff0c;千鹿 AI 为我们提供了…

Ubuntu的pip怎么用

第一步&#xff1a;查看python3版本 第二步&#xff1a;安装pip 第三步&#xff1a;可以尝试使用pip list查看 也可以尝试安装 下面这条命令可以设置永久源 pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

基于Matlab三点雨流计数法的载荷时间历程分析与循环疲劳评估

随着工程领域中机械设备和结构系统的复杂性不断增加&#xff0c;疲劳分析成为评估其可靠性与使用寿命的关键环节。载荷时间历程数据在疲劳分析中扮演着重要角色&#xff0c;而雨流计数法作为经典的循环计数方法&#xff0c;能够有效地从载荷时间历程中提取疲劳载荷循环信息。本…

帝可得-策略管理

策略管理 需求说明 策略管理主要涉及到二个功能模块&#xff0c;业务流程如下&#xff1a; 新增策略: 允许管理员定义新的策略&#xff0c;包括策略的具体内容和参数&#xff08;如折扣率&#xff09;策略分配: 将策略分配给一个或多个售货机。 #mermaid-svg-PSQOJMLJqVGn3W…

【数据结构】手搓链表

一、定义 typedef struct node_s {int _data;struct node_s *_next; } node_t;typedef struct list_s {node_t *_head;node_t *_tail; } list_t;节点结构体&#xff08;node_s&#xff09;&#xff1a; int _data;存储节点中的数据struct node_s *_next;&#xff1a;指向 node…

嵌入式 C 编程必备(7):const 关键字 —— 打造稳定的常量空间

目录 一、const关键字的基本含义与用法 1.1. 修饰基本数据类型 1.2. 修饰指针 1.3. 修饰数组 1.4. 修饰结构体 二、const关键字在嵌入式编程中的优势 2.1. 提升代码可读性 2.2. 增强代码安全性 2.3. 优化内存使用 2.4. 促进模块化设计 2.5. 支持静态分析和测试 三、…

Day28 买卖股票的最佳时机 跳跃游戏 跳跃游戏 II K 次取反后最大化的数组和

贪心算法 part02 122. 买卖股票的最佳时机 II - 力扣&#xff08;LeetCode&#xff09; 求最大利润 将每天的正利润加和 public int maxProfit(int[] prices) {int totalPrices 0;for(int i0;i<prices.length;i){if(i<prices.length-1&&prices[i1]>prices[…

【专题】计算机网络之运输层(传输层)

1. 运输层协议概述 1.1 进程之间的通信 (1) 运输层的作用 运输层提供进程间的逻辑通信。 运输层的屏蔽作用&#xff1a; 运输层向高层用户屏蔽了下面网络核心的细节&#xff08;如网络拓扑、所采用的路由选择协议等&#xff09;&#xff0c;使应用进程看见的就是好像在两个运…

Ansible 运维工具

安装 apt install ansible /etc/ansible/hosts , 指定密码或密钥访问分组机器 [k8s_masters] master0.c0.k8s.sb[k8s_nodes] node0.c0.k8s.sb node1.c0.k8s.sb[k8s:children] k8s_masters k8s_nodes[k8s_masters:vars] ansible_ssh_usersbadmin ansible_ssh_pass"***&q…