【问题标题】:Colcon build error in px4_ros_com package for ros2 humble on ubuntu 22.04ubuntu 22.04 上 ros2 humble 的 px4_ros_com 包中的 Colcon 构建错误
【发布时间】:2022-11-24 08:43:42
【问题描述】:

如标题中所述,我正在尝试为 ros2 humble 构建 px4_ros_com。我仔细阅读了 px4 教程并非常仔细地学习了它,但是当我colcon buildpx4_ros_com 时,我收到以下错误

CMake Error at /home/XXXX/px4_ros_com_ros2/install/px4_msgs/share/px4_msgs/cmake/ament_cmake_export_targets-extras.cmake:18 (message):
  Failed to find exported target names in
  '/home/XXXX/px4_ros_com_ros2/install/px4_msgs/share/px4_msgs/cmake/export_px4_msgs__rosidl_generator_cExport.cmake'
Call Stack (most recent call first):
  /home/XXXX/px4_ros_com_ros2/install/px4_msgs/share/px4_msgs/cmake/px4_msgsConfig.cmake:41 (include)
  CMakeLists.txt:24 (find_package)

任何帮助,将不胜感激!

我确定了以下几点:

  • Fast-RTPS-Gen 是版本 1.0.4
  • Java 版本为 11.0.17
  • ros2 来源

【问题讨论】:

    标签: cmake ros ros2 px4 colcon


    【解决方案1】:

    这是 ament_cmake 中的 bug,已在最新版本的 ament_cmake (1.3.3) 中修复。

    确保你升级你的包:

    apt update
    apt upgrade
    

    升级后,检查您的 ament_cmake 版本:

    ros2 pkg xml ament_cmake | grep version
    

    如果您看到以下内容或更新版本,则应修复此错误:

    <version>1.3.3</version>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-08-24
      • 2022-08-03
      • 2022-07-01
      • 2023-01-19
      • 2022-10-05
      • 2022-12-30
      • 2022-07-05
      • 2022-10-23
      相关资源
      最近更新 更多