commit 5e1e355ffa9c8e6437e45f4a8ef04fd6e85de12a Author: cyy_mac Date: Wed Mar 25 12:37:08 2026 +0800 bf diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/.DS_Store differ diff --git a/rm.cv.fans b/rm.cv.fans new file mode 160000 index 0000000..6abd1bf --- /dev/null +++ b/rm.cv.fans @@ -0,0 +1 @@ +Subproject commit 6abd1bf359356d1d603766c4b3bcabbb1d6432b2 diff --git a/src.zip b/src.zip new file mode 100644 index 0000000..c087ace Binary files /dev/null and b/src.zip differ diff --git a/src/rm_auto_aim/README.md b/src/rm_auto_aim/README.md new file mode 100644 index 0000000..98d672a --- /dev/null +++ b/src/rm_auto_aim/README.md @@ -0,0 +1,23 @@ +# rm_auto_aim + +FYT视觉24赛季装甲板识别与跟踪算法ROS2功能包 + +**主要参考**: [rm_vision](https://gitlab.com/rm_vision) + +## 维护者及开源许可证 + +Maintainer : Chengfu Zou, chengfuzou@outlook.com + +``` +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` \ No newline at end of file diff --git a/src/rm_auto_aim/armor_detector/CMakeLists.txt b/src/rm_auto_aim/armor_detector/CMakeLists.txt new file mode 100644 index 0000000..ca6c026 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/CMakeLists.txt @@ -0,0 +1,99 @@ +cmake_minimum_required(VERSION 3.10) +project(armor_detector) + +## Set CMake policy to suppress OpenGL warning +cmake_policy(SET CMP0072 NEW) + +## Use C++14 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +## By adding -Wall and -Werror, the compiler does not ignore warnings anymore, +## enforcing cleaner code. +add_definitions(-Wall -Werror) +add_definitions(-O3) + + +## Export compile commands for clangd +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +####################### +## Find dependencies ## +####################### + +# set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake_modules) +set(G2O_DIR "/usr/local/lib/cmake/g2o") +set(EXTERNAL_INCLUDE_DIRS ${G2O_INCLUDE_DIR}) +set(EXTERNAL_LIBS ${G2O_LIBRARIES}) + +find_package(ament_cmake_auto REQUIRED) +find_package(OpenCV REQUIRED) +find_package(TBB REQUIRED COMPONENTS tbb) +find_package(g2o REQUIRED) +find_package(fmt REQUIRED) +find_package(Sophus REQUIRED) +ament_auto_find_build_dependencies() + +########### +## Build ## +########### + +ament_auto_add_library(${PROJECT_NAME} SHARED + DIRECTORY src +) + +target_include_directories(${PROJECT_NAME} PUBLIC +${OpenCV_INCLUDE_DIRS} +${G2O_INCLUDE_DIRS} +${Sophus_INCLUDE_DIRS} +${EIGEN3_INCLUDE_DIRS} +) + +target_link_libraries(${PROJECT_NAME} +${OpenCV_LIBS} +g2o_core +g2o_stuff +g2o_solver_csparse +g2o_types_sba +g2o_types_slam3d +g2o_solver_dense +fmt::fmt +tbb +) + + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN fyt::auto_aim::ArmorDetectorNode + EXECUTABLE armor_detector_node +) + +############# +## Testing ## +############# + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + list(APPEND AMENT_LINT_AUTO_EXCLUDE + ament_cmake_copyright + ament_cmake_uncrustify + ament_cmake_cpplint + ament_cmake_lint_cmake + ) + ament_lint_auto_find_test_dependencies() + + find_package(ament_cmake_gtest) + ament_add_gtest(test_detector test/test_detector.cpp) + target_link_libraries(test_detector ${PROJECT_NAME}) + +endif() + +############# +## Install ## +############# + +ament_auto_package( + USE_SCOPED_HEADER_INSTALL_DIR + INSTALL_TO_SHARE + docs + model +) diff --git a/src/rm_auto_aim/armor_detector/README.md b/src/rm_auto_aim/armor_detector/README.md new file mode 100644 index 0000000..f8d039c --- /dev/null +++ b/src/rm_auto_aim/armor_detector/README.md @@ -0,0 +1,141 @@ +# armor_detector + +订阅相机参数及图像流进行装甲板的识别并解算三维位置,输出识别到的装甲板在输入frame下的三维位置 (一般是以相机光心为原点的相机坐标系) + +## fyt::ArmorDetectorNode + +装甲板识别节点 + +### 发布话题 + +* `armor_detector/armors` (`rm_interfaces/msg/Armors`) - 识别到的装甲板信息 +* `armor_detector/debug_lights` (`rm_interfaces/msg/DebugLights`) - Debug灯条信息 +* `armor_detector/debug_armors` (`rm_interfaces/msg/DebugArmors`) - Debug装甲板信息 +* `armor_detector/result_img` (`sensor_msgs/msg/Image`) - 识别结果可视化图像 +* `armor_detector/binary_img` (`sensor_msgs/msg/Image`) - 二值化图像 +* `armor_detector/number_img` (`sensor_msgs/msg/Image`) - 数字识别roi + +### 订阅话题 + +* `image_raw` (`sensor_msgs/msg/Image`) - 相机图像 +* `camera_info` (`sensor_msgs/msg/CameraInfo`) - 相机参数 + +### 服务 + +* `armor_detector/set_mode` (`rm_interfaces/srv/SetMode`) - 设置模式 + +### 参数 + +* `debug` (`bool`, default: false) - 是否开启调试模式 +* `classify_threshold` (`double`, default: 0.8) - 数字分类阈值 +* `ignore_class` (`vector`, default: ["negativie"]) - 跳过的类别 +* `binary_thres` (`int`, default: 100) - 二值化阈值 +* `light.min_ratio` (`double`, default: 0.08) - 灯条最小长宽比 +* `light.max_ratio` (`double`, default: 0.4) - 灯条最大长宽比 +* `light.max_angle` (`double`, default: 40) - 灯条最大倾斜角度 +* `light.color_diff_thresh` (`int`, default: 25) - 灯条颜色差异阈值` +* `armor.min_light_ratio` (`double`, default: 0.6) - 装甲板最小长宽比 +* `armor.min_small_center_distance` (`double`, default: 0.8) - 小装甲板最小中心距离长宽比 +* `armor.max_small_center_distance` (`double`, default: 3.2) - 小装甲板最大中心距离长宽比 +* `armor.min_large_center_distance` (`double`, default: 1.8) - 大装甲板最小中心距离长宽比 +* `armor.max_large_center_distance` (`double`, default: 6.4) - 大装甲板最大中心距离长宽比 +* `armor.max_angle` (`double`, default: 35.0) - 装甲板最大倾斜角度 + + +## Detector +装甲板识别器 + +### preprocessImage +预处理 + +| ![](docs/raw.png) | ![](docs/hsv_bin.png) | ![](docs/gray_bin.png) | +| :---------------: | :-------------------: | :--------------------: | +| 原图 | 通过颜色二值化 | 通过灰度二值化 | + +由于一般工业相机的动态范围不够大,导致若要能够清晰分辨装甲板的数字,得到的相机图像中灯条中心就会过曝,灯条中心的像素点的值往往都是 R=B。根据颜色信息来进行二值化效果不佳,因此此处选择了直接通过灰度图进行二值化,将灯条的颜色判断放到后续处理中。 + +### findLights +寻找灯条 + +通过 findContours 得到轮廓,再通过 minAreaRect 获得最小外接矩形,对其进行长宽比和倾斜角度的判断,可以高效的筛除形状不满足的亮斑。 + +判断灯条颜色这里采用了对轮廓内的的R/B值求和,判断两和的的大小的方法,若 `sum_r > sum_b` 则认为是红色灯条,反之则认为是蓝色灯条。 + +| ![](docs/red.png) | ![](docs/blue.png) | +| :---------------: | :----------------: | +| 提取出的红色灯条 | 提取出的蓝色灯条 | + +### matchLights +配对灯条 + +根据 `detect_color` 选择对应颜色的灯条进行两两配对,首先筛除掉两条灯条中间包含另一个灯条的情况,然后根据两灯条的长度之比、两灯条中心的距离、配对出装甲板的倾斜角度来筛选掉条件不满足的结果,得到形状符合装甲板特征的灯条配对。 + +## NumberClassifier +数字分类器 + +### extractNumbers +提取数字 + +| ![](docs/num_raw.png) | ![](docs/num_warp.png) | ![](docs/num_roi.png) | ![](docs/num_bin.png) | +| :-------------------: | :--------------------: | :-------------------: | :-------------------: | +| 原图 | 透视变换 | 取ROI | 二值化 | + +将每条灯条上下的角点拉伸到装甲板的上下边缘作为待变换点,进行透视变换,再对变换后的图像取ROI。考虑到数字图案实质上就是黑色背景+白色图案,所以此处使用了大津法进行二值化。 + +### Classify +分类 + +我们使用LeNet-5网络结构进行数字分类,同时在训练过程中加入了大量的椒盐噪声,有利于提高暗环境下的识别准确率 + +网络结构: + +![](docs/model.svg) + +效果图: + +![](docs/classify.png) + +## 角点矫正 + +在原版rm_vision中,使用旋转矩形的上顶点作为灯条角点,这种方法很受二值化图像的影响,当给不同的二值化阈值或者环境光照不均匀时,识别到的角点位置会发生变化,如图旋转矩形顶点1和2。这会导致角点实际坐标与types.hpp中定义的物体坐标不对应,影响到PnP的准确性。 + +| ![](docs/origin1.png) | ![](docs/origin2.png) | ![](docs/pca2.png) | ![](docs/pca1.png) | +| :-------------------: | :--------------------: | :-------------------: | :-------------------: | +| 旋转矩形顶点1 | 旋转矩形顶点2 | PCA1 | PCA2 | + +为了解决这个问题,我们使用PCA方法对灯条的角点进行矫正,先利用[主成分分析](https://docs.opencv.org/4.x/d1/dee/tutorial_introduction_to_pca.html)(Principal Component Analysis, PCA)方法获取灯条的对称轴,然后根据沿着对称轴方向寻找上下两个亮度变化最大的点(通常是图PCA2中那样的明暗交界处),作为灯条的角点。 + +如图PCA1和PCA2所示,这种方法获得的角点在不同光照下表现出一致性,可以提高PnP的准确性。 + +## BA优化 + +![](docs/BA.png) + + diff --git a/src/rm_auto_aim/armor_detector/cmake_modules/FindG2O.cmake.bak b/src/rm_auto_aim/armor_detector/cmake_modules/FindG2O.cmake.bak new file mode 100644 index 0000000..57e25d8 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/cmake_modules/FindG2O.cmake.bak @@ -0,0 +1,107 @@ +# Locate the g2o libraries +# A general framework for graph optimization. +# +# This module defines +# G2O_FOUND, if false, do not try to link against g2o +# G2O_LIBRARIES, path to the libg2o +# G2O_INCLUDE_DIR, where to find the g2o header files +# +# Niko Suenderhauf +# Adapted by Felix Endres + +IF(UNIX) + + #IF(G2O_INCLUDE_DIR AND G2O_LIBRARIES) + # in cache already + # SET(G2O_FIND_QUIETLY TRUE) + #ENDIF(G2O_INCLUDE_DIR AND G2O_LIBRARIES) + + MESSAGE(STATUS "Searching for g2o ...") + FIND_PATH(G2O_INCLUDE_DIR + NAMES core types stuff + PATHS /usr/local /usr + PATH_SUFFIXES include/g2o include) + + IF (G2O_INCLUDE_DIR) + MESSAGE(STATUS "Found g2o headers in: ${G2O_INCLUDE_DIR}") + ELSE() + MESSAGE(STATUS "G2O_INCLUDE_DIR not found") + ENDIF () + + FIND_LIBRARY(G2O_CORE_LIB + NAMES g2o_core g2o_core_rd + PATHS /usr/local /usr ${CMAKE_PREFIX_PATH} + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_STUFF_LIB + NAMES g2o_stuff g2o_stuff_rd + PATHS /usr/local /usr ${CMAKE_PREFIX_PATH} + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_TYPES_SLAM2D_LIB + NAMES g2o_types_slam2d g2o_types_slam2d_rd + PATHS /usr/local /usr ${CMAKE_PREFIX_PATH} + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_TYPES_SLAM3D_LIB + NAMES g2o_types_slam3d g2o_types_slam3d_rd + PATHS /usr/local /usr ${CMAKE_PREFIX_PATH} + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_SOLVER_CHOLMOD_LIB + NAMES g2o_solver_cholmod g2o_solver_cholmod_rd + PATHS /usr/local /usr ${CMAKE_PREFIX_PATH} + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_SOLVER_PCG_LIB + NAMES g2o_solver_pcg g2o_solver_pcg_rd + PATHS /usr/local /usr ${CMAKE_PREFIX_PATH} + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_SOLVER_CSPARSE_LIB + NAMES g2o_solver_csparse g2o_solver_csparse_rd + PATHS /usr/local /usr + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_INCREMENTAL_LIB + NAMES g2o_incremental g2o_incremental_rd + PATHS /usr/local /usr ${CMAKE_PREFIX_PATH} + PATH_SUFFIXES lib) + FIND_LIBRARY(G2O_CSPARSE_EXTENSION_LIB + NAMES g2o_csparse_extension g2o_csparse_extension_rd + PATHS /usr/local /usr ${CMAKE_PREFIX_PATH} + PATH_SUFFIXES lib) +MESSAGE(STATUS "G2O_CORE_LIB: ${G2O_CORE_LIB}") +MESSAGE(STATUS "G2O_STUFF_LIB: ${G2O_STUFF_LIB}") +MESSAGE(STATUS "G2O_TYPES_SLAM2D_LIB: ${G2O_TYPES_SLAM2D_LIB}") +MESSAGE(STATUS "G2O_TYPES_SLAM3D_LIB: ${G2O_TYPES_SLAM3D_LIB}") +MESSAGE(STATUS "G2O_SOLVER_CHOLMOD_LIB: ${G2O_SOLVER_CHOLMOD_LIB}") +MESSAGE(STATUS "G2O_SOLVER_PCG_LIB: ${G2O_SOLVER_PCG_LIB}") +MESSAGE(STATUS "G2O_SOLVER_CSPARSE_LIB: ${G2O_SOLVER_CSPARSE_LIB}") +MESSAGE(STATUS "G2O_INCREMENTAL_LIB: ${G2O_INCREMENTAL_LIB}") +MESSAGE(STATUS "G2O_CSPARSE_EXTENSION_LIB: ${G2O_CSPARSE_EXTENSION_LIB}") + +SET(G2O_LIBRARIES ${G2O_CSPARSE_EXTENSION_LIB} + ${G2O_CORE_LIB} + ${G2O_STUFF_LIB} + ${G2O_TYPES_SLAM2D_LIB} + ${G2O_TYPES_SLAM3D_LIB} + ${G2O_SOLVER_CHOLMOD_LIB} + ${G2O_SOLVER_PCG_LIB} + ${G2O_SOLVER_CSPARSE_LIB} + ${G2O_INCREMENTAL_LIB} + ) + + IF(G2O_LIBRARIES AND G2O_INCLUDE_DIR) + SET(G2O_FOUND "YES") + IF(NOT G2O_FIND_QUIETLY) + MESSAGE(STATUS "Found libg2o: ${G2O_LIBRARIES}") + ENDIF() + ELSE(G2O_LIBRARIES AND G2O_INCLUDE_DIR) + IF(NOT G2O_LIBRARIES) + IF(G2O_FIND_REQUIRED) + message(FATAL_ERROR "Could not find libg2o!") + ENDIF() + ENDIF() + + IF(NOT G2O_INCLUDE_DIR) + IF(G2O_FIND_REQUIRED) + message(FATAL_ERROR "Could not find g2o include directory!") + ENDIF() + ENDIF() + ENDIF() + +ENDIF(UNIX) diff --git a/src/rm_auto_aim/armor_detector/docs/BA.png b/src/rm_auto_aim/armor_detector/docs/BA.png new file mode 100644 index 0000000..d06165b Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/BA.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/blue.png b/src/rm_auto_aim/armor_detector/docs/blue.png new file mode 100644 index 0000000..f10db16 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/blue.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/classify.png b/src/rm_auto_aim/armor_detector/docs/classify.png new file mode 100644 index 0000000..9b70ec1 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/classify.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/gray_bin.png b/src/rm_auto_aim/armor_detector/docs/gray_bin.png new file mode 100644 index 0000000..5c35e71 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/gray_bin.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/hsv_bin.png b/src/rm_auto_aim/armor_detector/docs/hsv_bin.png new file mode 100644 index 0000000..075e1c6 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/hsv_bin.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/model.svg b/src/rm_auto_aim/armor_detector/docs/model.svg new file mode 100644 index 0000000..fc3ec37 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/docs/model.svg @@ -0,0 +1 @@ +1×1×28×281×6×28×281×6×28×281×6×14×141×16×10×101×16×10×101×16×5×51×4001×1201×1201×841×841×91×9input.1float32[1,1,28,28]Conv/conv1/Convfloat32[6,1,5,5]W〈6×1×5×5〉float32[6]B〈6〉Relu/act/ReluMaxPool/pool1/MaxPoolConv/conv2/Convfloat32[16,6,5,5]W〈16×6×5×5〉float32[16]B〈16〉Relu/act_1/ReluMaxPool/pool2/MaxPoolFlatten/flatten/FlattenGemm/fc1/Gemmfloat32[120,400]B〈120×400〉float32[120]C〈120〉Relu/act_2/ReluGemm/fc2/Gemmfloat32[84,120]B〈84×120〉float32[84]C〈84〉Relu/act_3/ReluGemm/fc3/Gemmfloat32[9,84]B〈9×84〉float32[9]C〈9〉Softmax/softmax/Softmax23float32[1,9] \ No newline at end of file diff --git a/src/rm_auto_aim/armor_detector/docs/num_bin.png b/src/rm_auto_aim/armor_detector/docs/num_bin.png new file mode 100644 index 0000000..1d47d99 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/num_bin.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/num_raw.png b/src/rm_auto_aim/armor_detector/docs/num_raw.png new file mode 100644 index 0000000..302c852 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/num_raw.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/num_roi.png b/src/rm_auto_aim/armor_detector/docs/num_roi.png new file mode 100644 index 0000000..b542bc5 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/num_roi.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/num_warp.png b/src/rm_auto_aim/armor_detector/docs/num_warp.png new file mode 100644 index 0000000..3fe6d74 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/num_warp.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/origin1.png b/src/rm_auto_aim/armor_detector/docs/origin1.png new file mode 100644 index 0000000..7a2238c Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/origin1.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/origin2.png b/src/rm_auto_aim/armor_detector/docs/origin2.png new file mode 100644 index 0000000..68d0b51 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/origin2.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/pca1.png b/src/rm_auto_aim/armor_detector/docs/pca1.png new file mode 100644 index 0000000..ab670f5 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/pca1.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/pca2.png b/src/rm_auto_aim/armor_detector/docs/pca2.png new file mode 100644 index 0000000..23695f4 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/pca2.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/raw.png b/src/rm_auto_aim/armor_detector/docs/raw.png new file mode 100644 index 0000000..af656a0 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/raw.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/red.png b/src/rm_auto_aim/armor_detector/docs/red.png new file mode 100644 index 0000000..6e6bca0 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/red.png differ diff --git a/src/rm_auto_aim/armor_detector/docs/test.png b/src/rm_auto_aim/armor_detector/docs/test.png new file mode 100644 index 0000000..251f9b9 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/docs/test.png differ diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/armor_detector.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/armor_detector.hpp new file mode 100644 index 0000000..daacaf3 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/armor_detector.hpp @@ -0,0 +1,105 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_DETECTOR_DETECTOR_HPP_ +#define ARMOR_DETECTOR_DETECTOR_HPP_ + +// std +#include +#include +#include +#include +// third party +#include +#include +// project +#include "armor_detector/light_corner_corrector.hpp" +#include "armor_detector/types.hpp" +#include "armor_detector/number_classifier.hpp" +#include "rm_interfaces/msg/debug_armors.hpp" +#include "rm_interfaces/msg/debug_lights.hpp" + +namespace fyt::auto_aim { +class Detector { +public: + struct LightParams { + // width / height + double min_ratio; + double max_ratio; + // vertical angle + double max_angle; + // Use least-squares line fitting (cv::fitLine) to refine top/bottom points + bool use_fit_line; + // judge color + int color_diff_thresh; + }; + + struct ArmorParams { + double min_light_ratio; + // light pairs distance + double min_small_center_distance; + double max_small_center_distance; + double min_large_center_distance; + double max_large_center_distance; + // horizontal angle + double max_angle; + }; + + Detector(const int &bin_thres, const EnemyColor &color, const LightParams &l, + const ArmorParams &a); + + std::vector detect(const cv::Mat &input) noexcept; + + cv::Mat preprocessImage(const cv::Mat &input) noexcept; + std::vector findLights(const cv::Mat &rbg_img, + const cv::Mat &binary_img) noexcept; + std::vector matchLights(const std::vector &lights) noexcept; + + // For debug usage + cv::Mat getAllNumbersImage() const noexcept; + void drawResults(cv::Mat &img) const noexcept; + + // Parameters + int binary_thres; + EnemyColor detect_color; + LightParams light_params; + ArmorParams armor_params; + + std::unique_ptr classifier; + std::unique_ptr corner_corrector; + + // Debug msgs + bool enable_debug = false; + cv::Mat binary_img; + rm_interfaces::msg::DebugLights debug_lights; + rm_interfaces::msg::DebugArmors debug_armors; + +private: + bool isLight(const Light &possible_light) noexcept; + bool containLight(const int i,const int j,const std::vector &lights) noexcept; + ArmorType isArmor(const Light &light_1, const Light &light_2) noexcept; + + cv::Mat gray_img_; + + std::vector lights_; + std::vector armors_; +}; + +} // namespace fyt::auto_aim + +#endif // ARMOR_DETECTOR_DETECTOR_HPP_ diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/armor_detector_node.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/armor_detector_node.hpp new file mode 100644 index 0000000..f69a574 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/armor_detector_node.hpp @@ -0,0 +1,193 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under +// Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_DETECTOR_DETECTOR_NODE_HPP_ +#define ARMOR_DETECTOR_DETECTOR_NODE_HPP_ + +// ros2 +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// std +#include +#include +#include +#include +#include +#include +#include +#include +#include +// project +#include "armor_detector/armor_detector.hpp" +#include "armor_detector/armor_pose_estimator.hpp" +#include "armor_detector/number_classifier.hpp" +#include "rm_interfaces/msg/armors.hpp" +#include "rm_interfaces/msg/target.hpp" +#include "rm_interfaces/srv/set_mode.hpp" +#include "rm_utils/heartbeat.hpp" +#include "rm_utils/logger/log.hpp" + +namespace fyt::auto_aim { + +// Armor Detector Node +// Subscribe to the image topic, run the armor detection alogorithm and publish +// the detected armors +class ArmorDetectorNode : public rclcpp::Node { +public: + ArmorDetectorNode(const rclcpp::NodeOptions &options); + ~ArmorDetectorNode() override; + +private: + struct PendingFrame { + sensor_msgs::msg::Image::ConstSharedPtr img_msg; + std::chrono::steady_clock::time_point frame_start; + }; + + void imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr img_msg); + void processImageLoop(); + void processFrame(PendingFrame frame); + // void targetCallback(const rm_interfaces::msg::Target::SharedPtr + // target_msg); + + std::unique_ptr initDetector(); + + std::vector detectArmors(const sensor_msgs::msg::Image::ConstSharedPtr &img_msg, + double *detect_ms = nullptr, + double *debug_publish_ms = nullptr); + + void createDebugPublishers() noexcept; + void destroyDebugPublishers() noexcept; + void refreshDebugPublishersIfNeeded() noexcept; + + void publishMarkers() noexcept; + + void setModeCallback( + const std::shared_ptr request, + std::shared_ptr response); + + // Dynamic Parameter + rcl_interfaces::msg::SetParametersResult + onSetParameters(std::vector parameters); + rclcpp::Node::OnSetParametersCallbackHandle::SharedPtr + on_set_parameters_callback_handle_; + + // Heartbeat + HeartBeatPublisher::SharedPtr heartbeat_; + + // Armor Detector + std::unique_ptr detector_; + + // Pose Solver + bool use_ba_; + std::unique_ptr armor_pose_estimator_; + + // Detected armors publisher + rm_interfaces::msg::Armors armors_msg_; + rclcpp::Publisher::SharedPtr armors_pub_; + + // Visualization marker publisher + visualization_msgs::msg::Marker armor_marker_; + visualization_msgs::msg::Marker text_marker_; + visualization_msgs::msg::MarkerArray marker_array_; + rclcpp::Publisher::SharedPtr + marker_pub_; + + // Camera info part + rclcpp::Subscription::SharedPtr cam_info_sub_; + cv::Point2f cam_center_; + std::shared_ptr cam_info_; + + // Image subscription + rclcpp::Subscription::SharedPtr img_sub_; + + // Target subscription + // rclcpp::Subscription::SharedPtr target_sub_; + // rm_interfaces::msg::Target::SharedPtr tracked_target_; + std::deque tracked_armors_; + + // ReceiveData subscripiton + std::string odom_frame_; + std::shared_ptr tf2_buffer_; + std::shared_ptr tf2_listener_; + + // Async image processing + std::mutex queue_mutex_; + std::condition_variable queue_cv_; + std::deque frame_queue_; + size_t max_queue_size_ = 3; + bool stop_processing_ = false; + int process_every_n_frames_ = 1; + std::thread image_processing_thread_; + + // Shared processing state + std::mutex processing_mutex_; + + // Enable/Disable Armor Detector + rclcpp::Service::SharedPtr set_mode_srv_; + + // Debug information + bool debug_; + int debug_log_interval_frames_ = 30; + bool debug_terminal_log_ = true; + bool debug_markers_ = true; + bool debug_lights_msg_ = true; + bool debug_armors_msg_ = true; + bool debug_binary_img_ = true; + bool debug_number_img_ = true; + bool debug_result_img_ = true; + bool debug_lights_pub_active_ = false; + bool debug_armors_pub_active_ = false; + bool debug_binary_pub_active_ = false; + bool debug_number_pub_active_ = false; + bool debug_result_pub_active_ = false; + std::atomic input_frame_counter_{0}; + std::atomic debug_log_counter_{0}; + int tf_error_log_interval_ms_ = 1000; + std::mutex tf_error_log_mutex_; + std::chrono::steady_clock::time_point last_tf_error_log_time_; + std::atomic tf_error_suppressed_counter_{0}; + std::shared_ptr debug_param_sub_; + std::shared_ptr debug_cb_handle_; + rclcpp::TimerBase::SharedPtr debug_publishers_refresh_timer_; + std::atomic debug_publishers_refresh_requested_{false}; + rclcpp::Publisher::SharedPtr + lights_data_pub_; + rclcpp::Publisher::SharedPtr + armors_data_pub_; + image_transport::Publisher binary_img_pub_; + image_transport::Publisher number_img_pub_; + image_transport::Publisher result_img_pub_; +}; + +} // namespace fyt::auto_aim + +#endif // ARMOR_DETECTOR_DETECTOR_NODE_HPP_ diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/armor_pose_estimator.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/armor_pose_estimator.hpp new file mode 100644 index 0000000..9a274fc --- /dev/null +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/armor_pose_estimator.hpp @@ -0,0 +1,62 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_DETECTOR_ARMOR_POSE_ESTIMATOR_HPP_ +#define ARMOR_DETECTOR_ARMOR_POSE_ESTIMATOR_HPP_ + +// std +#include +#include +#include +// OpenCV +#include +// Eigen +#include +// ros2 +#include +#include +#include +#include +// project +#include "armor_detector/ba_solver.hpp" +#include "rm_interfaces/msg/armor.hpp" +#include "rm_utils/math/pnp_solver.hpp" + +namespace fyt::auto_aim { +class ArmorPoseEstimator { +public: + explicit ArmorPoseEstimator(sensor_msgs::msg::CameraInfo::SharedPtr camera_info); + + std::vector extractArmorPoses(const std::vector &armors, + Eigen::Matrix3d R_imu_camera); + + void enableBA(bool enable) { use_ba_ = enable; } + +private: + // Select the best PnP solution according to the armor's direction in image, only available for SOLVEPNP_IPPE + void sortPnPResult(const Armor &armor, std::vector &rvecs, + std::vector &tvecs) const; + + // Convert a rotation matrix to RPY + static Eigen::Vector3d rotationMatrixToRPY(const Eigen::Matrix3d &R); + + bool use_ba_; + + Eigen::Matrix3d R_gimbal_camera_; + + std::unique_ptr ba_solver_; + std::unique_ptr pnp_solver_; +}; +} // namespace fyt::auto_aim +#endif // ARMOR_POSE_ESTIMATOR_HPP_ \ No newline at end of file diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/ba_solver.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/ba_solver.hpp new file mode 100644 index 0000000..d091237 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/ba_solver.hpp @@ -0,0 +1,66 @@ +// Created by Labor 2023.8.25 +// Maintained by Labor, Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_DETECTOR_BA_SOLVER_HPP_ +#define ARMOR_DETECTOR_BA_SOLVER_HPP_ + +// std +#include +#include +#include +#include +// 3rd party +#include +#include +#include +#include +#include +// g2o +#include +#include +#include +#include +#include +#include +#include +// project +#include "armor_detector/graph_optimizer.hpp" +#include "armor_detector/types.hpp" + +namespace fyt::auto_aim { + +// BA algorithm based Optimizer for the armor pose estimation (Particularly for +// the Yaw angle) +class BaSolver { +public: + BaSolver(std::array &camera_matrix, + std::vector &dist_coeffs); + + // Solve the armor pose using the BA algorithm, return the optimized rotation + Eigen::Matrix3d solveBa(const Armor &armor, + const Eigen::Vector3d &t_camera_armor, + const Eigen::Matrix3d &R_camera_armor, + const Eigen::Matrix3d &R_imu_camera) noexcept; + +private: + Eigen::Matrix3d K_; + g2o::SparseOptimizer optimizer_; + g2o::OptimizationAlgorithmProperty solver_property_; + g2o::OptimizationAlgorithmLevenberg *lm_algorithm_; +}; + +} // namespace fyt::auto_aim +#endif // ARMOR_DETECTOR_BAS_SOLVER_HPP_ diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/graph_optimizer.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/graph_optimizer.hpp new file mode 100644 index 0000000..1700fa1 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/graph_optimizer.hpp @@ -0,0 +1,76 @@ +// Created by Labor 2023.8.25 +// Maintained by Labor, Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_DETECTOR_GRAPH_OPTIMIZER_HPP_ +#define ARMOR_DETECTOR_GRAPH_OPTIMIZER_HPP_ + +// std +#include +// g2o +#include +#include +#include +#include +#include +#include +#include +// 3rd party +#include +#include +#include +#include +#include +// project +#include "armor_detector/types.hpp" + +namespace fyt::auto_aim { +// Vertex of graph optimization algorithm for the yaw angle +class VertexYaw : public g2o::BaseVertex<1, double> { +public: + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; + + VertexYaw() = default; + virtual void setToOriginImpl() override { _estimate = 0; } + virtual void oplusImpl(const double *update) override; + + virtual bool read(std::istream &in) override { return true; } + virtual bool write(std::ostream &out) const override { return true; } +}; + +// Edge of graph optimization algorithm for reporjection error calculation using +// yaw angle and observation +class EdgeProjection : public g2o::BaseBinaryEdge<2, Eigen::Vector2d, VertexYaw, + g2o::VertexPointXYZ> { +public: + EIGEN_MAKE_ALIGNED_OPERATOR_NEW; + using InfoMatrixType = Eigen::Matrix; + + EdgeProjection(const Sophus::SO3d &R_camera_imu, const Sophus::SO3d &R_pitch, + const Eigen::Vector3d &t, const Eigen::Matrix3d &K); + virtual void computeError() override; + + virtual bool read(std::istream &in) override { return true; } + virtual bool write(std::ostream &out) const override { return true; } + +private: + Sophus::SO3d R_camera_imu_; + Sophus::SO3d R_pitch_; + Eigen::Vector3d t_; + Eigen::Matrix3d K_; +}; + +} // namespace fyt::auto_aim +#endif // ARMOR_DETECTOR_GRAPH_OPTIMIZER_HPP_ diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/light_corner_corrector.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/light_corner_corrector.hpp new file mode 100644 index 0000000..df90af4 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/light_corner_corrector.hpp @@ -0,0 +1,54 @@ +// Maintained by Shenglin Qin, Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_DETECTOR_LIGHT_CORNER_CORRECTOR_HPP_ +#define ARMOR_DETECTOR_LIGHT_CORNER_CORRECTOR_HPP_ + +// opencv +#include +// project +#include "armor_detector/types.hpp" + +namespace fyt::auto_aim { + +struct SymmetryAxis { + cv::Point2f centroid; + cv::Point2f direction; + float mean_val; // Mean brightness +}; + +// This class is used to improve the precision of the corner points of the light bar. +// First, the PCA algorithm is used to find the symmetry axis of the light bar, +// and then along the symmetry axis to find the corner points of the light bar based on the gradient of brightness. +class LightCornerCorrector { +public: + explicit LightCornerCorrector() noexcept {} + + // Correct the corners of the armor's lights + void correctCorners(Armor &armor, const cv::Mat &gray_img); + +private: + // Find the symmetry axis of the light + SymmetryAxis findSymmetryAxis(const cv::Mat &gray_img, const Light &light); + + // Find the corner of the light + cv::Point2f findCorner(const cv::Mat &gray_img, + const Light &light, + const SymmetryAxis &axis, + std::string order); +}; + +} // namespace fyt::auto_aim +#endif // ARMOR_DETECTOR_LIGHT_CORNER_CORRECTOR_HPP_ diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/number_classifier.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/number_classifier.hpp new file mode 100644 index 0000000..b316d9f --- /dev/null +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/number_classifier.hpp @@ -0,0 +1,60 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_DETECTOR_NUMBER_CLASSIFIER_HPP_ +#define ARMOR_DETECTOR_NUMBER_CLASSIFIER_HPP_ + +// std +#include +#include +#include +#include +#include +// third party +#include +// project +#include "armor_detector/types.hpp" + +namespace fyt::auto_aim { +// Class used to classify the number of the armor, based on the MLP model +class NumberClassifier { +public: + NumberClassifier(const std::string &model_path, + const std::string &label_path, + const double threshold, + const std::vector &ignore_classes = {}); + + // Extract the roi image of number from the src + cv::Mat extractNumber(const cv::Mat &src, const Armor &armor) const noexcept; + + // Classify the number of the armor + void classify(const cv::Mat &src, Armor &armor) noexcept; + + // Erase the ignore classes + void eraseIgnoreClasses(std::vector &armors) noexcept; + + double threshold; + +private: + std::mutex mutex_; + cv::dnn::Net net_; + std::vector class_names_; + std::vector ignore_classes_; +}; +} // namespace fyt::auto_aim +#endif // ARMOR_DETECTOR_NUMBER_CLASSIFIER_HPP_ diff --git a/src/rm_auto_aim/armor_detector/include/armor_detector/types.hpp b/src/rm_auto_aim/armor_detector/include/armor_detector/types.hpp new file mode 100644 index 0000000..72de82f --- /dev/null +++ b/src/rm_auto_aim/armor_detector/include/armor_detector/types.hpp @@ -0,0 +1,177 @@ +// Created by Chengfu Zou on 2023.10.26 +// Maintained by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_DETECTOR_TYPES_HPP_ +#define ARMOR_DETECTOR_TYPES_HPP_ + +// std +#include +#include +#include +// 3rd party +#include +#include +#include +#include +#include +// project +#include "rm_utils/assert.hpp" +#include "rm_utils/common.hpp" + +namespace fyt::auto_aim { + +// Armor size, Unit: m +constexpr double SMALL_ARMOR_WIDTH = 133.0 / 1000.0; // 135 +constexpr double SMALL_ARMOR_HEIGHT = 50.0 / 1000.0; // 55 +constexpr double LARGE_ARMOR_WIDTH = 225.0 / 1000.0; +constexpr double LARGE_ARMOR_HEIGHT = 50.0 / 1000.0; // 55 + +// 15 degree in rad +constexpr double FIFTTEN_DEGREE_RAD = 15 * CV_PI / 180; + +// Armor type +enum class ArmorType { SMALL, LARGE, INVALID }; +inline std::string armorTypeToString(const ArmorType &type) { + switch (type) { + case ArmorType::SMALL: + return "small"; + case ArmorType::LARGE: + return "large"; + default: + return "invalid"; + } +} + +// Struct used to store the light bar +struct Light : public cv::RotatedRect { + Light() = default; + explicit Light(const std::vector &contour) + : cv::RotatedRect(cv::minAreaRect(contour)), color(EnemyColor::WHITE) { + FYT_ASSERT(contour.size() > 0); + + center = std::accumulate( + contour.begin(), + contour.end(), + cv::Point2f(0, 0), + [n = static_cast(contour.size())](const cv::Point2f &a, const cv::Point &b) { + return a + cv::Point2f(b.x, b.y) / n; + }); + + cv::Point2f p[4]; + this->points(p); + std::sort(p, p + 4, [](const cv::Point2f &a, const cv::Point2f &b) { return a.y < b.y; }); + top = (p[0] + p[1]) / 2; + bottom = (p[2] + p[3]) / 2; + + length = cv::norm(top - bottom); + width = cv::norm(p[0] - p[1]); + + axis = top - bottom; + axis = axis / cv::norm(axis); + + // Calculate the tilt angle + // The angle is the angle between the light bar and the horizontal line + tilt_angle = std::atan2(std::abs(top.x - bottom.x), std::abs(top.y - bottom.y)); + tilt_angle = tilt_angle / CV_PI * 180; + } + + // Constructor using fitLine results + explicit Light( + cv::RotatedRect box, cv::Point2f top, cv::Point2f bottom, double length, double width) + : cv::RotatedRect(box) + , color(EnemyColor::WHITE) + , top(top) + , bottom(bottom) + , length(length) + , width(width) { + center = (top + bottom) / 2; + axis = top - bottom; + axis = axis / cv::norm(axis); + tilt_angle = std::atan2(std::abs(top.x - bottom.x), std::abs(top.y - bottom.y)); + tilt_angle = tilt_angle / CV_PI * 180; + } + + EnemyColor color; + cv::Point2f top, bottom, center; + cv::Point2f axis; + double length; + double width; + float tilt_angle; +}; + +// Struct used to store the armor +struct Armor { + static constexpr const int N_LANDMARKS = 6; + static constexpr const int N_LANDMARKS_2 = N_LANDMARKS * 2; + Armor() = default; + Armor(const Light &l1, const Light &l2) { + if (l1.center.x < l2.center.x) { + left_light = l1, right_light = l2; + } else { + left_light = l2, right_light = l1; + } + + center = (left_light.center + right_light.center) / 2; + } + + // Build the points in the object coordinate system, start from bottom left in + // clockwise order + template + static inline std::vector buildObjectPoints(const double &w, + const double &h) noexcept { + if constexpr (N_LANDMARKS == 4) { + return {PointType(0, w / 2, -h / 2), + PointType(0, w / 2, h / 2), + PointType(0, -w / 2, h / 2), + PointType(0, -w / 2, -h / 2)}; + } else { + return {PointType(0, w / 2, -h / 2), + PointType(0, w / 2, 0), + PointType(0, w / 2, h / 2), + PointType(0, -w / 2, h / 2), + PointType(0, -w / 2, 0), + PointType(0, -w / 2, -h / 2)}; + } + } + + // Landmarks start from bottom left in clockwise order + std::vector landmarks() const { + if constexpr (N_LANDMARKS == 4) { + return {left_light.bottom, left_light.top, right_light.top, right_light.bottom}; + } else { + return {left_light.bottom, + left_light.center, + left_light.top, + right_light.top, + right_light.center, + right_light.bottom}; + } + } + + // Light pairs part + Light left_light, right_light; + cv::Point2f center; + ArmorType type; + + // Number part + cv::Mat number_img; + std::string number; + float confidence; + std::string classfication_result; +}; + +} // namespace fyt::auto_aim +#endif // ARMOR_DETECTOR_ARMOR_HPP_ diff --git a/src/rm_auto_aim/armor_detector/model/label.txt b/src/rm_auto_aim/armor_detector/model/label.txt new file mode 100644 index 0000000..a5c9a90 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/model/label.txt @@ -0,0 +1,9 @@ +1 +2 +3 +4 +5 +outpost +sentry +base +negative \ No newline at end of file diff --git a/src/rm_auto_aim/armor_detector/model/lenet.onnx b/src/rm_auto_aim/armor_detector/model/lenet.onnx new file mode 100644 index 0000000..8a0b42f Binary files /dev/null and b/src/rm_auto_aim/armor_detector/model/lenet.onnx differ diff --git a/src/rm_auto_aim/armor_detector/model/mlp.onnx b/src/rm_auto_aim/armor_detector/model/mlp.onnx new file mode 100644 index 0000000..2089380 Binary files /dev/null and b/src/rm_auto_aim/armor_detector/model/mlp.onnx differ diff --git a/src/rm_auto_aim/armor_detector/package.xml b/src/rm_auto_aim/armor_detector/package.xml new file mode 100644 index 0000000..46c9595 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/package.xml @@ -0,0 +1,46 @@ + + + + armor_detector + 0.1.0 + A template for ROS packages. + Chen Jun + BSD + https://github.com/chenjunnn/rm_auto_aim + https://github.com/chenjunnn/rm_auto_aim/issues + Chen Jun + + + ament_cmake + + + rclcpp + rclcpp_components + sensor_msgs + geometry_msgs + std_srvs + visualization_msgs + message_filters + cv_bridge + image_transport + image_transport_plugins + rm_interfaces + vision_opencv + tf2 + eigen + fmt + tf2_ros + tf2_geometry_msgs + rm_utils + + ament_lint_auto + ament_lint_common + ament_cmake_gtest + ament_cmake_clang_format + + + ament_cmake + + diff --git a/src/rm_auto_aim/armor_detector/src/armor_detector.cpp b/src/rm_auto_aim/armor_detector/src/armor_detector.cpp new file mode 100644 index 0000000..3dbce5a --- /dev/null +++ b/src/rm_auto_aim/armor_detector/src/armor_detector.cpp @@ -0,0 +1,351 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_detector/armor_detector.hpp" +// std +#include +#include +#include +// OpenCV +#include +#include +#include +#include +#include +#include +// project +#include "armor_detector/types.hpp" +#include "rm_utils/common.hpp" + +namespace fyt::auto_aim { +Detector::Detector(const int &bin_thres, + const EnemyColor &color, + const LightParams &l, + const ArmorParams &a) +: binary_thres(bin_thres), detect_color(color), light_params(l), armor_params(a) {} + +std::vector Detector::detect(const cv::Mat &input) noexcept { + // 1. Preprocess the image + binary_img = preprocessImage(input); + // 2. Find lights + lights_ = findLights(input, binary_img); + // 3. Match lights to armors + armors_ = matchLights(lights_); + + if (!armors_.empty() && classifier != nullptr) { + // Sequential processing here avoids nested parallelism with node-level workers. + for (auto &armor : armors_) { + // 4. Extract the number image + armor.number_img = classifier->extractNumber(input, armor); + // 5. Do classification + classifier->classify(input, armor); + // 6. Correct the corners of the armor + if (corner_corrector != nullptr) { + corner_corrector->correctCorners(armor, gray_img_); + } + } + + // 7. Erase the armors with ignore classes + classifier->eraseIgnoreClasses(armors_); + } + + return armors_; +} + +cv::Mat Detector::preprocessImage(const cv::Mat &rgb_img) noexcept { + cv::cvtColor(rgb_img, gray_img_, cv::COLOR_RGB2GRAY); + + cv::Mat binary_img; + cv::threshold(gray_img_, binary_img, binary_thres, 255, cv::THRESH_BINARY); + + return binary_img; +} + +std::vector Detector::findLights(const cv::Mat &rgb_img, + const cv::Mat &binary_img) noexcept { + using std::vector; + vector> contours; + vector hierarchy; + cv::findContours(binary_img, contours, hierarchy, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE); + + vector lights; + lights.reserve(contours.size()); + if (enable_debug) { + debug_lights.data.clear(); + } + + for (const auto &contour : contours) { + if (contour.size() < 6) continue; + + Light light; + std::vector points; + + if (light_params.use_fit_line) { + auto b_rect = cv::boundingRect(contour); + auto r_rect = cv::minAreaRect(contour); + // Fit line (least-squares) for more accurate top/bottom + cv::Mat mask = cv::Mat::zeros(b_rect.size(), CV_8UC1); + std::vector mask_contour; + mask_contour.reserve(contour.size()); + for (const auto &p : contour) { + mask_contour.emplace_back(p - cv::Point(b_rect.x, b_rect.y)); + } + cv::fillPoly(mask, {mask_contour}, 255); + cv::findNonZero(mask, points); + + // Filter by fill ratio, similar to attachment but simplified + if (points.empty()) continue; + + cv::Vec4f return_param; + cv::fitLine(points, return_param, cv::DIST_L2, 0, 0.01, 0.01); + cv::Point2f top, bottom; + if (int(return_param[0] * 100) == 100 || int(return_param[1] * 100) == 0) { + top = cv::Point2f(b_rect.x + b_rect.width / 2, b_rect.y); + bottom = cv::Point2f(b_rect.x + b_rect.width / 2, b_rect.y + b_rect.height); + } else { + auto k = return_param[1] / return_param[0]; + auto b = (return_param[3] + b_rect.y) - k * (return_param[2] + b_rect.x); + top = cv::Point2f((b_rect.y - b) / k, b_rect.y); + bottom = cv::Point2f((b_rect.y + b_rect.height - b) / k, b_rect.y + b_rect.height); + } + + // Use the short side of minAreaRect as width + double width = std::min(r_rect.size.width, r_rect.size.height); + double length = cv::norm(top - bottom); + light = Light(r_rect, top, bottom, length, width); + } else { + // Disable least-squares fitting: fall back to minAreaRect-based endpoints + light = Light(contour); + } + + if (isLight(light)) { + int sum_r = 0; + int sum_b = 0; + int sample_count = 0; + if (light_params.use_fit_line && !points.empty()) { + // fit-line mode keeps local contour pixels in points; convert to global by boundingRect offset + auto b_rect = cv::boundingRect(contour); + for (const auto &point : points) { + const int x = point.x + b_rect.x; + const int y = point.y + b_rect.y; + const auto &pixel = rgb_img.at(y, x); + sum_r += pixel[0]; + sum_b += pixel[2]; + ++sample_count; + } + } else { + // no-fit-line mode: use contour points directly to avoid expensive mask + findNonZero + for (const auto &point : contour) { + const auto &pixel = rgb_img.at(point.y, point.x); + sum_r += pixel[0]; + sum_b += pixel[2]; + ++sample_count; + } + } + + if (sample_count > 0 && + std::abs(sum_r - sum_b) / sample_count > light_params.color_diff_thresh) { + light.color = sum_r > sum_b ? EnemyColor::RED : EnemyColor::BLUE; + } + lights.emplace_back(light); + } + } + std::sort(lights.begin(), lights.end(), [](const Light &l1, const Light &l2) { + return l1.center.x < l2.center.x; + }); + return lights; +} + +bool Detector::isLight(const Light &light) noexcept { + // The ratio of light (short side / long side) + float ratio = light.width / light.length; + bool ratio_ok = light_params.min_ratio < ratio && ratio < light_params.max_ratio; + + bool angle_ok = light.tilt_angle < light_params.max_angle; + + bool is_light = ratio_ok && angle_ok; + + if (enable_debug) { + // Fill in debug information + rm_interfaces::msg::DebugLight light_data; + light_data.center_x = light.center.x; + light_data.ratio = ratio; + light_data.angle = light.tilt_angle; + light_data.is_light = is_light; + this->debug_lights.data.emplace_back(light_data); + } + + return is_light; +} + +std::vector Detector::matchLights(const std::vector &lights) noexcept { + std::vector armors; + if (enable_debug) { + this->debug_armors.data.clear(); + } + // Loop all the pairing of lights + for (auto light_1 = lights.begin(); light_1 != lights.end(); light_1++) { + if (light_1->color != detect_color) continue; + double max_iter_width = light_1->length * armor_params.max_large_center_distance; + + for (auto light_2 = light_1 + 1; light_2 != lights.end(); light_2++) { + if (light_2->color != detect_color) continue; + if (containLight(light_1 - lights.begin(), light_2 - lights.begin(), lights)) { + continue; + } + if (light_2->center.x - light_1->center.x > max_iter_width) break; + + auto type = isArmor(*light_1, *light_2); + if (type != ArmorType::INVALID) { + auto armor = Armor(*light_1, *light_2); + armor.type = type; + armors.emplace_back(armor); + } + } + } + + return armors; +} + +// Check if there is another light in the boundingRect formed by the 2 lights +bool Detector::containLight(const int i, const int j, const std::vector &lights) noexcept { + const Light &light_1 = lights.at(i), light_2 = lights.at(j); + auto points = std::vector{light_1.top, light_1.bottom, light_2.top, light_2.bottom}; + auto bounding_rect = cv::boundingRect(points); + double avg_length = (light_1.length + light_2.length) / 2.0; + double avg_width = (light_1.width + light_2.width) / 2.0; + // Only check lights in between + for (int k = i + 1; k < j; k++) { + const Light &test_light = lights.at(k); + + // 防止数字干扰 + if (test_light.width > 2 * avg_width) { + continue; + } + // 防止红点准星或弹丸干扰 + if (test_light.length < 0.5 * avg_length) { + continue; + } + + if (bounding_rect.contains(test_light.top) || bounding_rect.contains(test_light.bottom) || + bounding_rect.contains(test_light.center)) { + return true; + } + } + return false; +} + +ArmorType Detector::isArmor(const Light &light_1, const Light &light_2) noexcept { + // Ratio of the length of 2 lights (short side / long side) + float light_length_ratio = light_1.length < light_2.length ? light_1.length / light_2.length + : light_2.length / light_1.length; + bool light_ratio_ok = light_length_ratio > armor_params.min_light_ratio; + + // Distance between the center of 2 lights (unit : light length) + float avg_light_length = (light_1.length + light_2.length) / 2; + float center_distance = cv::norm(light_1.center - light_2.center) / avg_light_length; + bool center_distance_ok = (armor_params.min_small_center_distance <= center_distance && + center_distance < armor_params.max_small_center_distance) || + (armor_params.min_large_center_distance <= center_distance && + center_distance < armor_params.max_large_center_distance); + + // Angle of light center connection + cv::Point2f diff = light_1.center - light_2.center; + float angle = std::abs(std::atan(diff.y / diff.x)) / CV_PI * 180; + bool angle_ok = angle < armor_params.max_angle; + + bool is_armor = light_ratio_ok && center_distance_ok && angle_ok; + + // Judge armor type + ArmorType type; + if (is_armor) { + // 优先认为是小装甲板,提高大装甲板的判断阈值 + // 标准值:小装甲板 ~2.5,大装甲板 ~4.1 + // 将阈值设为 3.4 可以减少因灯条拟合变短导致的比值偏大从而误判为大装甲板的情况 + type = center_distance > 3.5 ? ArmorType::LARGE : ArmorType::SMALL; + } else { + type = ArmorType::INVALID; + } + + if (enable_debug) { + // Fill in debug information + rm_interfaces::msg::DebugArmor armor_data; + armor_data.type = armorTypeToString(type); + armor_data.center_x = (light_1.center.x + light_2.center.x) / 2; + armor_data.light_ratio = light_length_ratio; + armor_data.center_distance = center_distance; + armor_data.angle = angle; + this->debug_armors.data.emplace_back(armor_data); + } + + return type; +} + +cv::Mat Detector::getAllNumbersImage() const noexcept { + if (armors_.empty()) { + return cv::Mat(cv::Size(20, 28), CV_8UC1); + } else { + std::vector number_imgs; + number_imgs.reserve(armors_.size()); + for (auto &armor : armors_) { + number_imgs.emplace_back(armor.number_img); + } + cv::Mat all_num_img; + cv::vconcat(number_imgs, all_num_img); + return all_num_img; + } +} + +void Detector::drawResults(cv::Mat &img) const noexcept { + // Draw Lights + + // for (const auto &light : lights_) { + // auto line_color = + // light.color == EnemyColor::RED ? cv::Scalar(0, 255, 255) : cv::Scalar(255, 255, 0); + // // cv::ellipse(img, light, line_color, 2); + // cv::line(img, light.top, light.bottom, line_color, 1); + // } + + // Draw armors + for (const auto &armor : armors_) { + // cv::line(img, armor.left_light.top, armor.right_light.bottom, cv::Scalar(0, 255, 0), 1); + // cv::line(img, armor.left_light.bottom, armor.right_light.top, cv::Scalar(0, 255, 0), 1); + + cv::line( + img, armor.left_light.top, armor.left_light.bottom, cv::Scalar(0, 255, 0), 1, cv::LINE_AA); + cv::line( + img, armor.right_light.bottom, armor.right_light.top, cv::Scalar(0, 255, 0), 1, cv::LINE_AA); + cv::line( + img, armor.left_light.top, armor.right_light.top, cv::Scalar(0, 255, 0), 1, cv::LINE_AA); + cv::line(img, + armor.right_light.bottom, + armor.left_light.bottom, + cv::Scalar(0, 255, 0), + 1, + cv::LINE_AA); + } + // Show numbers and confidence + for (const auto &armor : armors_) { + std::string text = + fmt::format("{} {}", armorTypeToString(armor.type), armor.classfication_result); + cv::putText( + img, text, armor.left_light.top, cv::FONT_HERSHEY_SIMPLEX, 0.8, cv::Scalar(0, 255, 255), 2); + } +} + +} // namespace fyt::auto_aim diff --git a/src/rm_auto_aim/armor_detector/src/armor_detector_node.cpp b/src/rm_auto_aim/armor_detector/src/armor_detector_node.cpp new file mode 100644 index 0000000..1b81a67 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/src/armor_detector_node.cpp @@ -0,0 +1,685 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under +// Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// std +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// ros2 +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +// third party +#include +#include +#include +// project +#include "armor_detector/armor_detector_node.hpp" +#include "armor_detector/ba_solver.hpp" +#include "armor_detector/types.hpp" +#include "rm_utils/assert.hpp" +#include "rm_utils/common.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/pnp_solver.hpp" +#include "rm_utils/math/utils.hpp" +#include "rm_utils/url_resolver.hpp" + +namespace fyt::auto_aim { +namespace { + +double durationMs(const std::chrono::steady_clock::duration &duration) { + return std::chrono::duration(duration).count(); +} + +} // namespace + +ArmorDetectorNode::ArmorDetectorNode(const rclcpp::NodeOptions &options) +: Node("armor_detector", options) { + FYT_REGISTER_LOGGER("armor_detector", "~/fyt2024-log", INFO); + FYT_INFO("armor_detector", "Starting ArmorDetectorNode!"); + // Detector + detector_ = initDetector(); + + const int max_queue_size_param = static_cast(this->declare_parameter("max_queue_size", 3)); + max_queue_size_ = static_cast(std::max(1, max_queue_size_param)); + process_every_n_frames_ = + std::max(1, static_cast(this->declare_parameter("process_every_n_frames", 1))); + + // Tricks to make pose more accurate + use_ba_ = this->declare_parameter("use_ba", true); + + // Armors Publisher + armors_pub_ = this->create_publisher("armor_detector/armors", + rclcpp::SensorDataQoS()); + + // Transform initialize + odom_frame_ = this->declare_parameter("target_frame", "odom"); + + // Visualization Marker Publisher + // See http://wiki.ros.org/rviz/DisplayTypes/Marker + armor_marker_.ns = "armors"; + armor_marker_.action = visualization_msgs::msg::Marker::ADD; + armor_marker_.type = visualization_msgs::msg::Marker::CUBE; + armor_marker_.scale.x = 0.03; + armor_marker_.scale.y = 0.15; + armor_marker_.scale.z = 0.12; + armor_marker_.color.a = 1.0; + armor_marker_.color.r = 1.0; + armor_marker_.lifetime = rclcpp::Duration::from_seconds(0.1); + + text_marker_.ns = "classification"; + text_marker_.action = visualization_msgs::msg::Marker::ADD; + text_marker_.type = visualization_msgs::msg::Marker::TEXT_VIEW_FACING; + text_marker_.scale.z = 0.1; + text_marker_.color.a = 1.0; + text_marker_.color.r = 1.0; + text_marker_.color.g = 1.0; + text_marker_.color.b = 1.0; + text_marker_.lifetime = rclcpp::Duration::from_seconds(0.1); + + marker_pub_ = + this->create_publisher("armor_detector/marker", 10); + + // Debug Publishers + debug_ = this->declare_parameter("debug", false); + debug_log_interval_frames_ = + std::max(1, static_cast(this->declare_parameter("debug_log_interval_frames", 30))); + debug_terminal_log_ = this->declare_parameter("debug.enable_terminal_log", true); + debug_markers_ = this->declare_parameter("debug.enable_markers", true); + debug_lights_msg_ = this->declare_parameter("debug.enable_lights_msg", true); + debug_armors_msg_ = this->declare_parameter("debug.enable_armors_msg", true); + debug_binary_img_ = this->declare_parameter("debug.enable_binary_img", true); + debug_number_img_ = this->declare_parameter("debug.enable_number_img", true); + debug_result_img_ = this->declare_parameter("debug.enable_result_img", true); + tf_error_log_interval_ms_ = + std::max(1, static_cast(this->declare_parameter("tf_error_log_interval_ms", 1000))); + if (debug_) { + createDebugPublishers(); + } + debug_publishers_refresh_timer_ = this->create_wall_timer( + std::chrono::milliseconds(100), + [this]() { refreshDebugPublishersIfNeeded(); }); + // Debug param change moniter + debug_param_sub_ = std::make_shared(this); + debug_cb_handle_ = + debug_param_sub_->add_parameter_callback("debug", [this](const rclcpp::Parameter &p) { + std::lock_guard lock(processing_mutex_); + debug_ = p.as_bool(); + debug_ ? createDebugPublishers() : destroyDebugPublishers(); + }); + + cam_info_sub_ = this->create_subscription( + "camera_info", + rclcpp::SensorDataQoS(), + [this](sensor_msgs::msg::CameraInfo::SharedPtr camera_info) { + std::lock_guard lock(processing_mutex_); + cam_center_ = cv::Point2f(camera_info->k[2], camera_info->k[5]); + cam_info_ = std::make_shared(*camera_info); + // Setup armor pose solver + armor_pose_estimator_ = std::make_unique(cam_info_); + armor_pose_estimator_->enableBA(use_ba_); + cam_info_sub_.reset(); + }); + + img_sub_ = this->create_subscription( + "image_raw", + rclcpp::SensorDataQoS(), + std::bind(&ArmorDetectorNode::imageCallback, this, std::placeholders::_1)); + + // target_sub_ = this->create_subscription( + // "armor_solver/target", + // rclcpp::SensorDataQoS(), + // std::bind(&ArmorDetectorNode::targetCallback, this, + // std::placeholders::_1)); + + tf2_buffer_ = std::make_shared(this->get_clock()); + auto timer_interface = std::make_shared( + this->get_node_base_interface(), this->get_node_timers_interface()); + tf2_buffer_->setCreateTimerInterface(timer_interface); + tf2_listener_ = std::make_shared(*tf2_buffer_); + + set_mode_srv_ = this->create_service( + "armor_detector/set_mode", + std::bind( + &ArmorDetectorNode::setModeCallback, this, std::placeholders::_1, std::placeholders::_2)); + + image_processing_thread_ = std::thread(&ArmorDetectorNode::processImageLoop, this); + FYT_INFO("armor_detector", + "Image worker started: threads=1, max_queue_size={}", + max_queue_size_); + + heartbeat_ = HeartBeatPublisher::create(this); +} + +ArmorDetectorNode::~ArmorDetectorNode() { + { + std::lock_guard lock(queue_mutex_); + stop_processing_ = true; + } + queue_cv_.notify_one(); + if (image_processing_thread_.joinable()) { + image_processing_thread_.join(); + } +} + +void ArmorDetectorNode::imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr img_msg) { + if ((input_frame_counter_.fetch_add(1, std::memory_order_relaxed) + 1) % + static_cast(process_every_n_frames_) != + 0) { + return; + } + + auto frame_start = std::chrono::steady_clock::now(); + { + std::lock_guard lock(queue_mutex_); + if (frame_queue_.size() >= max_queue_size_) { + frame_queue_.pop_front(); + } + frame_queue_.push_back(PendingFrame{.img_msg = img_msg, .frame_start = frame_start}); + } + queue_cv_.notify_one(); +} + +void ArmorDetectorNode::processImageLoop() { + while (true) { + PendingFrame frame; + { + std::unique_lock lock(queue_mutex_); + queue_cv_.wait(lock, [this]() { return stop_processing_ || !frame_queue_.empty(); }); + if (stop_processing_ && frame_queue_.empty()) { + return; + } + frame = std::move(frame_queue_.front()); + frame_queue_.pop_front(); + } + + processFrame(std::move(frame)); + } +} + +void ArmorDetectorNode::processFrame(PendingFrame frame) { + bool debug_enabled = false; + bool debug_terminal_log_enabled = false; + bool debug_marker_enabled = false; + { + std::lock_guard lock(processing_mutex_); + debug_enabled = debug_; + debug_terminal_log_enabled = debug_terminal_log_; + debug_marker_enabled = debug_markers_; + } + + auto stage_start = std::chrono::steady_clock::now(); + Eigen::Matrix3d imu_to_camera = Eigen::Matrix3d::Identity(); + + try { + rclcpp::Time target_time = frame.img_msg->header.stamp; + auto odom_to_gimbal = tf2_buffer_->lookupTransform( + odom_frame_, frame.img_msg->header.frame_id, target_time, rclcpp::Duration::from_seconds(0.01)); + auto msg_q = odom_to_gimbal.transform.rotation; + tf2::Quaternion tf_q; + tf2::fromMsg(msg_q, tf_q); + tf2::Matrix3x3 tf2_matrix = tf2::Matrix3x3(tf_q); + imu_to_camera << tf2_matrix.getRow(0)[0], tf2_matrix.getRow(0)[1], tf2_matrix.getRow(0)[2], + tf2_matrix.getRow(1)[0], tf2_matrix.getRow(1)[1], tf2_matrix.getRow(1)[2], + tf2_matrix.getRow(2)[0], tf2_matrix.getRow(2)[1], tf2_matrix.getRow(2)[2]; + } catch (const tf2::TransformException &ex) { + bool should_log = false; + uint64_t suppressed_count = 0; + const auto now = std::chrono::steady_clock::now(); + { + std::lock_guard log_lock(tf_error_log_mutex_); + if (last_tf_error_log_time_.time_since_epoch().count() == 0 || + durationMs(now - last_tf_error_log_time_) >= static_cast(tf_error_log_interval_ms_)) { + should_log = true; + last_tf_error_log_time_ = now; + suppressed_count = tf_error_suppressed_counter_.exchange(0, std::memory_order_relaxed); + } else { + tf_error_suppressed_counter_.fetch_add(1, std::memory_order_relaxed); + } + } + if (should_log) { + FYT_ERROR("armor_detector", + "lookUpTransform failed: {} -> {}, error: {}, suppressed={}", + odom_frame_, + frame.img_msg->header.frame_id, + ex.what(), + suppressed_count); + } + return; + } + const double tf_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + // Detect armors + double detect_ms = 0.0; + double debug_image_ms = 0.0; + stage_start = std::chrono::steady_clock::now(); + auto armors = detectArmors(frame.img_msg, &detect_ms, &debug_image_ms); + const double detect_total_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + rm_interfaces::msg::Armors armors_msg; + // Init message + armors_msg.header = frame.img_msg->header; + armors_msg.armors.clear(); + + // Extract armor poses + stage_start = std::chrono::steady_clock::now(); + { + std::lock_guard lock(processing_mutex_); + if (armor_pose_estimator_ != nullptr) { + armors_msg.armors = armor_pose_estimator_->extractArmorPoses(armors, imu_to_camera); + + // std::string path = + // fmt::format("/home/zcf/fyt2024-log/images/{}/{}.jpg", + // armor_msg.number, now().seconds()); + // cv::imwrite(path, armor.number_img); + } else { + FYT_WARN("armor_detector", "PnP Failed!"); + } + } + const double pose_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + // Publishing marker + stage_start = std::chrono::steady_clock::now(); + { + std::lock_guard lock(processing_mutex_); + if (debug_enabled && debug_marker_enabled) { + armors_msg_ = armors_msg; + marker_array_.markers.clear(); + armor_marker_.id = 0; + text_marker_.id = 0; + armor_marker_.header = text_marker_.header = armors_msg_.header; + // Fill the markers + for (const auto &armor : armors_msg_.armors) { + armor_marker_.pose = armor.pose; + armor_marker_.id++; + text_marker_.pose.position = armor.pose.position; + text_marker_.id++; + text_marker_.pose.position.y -= 0.1; + text_marker_.text = armor.number; + marker_array_.markers.emplace_back(armor_marker_); + marker_array_.markers.emplace_back(text_marker_); + } + publishMarkers(); + } + } + const double marker_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + // Publishing detected armors + stage_start = std::chrono::steady_clock::now(); + armors_pub_->publish(armors_msg); + const double publish_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + if (debug_enabled && debug_terminal_log_enabled && + (debug_log_counter_.fetch_add(1, std::memory_order_relaxed) + 1) % + static_cast(debug_log_interval_frames_) == 0) { + const double total_ms = durationMs(std::chrono::steady_clock::now() - frame.frame_start); + FYT_INFO("armor_detector", + "Detector Latency: total={:.3f}ms tf={:.3f}ms detect={:.3f}ms " + "(core={:.3f}ms debug_img={:.3f}ms) pose={:.3f}ms marker={:.3f}ms publish={:.3f}ms", + total_ms, + tf_ms, + detect_total_ms, + detect_ms, + debug_image_ms, + pose_ms, + marker_ms, + publish_ms); + } +} + +std::unique_ptr ArmorDetectorNode::initDetector() { + rcl_interfaces::msg::ParameterDescriptor param_desc; + param_desc.integer_range.resize(1); + param_desc.integer_range[0].step = 1; + param_desc.integer_range[0].from_value = 0; + param_desc.integer_range[0].to_value = 255; + int binary_thres = declare_parameter("binary_thres", 160, param_desc); + + Detector::LightParams l_params = { + .min_ratio = declare_parameter("light.min_ratio", 0.08), + .max_ratio = declare_parameter("light.max_ratio", 0.4), + .max_angle = declare_parameter("light.max_angle", 40.0), + .use_fit_line = declare_parameter("light.use_fit_line", true), + .color_diff_thresh = static_cast(declare_parameter("light.color_diff_thresh", 25))}; + + Detector::ArmorParams a_params = { + .min_light_ratio = declare_parameter("armor.min_light_ratio", 0.6), + .min_small_center_distance = declare_parameter("armor.min_small_center_distance", 0.8), + .max_small_center_distance = declare_parameter("armor.max_small_center_distance", 3.2), + .min_large_center_distance = declare_parameter("armor.min_large_center_distance", 3.2), + .max_large_center_distance = declare_parameter("armor.max_large_center_distance", 5.0), + .max_angle = declare_parameter("armor.max_angle", 35.0)}; + + auto detector = std::make_unique(binary_thres, EnemyColor::RED, l_params, a_params); + + // Init classifier + namespace fs = std::filesystem; + fs::path model_path = + utils::URLResolver::getResolvedPath("package://armor_detector/model/lenet.onnx"); + fs::path label_path = + utils::URLResolver::getResolvedPath("package://armor_detector/model/label.txt"); + FYT_ASSERT_MSG(fs::exists(model_path) && fs::exists(label_path), + model_path.string() + " Not Found!"); + + double threshold = this->declare_parameter("classifier_threshold", 0.7); + std::vector ignore_classes = + this->declare_parameter("ignore_classes", std::vector{"negative"}); + detector->classifier = + std::make_unique(model_path, label_path, threshold, ignore_classes); + + // Init Corrector + bool use_pca = this->declare_parameter("use_pca", true); + if (use_pca) { + detector->corner_corrector = std::make_unique(); + } + + // Set dynamic parameter callback + on_set_parameters_callback_handle_ = this->add_on_set_parameters_callback( + std::bind(&ArmorDetectorNode::onSetParameters, this, std::placeholders::_1)); + + return detector; +} + +std::vector ArmorDetectorNode::detectArmors( + const sensor_msgs::msg::Image::ConstSharedPtr &img_msg, + double *detect_ms, + double *debug_publish_ms) { + std::lock_guard lock(processing_mutex_); + auto stage_start = std::chrono::steady_clock::now(); + // Convert ROS img to cv::Mat + auto img = cv_bridge::toCvShare(img_msg, "rgb8")->image; + + detector_->enable_debug = debug_; + auto armors = detector_->detect(img); + if (detect_ms != nullptr) { + *detect_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + } + + auto final_time = this->now(); + auto latency = (final_time - img_msg->header.stamp).seconds() * 1000; + + // Publish debug info + stage_start = std::chrono::steady_clock::now(); + if (debug_) { + if (debug_binary_img_ && debug_binary_pub_active_) { + binary_img_pub_.publish( + cv_bridge::CvImage(img_msg->header, "mono8", detector_->binary_img).toImageMsg()); + } + + if (debug_lights_msg_ || debug_armors_msg_) { + // Sort lights and armors data by x coordinate + std::sort(detector_->debug_lights.data.begin(), + detector_->debug_lights.data.end(), + [](const auto &l1, const auto &l2) { return l1.center_x < l2.center_x; }); + std::sort(detector_->debug_armors.data.begin(), + detector_->debug_armors.data.end(), + [](const auto &a1, const auto &a2) { return a1.center_x < a2.center_x; }); + } + + if (debug_lights_msg_ && debug_lights_pub_active_) { + lights_data_pub_->publish(detector_->debug_lights); + } + if (debug_armors_msg_ && debug_armors_pub_active_) { + armors_data_pub_->publish(detector_->debug_armors); + } + + if (debug_number_img_ && debug_number_pub_active_ && !armors.empty()) { + auto all_num_img = detector_->getAllNumbersImage(); + number_img_pub_.publish( + *cv_bridge::CvImage(img_msg->header, "mono8", all_num_img).toImageMsg()); + } + + if (debug_result_img_ && debug_result_pub_active_) { + detector_->drawResults(img); + + // Draw camera center + cv::circle(img, cam_center_, 5, cv::Scalar(255, 0, 0), 2); + // Draw latency + std::stringstream latency_ss; + latency_ss << "Latency: " << std::fixed << std::setprecision(2) << latency << "ms"; + auto latency_s = latency_ss.str(); + cv::putText( + img, + latency_s, + cv::Point(10, 30), + cv::FONT_HERSHEY_SIMPLEX, + 1.0, + cv::Scalar(0, 255, 0), + 2); + result_img_pub_.publish(cv_bridge::CvImage(img_msg->header, "rgb8", img).toImageMsg()); + } + } + if (debug_publish_ms != nullptr) { + *debug_publish_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + } + + return armors; +} + +rcl_interfaces::msg::SetParametersResult ArmorDetectorNode::onSetParameters( + std::vector parameters) { + rcl_interfaces::msg::SetParametersResult result; + result.successful = true; + std::lock_guard lock(processing_mutex_); + bool refresh_debug_publishers = false; + for (const auto ¶m : parameters) { + if (param.get_name() == "binary_thres") { + detector_->binary_thres = param.as_int(); + } else if (param.get_name() == "debug.enable_terminal_log") { + debug_terminal_log_ = param.as_bool(); + } else if (param.get_name() == "debug.enable_markers") { + debug_markers_ = param.as_bool(); + } else if (param.get_name() == "debug.enable_lights_msg") { + debug_lights_msg_ = param.as_bool(); + refresh_debug_publishers = true; + } else if (param.get_name() == "debug.enable_armors_msg") { + debug_armors_msg_ = param.as_bool(); + refresh_debug_publishers = true; + } else if (param.get_name() == "debug.enable_binary_img") { + debug_binary_img_ = param.as_bool(); + refresh_debug_publishers = true; + } else if (param.get_name() == "debug.enable_number_img") { + debug_number_img_ = param.as_bool(); + refresh_debug_publishers = true; + } else if (param.get_name() == "debug.enable_result_img") { + debug_result_img_ = param.as_bool(); + refresh_debug_publishers = true; + } else if (param.get_name() == "classifier_threshold") { + detector_->classifier->threshold = param.as_double(); + } else if (param.get_name() == "light.min_ratio") { + detector_->light_params.min_ratio = param.as_double(); + } else if (param.get_name() == "light.max_ratio") { + detector_->light_params.max_ratio = param.as_double(); + } else if (param.get_name() == "light.max_angle") { + detector_->light_params.max_angle = param.as_double(); + } else if (param.get_name() == "light.use_fit_line") { + detector_->light_params.use_fit_line = param.as_bool(); + } else if (param.get_name() == "light.color_diff_thresh") { + detector_->light_params.color_diff_thresh = param.as_int(); + } else if (param.get_name() == "armor.min_light_ratio") { + detector_->armor_params.min_light_ratio = param.as_double(); + } else if (param.get_name() == "armor.min_small_center_distance") { + detector_->armor_params.min_small_center_distance = param.as_double(); + } else if (param.get_name() == "armor.max_small_center_distance") { + detector_->armor_params.max_small_center_distance = param.as_double(); + } else if (param.get_name() == "armor.min_large_center_distance") { + detector_->armor_params.min_large_center_distance = param.as_double(); + } else if (param.get_name() == "armor.max_large_center_distance") { + detector_->armor_params.max_large_center_distance = param.as_double(); + } else if (param.get_name() == "armor.max_angle") { + detector_->armor_params.max_angle = param.as_double(); + } + } + if (refresh_debug_publishers) { + debug_publishers_refresh_requested_.store(true, std::memory_order_relaxed); + } + return result; +} + +// void ArmorDetectorNode::targetCallback(const +// rm_interfaces::msg::Target::SharedPtr target_msg) { +// if (target_msg->tracking) { +// tracked_target_ = target_msg; +// } else { +// tracked_target_ = nullptr; +// if (!tracked_armors_.empty()) { +// tracked_armors_.clear(); +// } +// } +// } + +void ArmorDetectorNode::createDebugPublishers() noexcept { + debug_lights_pub_active_ = false; + debug_armors_pub_active_ = false; + debug_binary_pub_active_ = false; + debug_number_pub_active_ = false; + debug_result_pub_active_ = false; + + if (debug_lights_msg_) { + lights_data_pub_ = + this->create_publisher("armor_detector/debug_lights", 10); + debug_lights_pub_active_ = true; + } + if (debug_armors_msg_) { + armors_data_pub_ = + this->create_publisher("armor_detector/debug_armors", 10); + debug_armors_pub_active_ = true; + } + if (!this->has_parameter("armor_detector.result_img.jpeg_quality")) { + this->declare_parameter("armor_detector.result_img.jpeg_quality", 50); + } + if (!this->has_parameter("armor_detector.binary_img.jpeg_quality")) { + this->declare_parameter("armor_detector.binary_img.jpeg_quality", 50); + } + if (debug_binary_img_) { + binary_img_pub_ = image_transport::create_publisher(this, "armor_detector/binary_img"); + debug_binary_pub_active_ = true; + } + if (debug_number_img_) { + number_img_pub_ = image_transport::create_publisher(this, "armor_detector/number_img"); + debug_number_pub_active_ = true; + } + if (debug_result_img_) { + result_img_pub_ = image_transport::create_publisher(this, "armor_detector/result_img"); + debug_result_pub_active_ = true; + } +} + +void ArmorDetectorNode::destroyDebugPublishers() noexcept { + lights_data_pub_.reset(); + armors_data_pub_.reset(); + + binary_img_pub_.shutdown(); + number_img_pub_.shutdown(); + result_img_pub_.shutdown(); + + debug_lights_pub_active_ = false; + debug_armors_pub_active_ = false; + debug_binary_pub_active_ = false; + debug_number_pub_active_ = false; + debug_result_pub_active_ = false; +} + +void ArmorDetectorNode::refreshDebugPublishersIfNeeded() noexcept { + if (!debug_publishers_refresh_requested_.exchange(false, std::memory_order_relaxed)) { + return; + } + + std::lock_guard lock(processing_mutex_); + destroyDebugPublishers(); + if (debug_) { + createDebugPublishers(); + } +} + +void ArmorDetectorNode::publishMarkers() noexcept { + using Marker = visualization_msgs::msg::Marker; + armor_marker_.action = armors_msg_.armors.empty() ? Marker::DELETEALL : Marker::ADD; + marker_array_.markers.emplace_back(armor_marker_); + marker_pub_->publish(marker_array_); +} + +void ArmorDetectorNode::setModeCallback( + const std::shared_ptr request, + std::shared_ptr response) { + response->success = true; + response->message = "0"; + + VisionMode mode = static_cast(request->mode); + std::string mode_name = visionModeToString(mode); + if (mode_name == "UNKNOWN") { + FYT_ERROR("armor_detector", "Invalid mode: {}", request->mode); + return; + } + + auto createImageSub = [this]() { + if (img_sub_ == nullptr) { + img_sub_ = this->create_subscription( + "image_raw", + rclcpp::SensorDataQoS(), + std::bind(&ArmorDetectorNode::imageCallback, this, std::placeholders::_1)); + } + }; + + switch (mode) { + case VisionMode::AUTO_AIM_RED: { + detector_->detect_color = EnemyColor::RED; + createImageSub(); + break; + } + case VisionMode::AUTO_AIM_BLUE: { + detector_->detect_color = EnemyColor::BLUE; + createImageSub(); + break; + } + default: { + img_sub_.reset(); + std::lock_guard lock(queue_mutex_); + frame_queue_.clear(); + } + } + + FYT_WARN("armor_detector", "Set mode to {}", mode_name); +} + +} // namespace fyt::auto_aim + +#include "rclcpp_components/register_node_macro.hpp" + +// Register the component with class_loader. +// This acts as a sort of entry point, allowing the component to be discoverable +// when its library is being loaded into a running process. +RCLCPP_COMPONENTS_REGISTER_NODE(fyt::auto_aim::ArmorDetectorNode) diff --git a/src/rm_auto_aim/armor_detector/src/armor_pose_estimator.cpp b/src/rm_auto_aim/armor_detector/src/armor_pose_estimator.cpp new file mode 100644 index 0000000..89e2d02 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/src/armor_pose_estimator.cpp @@ -0,0 +1,154 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_detector/armor_pose_estimator.hpp" + +#include "armor_detector/types.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/utils.hpp" + +namespace fyt::auto_aim { +ArmorPoseEstimator::ArmorPoseEstimator(sensor_msgs::msg::CameraInfo::SharedPtr camera_info) { + // Setup pnp solver + pnp_solver_ = std::make_unique(camera_info->k, camera_info->d); + pnp_solver_->setObjectPoints( + "small", Armor::buildObjectPoints(SMALL_ARMOR_WIDTH, SMALL_ARMOR_HEIGHT)); + pnp_solver_->setObjectPoints( + "large", Armor::buildObjectPoints(LARGE_ARMOR_WIDTH, LARGE_ARMOR_HEIGHT)); + // BA solver + ba_solver_ = std::make_unique(camera_info->k, camera_info->d); + + R_gimbal_camera_ = Eigen::Matrix3d::Identity(); + R_gimbal_camera_ << 0, 0, 1, -1, 0, 0, 0, -1, 0; +} + +std::vector ArmorPoseEstimator::extractArmorPoses( + const std::vector &armors, Eigen::Matrix3d R_imu_camera) { + std::vector armors_msg; + + for (const auto &armor : armors) { + std::vector rvecs, tvecs; + + // Use PnP to get the initial pose information + if (pnp_solver_->solvePnPGeneric( + armor.landmarks(), rvecs, tvecs, (armor.type == ArmorType::SMALL ? "small" : "large"))) { + sortPnPResult(armor, rvecs, tvecs); + cv::Mat rmat; + cv::Rodrigues(rvecs[0], rmat); + + Eigen::Matrix3d R = utils::cvToEigen(rmat); + Eigen::Vector3d t = utils::cvToEigen(tvecs[0]); + + double armor_roll = rotationMatrixToRPY(R_gimbal_camera_ * R)[0] * 180 / M_PI; + + if (use_ba_ && std::abs(armor_roll) < 15) { + // Use BA alogorithm to optimize the pose from PnP + // solveBa() will modify the rotation_matrix + R = ba_solver_->solveBa(armor, t, R, R_imu_camera); + } + Eigen::Quaterniond q(R); + + // Fill the armor message + rm_interfaces::msg::Armor armor_msg; + + // Fill basic info + armor_msg.type = armorTypeToString(armor.type); + armor_msg.number = armor.number; + + // Fill pose + armor_msg.pose.position.x = t(0); + armor_msg.pose.position.y = t(1); + armor_msg.pose.position.z = t(2); + armor_msg.pose.orientation.x = q.x(); + armor_msg.pose.orientation.y = q.y(); + armor_msg.pose.orientation.z = q.z(); + armor_msg.pose.orientation.w = q.w(); + + // Fill the distance to image center + armor_msg.distance_to_image_center = pnp_solver_->calculateDistanceToCenter(armor.center); + + armors_msg.push_back(std::move(armor_msg)); + } else { + FYT_WARN("armor_detector", "PnP Failed!"); + } + } + + return armors_msg; +} + +Eigen::Vector3d ArmorPoseEstimator::rotationMatrixToRPY(const Eigen::Matrix3d &R) { + // Transform to camera frame + Eigen::Quaterniond q(R); + // Get armor yaw + tf2::Quaternion tf_q(q.x(), q.y(), q.z(), q.w()); + Eigen::Vector3d rpy; + tf2::Matrix3x3(tf_q).getRPY(rpy[0], rpy[1], rpy[2]); + return rpy; +} + +void ArmorPoseEstimator::sortPnPResult(const Armor &armor, + std::vector &rvecs, + std::vector &tvecs) const { + constexpr float PROJECT_ERR_THRES = 3.0; + + // 获取这两个解 + cv::Mat &rvec1 = rvecs.at(0); + cv::Mat &tvec1 = tvecs.at(0); + cv::Mat &rvec2 = rvecs.at(1); + cv::Mat &tvec2 = tvecs.at(1); + + // 将旋转向量转换为旋转矩阵 + cv::Mat R1_cv, R2_cv; + cv::Rodrigues(rvec1, R1_cv); + cv::Rodrigues(rvec2, R2_cv); + + // 转换为Eigen矩阵 + Eigen::Matrix3d R1 = utils::cvToEigen(R1_cv); + Eigen::Matrix3d R2 = utils::cvToEigen(R2_cv); + + // 计算云台系下装甲板的RPY角 + auto rpy1 = rotationMatrixToRPY(R_gimbal_camera_ * R1); + auto rpy2 = rotationMatrixToRPY(R_gimbal_camera_ * R2); + + std::string coord_frame_name = (armor.type == ArmorType::SMALL ? "small" : "large"); + double error1 = + pnp_solver_->calculateReprojectionError(armor.landmarks(), rvec1, tvec1, coord_frame_name); + double error2 = + pnp_solver_->calculateReprojectionError(armor.landmarks(), rvec2, tvec2, coord_frame_name); + + // 两个解的重投影误差差距较大或者roll角度较大时,不做选择 + if ((error2 / error1 > PROJECT_ERR_THRES) || (std::abs(rpy1[0]) > 10 * M_PI / 180) || + (std::abs(rpy2[0]) > 10 * M_PI / 180)) { + return; + } + + // 计算灯条在图像中的倾斜角度 + double l_angle = std::atan2(armor.left_light.axis.y, armor.left_light.axis.x) * 180 / M_PI; + double r_angle = std::atan2(armor.right_light.axis.y, armor.right_light.axis.x) * 180 / M_PI; + double angle = (l_angle + r_angle) / 2; + angle += 90.0; + + if (armor.number == "outpost") angle = -angle; + + // 根据倾斜角度选择解 + // 如果装甲板左倾(angle > 0),选择Yaw为负的解 + // 如果装甲板右倾(angle < 0),选择Yaw为正的解 + if ((angle > 0 && rpy1[2] > 0 && rpy2[2] < 0) || (angle < 0 && rpy1[2] < 0 && rpy2[2] > 0)) { + std::swap(rvec1, rvec2); + std::swap(tvec1, tvec2); + FYT_DEBUG("armor_detector", "PnP Solution 2 Selected"); + } +} + +} // namespace fyt::auto_aim diff --git a/src/rm_auto_aim/armor_detector/src/ba_solver.cpp b/src/rm_auto_aim/armor_detector/src/ba_solver.cpp new file mode 100644 index 0000000..f8d8447 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/src/ba_solver.cpp @@ -0,0 +1,137 @@ +// Created by Labor 2023.8.25 +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_detector/ba_solver.hpp" +// std +#include +// g2o +#include +#include +#include +#include +// 3rd party +#include +#include +#include +#include +// project +#include "armor_detector/graph_optimizer.hpp" +#include "armor_detector/types.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/utils.hpp" + +namespace fyt::auto_aim { +G2O_USE_OPTIMIZATION_LIBRARY(dense) + +BaSolver::BaSolver(std::array &camera_matrix, + std::vector &dist_coeffs) { + K_ = Eigen::Matrix3d::Identity(); + K_(0, 0) = camera_matrix[0]; + K_(1, 1) = camera_matrix[4]; + K_(0, 2) = camera_matrix[2]; + K_(1, 2) = camera_matrix[5]; + + // Optimization information + optimizer_.setVerbose(false); + // Optimization method + optimizer_.setAlgorithm( + g2o::OptimizationAlgorithmFactory::instance()->construct( + "lm_dense", solver_property_)); + // Initial step size + lm_algorithm_ = dynamic_cast( + const_cast(optimizer_.algorithm())); + lm_algorithm_->setUserLambdaInit(0.1); +} + +Eigen::Matrix3d +BaSolver::solveBa(const Armor &armor, const Eigen::Vector3d &t_camera_armor, + const Eigen::Matrix3d &R_camera_armor, + const Eigen::Matrix3d &R_imu_camera) noexcept { + // Reset optimizer + optimizer_.clear(); + + // Essential coordinate system transformation + Eigen::Matrix3d R_imu_armor = R_imu_camera * R_camera_armor; + Sophus::SO3d R_camera_imu = Sophus::SO3d(R_imu_camera.transpose()); + + // Compute the initial yaw from rotation matrix + double initial_armor_yaw; + auto theta_by_sin = std::asin(-R_imu_armor(0, 1)); + auto theta_by_cos = std::acos(R_imu_armor(1, 1)); + if (std::abs(theta_by_sin) > 1e-5) { + initial_armor_yaw = theta_by_sin > 0 ? theta_by_cos : -theta_by_cos; + } else { + initial_armor_yaw = R_imu_armor(1, 1) > 0 ? 0 : CV_PI; + } + + // Get the pitch angle of the armor + double armor_pitch = + armor.number == "outpost" ? -FIFTTEN_DEGREE_RAD : FIFTTEN_DEGREE_RAD; + Sophus::SO3d R_pitch = Sophus::SO3d::exp(Eigen::Vector3d(0, armor_pitch, 0)); + + // Get the 3D points of the armor + const auto armor_size = + armor.type == ArmorType::SMALL + ? Eigen::Vector2d(SMALL_ARMOR_WIDTH, SMALL_ARMOR_HEIGHT) + : Eigen::Vector2d(LARGE_ARMOR_WIDTH, LARGE_ARMOR_HEIGHT); + const auto object_points = + Armor::buildObjectPoints(armor_size(0), armor_size(1)); + + // Fill the optimizer + size_t id_counter = 0; + + VertexYaw *v_yaw = new VertexYaw(); + v_yaw->setId(id_counter++); + v_yaw->setEstimate(initial_armor_yaw); + optimizer_.addVertex(v_yaw); + + const auto &landmarks = armor.landmarks(); + for (size_t i = 0; i < Armor::N_LANDMARKS; i++) { + g2o::VertexPointXYZ *v_point = new g2o::VertexPointXYZ(); + v_point->setId(id_counter++); + v_point->setEstimate(Eigen::Vector3d( + object_points[i].x(), object_points[i].y(), object_points[i].z())); + v_point->setFixed(true); + optimizer_.addVertex(v_point); + + EdgeProjection *edge = + new EdgeProjection(R_camera_imu, R_pitch, t_camera_armor, K_); + edge->setId(id_counter++); + edge->setVertex(0, v_yaw); + edge->setVertex(1, v_point); + edge->setMeasurement(Eigen::Vector2d(landmarks[i].x, landmarks[i].y)); + edge->setInformation(EdgeProjection::InfoMatrixType::Identity()); + edge->setRobustKernel(new g2o::RobustKernelHuber); + optimizer_.addEdge(edge); + } + + // Start optimizing + optimizer_.initializeOptimization(); + optimizer_.optimize(20); + + // Get yaw angle after optimization + double yaw_optimized = v_yaw->estimate(); + + if (std::isnan(yaw_optimized)) { + FYT_ERROR("armor_detector", "Yaw angle is nan after optimization"); + return R_camera_armor; + } + + Sophus::SO3d R_yaw = Sophus::SO3d::exp(Eigen::Vector3d(0, 0, yaw_optimized)); + return (R_camera_imu * R_yaw * R_pitch).matrix(); +} + +} // namespace fyt::auto_aim \ No newline at end of file diff --git a/src/rm_auto_aim/armor_detector/src/graph_optimizer.cpp b/src/rm_auto_aim/armor_detector/src/graph_optimizer.cpp new file mode 100644 index 0000000..937cb5b --- /dev/null +++ b/src/rm_auto_aim/armor_detector/src/graph_optimizer.cpp @@ -0,0 +1,63 @@ +// Created by Labor 2023.8.25 +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_detector/graph_optimizer.hpp" +// std +#include +// third party +#include +#include +#include +// project +#include "armor_detector/types.hpp" +#include "rm_utils/math/utils.hpp" + +namespace fyt::auto_aim { + +void VertexYaw::oplusImpl(const double *update) { + Sophus::SO3d R_yaw = Sophus::SO3d::exp(Eigen::Vector3d(0, 0, update[0])) * + Sophus::SO3d::exp(Eigen::Vector3d(0, 0, _estimate)); + _estimate = R_yaw.log()(2); +} + +EdgeProjection::EdgeProjection(const Sophus::SO3d &R_camera_imu, + const Sophus::SO3d &R_pitch, + const Eigen::Vector3d &t, + const Eigen::Matrix3d &K) + : R_camera_imu_(R_camera_imu), R_pitch_(R_pitch), t_(t), K_(K) {} + +void EdgeProjection::computeError() { + // Get the rotation + double yaw = static_cast(_vertices[0])->estimate(); + Sophus::SO3d R_yaw = Sophus::SO3d::exp(Eigen::Vector3d(0, 0, yaw)); + Sophus::SO3d R = R_camera_imu_ * R_yaw * R_pitch_; + + // Get the 3D point + Eigen::Vector3d p_3d = + static_cast(_vertices[1])->estimate(); + + // Get the observed 2D point + Eigen::Vector2d obs(_measurement); + + // Project the 3D point to the 2D point + Eigen::Vector3d p_2d = R * p_3d + t_; + p_2d = K_ * (p_2d / p_2d.z()); + + // Calculate the error + _error = obs - p_2d.head<2>(); +} + +} // namespace fyt::auto_aim diff --git a/src/rm_auto_aim/armor_detector/src/light_corner_corrector.cpp b/src/rm_auto_aim/armor_detector/src/light_corner_corrector.cpp new file mode 100644 index 0000000..37c6417 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/src/light_corner_corrector.cpp @@ -0,0 +1,176 @@ +// Maintained by Shenglin Qin, Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_detector/light_corner_corrector.hpp" + +#include + +namespace fyt::auto_aim { + +void LightCornerCorrector::correctCorners(Armor &armor, const cv::Mat &gray_img) { + // If the width of the light is too small, the correction is not performed + constexpr int PASS_OPTIMIZE_WIDTH = 3; + + if (armor.left_light.width > PASS_OPTIMIZE_WIDTH) { + // Find the symmetry axis of the light + SymmetryAxis left_axis = findSymmetryAxis(gray_img, armor.left_light); + armor.left_light.center = left_axis.centroid; + armor.left_light.axis = left_axis.direction; + // Find the corner of the light + if (cv::Point2f t = findCorner(gray_img, armor.left_light, left_axis, "top"); t.x > 0) { + armor.left_light.top = t; + } + if (cv::Point2f b = findCorner(gray_img, armor.left_light, left_axis, "bottom"); b.x > 0) { + armor.left_light.bottom = b; + } + } + + if (armor.right_light.width > PASS_OPTIMIZE_WIDTH) { + // Find the symmetry axis of the light + SymmetryAxis right_axis = findSymmetryAxis(gray_img, armor.right_light); + armor.right_light.center = right_axis.centroid; + armor.right_light.axis = right_axis.direction; + // Find the corner of the light + if (cv::Point2f t = findCorner(gray_img, armor.right_light, right_axis, "top"); t.x > 0) { + armor.right_light.top = t; + } + if (cv::Point2f b = findCorner(gray_img, armor.right_light, right_axis, "bottom"); b.x > 0) { + armor.right_light.bottom = b; + } + } +} + +SymmetryAxis LightCornerCorrector::findSymmetryAxis(const cv::Mat &gray_img, const Light &light) { + constexpr float MAX_BRIGHTNESS = 25; + constexpr float SCALE = 0.07; + + // Scale the bounding box + cv::Rect light_box = light.boundingRect(); + light_box.x -= light_box.width * SCALE; + light_box.y -= light_box.height * SCALE; + light_box.width += light_box.width * SCALE * 2; + light_box.height += light_box.height * SCALE * 2; + + // Check boundary + light_box.x = std::max(light_box.x, 0); + light_box.x = std::min(light_box.x, gray_img.cols - 1); + light_box.y = std::max(light_box.y, 0); + light_box.y = std::min(light_box.y, gray_img.rows - 1); + light_box.width = std::min(light_box.width, gray_img.cols - light_box.x); + light_box.height = std::min(light_box.height, gray_img.rows - light_box.y); + + // Get normalized light image + cv::Mat roi = gray_img(light_box); + float mean_val = cv::mean(roi)[0]; + roi.convertTo(roi, CV_32F); + cv::normalize(roi, roi, 0, MAX_BRIGHTNESS, cv::NORM_MINMAX); + + // Calculate the centroid + cv::Moments moments = cv::moments(roi, false); + cv::Point2f centroid = cv::Point2f(moments.m10 / moments.m00, moments.m01 / moments.m00) + + cv::Point2f(light_box.x, light_box.y); + + // Initialize the PointCloud + std::vector points; + for (int i = 0; i < roi.rows; i++) { + for (int j = 0; j < roi.cols; j++) { + for (int k = 0; k < std::round(roi.at(i, j)); k++) { + points.emplace_back(cv::Point2f(j, i)); + } + } + } + cv::Mat points_mat = cv::Mat(points).reshape(1); + + // PCA (Principal Component Analysis) + auto pca = cv::PCA(points_mat, cv::Mat(), cv::PCA::DATA_AS_ROW); + + // Get the symmetry axis + cv::Point2f axis = + cv::Point2f(pca.eigenvectors.at(0, 0), pca.eigenvectors.at(0, 1)); + + // Normalize the axis + axis = axis / cv::norm(axis); + + if (axis.y > 0) { + axis = -axis; + } + + return SymmetryAxis{.centroid = centroid, .direction = axis, .mean_val = mean_val}; +} + +cv::Point2f LightCornerCorrector::findCorner(const cv::Mat &gray_img, + const Light &light, + const SymmetryAxis &axis, + std::string order) { + constexpr float START = 0.8 / 2; + constexpr float END = 1.2 / 2; + + auto inImage = [&gray_img](const cv::Point &point) -> bool { + return point.x >= 0 && point.x < gray_img.cols && point.y >= 0 && point.y < gray_img.rows; + }; + + auto distance = [](float x0, float y0, float x1, float y1) -> float { + return std::sqrt((x0 - x1) * (x0 - x1) + (y0 - y1) * (y0 - y1)); + }; + + int oper = order == "top" ? 1 : -1; + float L = light.length; + float dx = axis.direction.x * oper; + float dy = axis.direction.y * oper; + + std::vector candidates; + + // Select multiple corner candidates and take the average as the final corner + int n = light.width - 2; + int half_n = std::round(n / 2); + for (int i = -half_n; i <= half_n; i++) { + float x0 = axis.centroid.x + L * START * dx + i; + float y0 = axis.centroid.y + L * START * dy; + + cv::Point2f prev = cv::Point2f(x0, y0); + cv::Point2f corner = cv::Point2f(x0, y0); + float max_brightness_diff = 0; + bool has_corner = false; + // Search along the symmetry axis to find the corner that has the maximum brightness difference + for (float x = x0 + dx, y = y0 + dy; distance(x, y, x0, y0) < L * (END - START); + x += dx, y += dy) { + cv::Point2f cur = cv::Point2f(x, y); + if (!inImage(cv::Point(cur))) { + break; + } + + float brightness_diff = gray_img.at(prev) - gray_img.at(cur); + if (brightness_diff > max_brightness_diff && gray_img.at(prev) > axis.mean_val) { + max_brightness_diff = brightness_diff; + corner = prev; + has_corner = true; + } + + prev = cur; + } + + if (has_corner) { + candidates.emplace_back(corner); + } + } + if (!candidates.empty()) { + cv::Point2f result = std::accumulate(candidates.begin(), candidates.end(), cv::Point2f(0, 0)); + return result / static_cast(candidates.size()); + } + + return cv::Point2f(-1, -1); +} + +} // namespace fyt::auto_aim diff --git a/src/rm_auto_aim/armor_detector/src/number_classifier.cpp b/src/rm_auto_aim/armor_detector/src/number_classifier.cpp new file mode 100644 index 0000000..afba39e --- /dev/null +++ b/src/rm_auto_aim/armor_detector/src/number_classifier.cpp @@ -0,0 +1,157 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// OpenCV +#include +#include +#include +#include +#include +#include +#include +#include +// std +#include +#include +#include +#include +#include +#include +#include +#include +// 3rd party +#include +// project +#include "armor_detector/number_classifier.hpp" +#include "armor_detector/types.hpp" + +namespace fyt::auto_aim { +NumberClassifier::NumberClassifier(const std::string &model_path, + const std::string &label_path, + const double thre, + const std::vector &ignore_classes) +: threshold(thre), ignore_classes_(ignore_classes) { + net_ = cv::dnn::readNetFromONNX(model_path); + std::ifstream label_file(label_path); + std::string line; + while (std::getline(label_file, line)) { + class_names_.push_back(line); + } +} + +cv::Mat NumberClassifier::extractNumber(const cv::Mat &src, const Armor &armor) const noexcept { + // Light length in image + static const int light_length = 12; + // Image size after warp + static const int warp_height = 28; + static const int small_armor_width = 32; + static const int large_armor_width = 54; + // Number ROI size + static const cv::Size roi_size(20, 28); + static const cv::Size input_size(28, 28); + + // Warp perspective transform + cv::Point2f lights_vertices[4] = { + armor.left_light.bottom, armor.left_light.top, armor.right_light.top, armor.right_light.bottom}; + + const int top_light_y = (warp_height - light_length) / 2 - 1; + const int bottom_light_y = top_light_y + light_length; + const int warp_width = armor.type == ArmorType::SMALL ? small_armor_width : large_armor_width; + cv::Point2f target_vertices[4] = { + cv::Point(0, bottom_light_y), + cv::Point(0, top_light_y), + cv::Point(warp_width - 1, top_light_y), + cv::Point(warp_width - 1, bottom_light_y), + }; + cv::Mat number_image; + auto rotation_matrix = cv::getPerspectiveTransform(lights_vertices, target_vertices); + cv::warpPerspective(src, number_image, rotation_matrix, cv::Size(warp_width, warp_height)); + + // Get ROI + number_image = number_image(cv::Rect(cv::Point((warp_width - roi_size.width) / 2, 0), roi_size)); + + // Binarize + cv::cvtColor(number_image, number_image, cv::COLOR_RGB2GRAY); + cv::threshold(number_image, number_image, 0, 255, cv::THRESH_BINARY | cv::THRESH_OTSU); + cv::resize(number_image, number_image, input_size); + return number_image; +} + +void NumberClassifier::classify(const cv::Mat &src, Armor &armor) noexcept { + // Normalize + cv::Mat input = armor.number_img / 255.0; + + // Create blob from image + cv::Mat blob; + cv::dnn::blobFromImage(input, blob); + + // Set the input blob for the neural network + mutex_.lock(); + net_.setInput(blob); + + // Forward pass the image blob through the model + cv::Mat outputs = net_.forward().clone(); + mutex_.unlock(); + + // Decode the output + double confidence; + cv::Point class_id_point; + minMaxLoc(outputs.reshape(1, 1), nullptr, &confidence, nullptr, &class_id_point); + int label_id = class_id_point.x; + + armor.confidence = confidence; + armor.number = class_names_[label_id]; + + if (armor.number == "2" || armor.number == "outpost" || armor.number == "guard" || + armor.number == "depth") { + armor.type = ArmorType::SMALL; + } else if (armor.number == "1" || armor.number == "base") { + armor.type = ArmorType::LARGE; + } + + armor.classfication_result = fmt::format("{}:{:.1f}%", armor.number, armor.confidence * 100.0); +} + +void NumberClassifier::eraseIgnoreClasses(std::vector &armors) noexcept { + armors.erase( + std::remove_if(armors.begin(), + armors.end(), + [this](const Armor &armor) { + if (armor.confidence < threshold) { + return true; + } + + for (const auto &ignore_class : ignore_classes_) { + if (armor.number == ignore_class) { + return true; + } + } + + bool mismatch_armor_type = false; + if (armor.type == ArmorType::LARGE) { + mismatch_armor_type = armor.number == "outpost" || armor.number == "2" || + armor.number == "sentry"; + } else if (armor.type == ArmorType::SMALL) { + mismatch_armor_type = armor.number == "1" || armor.number == "base"; + } + return mismatch_armor_type; + }), + armors.end()); +} + +} // namespace fyt::auto_aim diff --git a/src/rm_auto_aim/armor_detector/test/test_detector.cpp b/src/rm_auto_aim/armor_detector/test/test_detector.cpp new file mode 100644 index 0000000..0d10615 --- /dev/null +++ b/src/rm_auto_aim/armor_detector/test/test_detector.cpp @@ -0,0 +1,76 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// gest +#include +// ros2 +#include +#include +#include +#include +// std +#include +// opencv +#include +// project +#include "armor_detector/armor_detector.hpp" +#include "rm_utils/common.hpp" +#include "rm_utils/url_resolver.hpp" + +using namespace fyt; +using namespace fyt::auto_aim; +TEST(ArmorDetectorNodeTest, NodeStartupTest) { + // Init detector + int binary_thres = 160; + Detector::LightParams l_params = { + .min_ratio = 0.08, .max_ratio = 0.4, .max_angle = 40.0, .color_diff_thresh = 25}; + Detector::ArmorParams a_params = {.min_light_ratio = 0.6, + .min_small_center_distance = 0.8, + .max_small_center_distance = 3.2, + .min_large_center_distance = 3.2, + .max_large_center_distance = 5.0, + .max_angle = 35.0}; + + auto detector = std::make_unique(binary_thres, EnemyColor::RED, l_params, a_params); + + // Init classifier + namespace fs = std::filesystem; + fs::path model_path = + utils::URLResolver::getResolvedPath("package://armor_detector/model/lenet.onnx"); + fs::path label_path = + utils::URLResolver::getResolvedPath("package://armor_detector/model/label.txt"); + detector->classifier = std::make_unique( + model_path, label_path, 0.6, std::vector{"negative"}); + + // Load test image + fs::path test_image_path = + utils::URLResolver::getResolvedPath("package://armor_detector/docs/test.png"); + cv::Mat test_image = cv::imread(test_image_path.string(), cv::IMREAD_COLOR); + cv::cvtColor(test_image, test_image, cv::COLOR_BGR2RGB); + + // Detect + std::vector armors = detector->detect(test_image); + + std::sort(armors.begin(), armors.end(), [](const Armor &a, const Armor &b) { + return a.number < b.number; + }); + + EXPECT_EQ(armors.size(), static_cast(6)); + EXPECT_EQ(armors[0].number, "2"); + EXPECT_EQ(armors[1].number, "3"); + EXPECT_EQ(armors[2].number, "4"); + EXPECT_EQ(armors[3].number, "5"); + EXPECT_EQ(armors[4].number, "outpost"); + EXPECT_EQ(armors[5].number, "sentry"); +} diff --git a/src/rm_auto_aim/armor_solver/CMakeLists.txt b/src/rm_auto_aim/armor_solver/CMakeLists.txt new file mode 100644 index 0000000..d7155cf --- /dev/null +++ b/src/rm_auto_aim/armor_solver/CMakeLists.txt @@ -0,0 +1,56 @@ +cmake_minimum_required(VERSION 3.10) +project(armor_solver) + +## Use C++14 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +## By adding -Wall and -Werror, the compiler does not ignore warnings anymore, +## enforcing cleaner code. +add_definitions(-Wall -Werror -O3) + +## Export compile commands for clangd +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +####################### +## Find dependencies ## +####################### + +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() + +########### +## Build ## +########### + +ament_auto_add_library(${PROJECT_NAME} SHARED + DIRECTORY src +) + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN fyt::auto_aim::ArmorSolverNode + EXECUTABLE ${PROJECT_NAME}_node +) + +############# +## Testing ## +############# + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + list(APPEND AMENT_LINT_AUTO_EXCLUDE + ament_cmake_copyright + ament_cmake_uncrustify + ament_cmake_cpplint + ) + ament_lint_auto_find_test_dependencies() + + find_package(ament_cmake_gtest) + +endif() + +############# +## Install ## +############# + +ament_auto_package() \ No newline at end of file diff --git a/src/rm_auto_aim/armor_solver/README.md b/src/rm_auto_aim/armor_solver/README.md new file mode 100644 index 0000000..050701d --- /dev/null +++ b/src/rm_auto_aim/armor_solver/README.md @@ -0,0 +1,118 @@ +# armor_solver + +## fyt::ArmorSolverNode + +装甲板识别节点 + +### 发布话题 + +* `armor_solver/target` (`rm_interfaces/msg/Target`) - 整车估计的状态 +* `armor_solver/measurement` (`rm_interfaces/msg/Measurement`) - EKF的输入观测量 +* `armor_solver/cmd_gimbal` (`rm_interfaces/msg/GimbalCmd`) - 云台控制指令 + +### 订阅话题 + +* `armor_detector/armors` (`rm_interfaces/msg/Armors`) - 识别到的装甲板信息 + + +### 参数 + +* `debug` (`bool`, default: false) - 是否开启调试模式 +* `target_frame` (`string`, default: "odom") - 目标坐标系 +* `ekf.sigma2_q_xyz` (`double`, default: 0.05) - 状态转移噪声方差 (x,y,z) +* `ekf.sigma2_q_yaw` (`double`, default: 1.0) - 状态转移噪声方差 (yaw) +* `ekf.sigma2_q_r` (`double`, default: 80.0) - 状态转移噪声方差 (r) +* `r_xyz_factor` (`double`, default: 1.0) - 位置观测噪声方差系数 (x,y,z) +* `r_yaw_factor` (`double`, default: 1.0) - 位置观测噪声方差系数 (yaw) +* `tracker.max_match_distance` (`double`, default: 0.5) - 两帧间目标可匹配的最大距离 +* `tracker.max_match_yaw_diff` (`double`, default: 0.5) - 两帧间目标同一块装甲板可匹配的最大yaw角差(大于这个值则认为装甲板发生跳变) +* `tracker.tracking_thres` (`int`, default: 2) - `DETECTING` 状态进入 `TRACKING` 状态需要连续识别到的帧数 +* `tracker.lost_thres` (`double`, default: 1.0) - `TRACKING` 状态进入 `LOST` 状态需要连续丢失的时间(s) +* `solver.prediction_delay` (`double`, default: 0.0) - 预测延迟时间(s),会影响选版 +* `solver.controller_delay` (`double`, default: 0.0) - 控制延迟时间(s),不会影响选版 +* `solver.max_tracking_v_yaw` (`double`, default: 60.0) - 转速大于这个值时,瞄准中心 +* `solver.side_angle` (`double`, default: 15.0) - 跳转到下一装甲板的角度阈值 +* `solver.bullet_speed` (`double`, default: 25.0) - 子弹速度 +* `solver.gravity` (`double`, default: 9.8) - 重力加速度 +* `solver.compensator_type` (`string`, default: "ideal") - 补偿器类型 +* `solver.resistance` (`double`, default: 0.001) - 空气阻力 + + +## ArmorSolverNode +装甲板处理节点 + +订阅识别节点发布的装甲板三维位置及机器人的坐标转换信息,将装甲板三维位置变换到指定惯性系(一般是以云台中心为原点,IMU 上电时的 Yaw 朝向为 X 轴的惯性系)下,然后将装甲板目标送入跟踪器中,输出跟踪机器人在指定惯性系下的状态 + +订阅: +- 已识别到的装甲板 `/detector/armors` +- 机器人的坐标转换信息 `/tf` `/tf_static` + +发布: +- 最终锁定的目标 `/tracker/target` + +参数: +- 跟踪器参数 tracker + - 两帧间目标可匹配的最大距离 max_match_distance + - `DETECTING` 状态进入 `TRACKING` 状态的阈值 tracking_threshold + - `TRACKING` 状态进入 `LOST` 状态的阈值 lost_threshold + +## ExtendedKalmanFilter + +$$ x_c = x_a + r * cos (\theta) $$ +$$ y_c = y_a + r * sin (\theta) $$ + +$$ x = [x_c, y_c,z, yaw, v_{xc}, v_{yc},v_z, v_{yaw}, r]^T $$ + +参考 OpenCV 中的卡尔曼滤波器使用 Eigen 进行了实现 + +[卡尔曼滤波器](https://zh.wikipedia.org/wiki/%E5%8D%A1%E5%B0%94%E6%9B%BC%E6%BB%A4%E6%B3%A2) + +![](docs/Kalman_filter_model.png) + +考虑到自瞄任务中对于目标只有观测没有控制,所以输入-控制模型 $B$ 和控制器向量 $u$ 可忽略。 + +预测及更新的公式如下: + +预测: + +$$ x_{k|k-1} = F * x_{k-1|k-1} $$ + +$$ P_{k|k-1} = F * P_{k-1|k-1}* F^T + Q $$ + +更新: + +$$ K = P_{k|k-1} * H^T * (H * P_{k|k-1} * H^T + R)^{-1} $$ + +$$ x_{k|k} = x_{k|k-1} + K * (z_k - H * x_{k|k-1}) $$ + +$$ P_{k|k} = (I - K * H) * P_{k|k-1} $$ + +## Tracker + +参考 [SORT(Simple online and realtime tracking)](https://ieeexplore.ieee.org/abstract/document/7533003/) 中对于目标匹配的方法,使用卡尔曼滤波器对单目标在三维空间中进行跟踪 + +在此跟踪器中,卡尔曼滤波器观测量为目标在指定惯性系中的位置(xyz),状态量为目标位置及速度(xyz+vx vy vz) + +在对目标的运动模型建模为在指定惯性系中的匀速线性运动,即状态转移为 $x_{pre} = x_{post} + v_{post} * dt$ + +目标关联的判断依据为三维位置的 L2 欧式距离 + +跟踪器共有四个状态: +- `DETECTING` :短暂识别到目标,需要更多帧识别信息才能进入跟踪状态 +- `TRACKING` :跟踪器正常跟踪目标中 +- `TEMP_LOST` :跟踪器短暂丢失目标,通过卡尔曼滤波器预测目标 +- `LOST` :跟踪器完全丢失目标 + +工作流程: + +- init: + + 跟踪器默认选择离相机光心最近的目标作为跟踪对象,选择目标后初始化卡尔曼滤波器,初始状态设为当前目标位置,速度设为 0 + +- update: + + 首先由卡尔曼滤波器得到目标在当前帧的预测位置,然后遍历当前帧中的目标位置与预测位置进行匹配,若当前帧不存在目标或所有目标位置与预测位置的偏差都过大则认为目标丢失,重置卡尔曼滤波器。 + + 最后选取位置相差最小的目标作为最佳匹配项,更新卡尔曼滤波器,将更新后的状态作为跟踪器的结果输出 + + diff --git a/src/rm_auto_aim/armor_solver/docs/Kalman_filter_model.png b/src/rm_auto_aim/armor_solver/docs/Kalman_filter_model.png new file mode 100644 index 0000000..f603ff2 Binary files /dev/null and b/src/rm_auto_aim/armor_solver/docs/Kalman_filter_model.png differ diff --git a/src/rm_auto_aim/armor_solver/include/armor_solver/armor_solver.hpp b/src/rm_auto_aim/armor_solver/include/armor_solver/armor_solver.hpp new file mode 100644 index 0000000..d012edb --- /dev/null +++ b/src/rm_auto_aim/armor_solver/include/armor_solver/armor_solver.hpp @@ -0,0 +1,122 @@ +// Created by Chengfu Zou +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_SOLVER_SOLVER_HPP_ +#define ARMOR_SOLVER_SOLVER_HPP_ + +// std +#include +// ros2 +#include +#include + +#include +#include +// 3rd party +#include +// project +#include "rm_interfaces/msg/gimbal_cmd.hpp" +#include "rm_interfaces/msg/target.hpp" +#include "rm_utils/math/manual_compensator.hpp" +#include "rm_utils/math/trajectory_compensator.hpp" + +namespace fyt::auto_aim { +// Solver class used to solve the gimbal command from tracked target +class Solver { +public: + explicit Solver(std::weak_ptr node); + // explicit Solver(std::string trajectory_compensator_type, float max_tracking_v_yaw); + ~Solver() = default; + + // Solve the gimbal command from tracked target + // Throw: tf2::TransformException if the transform from "odom" to "pitch_link" is not available + rm_interfaces::msg::GimbalCmd solve(const rm_interfaces::msg::Target &target_msg, + const rclcpp::Time ¤t_time, + std::shared_ptr tf2_buffer_); + + enum State { TRACKING_ARMOR = 0, TRACKING_CENTER = 1 } state; + + std::vector> getTrajectory() const noexcept; + void setBulletSpeed(double bullet_speed) noexcept; + void updateRuntimeParams(double max_tracking_v_yaw, + double prediction_delay, + double controller_delay, + double side_angle, + double min_switching_v_yaw, + double shooting_range_w, + double shooting_range_h) noexcept; + +private: + // Get the armor positions from the target robot + std::vector getArmorPositions(const Eigen::Vector3d &target_center, + const double yaw, + const double r1, + const double r2, + const double d_zc, + const double d_za, + const size_t armors_num) const noexcept; + + // Select the best armor to shoot + // Return: selected idx in {0, 1, ..., armors_num - 1} + int selectBestArmor(const std::vector &armor_positions, + const Eigen::Vector3d &target_center, + const double target_yaw, + const double target_v_yaw, + const size_t armors_num) const noexcept; + + void calcYawAndPitch(const Eigen::Vector3d &p, + const Eigen::Vector3d &barrel_pos_in_odom, + double &yaw, + double &pitch) const noexcept; + + // Transform target position from odom frame to barrel frame for trajectory calculation + Eigen::Vector3d transformToBarrelFrame(const Eigen::Vector3d &target_in_odom, + std::shared_ptr tf2_buffer) const; + + bool isOnTarget(const double cur_yaw, + const double cur_pitch, + const double target_yaw, + const double target_pitch, + const double distance) const noexcept; + + std::unique_ptr trajectory_compensator_; + std::unique_ptr manual_compensator_; + + std::array rpy_; + + double prediction_delay_; + double controller_delay_; + + double shooting_range_w_; + double shooting_range_h_; + + double max_tracking_v_yaw_; + int overflow_count_; + int transfer_thresh_; + + double side_angle_; + double min_switching_v_yaw_; + + // Barrel frame for trajectory calculation + bool use_barrel_frame_; + bool barrel_offset_initialized_; // Whether barrel_offset has been initialized from TF + Eigen::Vector3d barrel_offset_; // Barrel offset relative to pitch_link (from TF tree) + + std::weak_ptr node_; +}; +} // namespace fyt::auto_aim +#endif // ARMOR_SOLVER_SOLVER_HPP_ + diff --git a/src/rm_auto_aim/armor_solver/include/armor_solver/armor_solver_node.hpp b/src/rm_auto_aim/armor_solver/include/armor_solver/armor_solver_node.hpp new file mode 100644 index 0000000..315a1a2 --- /dev/null +++ b/src/rm_auto_aim/armor_solver/include/armor_solver/armor_solver_node.hpp @@ -0,0 +1,134 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +#ifndef ARMOR_SOLVER_SOLVER_NODE_HPP_ +#define ARMOR_SOLVER_SOLVER_NODE_HPP_ + +// ros2 +#include +#include +#include +#include +#include + +#include +#include +#include +#include +// std +#include +#include +#include +#include +// project +#include "armor_solver/armor_solver.hpp" +#include "armor_solver/armor_tracker.hpp" +#include "rm_interfaces/msg/armors.hpp" +#include "rm_interfaces/msg/measurement.hpp" +#include "rm_interfaces/msg/serial_receive_data.hpp" +#include "rm_interfaces/msg/target.hpp" +#include "rm_interfaces/srv/set_mode.hpp" +#include "rm_utils/heartbeat.hpp" +#include "rm_utils/logger/log.hpp" + +namespace fyt::auto_aim { +using tf2_filter = tf2_ros::MessageFilter; +class ArmorSolverNode : public rclcpp::Node { +public: + explicit ArmorSolverNode(const rclcpp::NodeOptions &options); + +private: + rcl_interfaces::msg::SetParametersResult onSetParameters( + const std::vector ¶meters); + + void armorsCallback(const rm_interfaces::msg::Armors::SharedPtr armors_ptr); + + void initMarkers() noexcept; + + void publishMarkers(const rm_interfaces::msg::Target &target_msg, + const rm_interfaces::msg::GimbalCmd &gimbal_cmd) noexcept; + + + void setModeCallback(const std::shared_ptr request, + std::shared_ptr response); + + bool debug_mode_; + rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr + on_set_parameters_callback_handle_; + + // Heartbeat + HeartBeatPublisher::SharedPtr heartbeat_; + + // The time when the last message was received + rclcpp::Time last_time_; + double dt_; + + // Armor tracker + // Adaptive Q matrix parameters + double s2qxyz_max_, s2qxyz_min_; // Position noise range + double s2qyaw_max_, s2qyaw_min_; // Yaw noise range + double s2qr_, s2qd_zc_; // Radius and height offset noise + // R matrix parameters + double r_x_, r_y_, r_z_, r_yaw_; + double lost_time_thres_; + std::unique_ptr tracker_; + + // Armor Solver + std::unique_ptr solver_; + + // Subscriber with tf2 message_filter + std::string target_frame_; + std::shared_ptr tf2_buffer_; + std::shared_ptr tf2_listener_; + message_filters::Subscriber armors_sub_; + rm_interfaces::msg::Target armor_target_; + std::shared_ptr tf2_filter_; + + // Measurement publisher + rclcpp::Publisher::SharedPtr measure_pub_; + + // Publisher + rclcpp::Publisher::SharedPtr target_pub_; + rclcpp::Publisher::SharedPtr gimbal_pub_; + rclcpp::Subscription::SharedPtr serial_sub_; + rclcpp::TimerBase::SharedPtr pub_timer_; + void timerCallback(); + std::atomic bullet_speed_{0.0}; + std::atomic bullet_speed_param_{20.0}; + std::atomic bullet_speed_debug_{false}; + std::atomic shoot_rate_{3}; + + // Enable/Disable Armor Solver + bool enable_; + rclcpp::Service::SharedPtr set_mode_srv_; + + // Visualization marker publisher + visualization_msgs::msg::Marker position_marker_; + visualization_msgs::msg::Marker linear_v_marker_; + visualization_msgs::msg::Marker angular_v_marker_; + visualization_msgs::msg::Marker trajectory_marker_; + visualization_msgs::msg::Marker armors_marker_; + visualization_msgs::msg::Marker selection_marker_; + rclcpp::Publisher::SharedPtr marker_pub_; + rm_interfaces::msg::GimbalCmd control_msg_last; //保存上一次的角度 +}; + +} // namespace fyt::auto_aim + +#endif // ARMOR_SOLVER_SOLVER_NODE_HPP_ diff --git a/src/rm_auto_aim/armor_solver/include/armor_solver/armor_tracker.hpp b/src/rm_auto_aim/armor_solver/include/armor_solver/armor_tracker.hpp new file mode 100644 index 0000000..1fd82fe --- /dev/null +++ b/src/rm_auto_aim/armor_solver/include/armor_solver/armor_tracker.hpp @@ -0,0 +1,99 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +#ifndef ARMOR_SOLVER_TRACKER_HPP_ +#define ARMOR_SOLVER_TRACKER_HPP_ + +// std +#include +#include +// ros2 +#include +#include +#include +// third party +#include +// project +#include "rm_interfaces/msg/armors.hpp" +#include "rm_interfaces/msg/target.hpp" +#include "rm_utils/math/extended_kalman_filter.hpp" +#include "armor_solver/motion_model.hpp" + +namespace fyt::auto_aim { + +enum class ArmorsNum { NORMAL_4 = 4, BALANCE_2 = 2, OUTPOST_3 = 3 }; + +class Tracker { +public: + Tracker(double max_match_distance, double max_match_yaw); + + using Armors = rm_interfaces::msg::Armors; + using Armor = rm_interfaces::msg::Armor; + + void init(const Armors::SharedPtr &armors_msg) noexcept; + + void update(const Armors::SharedPtr &armors_msg) noexcept; + + void setMatchThreshold(double max_match_distance, double max_match_yaw_diff) noexcept; + + enum State { + LOST, + DETECTING, + TRACKING, + TEMP_LOST, + } tracker_state; + + std::unique_ptr ekf; + + int tracking_thres; // frame + int lost_thres; // second + + Armor tracked_armor; + std::string tracked_id; + ArmorsNum tracked_armors_num; + Eigen::VectorXd measurement; + Eigen::VectorXd target_state; + + // To store another pair of armors message + double d_za, another_r; + + // To store offset relative to the reference plane + double d_zc; + +private: + void initEKF(const Armor &a) noexcept; + + void handleArmorJump(const Armor &a) noexcept; + + double orientationToYaw(const geometry_msgs::msg::Quaternion &q) noexcept; + + static Eigen::Vector3d getArmorPositionFromState(const Eigen::VectorXd &x) noexcept; + + double max_match_distance_; + double max_match_yaw_diff_; + + int detect_count_; + int lost_count_; + + double last_yaw_; +}; + +} // namespace fyt::auto_aim + +#endif // ARMOR_SOLVER_ARMOR_TRACKER_HPP_ diff --git a/src/rm_auto_aim/armor_solver/include/armor_solver/motion_model.hpp b/src/rm_auto_aim/armor_solver/include/armor_solver/motion_model.hpp new file mode 100644 index 0000000..809e255 --- /dev/null +++ b/src/rm_auto_aim/armor_solver/include/armor_solver/motion_model.hpp @@ -0,0 +1,84 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_SOLVER_MOTION_MODEL_HPP_ +#define ARMOR_SOLVER_MOTION_MODEL_HPP_ + +// ceres +#include +// project +#include "rm_utils/math/extended_kalman_filter.hpp" + +namespace fyt::auto_aim { + +enum class MotionModel { + CONSTANT_VELOCITY = 0, // Constant velocity + CONSTANT_ROTATION = 1, // Constant rotation velocity + CONSTANT_VEL_ROT = 2 // Constant velocity and rotation velocity +}; + +// X_N: state dimension, Z_N: measurement dimension +constexpr int X_N = 10, Z_N = 4; + +struct Predict { + explicit Predict(double dt, MotionModel model = MotionModel::CONSTANT_VEL_ROT) + : dt(dt), model(model) {} + + template + void operator()(const T x0[X_N], T x1[X_N]) { + for (int i = 0; i < X_N; i++) { + x1[i] = x0[i]; + } + + // v_xyz + if (model == MotionModel::CONSTANT_VEL_ROT || model == MotionModel::CONSTANT_VELOCITY) { + // linear velocity + x1[0] += x0[1] * dt; + x1[2] += x0[3] * dt; + x1[4] += x0[5] * dt; + } else { + // no velocity + x1[1] *= 0.; + x1[3] *= 0.; + x1[5] *= 0.; + } + + // v_yaw + if (model == MotionModel::CONSTANT_VEL_ROT || model == MotionModel::CONSTANT_ROTATION) { + // angular velocity + x1[6] += x0[7] * dt; + } else { + // no rotation + x1[7] *= 0.; + } + } + + double dt; + MotionModel model; +}; + +struct Measure { + template + void operator()(const T x[Z_N], T z[Z_N]) { + z[0] = x[0] - ceres::cos(x[6]) * x[8]; + z[1] = x[2] - ceres::sin(x[6]) * x[8]; + z[2] = x[4] + x[9]; + z[3] = x[6]; + } +}; + +using RobotStateEKF = ExtendedKalmanFilter; + +} // namespace fyt::auto_aim +#endif diff --git a/src/rm_auto_aim/armor_solver/package.xml b/src/rm_auto_aim/armor_solver/package.xml new file mode 100644 index 0000000..46e9ad7 --- /dev/null +++ b/src/rm_auto_aim/armor_solver/package.xml @@ -0,0 +1,37 @@ + + + + armor_solver + 0.1.0 + A template for ROS packages. + Chen Jun + BSD + https://github.com/chenjunnn/rm_auto_aim + https://github.com/chenjunnn/rm_auto_aim/issues + Chen Jun + + + ament_cmake + + + rclcpp + rclcpp_components + eigen + angles + geometry_msgs + visualization_msgs + message_filters + tf2_geometry_msgs + rm_interfaces + rm_utils + + ament_lint_auto + ament_lint_common + ament_cmake_clang_format + + + ament_cmake + + diff --git a/src/rm_auto_aim/armor_solver/src/armor_solver.cpp b/src/rm_auto_aim/armor_solver/src/armor_solver.cpp new file mode 100644 index 0000000..400ce77 --- /dev/null +++ b/src/rm_auto_aim/armor_solver/src/armor_solver.cpp @@ -0,0 +1,393 @@ +// Created by Chengfu Zou +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_solver/armor_solver.hpp" +// std +#include +#include +#include +// project +#include "armor_solver/armor_solver_node.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/utils.hpp" + +namespace fyt::auto_aim { +Solver::Solver(std::weak_ptr n) : node_(n) { + auto node = node_.lock(); + + shooting_range_w_ = node->declare_parameter("solver.shooting_range_width", 0.135); + shooting_range_h_ = node->declare_parameter("solver.shooting_range_height", 0.135); + max_tracking_v_yaw_ = node->declare_parameter("solver.max_tracking_v_yaw", 6.0); + prediction_delay_ = node->declare_parameter("solver.prediction_delay", 0.0); + controller_delay_ = node->declare_parameter("solver.controller_delay", 0.0); + side_angle_ = node->declare_parameter("solver.side_angle", 15.0); + min_switching_v_yaw_ = node->declare_parameter("solver.min_switching_v_yaw", 1.0); + + std::string compenstator_type = node->declare_parameter("solver.compensator_type", "ideal"); + trajectory_compensator_ = CompensatorFactory::createCompensator(compenstator_type); + trajectory_compensator_->iteration_times = node->declare_parameter("solver.iteration_times", 20); + if (node->has_parameter("solver.bullet_speed")) { + trajectory_compensator_->velocity = node->get_parameter("solver.bullet_speed").as_double(); + } else { + trajectory_compensator_->velocity = node->declare_parameter("solver.bullet_speed", 20.0); + } + trajectory_compensator_->gravity = node->declare_parameter("solver.gravity", 9.8); + trajectory_compensator_->resistance = node->declare_parameter("solver.resistance", 0.001); + + manual_compensator_ = std::make_unique(); + auto angle_offset = node->declare_parameter("solver.angle_offset", std::vector{}); + if (!manual_compensator_->updateMapFlow(angle_offset)) { + FYT_WARN("armor_solver", "Manual compensator update failed!"); + } + + // Barrel frame parameters for trajectory calculation + // barrel_offset will be initialized from TF tree (barrel_link -> pitch_link) + use_barrel_frame_ = node->declare_parameter("solver.use_barrel_frame", true); + barrel_offset_ = Eigen::Vector3d(0.0, 0.0, 0.0); + barrel_offset_initialized_ = false; + FYT_INFO("armor_solver", + "Barrel frame enabled: {}, offset will be loaded from TF (barrel_link -> pitch_link)", + use_barrel_frame_); + + state = State::TRACKING_ARMOR; + overflow_count_ = 0; + transfer_thresh_ = 5; + + node.reset(); +} + +rm_interfaces::msg::GimbalCmd Solver::solve(const rm_interfaces::msg::Target &target, + const rclcpp::Time ¤t_time, + std::shared_ptr tf2_buffer_) { + Eigen::Vector3d gimbal_pos_in_odom = Eigen::Vector3d::Zero(); + Eigen::Vector3d barrel_pos_in_odom = Eigen::Vector3d::Zero(); + Eigen::Matrix3d R_gimbal_to_odom = Eigen::Matrix3d::Identity(); + + // Get current roll, yaw and pitch of gimbal + try { + auto gimbal_tf = + tf2_buffer_->lookupTransform(target.header.frame_id, "pitch_link", tf2::TimePointZero); + auto msg_q = gimbal_tf.transform.rotation; + + tf2::Quaternion tf_q; + tf2::fromMsg(msg_q, tf_q); + tf2::Matrix3x3 tf_mat(tf_q); + tf_mat.getRPY(rpy_[0], rpy_[1], rpy_[2]); + rpy_[1] = -rpy_[1]; + R_gimbal_to_odom << tf_mat[0][0], tf_mat[0][1], tf_mat[0][2], tf_mat[1][0], tf_mat[1][1], + tf_mat[1][2], tf_mat[2][0], tf_mat[2][1], tf_mat[2][2]; + gimbal_pos_in_odom = Eigen::Vector3d(gimbal_tf.transform.translation.x, + gimbal_tf.transform.translation.y, + gimbal_tf.transform.translation.z); + } catch (tf2::TransformException &ex) { + FYT_ERROR("armor_solver", "{}", ex.what()); + throw ex; + } + + // Initialize barrel_offset from TF tree (only once) + if (use_barrel_frame_ && !barrel_offset_initialized_) { + try { + auto barrel_tf = + tf2_buffer_->lookupTransform("pitch_link", "barrel_link", tf2::TimePointZero); + barrel_offset_ = Eigen::Vector3d(barrel_tf.transform.translation.x, + barrel_tf.transform.translation.y, + barrel_tf.transform.translation.z); + barrel_offset_initialized_ = true; + FYT_INFO("armor_solver", + "Barrel offset initialized from TF: [{:.3f}, {:.3f}, {:.3f}]", + barrel_offset_.x(), + barrel_offset_.y(), + barrel_offset_.z()); + } catch (tf2::TransformException &ex) { + FYT_WARN( + "armor_solver", "Failed to get barrel_link transform: {}, using default offset", ex.what()); + barrel_offset_ = Eigen::Vector3d(0.20, 0.0, -0.02); + barrel_offset_initialized_ = true; + } + } + + // Use flying time to approximately predict the position of target + Eigen::Vector3d target_position(target.position.x, target.position.y, target.position.z); + double target_yaw = target.yaw; + + // Calculate flying time considering barrel offset for more accurate prediction + Eigen::Vector3d target_for_flying_time = target_position; + if (use_barrel_frame_) { + // Approximate barrel position in odom frame for flying time calculation + barrel_pos_in_odom = gimbal_pos_in_odom + R_gimbal_to_odom * barrel_offset_; + target_for_flying_time = target_position - barrel_pos_in_odom; + } + + double flying_time = trajectory_compensator_->getFlyingTime(target_for_flying_time); + double dt = + (current_time - rclcpp::Time(target.header.stamp)).seconds() + flying_time + prediction_delay_; + target_position.x() += dt * target.velocity.x; + target_position.y() += dt * target.velocity.y; + target_position.z() += dt * target.velocity.z; + target_yaw += dt * target.v_yaw; + + // Choose the best armor to shoot + std::vector armor_positions = getArmorPositions(target_position, + target_yaw, + target.radius_1, + target.radius_2, + target.d_zc, + target.d_za, + target.armors_num); + int idx = + selectBestArmor(armor_positions, target_position, target_yaw, target.v_yaw, target.armors_num); + auto chosen_armor_position = armor_positions.at(idx); + if (chosen_armor_position.norm() < 0.1) { + throw std::runtime_error("No valid armor to shoot"); + } + + // Calculate yaw, pitch, distance + double yaw, pitch; + calcYawAndPitch(chosen_armor_position, barrel_pos_in_odom, yaw, pitch); + double distance = chosen_armor_position.norm(); + + // Initialize gimbal_cmd + rm_interfaces::msg::GimbalCmd gimbal_cmd; + gimbal_cmd.header = target.header; + gimbal_cmd.distance = distance; + gimbal_cmd.fire_advice = isOnTarget(rpy_[2], rpy_[1], yaw, pitch, distance); + + switch (state) { + case TRACKING_ARMOR: { + if (std::abs(target.v_yaw) > max_tracking_v_yaw_) { + overflow_count_++; + } else { + overflow_count_ = 0; + } + + if (overflow_count_ > transfer_thresh_) { + state = TRACKING_CENTER; + } + + // If isOnTarget() never returns true, adjust controller_delay to force the gimbal to move + if (controller_delay_ != 0) { + target_position.x() += controller_delay_ * target.velocity.x; + target_position.y() += controller_delay_ * target.velocity.y; + target_position.z() += controller_delay_ * target.velocity.z; + target_yaw += controller_delay_ * target.v_yaw; + armor_positions = getArmorPositions(target_position, + target_yaw, + target.radius_1, + target.radius_2, + target.d_zc, + target.d_za, + target.armors_num); + chosen_armor_position = armor_positions.at(idx); + gimbal_cmd.distance = chosen_armor_position.norm(); + if (chosen_armor_position.norm() < 0.1) { + throw std::runtime_error("No valid armor to shoot"); + } + calcYawAndPitch(chosen_armor_position, barrel_pos_in_odom, yaw, pitch); + } + break; + } + case TRACKING_CENTER: { + if (std::abs(target.v_yaw) < max_tracking_v_yaw_) { + overflow_count_++; + } else { + overflow_count_ = 0; + } + + if (overflow_count_ > transfer_thresh_) { + state = TRACKING_ARMOR; + overflow_count_ = 0; + } + gimbal_cmd.fire_advice = true; + calcYawAndPitch(target_position, barrel_pos_in_odom, yaw, pitch); + break; + } + } + + // Compensate angle by angle_offset_map + auto angle_offset = + manual_compensator_->angleHardCorrect(target_position.head(2).norm(), target_position.z()); + double pitch_offset = angle_offset[0] * M_PI / 180; + double yaw_offset = angle_offset[1] * M_PI / 180; + double cmd_pitch = pitch + pitch_offset; + double cmd_yaw = angles::normalize_angle(yaw + yaw_offset); + + gimbal_cmd.yaw = cmd_yaw * 180 / M_PI; + gimbal_cmd.pitch = cmd_pitch * 180 / M_PI; + gimbal_cmd.yaw_diff = (cmd_yaw - rpy_[2]) * 180 / M_PI; + gimbal_cmd.pitch_diff = (cmd_pitch - rpy_[1]) * 180 / M_PI; + + if (gimbal_cmd.fire_advice) { + FYT_DEBUG("armor_solver", "You Need Fire!"); + } + return gimbal_cmd; +} + +void Solver::updateRuntimeParams(double max_tracking_v_yaw, + double prediction_delay, + double controller_delay, + double side_angle, + double min_switching_v_yaw, + double shooting_range_w, + double shooting_range_h) noexcept { + max_tracking_v_yaw_ = max_tracking_v_yaw; + prediction_delay_ = prediction_delay; + controller_delay_ = controller_delay; + side_angle_ = side_angle; + min_switching_v_yaw_ = min_switching_v_yaw; + shooting_range_w_ = shooting_range_w; + shooting_range_h_ = shooting_range_h; +} + +bool Solver::isOnTarget(const double cur_yaw, + const double cur_pitch, + const double target_yaw, + const double target_pitch, + const double distance) const noexcept { + // Judge whether to shoot + double shooting_range_yaw = std::abs(atan2(shooting_range_w_ / 2, distance)); + double shooting_range_pitch = std::abs(atan2(shooting_range_h_ / 2, distance)); + // Limit the shooting area to 1 degree to avoid not shooting when distance is + // too large + shooting_range_yaw = std::max(shooting_range_yaw, 1.0 * M_PI / 180); + shooting_range_pitch = std::max(shooting_range_pitch, 1.0 * M_PI / 180); + if (std::abs(cur_yaw - target_yaw) < shooting_range_yaw && + std::abs(cur_pitch - target_pitch) < shooting_range_pitch) { + return true; + } + + return false; +} + +std::vector Solver::getArmorPositions(const Eigen::Vector3d &target_center, + const double target_yaw, + const double r1, + const double r2, + const double d_zc, + const double d_za, + const size_t armors_num) const noexcept { + auto armor_positions = std::vector(armors_num, Eigen::Vector3d::Zero()); + // Calculate the position of each armor + bool is_current_pair = true; + double r = 0., target_dz = 0.; + for (size_t i = 0; i < armors_num; i++) { + double temp_yaw = target_yaw + i * (2 * M_PI / armors_num); + if (armors_num == 4) { + r = is_current_pair ? r1 : r2; + target_dz = d_zc + (is_current_pair ? 0 : d_za); + is_current_pair = !is_current_pair; + } else { + r = r1; + target_dz = d_zc; + } + armor_positions[i] = + target_center + Eigen::Vector3d(-r * cos(temp_yaw), -r * sin(temp_yaw), target_dz); + } + return armor_positions; +} + +int Solver::selectBestArmor(const std::vector &armor_positions, + const Eigen::Vector3d &target_center, + const double target_yaw, + const double target_v_yaw, + const size_t armors_num) const noexcept { + // Angle between the car's center and the X-axis + double alpha = std::atan2(target_center.y(), target_center.x()); + // Angle between the front of observed armor and the X-axis + double beta = target_yaw; + + // clang-format off + Eigen::Matrix2d R_odom2center; + Eigen::Matrix2d R_odom2armor; + R_odom2center << std::cos(alpha), std::sin(alpha), + -std::sin(alpha), std::cos(alpha); + R_odom2armor << std::cos(beta), std::sin(beta), + -std::sin(beta), std::cos(beta); + // clang-format on + Eigen::Matrix2d R_center2armor = R_odom2center.transpose() * R_odom2armor; + + // Equal to (alpha - beta) in most cases + double decision_angle = -std::asin(R_center2armor(0, 1)); + + // Angle thresh of the armor jump + double theta = (target_v_yaw > 0 ? side_angle_ : -side_angle_) / 180.0 * M_PI; + + // Avoid the frequent switch between two armor + if (std::abs(target_v_yaw) < min_switching_v_yaw_) { + theta = 0; + } + + double temp_angle = decision_angle + M_PI / armors_num - theta; + + if (temp_angle < 0) { + temp_angle += 2 * M_PI; + } + + int selected_id = static_cast(temp_angle / (2 * M_PI / armors_num)); + return selected_id; +} + +void Solver::calcYawAndPitch(const Eigen::Vector3d &p, + const Eigen::Vector3d &barrel_pos_in_odom, + double &yaw, + double &pitch) const noexcept { + // Calculate yaw and pitch based on target position in odom frame + yaw = atan2(p.y(), p.x()); + pitch = atan2(p.z(), p.head(2).norm()); + + // For trajectory compensation, we need to consider the barrel offset + // The trajectory compensator calculates based on the distance from barrel to target + Eigen::Vector3d target_in_barrel = p; + if (use_barrel_frame_) { + // Target position relative to barrel in odom frame + target_in_barrel = p - barrel_pos_in_odom; + + FYT_DEBUG( + "armor_solver", + "Barrel compensation: target [{:.3f}, {:.3f}, {:.3f}] -> barrel_rel [{:.3f}, {:.3f}, {:.3f}]", + p.x(), + p.y(), + p.z(), + target_in_barrel.x(), + target_in_barrel.y(), + target_in_barrel.z()); + } + + if (double temp_pitch = pitch; + trajectory_compensator_->compensate(target_in_barrel, temp_pitch)) { + pitch = temp_pitch; + } +} + +std::vector> Solver::getTrajectory() const noexcept { + auto trajectory = trajectory_compensator_->getTrajectory(15, rpy_[1]); + // Rotate + for (auto &p : trajectory) { + double x = p.first; + double y = p.second; + p.first = x * cos(rpy_[1]) + y * sin(rpy_[1]); + p.second = -x * sin(rpy_[1]) + y * cos(rpy_[1]); + } + return trajectory; +} + +void Solver::setBulletSpeed(double bullet_speed) noexcept { + if (std::isfinite(bullet_speed) && bullet_speed > 0.0) { + trajectory_compensator_->velocity = bullet_speed; + } +} + +} // namespace fyt::auto_aim + diff --git a/src/rm_auto_aim/armor_solver/src/armor_solver_node.cpp b/src/rm_auto_aim/armor_solver/src/armor_solver_node.cpp new file mode 100644 index 0000000..3679e70 --- /dev/null +++ b/src/rm_auto_aim/armor_solver/src/armor_solver_node.cpp @@ -0,0 +1,604 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_solver/armor_solver_node.hpp" + +// std +#include +#include +// project +#include "armor_solver/motion_model.hpp" +#include "rm_utils/common.hpp" +#include "rm_utils/heartbeat.hpp" + +namespace fyt::auto_aim { +ArmorSolverNode::ArmorSolverNode(const rclcpp::NodeOptions &options) +: Node("armor_solver", options), solver_(nullptr) { + // Register logger + FYT_REGISTER_LOGGER("armor_solver", "~/fyt2024-log", INFO); + FYT_INFO("armor_solver", "Starting ArmorSolverNode!"); + + debug_mode_ = this->declare_parameter("debug", true); + bullet_speed_debug_.store(this->declare_parameter("bullet_speed_debug", false), + std::memory_order_relaxed); + shoot_rate_.store(this->declare_parameter("solver.shoot_rate", 3), std::memory_order_relaxed); + if (this->has_parameter("solver.bullet_speed")) { + bullet_speed_param_.store(this->get_parameter("solver.bullet_speed").as_double(), + std::memory_order_relaxed); + } else { + bullet_speed_param_.store(this->declare_parameter("solver.bullet_speed", 20.0), + std::memory_order_relaxed); + } + + // Tracker + double max_match_distance = this->declare_parameter("tracker.max_match_distance", 0.2); + double max_match_yaw_diff = this->declare_parameter("tracker.max_match_yaw_diff", 1.0); + tracker_ = std::make_unique(max_match_distance, max_match_yaw_diff); + tracker_->tracking_thres = this->declare_parameter("tracker.tracking_thres", 5); + lost_time_thres_ = this->declare_parameter("tracker.lost_time_thres", 0.3); + + // EKF + // xa = x_armor, xc = x_robot_center + // state: xc, v_xc, yc, v_yc, zc, v_zc, yaw, v_yaw, r, d_zc + // measurement: p, y, d, yaw + // f - Process function + auto f = Predict(0.005); + // h - Observation function + auto h = Measure(); + // update_Q - process noise covariance matrix (Adaptive) + // Adaptive parameters: noise varies based on velocity and angular velocity + s2qxyz_max_ = declare_parameter("ekf.sigma2_q_xyz_max", 30.0); + s2qxyz_min_ = declare_parameter("ekf.sigma2_q_xyz_min", 10.0); + s2qyaw_max_ = declare_parameter("ekf.sigma2_q_yaw_max", 150.0); + s2qyaw_min_ = declare_parameter("ekf.sigma2_q_yaw_min", 50.0); + s2qr_ = declare_parameter("ekf.sigma2_q_r", 800.0); + s2qd_zc_ = declare_parameter("ekf.sigma2_q_d_zc", 800.0); + + auto u_q = [this]() { + Eigen::Matrix q; + double t = dt_; + + // Get current state for adaptive calculation + const auto &state = tracker_->target_state; + double vx = state(1), vy = state(3), v_yaw = state(7); + + // Adaptive noise calculation: + // - High angular velocity (spinning) -> lower position noise (trust position measurement more) + // - High linear velocity (moving fast) -> lower yaw noise (trust yaw measurement more) + double linear_vel = std::sqrt(vx * vx + vy * vy); + double angular_vel = std::abs(v_yaw); + + // Exponential decay: when velocity is high, noise approaches min value + double s2q_xyz = std::exp(-angular_vel) * (s2qxyz_max_ - s2qxyz_min_) + s2qxyz_min_; + double s2q_yaw = std::exp(-linear_vel) * (s2qyaw_max_ - s2qyaw_min_) + s2qyaw_min_; + + double r = s2qr_, d_zc = s2qd_zc_; + + // White noise integral model for position-velocity state + double q_x_x = pow(t, 4) / 4 * s2q_xyz, q_x_vx = pow(t, 3) / 2 * s2q_xyz, q_vx_vx = pow(t, 2) * s2q_xyz; + double q_y_y = pow(t, 4) / 4 * s2q_xyz, q_y_vy = pow(t, 3) / 2 * s2q_xyz, q_vy_vy = pow(t, 2) * s2q_xyz; + double q_z_z = pow(t, 4) / 4 * s2q_xyz, q_z_vz = pow(t, 3) / 2 * s2q_xyz, q_vz_vz = pow(t, 2) * s2q_xyz; + double q_yaw_yaw = pow(t, 4) / 4 * s2q_yaw, q_yaw_vyaw = pow(t, 3) / 2 * s2q_yaw, + q_vyaw_vyaw = pow(t, 2) * s2q_yaw; + double q_r = pow(t, 4) / 4 * r; + double q_d_zc = pow(t, 4) / 4 * d_zc; + // clang-format off + // xc v_xc yc v_yc zc v_zc yaw v_yaw r d_zc + q << q_x_x, q_x_vx, 0, 0, 0, 0, 0, 0, 0, 0, + q_x_vx, q_vx_vx,0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, q_y_y, q_y_vy, 0, 0, 0, 0, 0, 0, + 0, 0, q_y_vy, q_vy_vy,0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, q_z_z, q_z_vz, 0, 0, 0, 0, + 0, 0, 0, 0, q_z_vz, q_vz_vz,0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, q_yaw_yaw, q_yaw_vyaw, 0, 0, + 0, 0, 0, 0, 0, 0, q_yaw_vyaw, q_vyaw_vyaw,0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, q_r, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, q_d_zc; + + // clang-format on + return q; + }; + // update_R - measurement noise covariance matrix + // R scales with distance: farther target -> larger measurement noise + r_x_ = declare_parameter("ekf.r_x", 0.05); + r_y_ = declare_parameter("ekf.r_y", 0.05); + r_z_ = declare_parameter("ekf.r_z", 0.05); + r_yaw_ = declare_parameter("ekf.r_yaw", 0.02); + auto u_r = [this](const Eigen::Matrix &z) { + Eigen::Matrix r; + // Calculate distance for better noise scaling + double dist = std::sqrt(z[0] * z[0] + z[1] * z[1] + z[2] * z[2]); + // Minimum distance to prevent numerical issues when target is very close + dist = std::max(dist, 1.0); + // clang-format off + r << r_x_ * dist, 0, 0, 0, + 0, r_y_ * dist, 0, 0, + 0, 0, r_z_ * dist, 0, + 0, 0, 0, r_yaw_; + // clang-format on + return r; + }; + // P - error estimate covariance matrix + Eigen::DiagonalMatrix p0; + p0.setIdentity(); + tracker_->ekf = std::make_unique(f, h, u_q, u_r, p0); + + // Subscriber with tf2 message_filter + // tf2 relevant + tf2_buffer_ = std::make_shared(this->get_clock()); + // Create the timer interface before call to waitForTransform, + // to avoid a tf2_ros::CreateTimerInterfaceException exception + auto timer_interface = std::make_shared( + this->get_node_base_interface(), this->get_node_timers_interface()); + tf2_buffer_->setCreateTimerInterface(timer_interface); + tf2_listener_ = std::make_shared(*tf2_buffer_); + // subscriber and filter + armors_sub_.subscribe(this, "armor_detector/armors", rmw_qos_profile_sensor_data); + target_frame_ = this->declare_parameter("target_frame", "odom"); + tf2_filter_ = std::make_shared(armors_sub_, + *tf2_buffer_, + target_frame_, + 10, + this->get_node_logging_interface(), + this->get_node_clock_interface(), + std::chrono::duration(1)); + // Register a callback with tf2_ros::MessageFilter to be called when + // transforms are available + tf2_filter_->registerCallback(&ArmorSolverNode::armorsCallback, this); + + // Measurement publisher (for debug usage) + measure_pub_ = this->create_publisher("armor_solver/measurement", + rclcpp::SensorDataQoS()); + + // Publisher + target_pub_ = this->create_publisher("armor_solver/target", + rclcpp::SensorDataQoS()); + gimbal_pub_ = this->create_publisher("armor_solver/cmd_gimbal", + rclcpp::SensorDataQoS()); + serial_sub_ = this->create_subscription( + "serial/receive", + rclcpp::SensorDataQoS(), + [this](const rm_interfaces::msg::SerialReceiveData::SharedPtr msg) { + bullet_speed_.store(msg->bullet_speed, std::memory_order_relaxed); + }); + // Timer 250 Hz + pub_timer_ = this->create_wall_timer(std::chrono::milliseconds(4), + std::bind(&ArmorSolverNode::timerCallback, this)); + armor_target_.header.frame_id = ""; + + // Enable/Disable Armor Solver + enable_ = true; + set_mode_srv_ = this->create_service( + "armor_solver/set_mode", + std::bind( + &ArmorSolverNode::setModeCallback, this, std::placeholders::_1, std::placeholders::_2)); + + if (debug_mode_) { + initMarkers(); + } + + on_set_parameters_callback_handle_ = this->add_on_set_parameters_callback( + std::bind(&ArmorSolverNode::onSetParameters, this, std::placeholders::_1)); + + // Heartbeat + heartbeat_ = HeartBeatPublisher::create(this); + //初始化control_msg_last + control_msg_last.yaw_diff = 0; + control_msg_last.pitch_diff = 0; + control_msg_last.distance = -1; + control_msg_last.pitch = 0; + control_msg_last.yaw = 0; + control_msg_last.fire_advice = false; + control_msg_last.shoot_rate = + static_cast(shoot_rate_.load(std::memory_order_relaxed)); + +} + +void ArmorSolverNode::timerCallback() { + if (solver_ == nullptr) { + return; + } + + if (!enable_) { + return; + } + + const bool bullet_speed_debug = bullet_speed_debug_.load(std::memory_order_relaxed); + const double serial_bullet_speed = bullet_speed_.load(std::memory_order_relaxed); + const double param_bullet_speed = bullet_speed_param_.load(std::memory_order_relaxed); + if (bullet_speed_debug) { + solver_->setBulletSpeed(param_bullet_speed); + } else if (serial_bullet_speed > 0.0) { + solver_->setBulletSpeed(serial_bullet_speed); + } else { + solver_->setBulletSpeed(param_bullet_speed); + } + + // Init message + rm_interfaces::msg::GimbalCmd control_msg; + int shoot_rate = shoot_rate_.load(std::memory_order_relaxed); + if (shoot_rate < 0) + { + shoot_rate = 0; + } + else if (shoot_rate > 8) + { + shoot_rate = 8; + } + + // If target never detected + if (armor_target_.header.frame_id.empty()) { + control_msg = control_msg_last; //保持上一次的值 + control_msg.distance = -1; // 默认发送-1 + control_msg.fire_advice = false;//没识别不开火 + gimbal_pub_->publish(control_msg); + return; + } + + if (armor_target_.tracking) { + try { + control_msg = solver_->solve(armor_target_, this->now(), tf2_buffer_); + } catch (...) { + FYT_ERROR("armor_solver", "Something went wrong in solver!"); + control_msg = control_msg_last; //保持上一次的值 + control_msg.distance = -1; // 默认发送-1 + control_msg.fire_advice = false;//没识别不开火 + } + } else { + control_msg = control_msg_last; //保持上一次的值 + control_msg.distance = -1; // 默认发送-1 + control_msg.fire_advice = false;//没识别不开火 + } + control_msg.shoot_rate = static_cast(shoot_rate); + gimbal_pub_->publish(control_msg); + control_msg_last = control_msg; //保存上一次的值 + + if (debug_mode_) { + publishMarkers(armor_target_, control_msg); + } +} + +void ArmorSolverNode::initMarkers() noexcept { + // Visualization Marker Publisher + // See http://wiki.ros.org/rviz/DisplayTypes/Marker + position_marker_.ns = "position"; + position_marker_.type = visualization_msgs::msg::Marker::SPHERE; + position_marker_.scale.x = position_marker_.scale.y = position_marker_.scale.z = 0.1; + position_marker_.color.a = 1.0; + position_marker_.color.g = 1.0; + linear_v_marker_.type = visualization_msgs::msg::Marker::ARROW; + linear_v_marker_.ns = "linear_v"; + linear_v_marker_.scale.x = 0.03; + linear_v_marker_.scale.y = 0.05; + linear_v_marker_.color.a = 1.0; + linear_v_marker_.color.r = 1.0; + linear_v_marker_.color.g = 1.0; + angular_v_marker_.type = visualization_msgs::msg::Marker::ARROW; + angular_v_marker_.ns = "angular_v"; + angular_v_marker_.scale.x = 0.03; + angular_v_marker_.scale.y = 0.05; + angular_v_marker_.color.a = 1.0; + angular_v_marker_.color.b = 1.0; + angular_v_marker_.color.g = 1.0; + armors_marker_.ns = "filtered_armors"; + armors_marker_.type = visualization_msgs::msg::Marker::CUBE; + armors_marker_.scale.x = 0.03; + armors_marker_.scale.z = 0.125; + armors_marker_.color.a = 1.0; + armors_marker_.color.b = 1.0; + selection_marker_.ns = "selection"; + selection_marker_.type = visualization_msgs::msg::Marker::SPHERE; + selection_marker_.scale.x = selection_marker_.scale.y = selection_marker_.scale.z = 0.1; + selection_marker_.color.a = 1.0; + selection_marker_.color.g = 1.0; + selection_marker_.color.r = 1.0; + trajectory_marker_.ns = "trajectory"; + trajectory_marker_.type = visualization_msgs::msg::Marker::POINTS; + trajectory_marker_.scale.x = 0.01; + trajectory_marker_.scale.y = 0.01; + trajectory_marker_.color.a = 1.0; + trajectory_marker_.color.r = 1.0; + trajectory_marker_.color.g = 0.75; + trajectory_marker_.color.b = 0.79; + trajectory_marker_.points.clear(); + + marker_pub_ = + this->create_publisher("armor_solver/marker", 10); +} + +void ArmorSolverNode::armorsCallback(const rm_interfaces::msg::Armors::SharedPtr armors_msg) { + // Lazy initialize solver owing to weak_from_this() can't be called in constructor + if (solver_ == nullptr) { + solver_ = std::make_unique(weak_from_this()); + solver_->updateRuntimeParams(this->get_parameter("solver.max_tracking_v_yaw").as_double(), + this->get_parameter("solver.prediction_delay").as_double(), + this->get_parameter("solver.controller_delay").as_double(), + this->get_parameter("solver.side_angle").as_double(), + this->get_parameter("solver.min_switching_v_yaw").as_double(), + this->get_parameter("solver.shooting_range_width").as_double(), + this->get_parameter("solver.shooting_range_height").as_double()); + solver_->setBulletSpeed(bullet_speed_param_.load(std::memory_order_relaxed)); + } + + // Tranform armor position from image frame to world coordinate + for (auto &armor : armors_msg->armors) { + geometry_msgs::msg::PoseStamped ps; + ps.header = armors_msg->header; + ps.pose = armor.pose; + try { + armor.pose = tf2_buffer_->transform(ps, target_frame_).pose; + } catch (const tf2::TransformException &ex) { + FYT_ERROR("armor_solver", "Transform error: {}", ex.what()); + return; + } + } + + // Filter abnormal armors + armors_msg->armors.erase(std::remove_if(armors_msg->armors.begin(), + armors_msg->armors.end(), + [](const rm_interfaces::msg::Armor &armor) { + return abs(armor.pose.position.z) > 2; + }), + armors_msg->armors.end()); + + // Init message + rm_interfaces::msg::Measurement measure_msg; + rm_interfaces::msg::Target target_msg; + rclcpp::Time time = armors_msg->header.stamp; + target_msg.header.stamp = time; + target_msg.header.frame_id = target_frame_; + + // Update tracker + if (tracker_->tracker_state == Tracker::LOST) { + tracker_->init(armors_msg); + target_msg.tracking = false; + } else { + dt_ = (time - last_time_).seconds(); + tracker_->lost_thres = std::abs(static_cast(lost_time_thres_ / dt_)); + if (tracker_->tracked_id == "outpost") { + tracker_->ekf->setPredictFunc(Predict{dt_, MotionModel::CONSTANT_ROTATION}); + } else { + tracker_->ekf->setPredictFunc(Predict{dt_, MotionModel::CONSTANT_VEL_ROT}); + } + tracker_->update(armors_msg); + // Publish measurement + measure_msg.x = tracker_->measurement(0); + measure_msg.y = tracker_->measurement(1); + measure_msg.z = tracker_->measurement(2); + measure_msg.yaw = tracker_->measurement(3); + if (measure_pub_->get_subscription_count() > 0) { + measure_pub_->publish(measure_msg); + } + + if (tracker_->tracker_state == Tracker::DETECTING) { + target_msg.tracking = false; + } else if (tracker_->tracker_state == Tracker::TRACKING || + tracker_->tracker_state == Tracker::TEMP_LOST) { + target_msg.tracking = true; + // Fill target message + const auto &state = tracker_->target_state; + target_msg.id = tracker_->tracked_id; + target_msg.armors_num = static_cast(tracker_->tracked_armors_num); + target_msg.position.x = state(0); + target_msg.velocity.x = state(1); + target_msg.position.y = state(2); + target_msg.velocity.y = state(3); + target_msg.position.z = state(4); + target_msg.velocity.z = state(5); + target_msg.yaw = state(6); + target_msg.v_yaw = state(7); + target_msg.radius_1 = state(8); + target_msg.radius_2 = tracker_->another_r; + target_msg.d_zc = state(9); + target_msg.d_za = tracker_->d_za; + } + } + + // Store and Publish the target_msg + armor_target_ = target_msg; + target_pub_->publish(target_msg); + + last_time_ = time; +} + +void ArmorSolverNode::publishMarkers(const rm_interfaces::msg::Target &target_msg, + const rm_interfaces::msg::GimbalCmd &gimbal_cmd) noexcept { + position_marker_.header = target_msg.header; + linear_v_marker_.header = target_msg.header; + angular_v_marker_.header = target_msg.header; + armors_marker_.header = target_msg.header; + selection_marker_.header = target_msg.header; + trajectory_marker_.header = target_msg.header; + + visualization_msgs::msg::MarkerArray marker_array; + + if (target_msg.tracking) { + double yaw = target_msg.yaw, r1 = target_msg.radius_1, r2 = target_msg.radius_2; + double xc = target_msg.position.x, yc = target_msg.position.y, zc = target_msg.position.z; + double vx = target_msg.velocity.x, vy = target_msg.velocity.y, vz = target_msg.velocity.z; + double d_za = target_msg.d_za, d_zc = target_msg.d_zc; + position_marker_.action = visualization_msgs::msg::Marker::ADD; + position_marker_.pose.position.x = xc; + position_marker_.pose.position.y = yc; + position_marker_.pose.position.z = zc; + + linear_v_marker_.action = visualization_msgs::msg::Marker::ADD; + linear_v_marker_.points.clear(); + linear_v_marker_.points.emplace_back(position_marker_.pose.position); + geometry_msgs::msg::Point arrow_end = position_marker_.pose.position; + arrow_end.x += vx; + arrow_end.y += vy; + arrow_end.z += vz; + linear_v_marker_.points.emplace_back(arrow_end); + + angular_v_marker_.action = visualization_msgs::msg::Marker::ADD; + angular_v_marker_.points.clear(); + angular_v_marker_.points.emplace_back(position_marker_.pose.position); + arrow_end = position_marker_.pose.position; + arrow_end.z += target_msg.v_yaw / M_PI; + angular_v_marker_.points.emplace_back(arrow_end); + + armors_marker_.action = visualization_msgs::msg::Marker::ADD; + armors_marker_.scale.y = tracker_->tracked_armor.type == "small" ? 0.135 : 0.23; + // Draw armors + bool is_current_pair = true; + size_t a_n = target_msg.armors_num; + geometry_msgs::msg::Point p_a; + double r = 0; + for (size_t i = 0; i < a_n; i++) { + double tmp_yaw = yaw + i * (2 * M_PI / a_n); + // Only 4 armors has 2 radius and height + if (a_n == 4) { + r = is_current_pair ? r1 : r2; + p_a.z = zc + d_zc + (is_current_pair ? 0 : d_za); + is_current_pair = !is_current_pair; + } else { + r = r1; + p_a.z = zc; + } + p_a.x = xc - r * cos(tmp_yaw); + p_a.y = yc - r * sin(tmp_yaw); + + armors_marker_.id = i; + armors_marker_.pose.position = p_a; + tf2::Quaternion q; + q.setRPY(0, target_msg.id == "outpost" ? -0.2618 : 0.2618, tmp_yaw); + armors_marker_.pose.orientation = tf2::toMsg(q); + marker_array.markers.emplace_back(armors_marker_); + } + + selection_marker_.action = visualization_msgs::msg::Marker::ADD; + selection_marker_.points.clear(); + selection_marker_.pose.position.y = gimbal_cmd.distance * sin(gimbal_cmd.yaw * M_PI / 180); + selection_marker_.pose.position.x = gimbal_cmd.distance * cos(gimbal_cmd.yaw * M_PI / 180); + selection_marker_.pose.position.z = gimbal_cmd.distance * sin(gimbal_cmd.pitch * M_PI / 180); + + trajectory_marker_.action = visualization_msgs::msg::Marker::ADD; + trajectory_marker_.points.clear(); + trajectory_marker_.header.frame_id = "pitch_link"; + for (const auto &point : solver_->getTrajectory()) { + geometry_msgs::msg::Point p; + p.x = point.first; + p.z = point.second; + trajectory_marker_.points.emplace_back(p); + } + if (gimbal_cmd.fire_advice) { + trajectory_marker_.color.r = 0; + trajectory_marker_.color.g = 1; + trajectory_marker_.color.b = 0; + } else { + trajectory_marker_.color.r = 1; + trajectory_marker_.color.g = 1; + trajectory_marker_.color.b = 1; + } + + } else { + position_marker_.action = visualization_msgs::msg::Marker::DELETE; + linear_v_marker_.action = visualization_msgs::msg::Marker::DELETE; + angular_v_marker_.action = visualization_msgs::msg::Marker::DELETE; + armors_marker_.action = visualization_msgs::msg::Marker::DELETE; + trajectory_marker_.action = visualization_msgs::msg::Marker::DELETE; + selection_marker_.action = visualization_msgs::msg::Marker::DELETE; + } + + marker_array.markers.emplace_back(position_marker_); + marker_array.markers.emplace_back(trajectory_marker_); + marker_array.markers.emplace_back(linear_v_marker_); + marker_array.markers.emplace_back(angular_v_marker_); + marker_array.markers.emplace_back(armors_marker_); + marker_array.markers.emplace_back(selection_marker_); + marker_pub_->publish(marker_array); +} + +void ArmorSolverNode::setModeCallback( + const std::shared_ptr request, + std::shared_ptr response) { + response->success = true; + + VisionMode mode = static_cast(request->mode); + std::string mode_name = visionModeToString(mode); + if (mode_name == "UNKNOWN") { + FYT_ERROR("armor_solver", "Invalid mode: {}", request->mode); + return; + } + + switch (mode) { + case VisionMode::AUTO_AIM_RED: + case VisionMode::AUTO_AIM_BLUE: { + enable_ = true; + break; + } + default: { + enable_ = false; + break; + } + } + + FYT_WARN("armor_solver", "Set Mode to {}", visionModeToString(mode)); +} + +rcl_interfaces::msg::SetParametersResult ArmorSolverNode::onSetParameters( + const std::vector ¶meters) { + rcl_interfaces::msg::SetParametersResult result; + result.successful = true; + + for (const auto ¶m : parameters) { + if (param.get_name() == "debug") { + debug_mode_ = param.as_bool(); + } else if (param.get_name() == "bullet_speed_debug") { + bullet_speed_debug_.store(param.as_bool(), std::memory_order_relaxed); + } else if (param.get_name() == "solver.bullet_speed") { + bullet_speed_param_.store(param.as_double(), std::memory_order_relaxed); + } else if (param.get_name() == "solver.shoot_rate") { + shoot_rate_.store(param.as_int(), std::memory_order_relaxed); + } else if (param.get_name() == "tracker.max_match_distance") { + const double max_match_distance = param.as_double(); + tracker_->setMatchThreshold(max_match_distance, this->get_parameter("tracker.max_match_yaw_diff").as_double()); + } else if (param.get_name() == "tracker.max_match_yaw_diff") { + const double max_match_yaw_diff = param.as_double(); + tracker_->setMatchThreshold(this->get_parameter("tracker.max_match_distance").as_double(), max_match_yaw_diff); + } else if (param.get_name() == "tracker.tracking_thres") { + tracker_->tracking_thres = param.as_int(); + } else if (param.get_name() == "tracker.lost_time_thres") { + lost_time_thres_ = param.as_double(); + } + } + + if (solver_ != nullptr) { + solver_->updateRuntimeParams(this->get_parameter("solver.max_tracking_v_yaw").as_double(), + this->get_parameter("solver.prediction_delay").as_double(), + this->get_parameter("solver.controller_delay").as_double(), + this->get_parameter("solver.side_angle").as_double(), + this->get_parameter("solver.min_switching_v_yaw").as_double(), + this->get_parameter("solver.shooting_range_width").as_double(), + this->get_parameter("solver.shooting_range_height").as_double()); + solver_->setBulletSpeed(bullet_speed_param_.load(std::memory_order_relaxed)); + } + + return result; +} + +} // namespace fyt::auto_aim + +#include "rclcpp_components/register_node_macro.hpp" + +// Register the component with class_loader. +// This acts as a sort of entry point, allowing the component to be discoverable +// when its library is being loaded into a running process. +RCLCPP_COMPONENTS_REGISTER_NODE(fyt::auto_aim::ArmorSolverNode) + diff --git a/src/rm_auto_aim/armor_solver/src/armor_tracker.cpp b/src/rm_auto_aim/armor_solver/src/armor_tracker.cpp new file mode 100644 index 0000000..09e3fb3 --- /dev/null +++ b/src/rm_auto_aim/armor_solver/src/armor_tracker.cpp @@ -0,0 +1,272 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_solver/armor_tracker.hpp" +// std +#include +#include +#include +// ros2 +#include +#include +#include + +#include +// third party +#include +// project +#include "rm_utils/logger/log.hpp" + +namespace fyt::auto_aim { +Tracker::Tracker(double max_match_distance, double max_match_yaw_diff) +: tracker_state(LOST) +, tracked_id(std::string("")) +, measurement(Eigen::VectorXd::Zero(4)) +, target_state(Eigen::VectorXd::Zero(9)) +, max_match_distance_(max_match_distance) +, max_match_yaw_diff_(max_match_yaw_diff) +, detect_count_(0) +, lost_count_(0) +, last_yaw_(0) {} + +void Tracker::setMatchThreshold(double max_match_distance, double max_match_yaw_diff) noexcept { + max_match_distance_ = max_match_distance; + max_match_yaw_diff_ = max_match_yaw_diff; +} + +void Tracker::init(const Armors::SharedPtr &armors_msg) noexcept { + if (armors_msg->armors.empty()) { + return; + } + + // Simply choose the armor that is closest to image center + double min_distance = DBL_MAX; + tracked_armor = armors_msg->armors[0]; + for (const auto &armor : armors_msg->armors) { + if (armor.distance_to_image_center < min_distance) { + min_distance = armor.distance_to_image_center; + tracked_armor = armor; + } + } + + initEKF(tracked_armor); + FYT_INFO("armor_solver", "Init EKF!"); + + tracked_id = tracked_armor.number; + tracker_state = DETECTING; + + if (tracked_armor.type == "large" && + (tracked_id == "3" || tracked_id == "4" || tracked_id == "5")) { + tracked_armors_num = ArmorsNum::BALANCE_2; + } else if (tracked_id == "outpost") { + tracked_armors_num = ArmorsNum::OUTPOST_3; + } else { + tracked_armors_num = ArmorsNum::NORMAL_4; + } +} + +void Tracker::update(const Armors::SharedPtr &armors_msg) noexcept { + // KF predict + Eigen::VectorXd ekf_prediction = ekf->predict(); + + bool matched = false; + // Use KF prediction as default target state if no matched armor is found + target_state = ekf_prediction; + + if (!armors_msg->armors.empty()) { + // Find the closest armor with the same id + Armor same_id_armor; + int same_id_armors_count = 0; + auto predicted_position = getArmorPositionFromState(ekf_prediction); + double min_position_diff = DBL_MAX; + double yaw_diff = DBL_MAX; + for (const auto &armor : armors_msg->armors) { + // Only consider armors with the same id + if (armor.number == tracked_id) { + same_id_armor = armor; + same_id_armors_count++; + // Calculate the difference between the predicted position and the + // current armor position + auto p = armor.pose.position; + Eigen::Vector3d position_vec(p.x, p.y, p.z); + double position_diff = (predicted_position - position_vec).norm(); + if (position_diff < min_position_diff) { + // Find the closest armor + min_position_diff = position_diff; + yaw_diff = abs(orientationToYaw(armor.pose.orientation) - ekf_prediction(6)); + tracked_armor = armor; + // Update tracked armor type + if (tracked_armor.type == "large" && + (tracked_id == "3" || tracked_id == "4" || tracked_id == "5")) { + tracked_armors_num = ArmorsNum::BALANCE_2; + } else if (tracked_id == "outpost") { + tracked_armors_num = ArmorsNum::OUTPOST_3; + } else { + tracked_armors_num = ArmorsNum::NORMAL_4; + } + } + } + } + + // Check if the distance and yaw difference of closest armor are within the + // threshold + if (min_position_diff < max_match_distance_ && yaw_diff < max_match_yaw_diff_) { + // Matched armor found + matched = true; + auto p = tracked_armor.pose.position; + // Update EKF + double measured_yaw = orientationToYaw(tracked_armor.pose.orientation); + measurement = Eigen::Vector4d(p.x, p.y, p.z, measured_yaw); + target_state = ekf->update(measurement); + } else if (same_id_armors_count == 1 && yaw_diff > max_match_yaw_diff_) { + // Matched armor not found, but there is only one armor with the same id + // and yaw has jumped, take this case as the target is spinning and armor + // jumped + handleArmorJump(same_id_armor); + } else { + // No matched armor found + FYT_WARN("armor_solver", "No matched armor found!"); + } + } + + // Prevent radius from spreading + if (target_state(8) < 0.12) { + target_state(8) = 0.12; + ekf->setState(target_state); + } else if (target_state(8) > 0.4) { + target_state(8) = 0.4; + ekf->setState(target_state); + } + + // Tracking state machine + if (tracker_state == DETECTING) { + if (matched) { + detect_count_++; + if (detect_count_ > tracking_thres) { + detect_count_ = 0; + tracker_state = TRACKING; + FYT_DEBUG("armor_solver", "Tracker state: TRACKING {}", tracked_id); + } + } else { + detect_count_ = 0; + tracker_state = LOST; + FYT_DEBUG("armor_solver", "Tracker state: LOST {}", tracked_id); + } + } else if (tracker_state == TRACKING) { + if (!matched) { + tracker_state = TEMP_LOST; + lost_count_++; + FYT_DEBUG("armor_solver", "Tracker state: TEMP_LOST {}", tracked_id); + } + } else if (tracker_state == TEMP_LOST) { + if (!matched) { + lost_count_++; + if (lost_count_ > lost_thres) { + lost_count_ = 0; + tracker_state = LOST; + FYT_DEBUG("armor_solver", "Tracker state: LOST {}", tracked_id); + } + } else { + tracker_state = TRACKING; + lost_count_ = 0; + FYT_DEBUG("armor_solver", "Tracker state: TRACKING {}", tracked_id); + } + } +} + +void Tracker::initEKF(const Armor &a) noexcept { + double xa = a.pose.position.x; + double ya = a.pose.position.y; + double za = a.pose.position.z; + last_yaw_ = 0; + double yaw = orientationToYaw(a.pose.orientation); + + // Set initial position at 0.2m behind the target + target_state = Eigen::VectorXd::Zero(X_N); + double r = 0.26; + double xc = xa + r * cos(yaw); + double yc = ya + r * sin(yaw); + double zc = za; + d_za = 0, d_zc = 0, another_r = r; + target_state << xc, 0, yc, 0, zc, 0, yaw, 0, r, d_zc; + + ekf->setState(target_state); +} + +void Tracker::handleArmorJump(const Armor ¤t_armor) noexcept { + double last_yaw = target_state(6); + double yaw = orientationToYaw(current_armor.pose.orientation); + + if (abs(yaw - last_yaw) > 0.4) { + // Armor angle also jumped, take this case as target spinning + target_state(6) = yaw; + // Only 4 armors has 2 radius and height + if (tracked_armors_num == ArmorsNum::NORMAL_4) { + d_za = target_state(4) + target_state(9) - current_armor.pose.position.z; + std::swap(target_state(8), another_r); + d_zc = d_zc == 0 ? -d_za : 0; + target_state(9) = d_zc; + } + FYT_DEBUG("armor_solver", "Armor Jump!"); + } + + auto p = current_armor.pose.position; + Eigen::Vector3d current_p(p.x, p.y, p.z); + Eigen::Vector3d infer_p = getArmorPositionFromState(target_state); + + if ((current_p - infer_p).norm() > max_match_distance_) { + // If the distance between the current armor and the inferred armor is too + // large, the state is wrong, reset center position and velocity in the + // state + d_zc = 0; + double r = target_state(8); + target_state(0) = p.x + r * cos(yaw); // xc + target_state(1) = 0; // vxc + target_state(2) = p.y + r * sin(yaw); // yc + target_state(3) = 0; // vyc + target_state(4) = p.z; // zc + target_state(5) = 0; // vzc + target_state(9) = d_zc; // d_zc + FYT_WARN("armor_solver", "State wrong!"); + } + + ekf->setState(target_state); +} + +double Tracker::orientationToYaw(const geometry_msgs::msg::Quaternion &q) noexcept { + // Get armor yaw + tf2::Quaternion tf_q; + tf2::fromMsg(q, tf_q); + double roll, pitch, yaw; + tf2::Matrix3x3(tf_q).getRPY(roll, pitch, yaw); + // Make yaw change continuous (-pi~pi to -inf~inf) + yaw = last_yaw_ + angles::shortest_angular_distance(last_yaw_, yaw); + last_yaw_ = yaw; + return yaw; +} + +Eigen::Vector3d Tracker::getArmorPositionFromState(const Eigen::VectorXd &x) noexcept { + // Calculate predicted position of the current armor + double xc = x(0), yc = x(2), za = x(4) + x(9); + double yaw = x(6), r = x(8); + double xa = xc - r * cos(yaw); + double ya = yc - r * sin(yaw); + return Eigen::Vector3d(xa, ya, za); +} + +} // namespace fyt::auto_aim \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect.zip b/src/rm_auto_aim/armor_yolo_detect.zip new file mode 100644 index 0000000..ac208bb Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect.zip differ diff --git a/src/rm_auto_aim/armor_yolo_detect/.DS_Store b/src/rm_auto_aim/armor_yolo_detect/.DS_Store new file mode 100644 index 0000000..0e6cc58 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/.DS_Store differ diff --git a/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt b/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt new file mode 100644 index 0000000..506458f --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt @@ -0,0 +1,114 @@ +cmake_minimum_required(VERSION 3.10) +project(armor_yolo_detect) + +## Set CMake policy to suppress OpenGL warning +cmake_policy(SET CMP0072 NEW) + +## Use C++17 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +## Export compile commands for clangd +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +####################### +## Find dependencies ## +####################### + +find_package(ament_cmake_auto REQUIRED) +find_package(OpenCV REQUIRED) +find_package(fmt REQUIRED) +find_package(Sophus REQUIRED) +find_package(armor_detector REQUIRED) +ament_auto_find_build_dependencies() + +# TensorRT +find_package(CUDA REQUIRED) + +########### +## Build ## +########### + +ament_auto_add_library(${PROJECT_NAME} SHARED + src/armor_yolo_detector.cpp + src/armor_yolo_detector_node.cpp + src/async_detector.cpp + src/trt_logger.cpp + src/yolo_tensorrt.cpp +) + +ament_auto_add_executable(trt_inference_test + trt_inference/trt_inference_test.cpp +) + +set(ONNXRUNTIME_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/onnxruntime) +set(ONNXRUNTIME_INCLUDE_DIR ${ONNXRUNTIME_ROOT}/include) +set(ONNXRUNTIME_LIB_DIR ${ONNXRUNTIME_ROOT}/lib) + +target_include_directories(trt_inference_test PRIVATE + ${ONNXRUNTIME_INCLUDE_DIR} +) + +target_link_directories(trt_inference_test PRIVATE + ${ONNXRUNTIME_LIB_DIR} +) + +target_link_libraries(trt_inference_test + ${PROJECT_NAME} + ${OpenCV_LIBS} + onnxruntime +) + +set_target_properties(trt_inference_test PROPERTIES + BUILD_RPATH "${ONNXRUNTIME_LIB_DIR}" + INSTALL_RPATH "\$ORIGIN/../../share/${PROJECT_NAME}/third_party/onnxruntime/lib" +) + +target_include_directories(${PROJECT_NAME} PUBLIC + ${OpenCV_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} + ${Sophus_INCLUDE_DIRS} + ${CUDA_INCLUDE_DIRS} +) + +target_link_libraries(${PROJECT_NAME} + ${OpenCV_LIBS} + ${CUDA_LIBRARIES} + nvinfer + nvinfer_plugin + nvonnxparser + fmt::fmt +) + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN armor_yolo_detect::ArmorYoloDetectorNode + EXECUTABLE armor_yolo_detector_node +) + +############# +## Testing ## +############# + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + list(APPEND AMENT_LINT_AUTO_EXCLUDE + ament_cmake_copyright + ament_cmake_uncrustify + ament_cmake_cpplint + ament_cmake_lint_cmake + ) + ament_lint_auto_find_test_dependencies() +endif() + +############# +## Install ## +############# + +ament_auto_package( + USE_SCOPED_HEADER_INSTALL_DIR + INSTALL_TO_SHARE + config + model + launch + third_party +) diff --git a/src/rm_auto_aim/armor_yolo_detect/README.md b/src/rm_auto_aim/armor_yolo_detect/README.md new file mode 100644 index 0000000..35acd93 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/README.md @@ -0,0 +1,423 @@ +# Armor YOLO Detect + +基于 **YOLOv5** 和 **TensorRT** 的装甲板检测节点,用于 RoboMaster 机甲大师竞赛的自瞄系统。 + +本节点作为原始二值化+灯条匹配方案(`armor_detector`)的替代方案,使用深度学习模型直接检测装甲板,提供更好的泛化能力和检测精度。 + +--- + +## 目录 + +- [简介](#简介) +- [目录结构](#目录结构) +- [模型说明](#模型说明) +- [快速开始](#快速开始) + - [环境依赖](#环境依赖) + - [模型转换](#模型转换) + - [编译项目](#编译项目) + - [运行节点](#运行节点) +- [详细使用](#详细使用) +- [参数说明](#参数说明) +- [与原始方案对比](#与原始方案对比) +- [调试方法](#调试方法) +- [常见问题](#常见问题) + +--- + +## 简介 + +本项目使用 RobotDetectionModel 中的 0526 版本 ONNX 模型,该模型: +- **网络结构**: 魔改 YOLOv5,backbone 采用 MobileNetV3 +- **训练数据**: 约 15K 张高质量数据集 +- **输入**: 640x640 RGB 彩色图像 +- **输出**: 25200x85 矩阵,包含四个角点、置信度、颜色分类和数字分类 +- **推理设备**: Jetson NX (TensorRT 加速) + +--- + +## 目录结构 + +``` +armor_yolo_detect/ +├── include/armor_yolo_detect/ +│ ├── types.hpp # 数据结构:Armor, YoloObject, NumberClass 等 +│ ├── yolo_tensorrt.hpp/cpp # TensorRT 推理引擎封装 +│ ├── trt_logger.hpp/cpp # TensorRT 日志工具 +│ ├── armor_yolo_detector.hpp/cpp # 检测器类封装 +│ └── armor_yolo_detector_node.hpp/cpp # ROS2 节点实现 +├── src/ # 源文件 +├── config/ +│ └── params.yaml # 默认参数配置 +├── model/ +│ └── label.yaml # 类别标签定义 +└── launch/ + └── armor_yolo_detector.launch.py # 启动文件 +``` + +--- + +## 模型说明 + +### 输入格式 + +| 属性 | 值 | +|------|-----| +| 尺寸 | 640 x 640 | +| 通道 | 3 (RGB 彩色图) | +| 数据类型 | float32 | +| 归一化 | [0, 1] | +| 格式 | NCHW (TensorRT) | + +### 输出格式 (25200 x 85) + +每行代表一个检测候选框,85 个通道含义如下: + +| 索引 | 含义 | 说明 | +|------|------|------| +| 0-7 | 四个角点坐标 | (x1,y1,x2,y2,x3,y3,x4,y4),左上角开始逆时针 | +| 8 | 置信度 | sigmoid 激活 | +| 9-12 | 颜色分类 | 红0, 蓝1, 灰2, 紫3 | +| 13-21 | 数字分类 | 0:G, 1:1, 2:2, 3:3, 4:4, 5:5, 6:O, 7:Bs, 8:Bb | + +### 类别定义 + +**数字类别 (13-21):** +- `0`: G (哨兵 Guard) +- `1`: 1 (一号步兵) +- `2`: 2 (二号步兵) +- `3`: 3 (三号步兵) +- `4`: 4 (四号步兵) +- `5`: 5 (五号步兵) +- `6`: O (前哨站 Outpost) +- `7`: Bs (基地小装甲) +- `8`: Bb (基地大装甲) + +**颜色类别 (9-12):** +- `0`: RED (红色敌方) +- `1`: BLUE (蓝色敌方) +- `2`: GRAY (灰色-无威胁) +- `3`: PURPLE (紫色-无威胁) + +--- + +## 快速开始 + +### 环境依赖 + +#### Jetson NX 平台 + +Jetson NX 已预装 CUDA,需要安装 TensorRT: + +```bash +# 1. 安装 Python TensorRT 和相关包 +sudo apt update +sudo apt install python3-libnvinfer-dev tensorrt + +# 2. 验证安装 +python3 -c "import tensorrt; print(tensorrt.__version__)" + +# 3. 确保 CUDA 环境变量 +echo 'export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH' >> ~/.bashrc +source ~/.bashrc +``` + +#### 其他依赖 + +```bash +# OpenCV (通常已预装) +sudo apt install libopencv-dev python3-opencv + +# ROS2 Humble (参考 rm_auto_aim 原有配置) +# 确保已正确安装并 source +source /opt/ros/humble/setup.bash +``` + +### 模型转换 + +**注意**: 模型转换需要在有 NVIDIA GPU 的机器上进行(可以是 Jetson NX 本身) + +```bash +# 进入工作空间 +cd ~/colcon_ws + +# 一键转换(推荐) +# 语法: ./scripts/build_engine.sh --onnx --engine <输出engine路径> [选项] +./tools/scripts/build_engine.sh \ + --onnx ../RobotDetectionModel/Model/0526.onnx \ + --engine src/rm_auto_aim/armor_yolo_detect/model/yolov5_0526.engine \ + --fp16 + +# 完整参数说明: +# --onnx 输入 ONNX 模型路径 +# --engine 输出 TensorRT engine 路径 +# --batch-size 批处理大小,默认 1 +# --workspace 工作空间大小(GB),默认 4 +# --fp16 启用 FP16 加速(Jetson NX 推荐) +# --int8 启用 INT8 加速(需要校准) +# --verbose 显示详细日志 +``` + +**转换成功标志**: +``` +Building TensorRT engine from ONNX... +[TensorRT] INFO: [MemUsageChange] Init CUDA engine for native input sizes... +Engine built successfully! +Engine saved to: /path/to/engine +Conversion completed! +``` + +### 编译项目 + +```bash +cd ~/colcon_ws + +# 编译 armor_yolo_detect 包 +colcon build --packages-select armor_yolo_detect + +# 如果需要编译依赖 +colcon build --packages-select armor_yolo_detect rm_interfaces rm_utils + +# source 环境 +source install/setup.bash +``` + +### 运行节点 + +```bash +# 启动 YOLO 检测节点(红色敌方) +ros2 launch armor_yolo_detect armor_yolo_detector.launch.py detect_color:=0 + +# 蓝色敌方 +ros2 launch armor_yolo_detect armor_yolo_detector.launch.py detect_color:=1 + +# 启用调试模式 +ros2 launch armor_yolo_detect armor_yolo_detector.launch.py debug:=true +``` + +--- + +## 详细使用 + +### 完整启动示例 + +```bash +# 1. Source 环境 +source /opt/ros/humble/setup.bash +source ~/colcon_ws/install/setup.bash + +# 2. 启动相机节点(如有需要) +# ros2 launch hik_camera hik_camera.launch.py + +# 3. 启动 YOLO 检测节点 +ros2 launch armor_yolo_detect armor_yolo_detector.launch.py \ + detect_color:=0 \ + conf_threshold:=0.7 \ + nms_threshold:=0.5 \ + debug:=true +``` + +### 参数配置 + +可以在 `config/params.yaml` 中修改默认参数: + +```yaml +/**: + ros__parameters: + # 检测参数 + conf_threshold: 0.65 # 置信度阈值 (0.0-1.0) + nms_threshold: 0.45 # NMS 阈值 (0.0-1.0) + detect_color: 0 # 0=红色, 1=蓝色 + + # 处理参数 + max_queue_size: 3 # 图像队列大小 + process_every_n_frames: 1 # 每N帧处理一次 + + # PnP 和 BA + use_ba: true # 是否使用 BA 优化 + + # 坐标系 + target_frame: "odom" # TF 目标坐标系 + + # 调试 + debug: false + debug: + enable_terminal_log: true + enable_markers: true + enable_result_img: true + debug_log_interval_frames: 30 +``` + +### 动态调参 + +运行时可以通过命令行调整参数: + +```bash +# 降低置信度阈值(检测更多目标) +ros2 param set /armor_yolo_detector conf_threshold 0.5 + +# 提高 NMS 阈值(合并更近的目标) +ros2 param set /armor_yolo_detector nms_threshold 0.6 + +# 切换敌方颜色 +ros2 service call /armor_detector/set_mode rm_interfaces/srv/SetMode "{mode: 0}" # 红 +ros2 service call /armor_detector/set_mode rm_interfaces/srv/SetMode "{mode: 1}" # 蓝 +``` + +--- + +## 参数说明 + +| 参数 | 类型 | 默认值 | 说明 | +|------|------|--------|------| +| `conf_threshold` | float | 0.65 | 置信度阈值,低于此值的检测框将被丢弃 | +| `nms_threshold` | float | 0.45 | NMS(非极大值抑制)阈值,用于去除重叠框 | +| `detect_color` | int | 0 | 0=红色敌方, 1=蓝色敌方 | +| `max_queue_size` | int | 3 | 图像队列最大长度 | +| `process_every_n_frames` | int | 1 | 每 N 帧处理一次,用于降低帧率 | +| `use_ba` | bool | true | 启用 BA(束调整)优化位姿 | +| `target_frame` | string | "odom" | TF 变换的目标坐标系 | +| `debug` | bool | false | 是否启用调试模式 | + +### 建议参数调整 + +- **低光照环境**: 降低 `conf_threshold` 到 0.5-0.6 +- **误检测多**: 提高 `conf_threshold` 到 0.7-0.8 +- **目标频繁切换**: 提高 `nms_threshold` 到 0.5-0.6 + +--- + +## 与原始方案对比 + +| 特性 | armor_detector (原始) | armor_yolo_detect (本项目) | +|------|----------------------|---------------------------| +| 检测方式 | 二值化 + 灯条匹配 | YOLOv5 深度学习 | +| 输入 | 灰度图 | RGB 彩色图 | +| 泛化能力 | 依赖阈值参数 | 模型自适应 | +| 计算量 | 较低 | 较高 | +| 依赖 | OpenCV | TensorRT + CUDA | +| 输出话题 | `/armor_detector/armors` | `/armor_detector/armors` | +| 消息类型 | `rm_interfaces::msg::Armors` | `rm_interfaces::msg::Armors` | + +**切换方案**: +```bash +# 原始二值化方案 +ros2 launch rm_bringup bringup.launch.py detector:=binary + +# YOLO 方案 +ros2 launch rm_bringup bringup.launch.py detector:=yolo +``` + +--- + +## 调试方法 + +### 启用调试输出 + +```bash +ros2 launch armor_yolo_detect armor_yolo_detector.launch.py debug:=true +``` + +### 查看话题 + +```bash +# 查看检测结果图像 +ros2 topic echo /armor_yolo_detector/result_img + +# 查看原始图像(需要 remap) +ros2 run image_view image_view --image /armor_yolo_detector/result_img + +# 查看检测到的装甲板 +ros2 topic echo /armor_detector/armors + +# 查看可视化标记 +ros2 topic echo /armor_detector/marker +``` + +### Rviz2 可视化 + +```bash +# 启动 rviz2 +rviz2 + +# 添加 Display: +# - Image: /armor_yolo_detector/result_img +# - Marker: /armor_detector/marker +``` + +### 发表话题重映射 + +如果相机话题名称不同,需要重映射: + +```bash +ros2 launch armor_yolo_detect armor_yolo_detector.launch.py \ + remappings:="[('/image_raw', '/your_camera/image_raw'), ('/camera_info', '/your_camera/camera_info')]" +``` + +--- + +## 常见问题 + +### Q1: 编译报错 "TensorRT not found" + +```bash +# 确保安装了 TensorRT 开发包 +sudo apt install tensorrt libnvinfer-dev python3-libnvinfer-dev + +# 验证 +dpkg -l | grep TensorRT +``` + +### Q2: 运行时报错 "Engine file not found" + +```bash +# 检查 engine 文件是否存在 +ls -la ~/colcon_ws/src/rm_auto_aim/armor_yolo_detect/model/ + +# 如果没有,执行模型转换 +./tools/scripts/build_engine.sh --onnx ../RobotDetectionModel/Model/0526.onnx --engine src/rm_auto_aim/armor_yolo_detect/model/yolov5_0526.engine --fp16 +``` + +### Q3: 检测框错位或翻转 + +检查图像输入格式,确保是 RGB 输入: +```bash +# 查看图像编码 +ros2 topic echo /hik_camera/image_raw --field encoding +``` +如果是 `mono8`(灰度),需要修改代码中的预处理逻辑。 + +### Q4: Jetson NX 上推理速度慢 + +```bash +# 1. 确保使用 FP16 +./tools/scripts/build_engine.sh --onnx model.onnx --engine model.engine --fp16 + +# 2. 检查电源模式(JetPack 4.6+) +sudo nvpmodel -m 0 # 最大性能模式 + +# 3. 查看推理时间 +ros2 run rqt_top rqt_top +``` + +### Q5: 如何同时运行多个检测器进行对比? + +```bash +# 终端 1: 运行原始方案 +ros2 launch armor_detector armor_detector.launch.py + +# 终端 2: 运行 YOLO 方案(修改节点名避免冲突) +ros2 launch armor_yolo_detect armor_yolo_detector.launch.py \ + --remap /armor_detector/armors:=/armor_detector/armors_yolo +``` + +--- + +## 维护者 + +- **开发者**: chenyy +- **邮箱**: 3289288508@qq.com +- **开源**: https://github.com/chenjunnn/rm_auto_aim + +## 协议 + +本项目基于 Apache 2.0 协议开源。 diff --git a/src/rm_auto_aim/armor_yolo_detect/build/.built_by b/src/rm_auto_aim/armor_yolo_detect/build/.built_by new file mode 100644 index 0000000..06e74ac --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/.built_by @@ -0,0 +1 @@ +colcon diff --git a/src/rm_auto_aim/armor_yolo_detect/build/COLCON_IGNORE b/src/rm_auto_aim/armor_yolo_detect/build/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/query/client-colcon-cmake/codemodel-v2 b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/query/client-colcon-cmake/codemodel-v2 new file mode 100644 index 0000000..e69de29 diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/codemodel-v2-27f63d19a4af901a6613.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/codemodel-v2-27f63d19a4af901a6613.json new file mode 100644 index 0000000..bd3e08b --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/codemodel-v2-27f63d19a4af901a6613.json @@ -0,0 +1,97 @@ +{ + "configurations" : + [ + { + "directories" : + [ + { + "build" : ".", + "hasInstallRule" : true, + "jsonFile" : "directory-.-cdda605c8f0fc3a94bdb.json", + "minimumCMakeVersion" : + { + "string" : "3.12" + }, + "projectIndex" : 0, + "source" : ".", + "targetIndexes" : + [ + 0, + 1, + 2, + 3, + 4 + ] + } + ], + "name" : "", + "projects" : + [ + { + "directoryIndexes" : + [ + 0 + ], + "name" : "armor_yolo_detect", + "targetIndexes" : + [ + 0, + 1, + 2, + 3, + 4 + ] + } + ], + "targets" : + [ + { + "directoryIndex" : 0, + "id" : "armor_yolo_detect::@6890427a1f51a3e7e1df", + "jsonFile" : "target-armor_yolo_detect-c59ff32f9b5cff5c0a75.json", + "name" : "armor_yolo_detect", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "armor_yolo_detect_uninstall::@6890427a1f51a3e7e1df", + "jsonFile" : "target-armor_yolo_detect_uninstall-7f4bd7e3de607a0ee4c2.json", + "name" : "armor_yolo_detect_uninstall", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "armor_yolo_detector_node::@6890427a1f51a3e7e1df", + "jsonFile" : "target-armor_yolo_detector_node-a828a80270a5533985cb.json", + "name" : "armor_yolo_detector_node", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "trt_inference_test::@6890427a1f51a3e7e1df", + "jsonFile" : "target-trt_inference_test-eca372c678304d0a96b7.json", + "name" : "trt_inference_test", + "projectIndex" : 0 + }, + { + "directoryIndex" : 0, + "id" : "uninstall::@6890427a1f51a3e7e1df", + "jsonFile" : "target-uninstall-b7ab4eaa92f8931a51e0.json", + "name" : "uninstall", + "projectIndex" : 0 + } + ] + } + ], + "kind" : "codemodel", + "paths" : + { + "build" : "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "source" : "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" + }, + "version" : + { + "major" : 2, + "minor" : 3 + } +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/directory-.-cdda605c8f0fc3a94bdb.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/directory-.-cdda605c8f0fc3a94bdb.json new file mode 100644 index 0000000..c9c83dc --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/directory-.-cdda605c8f0fc3a94bdb.json @@ -0,0 +1,115 @@ +{ + "backtraceGraph" : + { + "commands" : + [ + "_install", + "install", + "include", + "find_package" + ], + "files" : + [ + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/install.cmake", + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_symlink_install-extras.cmake", + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake", + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake", + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig.cmake", + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_auto-extras.cmake", + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_autoConfig.cmake", + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 7 + }, + { + "command" : 3, + "file" : 7, + "line" : 18, + "parent" : 0 + }, + { + "file" : 6, + "parent" : 1 + }, + { + "command" : 2, + "file" : 6, + "line" : 41, + "parent" : 2 + }, + { + "file" : 5, + "parent" : 3 + }, + { + "command" : 3, + "file" : 5, + "line" : 17, + "parent" : 4 + }, + { + "file" : 4, + "parent" : 5 + }, + { + "command" : 2, + "file" : 4, + "line" : 41, + "parent" : 6 + }, + { + "file" : 3, + "parent" : 7 + }, + { + "command" : 3, + "file" : 3, + "line" : 15, + "parent" : 8 + }, + { + "file" : 2, + "parent" : 9 + }, + { + "command" : 2, + "file" : 2, + "line" : 41, + "parent" : 10 + }, + { + "file" : 1, + "parent" : 11 + }, + { + "command" : 1, + "file" : 1, + "line" : 47, + "parent" : 12 + }, + { + "command" : 0, + "file" : 0, + "line" : 43, + "parent" : 13 + } + ] + }, + "installers" : + [ + { + "backtrace" : 14, + "component" : "Unspecified", + "scriptFile" : "build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install.cmake", + "type" : "script" + } + ], + "paths" : + { + "build" : ".", + "source" : "." + } +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/index-2026-03-22T17-01-37-0409.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/index-2026-03-22T17-01-37-0409.json new file mode 100644 index 0000000..8e2c528 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/index-2026-03-22T17-01-37-0409.json @@ -0,0 +1,54 @@ +{ + "cmake" : + { + "generator" : + { + "multiConfig" : false, + "name" : "Unix Makefiles" + }, + "paths" : + { + "cmake" : "/usr/bin/cmake", + "cpack" : "/usr/bin/cpack", + "ctest" : "/usr/bin/ctest", + "root" : "/usr/share/cmake-3.22" + }, + "version" : + { + "isDirty" : false, + "major" : 3, + "minor" : 22, + "patch" : 1, + "string" : "3.22.1", + "suffix" : "" + } + }, + "objects" : + [ + { + "jsonFile" : "codemodel-v2-27f63d19a4af901a6613.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + } + ], + "reply" : + { + "client-colcon-cmake" : + { + "codemodel-v2" : + { + "jsonFile" : "codemodel-v2-27f63d19a4af901a6613.json", + "kind" : "codemodel", + "version" : + { + "major" : 2, + "minor" : 3 + } + } + } + } +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detect-c59ff32f9b5cff5c0a75.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detect-c59ff32f9b5cff5c0a75.json new file mode 100644 index 0000000..8b3c072 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detect-c59ff32f9b5cff5c0a75.json @@ -0,0 +1,1344 @@ +{ + "artifacts" : + [ + { + "path" : "libarmor_yolo_detect.so" + } + ], + "backtrace" : 2, + "backtraceGraph" : + { + "commands" : + [ + "add_library", + "ament_auto_add_library", + "target_link_libraries", + "ament_target_dependencies", + "target_include_directories" + ], + "files" : + [ + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_library.cmake", + "CMakeLists.txt", + "/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake" + ], + "nodes" : + [ + { + "file" : 1 + }, + { + "command" : 1, + "file" : 1, + "line" : 31, + "parent" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 66, + "parent" : 1 + }, + { + "command" : 3, + "file" : 0, + "line" : 80, + "parent" : 1 + }, + { + "command" : 2, + "file" : 2, + "line" : 145, + "parent" : 3 + }, + { + "command" : 2, + "file" : 1, + "line" : 72, + "parent" : 0 + }, + { + "command" : 4, + "file" : 0, + "line" : 70, + "parent" : 1 + }, + { + "command" : 4, + "file" : 1, + "line" : 65, + "parent" : 0 + }, + { + "command" : 4, + "file" : 2, + "line" : 141, + "parent" : 3 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-fPIC" + }, + { + "fragment" : "-std=gnu++17" + } + ], + "defines" : + [ + { + "backtrace" : 4, + "define" : "DEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp" + }, + { + "backtrace" : 5, + "define" : "FMT_LOCALE" + }, + { + "backtrace" : 5, + "define" : "FMT_SHARED" + }, + { + "backtrace" : 4, + "define" : "RCUTILS_ENABLE_FAULT_INJECTION" + }, + { + "define" : "armor_yolo_detect_EXPORTS" + } + ], + "includes" : + [ + { + "backtrace" : 6, + "path" : "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include" + }, + { + "backtrace" : 7, + "path" : "/usr/local/cuda-12.6/include" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rclcpp" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rclcpp_components" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/sensor_msgs" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/geometry_msgs" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/std_srvs" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/visualization_msgs" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/cv_bridge" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/image_transport" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tf2" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tf2_ros" + }, + { + "backtrace" : 8, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tf2_geometry_msgs" + }, + { + "backtrace" : 7, + "isSystem" : true, + "path" : "/usr/include/opencv4" + }, + { + "backtrace" : 7, + "isSystem" : true, + "path" : "/usr/include/eigen3" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/ament_index_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/libstatistics_collector" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/builtin_interfaces" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_runtime_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcutils" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_interface" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/fastcdr" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_runtime_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rmw" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_fastrtps_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_introspection_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_introspection_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_interfaces" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_logging_interface" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_yaml_param_parser" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/libyaml_vendor" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tracetools" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcpputils" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/statistics_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosgraph_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/class_loader" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/composition_interfaces" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/std_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/message_filters" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rclcpp_action" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/action_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/unique_identifier_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_action" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tf2_msgs" + } + ], + "language" : "CXX", + "languageStandard" : + { + "backtraces" : + [ + 4, + 4, + 5 + ], + "standard" : "17" + }, + "sourceIndexes" : + [ + 0, + 1, + 2, + 3 + ] + } + ], + "id" : "armor_yolo_detect::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-Wl,-rpath,/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libcomponent_manager.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libcv_bridge.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/aarch64-linux-gnu/libimage_transport.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstatic_transform_broadcaster_node.so", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_stitching.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_alphamat.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_aruco.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_barcode.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_bgsegm.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_bioinspired.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_ccalib.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_dnn_objdetect.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_dnn_superres.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_dpm.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_face.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_freetype.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_fuzzy.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_hdf.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_hfs.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_img_hash.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_intensity_transform.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_line_descriptor.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_mcc.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_quality.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_rapid.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_reg.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_rgbd.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_saliency.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_shape.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_stereo.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_structured_light.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_superres.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_surface_matching.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_tracking.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_videostab.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_viz.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_wechat_qrcode.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_xobjdetect.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_xphoto.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/local/cuda-12.6/lib64/libcudart_static.a", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "-ldl", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/librt.a", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "-lnvinfer", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "-lnvinfer_plugin", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "-lnvonnxparser", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libclass_loader.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libtf2_ros.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libtf2.so", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libmessage_filters.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librclcpp_action.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/librclcpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/liblibstatistics_collector.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_action.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_yaml_param_parser.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libyaml.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtracetools.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librmw_implementation.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libament_index_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_logging_spdlog.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_logging_interface.so", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libfmt.so.8.1.1", + "role" : "libraries" + }, + { + "fragment" : "-Wl,--as-needed", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libfastcdr.so.1.0.24", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librmw.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/libpython3.10.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcpputils.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_runtime_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcutils.so", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/liborocos-kdl.so", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_highgui.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_datasets.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_plot.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_text.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_ml.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_phase_unwrapping.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_optflow.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_ximgproc.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_video.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_videoio.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_objdetect.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_calib3d.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_dnn.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_features2d.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_flann.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_photo.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_core.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "-ldl", + "role" : "libraries" + } + ], + "language" : "CXX" + }, + "name" : "armor_yolo_detect", + "nameOnDisk" : "libarmor_yolo_detect.so", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0, + 1, + 2, + 3 + ] + } + ], + "sources" : + [ + { + "backtrace" : 2, + "compileGroupIndex" : 0, + "path" : "src/armor_yolo_detector.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 2, + "compileGroupIndex" : 0, + "path" : "src/armor_yolo_detector_node.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 2, + "compileGroupIndex" : 0, + "path" : "src/trt_logger.cpp", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 2, + "compileGroupIndex" : 0, + "path" : "src/yolo_tensorrt.cpp", + "sourceGroupIndex" : 0 + } + ], + "type" : "SHARED_LIBRARY" +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detect_uninstall-7f4bd7e3de607a0ee4c2.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detect_uninstall-7f4bd7e3de607a0ee4c2.json new file mode 100644 index 0000000..9effef8 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detect_uninstall-7f4bd7e3de607a0ee4c2.json @@ -0,0 +1,134 @@ +{ + "backtrace" : 13, + "backtraceGraph" : + { + "commands" : + [ + "add_custom_target", + "include", + "find_package" + ], + "files" : + [ + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_uninstall_target-extras.cmake", + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake", + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake", + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig.cmake", + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_auto-extras.cmake", + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_autoConfig.cmake", + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 6 + }, + { + "command" : 2, + "file" : 6, + "line" : 18, + "parent" : 0 + }, + { + "file" : 5, + "parent" : 1 + }, + { + "command" : 1, + "file" : 5, + "line" : 41, + "parent" : 2 + }, + { + "file" : 4, + "parent" : 3 + }, + { + "command" : 2, + "file" : 4, + "line" : 17, + "parent" : 4 + }, + { + "file" : 3, + "parent" : 5 + }, + { + "command" : 1, + "file" : 3, + "line" : 41, + "parent" : 6 + }, + { + "file" : 2, + "parent" : 7 + }, + { + "command" : 2, + "file" : 2, + "line" : 15, + "parent" : 8 + }, + { + "file" : 1, + "parent" : 9 + }, + { + "command" : 1, + "file" : 1, + "line" : 41, + "parent" : 10 + }, + { + "file" : 0, + "parent" : 11 + }, + { + "command" : 0, + "file" : 0, + "line" : 40, + "parent" : 12 + } + ] + }, + "id" : "armor_yolo_detect_uninstall::@6890427a1f51a3e7e1df", + "name" : "armor_yolo_detect_uninstall", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "", + "sourceIndexes" : + [ + 0 + ] + }, + { + "name" : "CMake Rules", + "sourceIndexes" : + [ + 1 + ] + } + ], + "sources" : + [ + { + "backtrace" : 13, + "isGenerated" : true, + "path" : "build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall", + "sourceGroupIndex" : 0 + }, + { + "backtrace" : 0, + "isGenerated" : true, + "path" : "build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.rule", + "sourceGroupIndex" : 1 + } + ], + "type" : "UTILITY" +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detector_node-a828a80270a5533985cb.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detector_node-a828a80270a5533985cb.json new file mode 100644 index 0000000..35da477 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-armor_yolo_detector_node-a828a80270a5533985cb.json @@ -0,0 +1,551 @@ +{ + "artifacts" : + [ + { + "path" : "armor_yolo_detector_node" + } + ], + "backtrace" : 2, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "rclcpp_components_register_node", + "target_link_libraries", + "ament_target_dependencies", + "target_include_directories" + ], + "files" : + [ + "/opt/ros/humble/share/rclcpp_components/cmake/rclcpp_components_register_node.cmake", + "CMakeLists.txt", + "/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake" + ], + "nodes" : + [ + { + "file" : 1 + }, + { + "command" : 1, + "file" : 1, + "line" : 81, + "parent" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 72, + "parent" : 1 + }, + { + "command" : 3, + "file" : 0, + "line" : 73, + "parent" : 1 + }, + { + "command" : 2, + "file" : 2, + "line" : 145, + "parent" : 3 + }, + { + "command" : 4, + "file" : 2, + "line" : 141, + "parent" : 3 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-std=gnu++17" + } + ], + "defines" : + [ + { + "backtrace" : 4, + "define" : "DEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp" + }, + { + "backtrace" : 4, + "define" : "RCUTILS_ENABLE_FAULT_INJECTION" + } + ], + "includes" : + [ + { + "backtrace" : 5, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rclcpp" + }, + { + "backtrace" : 5, + "isSystem" : true, + "path" : "/opt/ros/humble/include/class_loader" + }, + { + "backtrace" : 5, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rclcpp_components" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/ament_index_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/libstatistics_collector" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/builtin_interfaces" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_runtime_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcutils" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_interface" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/fastcdr" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_runtime_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rmw" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_fastrtps_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_introspection_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_introspection_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_interfaces" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_logging_interface" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_yaml_param_parser" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/libyaml_vendor" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tracetools" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcpputils" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/statistics_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosgraph_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/composition_interfaces" + } + ], + "language" : "CXX", + "languageStandard" : + { + "backtraces" : + [ + 4 + ], + "standard" : "17" + }, + "sourceIndexes" : + [ + 0 + ] + } + ], + "id" : "armor_yolo_detector_node::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "", + "role" : "flags" + }, + { + "fragment" : "-Wl,-rpath,/opt/ros/humble/lib", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libcomponent_manager.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/librclcpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/liblibstatistics_collector.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librmw_implementation.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_logging_spdlog.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_logging_interface.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_yaml_param_parser.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libyaml.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtracetools.so", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "/opt/ros/humble/lib/libclass_loader.so", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libament_index_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librmw.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libfastcdr.so.1.0.24", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcpputils.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_runtime_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcutils.so", + "role" : "libraries" + }, + { + "fragment" : "-ldl", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/libpython3.10.so", + "role" : "libraries" + } + ], + "language" : "CXX" + }, + "name" : "armor_yolo_detector_node", + "nameOnDisk" : "armor_yolo_detector_node", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 2, + "compileGroupIndex" : 0, + "isGenerated" : true, + "path" : "build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-trt_inference_test-eca372c678304d0a96b7.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-trt_inference_test-eca372c678304d0a96b7.json new file mode 100644 index 0000000..96c9b72 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-trt_inference_test-eca372c678304d0a96b7.json @@ -0,0 +1,1341 @@ +{ + "artifacts" : + [ + { + "path" : "trt_inference_test" + } + ], + "backtrace" : 2, + "backtraceGraph" : + { + "commands" : + [ + "add_executable", + "ament_auto_add_executable", + "target_link_directories", + "target_link_libraries", + "ament_target_dependencies", + "target_include_directories" + ], + "files" : + [ + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_executable.cmake", + "CMakeLists.txt", + "/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake" + ], + "nodes" : + [ + { + "file" : 1 + }, + { + "command" : 1, + "file" : 1, + "line" : 38, + "parent" : 0 + }, + { + "command" : 0, + "file" : 0, + "line" : 66, + "parent" : 1 + }, + { + "command" : 2, + "file" : 1, + "line" : 50, + "parent" : 0 + }, + { + "command" : 3, + "file" : 0, + "line" : 76, + "parent" : 1 + }, + { + "command" : 3, + "file" : 1, + "line" : 54, + "parent" : 0 + }, + { + "command" : 4, + "file" : 0, + "line" : 80, + "parent" : 1 + }, + { + "command" : 3, + "file" : 2, + "line" : 145, + "parent" : 6 + }, + { + "command" : 5, + "file" : 0, + "line" : 70, + "parent" : 1 + }, + { + "command" : 5, + "file" : 1, + "line" : 46, + "parent" : 0 + }, + { + "command" : 5, + "file" : 2, + "line" : 141, + "parent" : 6 + } + ] + }, + "compileGroups" : + [ + { + "compileCommandFragments" : + [ + { + "fragment" : "-std=gnu++17" + } + ], + "defines" : + [ + { + "backtrace" : 4, + "define" : "DEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp" + }, + { + "backtrace" : 4, + "define" : "FMT_LOCALE" + }, + { + "backtrace" : 4, + "define" : "FMT_SHARED" + }, + { + "backtrace" : 4, + "define" : "RCUTILS_ENABLE_FAULT_INJECTION" + } + ], + "includes" : + [ + { + "backtrace" : 8, + "path" : "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include" + }, + { + "backtrace" : 9, + "path" : "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include" + }, + { + "backtrace" : 4, + "path" : "/usr/local/cuda-12.6/include" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rclcpp" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rclcpp_components" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/sensor_msgs" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/geometry_msgs" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/std_srvs" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/visualization_msgs" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/cv_bridge" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/image_transport" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tf2" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tf2_ros" + }, + { + "backtrace" : 10, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tf2_geometry_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/usr/include/opencv4" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/usr/include/eigen3" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/ament_index_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/libstatistics_collector" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/builtin_interfaces" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_runtime_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcutils" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_interface" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/fastcdr" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_runtime_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rmw" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_fastrtps_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_introspection_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_introspection_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_interfaces" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_logging_interface" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_yaml_param_parser" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/libyaml_vendor" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tracetools" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcpputils" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/statistics_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosgraph_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_cpp" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rosidl_typesupport_c" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/class_loader" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/composition_interfaces" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/std_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/message_filters" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rclcpp_action" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/action_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/unique_identifier_msgs" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/rcl_action" + }, + { + "backtrace" : 4, + "isSystem" : true, + "path" : "/opt/ros/humble/include/tf2_msgs" + } + ], + "language" : "CXX", + "languageStandard" : + { + "backtraces" : + [ + 4, + 4, + 4 + ], + "standard" : "17" + }, + "sourceIndexes" : + [ + 0 + ] + } + ], + "dependencies" : + [ + { + "backtrace" : 4, + "id" : "armor_yolo_detect::@6890427a1f51a3e7e1df" + } + ], + "id" : "trt_inference_test::@6890427a1f51a3e7e1df", + "link" : + { + "commandFragments" : + [ + { + "fragment" : "", + "role" : "flags" + }, + { + "backtrace" : 3, + "fragment" : "-L/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib", + "role" : "libraryPath" + }, + { + "fragment" : "-Wl,-rpath,/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib:/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect:/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib", + "role" : "libraries" + }, + { + "backtrace" : 4, + "fragment" : "libarmor_yolo_detect.so", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_stitching.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_alphamat.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_aruco.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_barcode.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_bgsegm.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_bioinspired.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_ccalib.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_dnn_objdetect.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_dnn_superres.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_dpm.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_face.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_freetype.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_fuzzy.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_hdf.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_hfs.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_img_hash.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_intensity_transform.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_line_descriptor.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_mcc.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_quality.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_rapid.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_reg.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_rgbd.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_saliency.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_shape.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_stereo.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_structured_light.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_superres.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_surface_matching.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_tracking.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_videostab.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_viz.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_wechat_qrcode.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_xobjdetect.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_xphoto.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "-lonnxruntime", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libcomponent_manager.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libclass_loader.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstd_srvs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libcv_bridge.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/aarch64-linux-gnu/libimage_transport.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libstatic_transform_broadcaster_node.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libtf2_ros.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libtf2.so", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libmessage_filters.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librclcpp_action.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/librclcpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/liblibstatistics_collector.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_action.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_yaml_param_parser.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libyaml.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtracetools.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librmw_implementation.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libament_index_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_logging_spdlog.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcl_logging_interface.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libfastcdr.so.1.0.24", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librmw.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_introspection_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_cpp.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libtf2_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "backtrace" : 7, + "fragment" : "/opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libstd_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libaction_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_py.so", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/libpython3.10.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_typesupport_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcpputils.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librosidl_runtime_c.so", + "role" : "libraries" + }, + { + "fragment" : "/opt/ros/humble/lib/librcutils.so", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/liborocos-kdl.so", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_phase_unwrapping.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_optflow.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_highgui.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_datasets.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_plot.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_text.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_ml.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_videoio.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_ximgproc.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_video.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_objdetect.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_calib3d.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_dnn.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_features2d.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_flann.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_photo.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.4.5.4d", + "role" : "libraries" + }, + { + "backtrace" : 5, + "fragment" : "/usr/lib/aarch64-linux-gnu/libopencv_core.so.4.5.4d", + "role" : "libraries" + }, + { + "fragment" : "/usr/local/cuda-12.6/lib64/libcudart_static.a", + "role" : "libraries" + }, + { + "fragment" : "-ldl", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/librt.a", + "role" : "libraries" + }, + { + "fragment" : "-lnvinfer", + "role" : "libraries" + }, + { + "fragment" : "-lnvinfer_plugin", + "role" : "libraries" + }, + { + "fragment" : "-lnvonnxparser", + "role" : "libraries" + }, + { + "fragment" : "/usr/lib/aarch64-linux-gnu/libfmt.so.8.1.1", + "role" : "libraries" + }, + { + "fragment" : "-Wl,--as-needed", + "role" : "libraries" + } + ], + "language" : "CXX" + }, + "name" : "trt_inference_test", + "nameOnDisk" : "trt_inference_test", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sourceGroups" : + [ + { + "name" : "Source Files", + "sourceIndexes" : + [ + 0 + ] + } + ], + "sources" : + [ + { + "backtrace" : 2, + "compileGroupIndex" : 0, + "path" : "trt_inference/trt_inference_test.cpp", + "sourceGroupIndex" : 0 + } + ], + "type" : "EXECUTABLE" +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-uninstall-b7ab4eaa92f8931a51e0.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-uninstall-b7ab4eaa92f8931a51e0.json new file mode 100644 index 0000000..db0d747 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/.cmake/api/v1/reply/target-uninstall-b7ab4eaa92f8931a51e0.json @@ -0,0 +1,117 @@ +{ + "backtrace" : 13, + "backtraceGraph" : + { + "commands" : + [ + "add_custom_target", + "include", + "find_package", + "add_dependencies" + ], + "files" : + [ + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_uninstall_target-extras.cmake", + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake", + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake", + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig.cmake", + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_auto-extras.cmake", + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_autoConfig.cmake", + "CMakeLists.txt" + ], + "nodes" : + [ + { + "file" : 6 + }, + { + "command" : 2, + "file" : 6, + "line" : 18, + "parent" : 0 + }, + { + "file" : 5, + "parent" : 1 + }, + { + "command" : 1, + "file" : 5, + "line" : 41, + "parent" : 2 + }, + { + "file" : 4, + "parent" : 3 + }, + { + "command" : 2, + "file" : 4, + "line" : 17, + "parent" : 4 + }, + { + "file" : 3, + "parent" : 5 + }, + { + "command" : 1, + "file" : 3, + "line" : 41, + "parent" : 6 + }, + { + "file" : 2, + "parent" : 7 + }, + { + "command" : 2, + "file" : 2, + "line" : 15, + "parent" : 8 + }, + { + "file" : 1, + "parent" : 9 + }, + { + "command" : 1, + "file" : 1, + "line" : 41, + "parent" : 10 + }, + { + "file" : 0, + "parent" : 11 + }, + { + "command" : 0, + "file" : 0, + "line" : 35, + "parent" : 12 + }, + { + "command" : 3, + "file" : 0, + "line" : 42, + "parent" : 12 + } + ] + }, + "dependencies" : + [ + { + "backtrace" : 14, + "id" : "armor_yolo_detect_uninstall::@6890427a1f51a3e7e1df" + } + ], + "id" : "uninstall::@6890427a1f51a3e7e1df", + "name" : "uninstall", + "paths" : + { + "build" : ".", + "source" : "." + }, + "sources" : [], + "type" : "UTILITY" +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeCache.txt b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeCache.txt new file mode 100644 index 0000000..1bd3006 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeCache.txt @@ -0,0 +1,1096 @@ +# This is the CMakeCache file. +# For build in directory: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect +# It was generated by CMake: /usr/bin/cmake +# You can edit this file to change values found and used by cmake. +# If you do not want to change any of the values, simply exit the editor. +# If you do want to change a value, simply edit, save, and exit the editor. +# The syntax for the file is as follows: +# KEY:TYPE=VALUE +# KEY is the name of a variable in the cache. +# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!. +# VALUE is the current value for the KEY. + +######################## +# EXTERNAL cache entries +######################## + +//Generate environment files in the CMAKE_INSTALL_PREFIX +AMENT_CMAKE_ENVIRONMENT_GENERATION:BOOL=OFF + +//Generate environment files in the package share folder +AMENT_CMAKE_ENVIRONMENT_PACKAGE_GENERATION:BOOL=ON + +//Generate marker file containing the parent prefix path +AMENT_CMAKE_ENVIRONMENT_PARENT_PREFIX_PATH_GENERATION:BOOL=ON + +//Replace the CMake install command with a custom implementation +// using symlinks instead of copying resources +AMENT_CMAKE_SYMLINK_INSTALL:BOOL=1 + +//Generate an uninstall target to revert the effects of the install +// step +AMENT_CMAKE_UNINSTALL_TARGET:BOOL=ON + +//The path where test results are generated +AMENT_TEST_RESULTS_DIR:PATH=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results + +//Build the testing tree. +BUILD_TESTING:BOOL=ON + +//Path to a program. +CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line + +//Path to a program. +CMAKE_AR:FILEPATH=/usr/bin/ar + +//Choose the type of build, options are: None Debug Release RelWithDebInfo +// MinSizeRel ... +CMAKE_BUILD_TYPE:STRING= + +//Enable/Disable color output during build. +CMAKE_COLOR_MAKEFILE:BOOL=ON + +//CXX compiler +CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/c++ + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11 + +//Flags used by the CXX compiler during all build types. +CMAKE_CXX_FLAGS:STRING= + +//Flags used by the CXX compiler during DEBUG builds. +CMAKE_CXX_FLAGS_DEBUG:STRING=-g + +//Flags used by the CXX compiler during MINSIZEREL builds. +CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the CXX compiler during RELEASE builds. +CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the CXX compiler during RELWITHDEBINFO builds. +CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//C compiler +CMAKE_C_COMPILER:FILEPATH=/usr/bin/cc + +//A wrapper around 'ar' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-11 + +//A wrapper around 'ranlib' adding the appropriate '--plugin' option +// for the GCC compiler +CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-11 + +//Flags used by the C compiler during all build types. +CMAKE_C_FLAGS:STRING= + +//Flags used by the C compiler during DEBUG builds. +CMAKE_C_FLAGS_DEBUG:STRING=-g + +//Flags used by the C compiler during MINSIZEREL builds. +CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG + +//Flags used by the C compiler during RELEASE builds. +CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG + +//Flags used by the C compiler during RELWITHDEBINFO builds. +CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG + +//Path to a program. +CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND + +//Flags used by the linker during all build types. +CMAKE_EXE_LINKER_FLAGS:STRING= + +//Flags used by the linker during DEBUG builds. +CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during MINSIZEREL builds. +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during RELEASE builds. +CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during RELWITHDEBINFO builds. +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Enable/Disable output of compile commands during generation. +CMAKE_EXPORT_COMPILE_COMMANDS:BOOL= + +//Install path prefix, prepended onto install directories. +CMAKE_INSTALL_PREFIX:PATH=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect + +//Path to a program. +CMAKE_LINKER:FILEPATH=/usr/bin/ld + +//Path to a program. +CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/gmake + +//Flags used by the linker during the creation of modules during +// all build types. +CMAKE_MODULE_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of modules during +// DEBUG builds. +CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of modules during +// MINSIZEREL builds. +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of modules during +// RELEASE builds. +CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of modules during +// RELWITHDEBINFO builds. +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_NM:FILEPATH=/usr/bin/nm + +//Path to a program. +CMAKE_OBJCOPY:FILEPATH=/usr/bin/objcopy + +//Path to a program. +CMAKE_OBJDUMP:FILEPATH=/usr/bin/objdump + +//Value Computed by CMake +CMAKE_PROJECT_DESCRIPTION:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_HOMEPAGE_URL:STATIC= + +//Value Computed by CMake +CMAKE_PROJECT_NAME:STATIC=armor_yolo_detect + +//Path to a program. +CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib + +//Path to a program. +CMAKE_READELF:FILEPATH=/usr/bin/readelf + +//Flags used by the linker during the creation of shared libraries +// during all build types. +CMAKE_SHARED_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of shared libraries +// during DEBUG builds. +CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of shared libraries +// during MINSIZEREL builds. +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELEASE builds. +CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of shared libraries +// during RELWITHDEBINFO builds. +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//If set, runtime paths are not added when installing shared libraries, +// but are added when building. +CMAKE_SKIP_INSTALL_RPATH:BOOL=NO + +//If set, runtime paths are not added when using shared libraries. +CMAKE_SKIP_RPATH:BOOL=NO + +//Flags used by the linker during the creation of static libraries +// during all build types. +CMAKE_STATIC_LINKER_FLAGS:STRING= + +//Flags used by the linker during the creation of static libraries +// during DEBUG builds. +CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING= + +//Flags used by the linker during the creation of static libraries +// during MINSIZEREL builds. +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELEASE builds. +CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING= + +//Flags used by the linker during the creation of static libraries +// during RELWITHDEBINFO builds. +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING= + +//Path to a program. +CMAKE_STRIP:FILEPATH=/usr/bin/strip + +//If this value is on, makefiles will be generated without the +// .SILENT directive, and all commands will be echoed to the console +// during the make. This is useful for debugging only. With Visual +// Studio IDE projects all commands are done without /nologo. +CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE + +//Compile device code in 64 bit mode +CUDA_64_BIT_DEVICE_CODE:BOOL=ON + +//Attach the build rule to the CUDA source file. Enable only when +// the CUDA source file is added to at most one target. +CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE:BOOL=ON + +//Generate and parse .cubin files in Device mode. +CUDA_BUILD_CUBIN:BOOL=OFF + +//Build in Emulation mode +CUDA_BUILD_EMULATION:BOOL=OFF + +//"cudart" library +CUDA_CUDART_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libcudart.so + +//"cuda" library (older versions only). +CUDA_CUDA_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/libcuda.so + +//Directory to put all the output files. If blank it will default +// to the CMAKE_CURRENT_BINARY_DIR +CUDA_GENERATED_OUTPUT_DIR:PATH= + +//Generated file extension +CUDA_HOST_COMPILATION_CPP:BOOL=ON + +//Host side compiler used by NVCC +CUDA_HOST_COMPILER:FILEPATH=/usr/bin/cc + +//Path to a program. +CUDA_NVCC_EXECUTABLE:FILEPATH=/usr/local/cuda-12.6/bin/nvcc + +//Semi-colon delimit multiple arguments. during all build types. +CUDA_NVCC_FLAGS:STRING= + +//Semi-colon delimit multiple arguments. during DEBUG builds. +CUDA_NVCC_FLAGS_DEBUG:STRING= + +//Semi-colon delimit multiple arguments. during MINSIZEREL builds. +CUDA_NVCC_FLAGS_MINSIZEREL:STRING= + +//Semi-colon delimit multiple arguments. during RELEASE builds. +CUDA_NVCC_FLAGS_RELEASE:STRING= + +//Semi-colon delimit multiple arguments. during RELWITHDEBINFO +// builds. +CUDA_NVCC_FLAGS_RELWITHDEBINFO:STRING= + +//"OpenCL" library +CUDA_OpenCL_LIBRARY:FILEPATH=CUDA_OpenCL_LIBRARY-NOTFOUND + +//Propagate C/CXX_FLAGS and friends to the host compiler via -Xcompile +CUDA_PROPAGATE_HOST_FLAGS:BOOL=ON + +//Path to a file. +CUDA_SDK_ROOT_DIR:PATH=CUDA_SDK_ROOT_DIR-NOTFOUND + +//Compile CUDA objects with separable compilation enabled. Requires +// CUDA 5.0+ +CUDA_SEPARABLE_COMPILATION:BOOL=OFF + +//Path to a file. +CUDA_TOOLKIT_INCLUDE:PATH=/usr/local/cuda-12.6/include + +//Toolkit location. +CUDA_TOOLKIT_ROOT_DIR:PATH=/usr/local/cuda-12.6 + +//Use the static version of the CUDA runtime library if available +CUDA_USE_STATIC_CUDA_RUNTIME:BOOL=ON + +//Print out the commands run while compiling the CUDA source file. +// With the Makefile generator this defaults to VERBOSE variable +// specified on the command line, but can be forced on with this +// option. +CUDA_VERBOSE_BUILD:BOOL=OFF + +//Version of CUDA as computed from nvcc. +CUDA_VERSION:STRING=12.6 + +//"cublas" library +CUDA_cublas_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libcublas.so + +//"cudadevrt" library +CUDA_cudadevrt_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libcudadevrt.a + +//static CUDA runtime library +CUDA_cudart_static_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libcudart_static.a + +//"cufft" library +CUDA_cufft_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libcufft.so + +//"cupti" library +CUDA_cupti_LIBRARY:FILEPATH=CUDA_cupti_LIBRARY-NOTFOUND + +//"curand" library +CUDA_curand_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libcurand.so + +//"cusolver" library +CUDA_cusolver_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libcusolver.so + +//"cusparse" library +CUDA_cusparse_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libcusparse.so + +//"nppc" library +CUDA_nppc_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppc.so + +//"nppial" library +CUDA_nppial_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppial.so + +//"nppicc" library +CUDA_nppicc_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppicc.so + +//"nppidei" library +CUDA_nppidei_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppidei.so + +//"nppif" library +CUDA_nppif_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppif.so + +//"nppig" library +CUDA_nppig_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppig.so + +//"nppim" library +CUDA_nppim_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppim.so + +//"nppist" library +CUDA_nppist_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppist.so + +//"nppisu" library +CUDA_nppisu_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppisu.so + +//"nppitc" library +CUDA_nppitc_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnppitc.so + +//"npps" library +CUDA_npps_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnpps.so + +//"nvToolsExt" library +CUDA_nvToolsExt_LIBRARY:FILEPATH=/usr/local/cuda-12.6/lib64/libnvToolsExt.so + +//Path to a library. +CUDA_rt_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/librt.a + +//The directory containing a CMake configuration file for Eigen3. +Eigen3_DIR:PATH=/usr/share/eigen3/cmake + +//Path to a library. +FastCDR_LIBRARY_DEBUG:FILEPATH=FastCDR_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +FastCDR_LIBRARY_RELEASE:FILEPATH=/opt/ros/humble/lib/libfastcdr.so + +//Path to a file. +FastRTPS_INCLUDE_DIR:PATH=/opt/ros/humble/include + +//Path to a library. +FastRTPS_LIBRARY_DEBUG:FILEPATH=FastRTPS_LIBRARY_DEBUG-NOTFOUND + +//Path to a library. +FastRTPS_LIBRARY_RELEASE:FILEPATH=/opt/ros/humble/lib/libfastrtps.so + +//Path to a library. +OPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/libcrypto.so + +//Path to a file. +OPENSSL_INCLUDE_DIR:PATH=/usr/include + +//Path to a library. +OPENSSL_SSL_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/libssl.so + +//The directory containing a CMake configuration file for OpenCV. +OpenCV_DIR:PATH=/usr/lib/aarch64-linux-gnu/cmake/opencv4 + +//Arguments to supply to pkg-config +PKG_CONFIG_ARGN:STRING= + +//pkg-config executable +PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/bin/pkg-config + +//Path to a program. +Python3_EXECUTABLE:FILEPATH=/usr/bin/python3 + +//Name of the computer/site where compile is being run +SITE:STRING=nx-02 + +//The directory containing a CMake configuration file for Sophus. +Sophus_DIR:PATH=/usr/local/share/sophus/cmake + +//Path to a file. +TINYXML2_INCLUDE_DIR:PATH=/usr/include + +//Path to a library. +TINYXML2_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/libtinyxml2.so + +//The directory containing a CMake configuration file for TinyXML2. +TinyXML2_DIR:PATH=TinyXML2_DIR-NOTFOUND + +//Path to a library. +_lib:FILEPATH=/opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so + +//The directory containing a CMake configuration file for action_msgs. +action_msgs_DIR:PATH=/opt/ros/humble/share/action_msgs/cmake + +//The directory containing a CMake configuration file for ament_cmake. +ament_cmake_DIR:PATH=/opt/ros/humble/share/ament_cmake/cmake + +//The directory containing a CMake configuration file for ament_cmake_auto. +ament_cmake_auto_DIR:PATH=/opt/ros/humble/share/ament_cmake_auto/cmake + +//The directory containing a CMake configuration file for ament_cmake_copyright. +ament_cmake_copyright_DIR:PATH=/opt/ros/humble/share/ament_cmake_copyright/cmake + +//The directory containing a CMake configuration file for ament_cmake_core. +ament_cmake_core_DIR:PATH=/opt/ros/humble/share/ament_cmake_core/cmake + +//The directory containing a CMake configuration file for ament_cmake_cppcheck. +ament_cmake_cppcheck_DIR:PATH=/opt/ros/humble/share/ament_cmake_cppcheck/cmake + +//The directory containing a CMake configuration file for ament_cmake_cpplint. +ament_cmake_cpplint_DIR:PATH=/opt/ros/humble/share/ament_cmake_cpplint/cmake + +//The directory containing a CMake configuration file for ament_cmake_export_definitions. +ament_cmake_export_definitions_DIR:PATH=/opt/ros/humble/share/ament_cmake_export_definitions/cmake + +//The directory containing a CMake configuration file for ament_cmake_export_dependencies. +ament_cmake_export_dependencies_DIR:PATH=/opt/ros/humble/share/ament_cmake_export_dependencies/cmake + +//The directory containing a CMake configuration file for ament_cmake_export_include_directories. +ament_cmake_export_include_directories_DIR:PATH=/opt/ros/humble/share/ament_cmake_export_include_directories/cmake + +//The directory containing a CMake configuration file for ament_cmake_export_interfaces. +ament_cmake_export_interfaces_DIR:PATH=/opt/ros/humble/share/ament_cmake_export_interfaces/cmake + +//The directory containing a CMake configuration file for ament_cmake_export_libraries. +ament_cmake_export_libraries_DIR:PATH=/opt/ros/humble/share/ament_cmake_export_libraries/cmake + +//The directory containing a CMake configuration file for ament_cmake_export_link_flags. +ament_cmake_export_link_flags_DIR:PATH=/opt/ros/humble/share/ament_cmake_export_link_flags/cmake + +//The directory containing a CMake configuration file for ament_cmake_export_targets. +ament_cmake_export_targets_DIR:PATH=/opt/ros/humble/share/ament_cmake_export_targets/cmake + +//The directory containing a CMake configuration file for ament_cmake_flake8. +ament_cmake_flake8_DIR:PATH=/opt/ros/humble/share/ament_cmake_flake8/cmake + +//The directory containing a CMake configuration file for ament_cmake_gen_version_h. +ament_cmake_gen_version_h_DIR:PATH=/opt/ros/humble/share/ament_cmake_gen_version_h/cmake + +//The directory containing a CMake configuration file for ament_cmake_gtest. +ament_cmake_gtest_DIR:PATH=/opt/ros/humble/share/ament_cmake_gtest/cmake + +//The directory containing a CMake configuration file for ament_cmake_include_directories. +ament_cmake_include_directories_DIR:PATH=/opt/ros/humble/share/ament_cmake_include_directories/cmake + +//The directory containing a CMake configuration file for ament_cmake_libraries. +ament_cmake_libraries_DIR:PATH=/opt/ros/humble/share/ament_cmake_libraries/cmake + +//The directory containing a CMake configuration file for ament_cmake_lint_cmake. +ament_cmake_lint_cmake_DIR:PATH=/opt/ros/humble/share/ament_cmake_lint_cmake/cmake + +//The directory containing a CMake configuration file for ament_cmake_pep257. +ament_cmake_pep257_DIR:PATH=/opt/ros/humble/share/ament_cmake_pep257/cmake + +//The directory containing a CMake configuration file for ament_cmake_python. +ament_cmake_python_DIR:PATH=/opt/ros/humble/share/ament_cmake_python/cmake + +//The directory containing a CMake configuration file for ament_cmake_target_dependencies. +ament_cmake_target_dependencies_DIR:PATH=/opt/ros/humble/share/ament_cmake_target_dependencies/cmake + +//The directory containing a CMake configuration file for ament_cmake_test. +ament_cmake_test_DIR:PATH=/opt/ros/humble/share/ament_cmake_test/cmake + +//The directory containing a CMake configuration file for ament_cmake_uncrustify. +ament_cmake_uncrustify_DIR:PATH=/opt/ros/humble/share/ament_cmake_uncrustify/cmake + +//The directory containing a CMake configuration file for ament_cmake_version. +ament_cmake_version_DIR:PATH=/opt/ros/humble/share/ament_cmake_version/cmake + +//The directory containing a CMake configuration file for ament_cmake_xmllint. +ament_cmake_xmllint_DIR:PATH=/opt/ros/humble/share/ament_cmake_xmllint/cmake + +//Path to a program. +ament_cppcheck_BIN:FILEPATH=/opt/ros/humble/bin/ament_cppcheck + +//Path to a program. +ament_flake8_BIN:FILEPATH=/opt/ros/humble/bin/ament_flake8 + +//The directory containing a CMake configuration file for ament_index_cpp. +ament_index_cpp_DIR:PATH=/opt/ros/humble/share/ament_index_cpp/cmake + +//The directory containing a CMake configuration file for ament_lint_auto. +ament_lint_auto_DIR:PATH=/opt/ros/humble/share/ament_lint_auto/cmake + +//The directory containing a CMake configuration file for ament_lint_common. +ament_lint_common_DIR:PATH=/opt/ros/humble/share/ament_lint_common/cmake + +//Path to a program. +ament_pep257_BIN:FILEPATH=/opt/ros/humble/bin/ament_pep257 + +//Path to a program. +ament_xmllint_BIN:FILEPATH=/opt/ros/humble/bin/ament_xmllint + +//The directory containing a CMake configuration file for armor_detector. +armor_detector_DIR:PATH=armor_detector_DIR-NOTFOUND + +//Value Computed by CMake +armor_yolo_detect_BINARY_DIR:STATIC=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +//Value Computed by CMake +armor_yolo_detect_IS_TOP_LEVEL:STATIC=ON + +//Dependencies for the target +armor_yolo_detect_LIB_DEPENDS:STATIC=general;rclcpp::rclcpp;general;rclcpp_components::component_manager;general;sensor_msgs::sensor_msgs__rosidl_generator_c;general;sensor_msgs::sensor_msgs__rosidl_typesupport_fastrtps_c;general;sensor_msgs::sensor_msgs__rosidl_typesupport_fastrtps_cpp;general;sensor_msgs::sensor_msgs__rosidl_typesupport_introspection_c;general;sensor_msgs::sensor_msgs__rosidl_typesupport_c;general;sensor_msgs::sensor_msgs__rosidl_typesupport_introspection_cpp;general;sensor_msgs::sensor_msgs__rosidl_typesupport_cpp;general;sensor_msgs::sensor_msgs__rosidl_generator_py;general;geometry_msgs::geometry_msgs__rosidl_generator_c;general;geometry_msgs::geometry_msgs__rosidl_typesupport_fastrtps_c;general;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_c;general;geometry_msgs::geometry_msgs__rosidl_typesupport_c;general;geometry_msgs::geometry_msgs__rosidl_typesupport_fastrtps_cpp;general;geometry_msgs::geometry_msgs__rosidl_typesupport_introspection_cpp;general;geometry_msgs::geometry_msgs__rosidl_typesupport_cpp;general;geometry_msgs::geometry_msgs__rosidl_generator_py;general;std_srvs::std_srvs__rosidl_generator_c;general;std_srvs::std_srvs__rosidl_typesupport_fastrtps_c;general;std_srvs::std_srvs__rosidl_typesupport_introspection_c;general;std_srvs::std_srvs__rosidl_typesupport_c;general;std_srvs::std_srvs__rosidl_typesupport_fastrtps_cpp;general;std_srvs::std_srvs__rosidl_typesupport_introspection_cpp;general;std_srvs::std_srvs__rosidl_typesupport_cpp;general;std_srvs::std_srvs__rosidl_generator_py;general;visualization_msgs::visualization_msgs__rosidl_generator_c;general;visualization_msgs::visualization_msgs__rosidl_typesupport_fastrtps_c;general;visualization_msgs::visualization_msgs__rosidl_typesupport_fastrtps_cpp;general;visualization_msgs::visualization_msgs__rosidl_typesupport_introspection_c;general;visualization_msgs::visualization_msgs__rosidl_typesupport_c;general;visualization_msgs::visualization_msgs__rosidl_typesupport_introspection_cpp;general;visualization_msgs::visualization_msgs__rosidl_typesupport_cpp;general;visualization_msgs::visualization_msgs__rosidl_generator_py;general;cv_bridge::cv_bridge;general;image_transport::image_transport;general;tf2::tf2;general;tf2_ros::tf2_ros;general;tf2_ros::static_transform_broadcaster_node;general;opencv_calib3d;general;opencv_core;general;opencv_dnn;general;opencv_features2d;general;opencv_flann;general;opencv_highgui;general;opencv_imgcodecs;general;opencv_imgproc;general;opencv_ml;general;opencv_objdetect;general;opencv_photo;general;opencv_stitching;general;opencv_video;general;opencv_videoio;general;opencv_alphamat;general;opencv_aruco;general;opencv_barcode;general;opencv_bgsegm;general;opencv_bioinspired;general;opencv_ccalib;general;opencv_datasets;general;opencv_dnn_objdetect;general;opencv_dnn_superres;general;opencv_dpm;general;opencv_face;general;opencv_freetype;general;opencv_fuzzy;general;opencv_hdf;general;opencv_hfs;general;opencv_img_hash;general;opencv_intensity_transform;general;opencv_line_descriptor;general;opencv_mcc;general;opencv_optflow;general;opencv_phase_unwrapping;general;opencv_plot;general;opencv_quality;general;opencv_rapid;general;opencv_reg;general;opencv_rgbd;general;opencv_saliency;general;opencv_shape;general;opencv_stereo;general;opencv_structured_light;general;opencv_superres;general;opencv_surface_matching;general;opencv_text;general;opencv_tracking;general;opencv_videostab;general;opencv_viz;general;opencv_wechat_qrcode;general;opencv_ximgproc;general;opencv_xobjdetect;general;opencv_xphoto;general;/usr/local/cuda-12.6/lib64/libcudart_static.a;general;dl;general;/usr/lib/aarch64-linux-gnu/librt.a;general;nvinfer;general;nvinfer_plugin;general;nvonnxparser;general;fmt::fmt; + +//Value Computed by CMake +armor_yolo_detect_SOURCE_DIR:STATIC=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +//The directory containing a CMake configuration file for builtin_interfaces. +builtin_interfaces_DIR:PATH=/opt/ros/humble/share/builtin_interfaces/cmake + +//The directory containing a CMake configuration file for class_loader. +class_loader_DIR:PATH=/opt/ros/humble/share/class_loader/cmake + +//The directory containing a CMake configuration file for composition_interfaces. +composition_interfaces_DIR:PATH=/opt/ros/humble/share/composition_interfaces/cmake + +//The directory containing a CMake configuration file for console_bridge. +console_bridge_DIR:PATH=/usr/lib/aarch64-linux-gnu/console_bridge/cmake + +//The directory containing a CMake configuration file for cv_bridge. +cv_bridge_DIR:PATH=/opt/ros/humble/share/cv_bridge/cmake + +//The directory containing a CMake configuration file for eigen3_cmake_module. +eigen3_cmake_module_DIR:PATH=/opt/ros/humble/share/eigen3_cmake_module/cmake + +//The directory containing a CMake configuration file for eigen. +eigen_DIR:PATH=eigen_DIR-NOTFOUND + +//The directory containing a CMake configuration file for fastcdr. +fastcdr_DIR:PATH=/opt/ros/humble/lib/cmake/fastcdr + +//The directory containing a CMake configuration file for fastrtps. +fastrtps_DIR:PATH=/opt/ros/humble/share/fastrtps/cmake + +//The directory containing a CMake configuration file for fastrtps_cmake_module. +fastrtps_cmake_module_DIR:PATH=/opt/ros/humble/share/fastrtps_cmake_module/cmake + +//The directory containing a CMake configuration file for fmt. +fmt_DIR:PATH=/usr/lib/aarch64-linux-gnu/cmake/fmt + +//The directory containing a CMake configuration file for foonathan_memory. +foonathan_memory_DIR:PATH=/opt/ros/humble/lib/foonathan_memory/cmake + +//The directory containing a CMake configuration file for geometry_msgs. +geometry_msgs_DIR:PATH=/opt/ros/humble/share/geometry_msgs/cmake + +//The directory containing a CMake configuration file for image_transport. +image_transport_DIR:PATH=/opt/ros/humble/share/image_transport/cmake + +//The directory containing a CMake configuration file for libstatistics_collector. +libstatistics_collector_DIR:PATH=/opt/ros/humble/share/libstatistics_collector/cmake + +//The directory containing a CMake configuration file for libyaml_vendor. +libyaml_vendor_DIR:PATH=/opt/ros/humble/share/libyaml_vendor/cmake + +//The directory containing a CMake configuration file for message_filters. +message_filters_DIR:PATH=/opt/ros/humble/share/message_filters/cmake + +//The directory containing a CMake configuration file for orocos_kdl. +orocos_kdl_DIR:PATH=/usr/lib/aarch64-linux-gnu/cmake/orocos_kdl + +//Path to a library. +orocos_kdl_LIBRARY:FILEPATH=/usr/lib/aarch64-linux-gnu/liborocos-kdl.so + +//The directory containing a CMake configuration file for orocos_kdl_vendor. +orocos_kdl_vendor_DIR:PATH=/opt/ros/humble/share/orocos_kdl_vendor/cmake + +//Path to a library. +pkgcfg_lib__OPENSSL_crypto:FILEPATH=/usr/lib/aarch64-linux-gnu/libcrypto.so + +//Path to a library. +pkgcfg_lib__OPENSSL_ssl:FILEPATH=/usr/lib/aarch64-linux-gnu/libssl.so + +//The directory containing a CMake configuration file for pluginlib. +pluginlib_DIR:PATH=/opt/ros/humble/share/pluginlib/cmake + +//The directory containing a CMake configuration file for rcl. +rcl_DIR:PATH=/opt/ros/humble/share/rcl/cmake + +//The directory containing a CMake configuration file for rcl_action. +rcl_action_DIR:PATH=/opt/ros/humble/share/rcl_action/cmake + +//The directory containing a CMake configuration file for rcl_interfaces. +rcl_interfaces_DIR:PATH=/opt/ros/humble/share/rcl_interfaces/cmake + +//The directory containing a CMake configuration file for rcl_logging_interface. +rcl_logging_interface_DIR:PATH=/opt/ros/humble/share/rcl_logging_interface/cmake + +//The directory containing a CMake configuration file for rcl_logging_spdlog. +rcl_logging_spdlog_DIR:PATH=/opt/ros/humble/share/rcl_logging_spdlog/cmake + +//The directory containing a CMake configuration file for rcl_yaml_param_parser. +rcl_yaml_param_parser_DIR:PATH=/opt/ros/humble/share/rcl_yaml_param_parser/cmake + +//The directory containing a CMake configuration file for rclcpp. +rclcpp_DIR:PATH=/opt/ros/humble/share/rclcpp/cmake + +//The directory containing a CMake configuration file for rclcpp_action. +rclcpp_action_DIR:PATH=/opt/ros/humble/share/rclcpp_action/cmake + +//The directory containing a CMake configuration file for rclcpp_components. +rclcpp_components_DIR:PATH=/opt/ros/humble/share/rclcpp_components/cmake + +//The directory containing a CMake configuration file for rcpputils. +rcpputils_DIR:PATH=/opt/ros/humble/share/rcpputils/cmake + +//The directory containing a CMake configuration file for rcutils. +rcutils_DIR:PATH=/opt/ros/humble/share/rcutils/cmake + +//The directory containing a CMake configuration file for rm_interfaces. +rm_interfaces_DIR:PATH=rm_interfaces_DIR-NOTFOUND + +//The directory containing a CMake configuration file for rm_utils. +rm_utils_DIR:PATH=rm_utils_DIR-NOTFOUND + +//The directory containing a CMake configuration file for rmw. +rmw_DIR:PATH=/opt/ros/humble/share/rmw/cmake + +//The directory containing a CMake configuration file for rmw_dds_common. +rmw_dds_common_DIR:PATH=/opt/ros/humble/share/rmw_dds_common/cmake + +//The directory containing a CMake configuration file for rmw_fastrtps_cpp. +rmw_fastrtps_cpp_DIR:PATH=/opt/ros/humble/share/rmw_fastrtps_cpp/cmake + +//The directory containing a CMake configuration file for rmw_fastrtps_shared_cpp. +rmw_fastrtps_shared_cpp_DIR:PATH=/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake + +//The directory containing a CMake configuration file for rmw_implementation. +rmw_implementation_DIR:PATH=/opt/ros/humble/share/rmw_implementation/cmake + +//The directory containing a CMake configuration file for rmw_implementation_cmake. +rmw_implementation_cmake_DIR:PATH=/opt/ros/humble/share/rmw_implementation_cmake/cmake + +//The directory containing a CMake configuration file for rosgraph_msgs. +rosgraph_msgs_DIR:PATH=/opt/ros/humble/share/rosgraph_msgs/cmake + +//The directory containing a CMake configuration file for rosidl_adapter. +rosidl_adapter_DIR:PATH=/opt/ros/humble/share/rosidl_adapter/cmake + +//The directory containing a CMake configuration file for rosidl_cmake. +rosidl_cmake_DIR:PATH=/opt/ros/humble/share/rosidl_cmake/cmake + +//The directory containing a CMake configuration file for rosidl_default_runtime. +rosidl_default_runtime_DIR:PATH=/opt/ros/humble/share/rosidl_default_runtime/cmake + +//The directory containing a CMake configuration file for rosidl_generator_c. +rosidl_generator_c_DIR:PATH=/opt/ros/humble/share/rosidl_generator_c/cmake + +//The directory containing a CMake configuration file for rosidl_generator_cpp. +rosidl_generator_cpp_DIR:PATH=/opt/ros/humble/share/rosidl_generator_cpp/cmake + +//The directory containing a CMake configuration file for rosidl_runtime_c. +rosidl_runtime_c_DIR:PATH=/opt/ros/humble/share/rosidl_runtime_c/cmake + +//The directory containing a CMake configuration file for rosidl_runtime_cpp. +rosidl_runtime_cpp_DIR:PATH=/opt/ros/humble/share/rosidl_runtime_cpp/cmake + +//The directory containing a CMake configuration file for rosidl_typesupport_c. +rosidl_typesupport_c_DIR:PATH=/opt/ros/humble/share/rosidl_typesupport_c/cmake + +//The directory containing a CMake configuration file for rosidl_typesupport_cpp. +rosidl_typesupport_cpp_DIR:PATH=/opt/ros/humble/share/rosidl_typesupport_cpp/cmake + +//The directory containing a CMake configuration file for rosidl_typesupport_fastrtps_c. +rosidl_typesupport_fastrtps_c_DIR:PATH=/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake + +//The directory containing a CMake configuration file for rosidl_typesupport_fastrtps_cpp. +rosidl_typesupport_fastrtps_cpp_DIR:PATH=/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake + +//The directory containing a CMake configuration file for rosidl_typesupport_interface. +rosidl_typesupport_interface_DIR:PATH=/opt/ros/humble/share/rosidl_typesupport_interface/cmake + +//The directory containing a CMake configuration file for rosidl_typesupport_introspection_c. +rosidl_typesupport_introspection_c_DIR:PATH=/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake + +//The directory containing a CMake configuration file for rosidl_typesupport_introspection_cpp. +rosidl_typesupport_introspection_cpp_DIR:PATH=/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake + +//The directory containing a CMake configuration file for sensor_msgs. +sensor_msgs_DIR:PATH=/opt/ros/humble/share/sensor_msgs/cmake + +//The directory containing a CMake configuration file for spdlog. +spdlog_DIR:PATH=/usr/lib/aarch64-linux-gnu/cmake/spdlog + +//The directory containing a CMake configuration file for spdlog_vendor. +spdlog_vendor_DIR:PATH=/opt/ros/humble/share/spdlog_vendor/cmake + +//The directory containing a CMake configuration file for statistics_msgs. +statistics_msgs_DIR:PATH=/opt/ros/humble/share/statistics_msgs/cmake + +//The directory containing a CMake configuration file for std_msgs. +std_msgs_DIR:PATH=/opt/ros/humble/share/std_msgs/cmake + +//The directory containing a CMake configuration file for std_srvs. +std_srvs_DIR:PATH=/opt/ros/humble/share/std_srvs/cmake + +//The directory containing a CMake configuration file for tf2. +tf2_DIR:PATH=/opt/ros/humble/share/tf2/cmake + +//The directory containing a CMake configuration file for tf2_geometry_msgs. +tf2_geometry_msgs_DIR:PATH=/opt/ros/humble/share/tf2_geometry_msgs/cmake + +//The directory containing a CMake configuration file for tf2_msgs. +tf2_msgs_DIR:PATH=/opt/ros/humble/share/tf2_msgs/cmake + +//The directory containing a CMake configuration file for tf2_ros. +tf2_ros_DIR:PATH=/opt/ros/humble/share/tf2_ros/cmake + +//The directory containing a CMake configuration file for tinyxml2_vendor. +tinyxml2_vendor_DIR:PATH=/opt/ros/humble/share/tinyxml2_vendor/cmake + +//The directory containing a CMake configuration file for tracetools. +tracetools_DIR:PATH=/opt/ros/humble/share/tracetools/cmake + +//The directory containing a CMake configuration file for unique_identifier_msgs. +unique_identifier_msgs_DIR:PATH=/opt/ros/humble/share/unique_identifier_msgs/cmake + +//The directory containing a CMake configuration file for vision_opencv. +vision_opencv_DIR:PATH=/opt/ros/humble/share/vision_opencv/cmake + +//The directory containing a CMake configuration file for visualization_msgs. +visualization_msgs_DIR:PATH=/opt/ros/humble/share/visualization_msgs/cmake + +//Path to a program. +xmllint_BIN:FILEPATH=/usr/bin/xmllint + +//The directory containing a CMake configuration file for yaml. +yaml_DIR:PATH=/opt/ros/humble/cmake + + +######################## +# INTERNAL cache entries +######################## + +//ADVANCED property for variable: CMAKE_ADDR2LINE +CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_AR +CMAKE_AR-ADVANCED:INTERNAL=1 +//This is the directory where this CMakeCache.txt was created +CMAKE_CACHEFILE_DIR:INTERNAL=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect +//Major version of cmake used to create the current loaded cache +CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3 +//Minor version of cmake used to create the current loaded cache +CMAKE_CACHE_MINOR_VERSION:INTERNAL=22 +//Patch version of cmake used to create the current loaded cache +CMAKE_CACHE_PATCH_VERSION:INTERNAL=1 +//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE +CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1 +//Path to CMake executable. +CMAKE_COMMAND:INTERNAL=/usr/bin/cmake +//Path to cpack program executable. +CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack +//Path to ctest program executable. +CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest +//ADVANCED property for variable: CMAKE_CXX_COMPILER +CMAKE_CXX_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR +CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB +CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS +CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG +CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL +CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE +CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO +CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER +CMAKE_C_COMPILER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_AR +CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB +CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS +CMAKE_C_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG +CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL +CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE +CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO +CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_DLLTOOL +CMAKE_DLLTOOL-ADVANCED:INTERNAL=1 +//Executable file format +CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS +CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG +CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL +CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE +CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS +CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1 +//Name of external makefile project generator. +CMAKE_EXTRA_GENERATOR:INTERNAL= +//Name of generator. +CMAKE_GENERATOR:INTERNAL=Unix Makefiles +//Generator instance identifier. +CMAKE_GENERATOR_INSTANCE:INTERNAL= +//Name of generator platform. +CMAKE_GENERATOR_PLATFORM:INTERNAL= +//Name of generator toolset. +CMAKE_GENERATOR_TOOLSET:INTERNAL= +//Test CMAKE_HAVE_LIBC_PTHREAD +CMAKE_HAVE_LIBC_PTHREAD:INTERNAL=1 +//Have include pthread.h +CMAKE_HAVE_PTHREAD_H:INTERNAL=1 +//Source directory with the top level CMakeLists.txt file for this +// project +CMAKE_HOME_DIRECTORY:INTERNAL=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect +//Install .so files without execute permission. +CMAKE_INSTALL_SO_NO_EXE:INTERNAL=1 +//ADVANCED property for variable: CMAKE_LINKER +CMAKE_LINKER-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MAKE_PROGRAM +CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS +CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG +CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL +CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE +CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_NM +CMAKE_NM-ADVANCED:INTERNAL=1 +//number of local generators +CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJCOPY +CMAKE_OBJCOPY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_OBJDUMP +CMAKE_OBJDUMP-ADVANCED:INTERNAL=1 +//Platform information initialized +CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_RANLIB +CMAKE_RANLIB-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_READELF +CMAKE_READELF-ADVANCED:INTERNAL=1 +//Path to CMake installation. +CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.22 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS +CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG +CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL +CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE +CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH +CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_SKIP_RPATH +CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS +CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG +CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL +CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE +CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO +CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CMAKE_STRIP +CMAKE_STRIP-ADVANCED:INTERNAL=1 +//uname command +CMAKE_UNAME:INTERNAL=/usr/bin/uname +//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE +CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_64_BIT_DEVICE_CODE +CUDA_64_BIT_DEVICE_CODE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE +CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_BUILD_CUBIN +CUDA_BUILD_CUBIN-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_BUILD_EMULATION +CUDA_BUILD_EMULATION-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_CUDART_LIBRARY +CUDA_CUDART_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_CUDA_LIBRARY +CUDA_CUDA_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_GENERATED_OUTPUT_DIR +CUDA_GENERATED_OUTPUT_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_HOST_COMPILATION_CPP +CUDA_HOST_COMPILATION_CPP-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_NVCC_EXECUTABLE +CUDA_NVCC_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_NVCC_FLAGS +CUDA_NVCC_FLAGS-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_NVCC_FLAGS_DEBUG +CUDA_NVCC_FLAGS_DEBUG-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_NVCC_FLAGS_MINSIZEREL +CUDA_NVCC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_NVCC_FLAGS_RELEASE +CUDA_NVCC_FLAGS_RELEASE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_NVCC_FLAGS_RELWITHDEBINFO +CUDA_NVCC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_OpenCL_LIBRARY +CUDA_OpenCL_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_PROPAGATE_HOST_FLAGS +CUDA_PROPAGATE_HOST_FLAGS-ADVANCED:INTERNAL=1 +//This is the value of the last time CUDA_SDK_ROOT_DIR was set +// successfully. +CUDA_SDK_ROOT_DIR_INTERNAL:INTERNAL=CUDA_SDK_ROOT_DIR-NOTFOUND +//ADVANCED property for variable: CUDA_SEPARABLE_COMPILATION +CUDA_SEPARABLE_COMPILATION-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_TOOLKIT_INCLUDE +CUDA_TOOLKIT_INCLUDE-ADVANCED:INTERNAL=1 +//This is the value of the last time CUDA_TOOLKIT_ROOT_DIR was +// set successfully. +CUDA_TOOLKIT_ROOT_DIR_INTERNAL:INTERNAL=/usr/local/cuda-12.6 +//This is the value of the last time CUDA_TOOLKIT_TARGET_DIR was +// set successfully. +CUDA_TOOLKIT_TARGET_DIR_INTERNAL:INTERNAL=/usr/local/cuda-12.6 +//ADVANCED property for variable: CUDA_VERBOSE_BUILD +CUDA_VERBOSE_BUILD-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_VERSION +CUDA_VERSION-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_cublas_LIBRARY +CUDA_cublas_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_cudadevrt_LIBRARY +CUDA_cudadevrt_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_cudart_static_LIBRARY +CUDA_cudart_static_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_cufft_LIBRARY +CUDA_cufft_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_cupti_LIBRARY +CUDA_cupti_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_curand_LIBRARY +CUDA_curand_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_cusolver_LIBRARY +CUDA_cusolver_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_cusparse_LIBRARY +CUDA_cusparse_LIBRARY-ADVANCED:INTERNAL=1 +//Location of make2cmake.cmake +CUDA_make2cmake:INTERNAL=/usr/share/cmake-3.22/Modules/FindCUDA/make2cmake.cmake +//ADVANCED property for variable: CUDA_nppc_LIBRARY +CUDA_nppc_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppial_LIBRARY +CUDA_nppial_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppicc_LIBRARY +CUDA_nppicc_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppidei_LIBRARY +CUDA_nppidei_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppif_LIBRARY +CUDA_nppif_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppig_LIBRARY +CUDA_nppig_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppim_LIBRARY +CUDA_nppim_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppist_LIBRARY +CUDA_nppist_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppisu_LIBRARY +CUDA_nppisu_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nppitc_LIBRARY +CUDA_nppitc_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_npps_LIBRARY +CUDA_npps_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: CUDA_nvToolsExt_LIBRARY +CUDA_nvToolsExt_LIBRARY-ADVANCED:INTERNAL=1 +//Location of parse_cubin.cmake +CUDA_parse_cubin:INTERNAL=/usr/share/cmake-3.22/Modules/FindCUDA/parse_cubin.cmake +//Location of run_nvcc.cmake +CUDA_run_nvcc:INTERNAL=/usr/share/cmake-3.22/Modules/FindCUDA/run_nvcc.cmake +//Details about finding CUDA +FIND_PACKAGE_MESSAGE_DETAILS_CUDA:INTERNAL=[/usr/local/cuda-12.6][/usr/local/cuda-12.6/bin/nvcc][/usr/local/cuda-12.6/include][/usr/local/cuda-12.6/lib64/libcudart_static.a][v12.6()] +//Details about finding Eigen3 +FIND_PACKAGE_MESSAGE_DETAILS_Eigen3:INTERNAL=[1][v3.4.0()] +//Details about finding FastRTPS +FIND_PACKAGE_MESSAGE_DETAILS_FastRTPS:INTERNAL=[/opt/ros/humble/include][/opt/ros/humble/lib/libfastrtps.so;/opt/ros/humble/lib/libfastcdr.so][v()] +//Details about finding OpenCV +FIND_PACKAGE_MESSAGE_DETAILS_OpenCV:INTERNAL=[/usr][v4.5.4()] +//Details about finding OpenSSL +FIND_PACKAGE_MESSAGE_DETAILS_OpenSSL:INTERNAL=[/usr/lib/aarch64-linux-gnu/libcrypto.so][/usr/include][c ][v3.0.2()] +//Details about finding Python3 +FIND_PACKAGE_MESSAGE_DETAILS_Python3:INTERNAL=[/usr/bin/python3][cfound components: Interpreter ][v3.10.12()] +//Details about finding Threads +FIND_PACKAGE_MESSAGE_DETAILS_Threads:INTERNAL=[TRUE][v()] +//ADVANCED property for variable: OPENSSL_CRYPTO_LIBRARY +OPENSSL_CRYPTO_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: OPENSSL_INCLUDE_DIR +OPENSSL_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: OPENSSL_SSL_LIBRARY +OPENSSL_SSL_LIBRARY-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: PKG_CONFIG_ARGN +PKG_CONFIG_ARGN-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: PKG_CONFIG_EXECUTABLE +PKG_CONFIG_EXECUTABLE-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: TINYXML2_INCLUDE_DIR +TINYXML2_INCLUDE_DIR-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: TINYXML2_LIBRARY +TINYXML2_LIBRARY-ADVANCED:INTERNAL=1 +_OPENSSL_CFLAGS:INTERNAL= +_OPENSSL_CFLAGS_I:INTERNAL= +_OPENSSL_CFLAGS_OTHER:INTERNAL= +_OPENSSL_FOUND:INTERNAL=1 +_OPENSSL_INCLUDEDIR:INTERNAL=/usr/include +_OPENSSL_INCLUDE_DIRS:INTERNAL= +_OPENSSL_LDFLAGS:INTERNAL=-L/usr/lib/aarch64-linux-gnu;-lssl;-lcrypto +_OPENSSL_LDFLAGS_OTHER:INTERNAL= +_OPENSSL_LIBDIR:INTERNAL=/usr/lib/aarch64-linux-gnu +_OPENSSL_LIBRARIES:INTERNAL=ssl;crypto +_OPENSSL_LIBRARY_DIRS:INTERNAL=/usr/lib/aarch64-linux-gnu +_OPENSSL_LIBS:INTERNAL= +_OPENSSL_LIBS_L:INTERNAL= +_OPENSSL_LIBS_OTHER:INTERNAL= +_OPENSSL_LIBS_PATHS:INTERNAL= +_OPENSSL_MODULE_NAME:INTERNAL=openssl +_OPENSSL_PREFIX:INTERNAL=/usr +_OPENSSL_STATIC_CFLAGS:INTERNAL= +_OPENSSL_STATIC_CFLAGS_I:INTERNAL= +_OPENSSL_STATIC_CFLAGS_OTHER:INTERNAL= +_OPENSSL_STATIC_INCLUDE_DIRS:INTERNAL= +_OPENSSL_STATIC_LDFLAGS:INTERNAL=-L/usr/lib/aarch64-linux-gnu;-lssl;-lcrypto;-ldl;-pthread +_OPENSSL_STATIC_LDFLAGS_OTHER:INTERNAL=-pthread +_OPENSSL_STATIC_LIBDIR:INTERNAL= +_OPENSSL_STATIC_LIBRARIES:INTERNAL=ssl;crypto;dl +_OPENSSL_STATIC_LIBRARY_DIRS:INTERNAL=/usr/lib/aarch64-linux-gnu +_OPENSSL_STATIC_LIBS:INTERNAL= +_OPENSSL_STATIC_LIBS_L:INTERNAL= +_OPENSSL_STATIC_LIBS_OTHER:INTERNAL= +_OPENSSL_STATIC_LIBS_PATHS:INTERNAL= +_OPENSSL_VERSION:INTERNAL=3.0.2 +_OPENSSL_openssl_INCLUDEDIR:INTERNAL= +_OPENSSL_openssl_LIBDIR:INTERNAL= +_OPENSSL_openssl_PREFIX:INTERNAL= +_OPENSSL_openssl_VERSION:INTERNAL= +_Python3_EXECUTABLE:INTERNAL=/usr/bin/python3 +//Python3 Properties +_Python3_INTERPRETER_PROPERTIES:INTERNAL=Python;3;10;12;64;;cpython-310-aarch64-linux-gnu;/usr/lib/python3.10;/usr/lib/python3.10;/usr/lib/python3/dist-packages;/usr/lib/python3/dist-packages +_Python3_INTERPRETER_SIGNATURE:INTERNAL=0f3e53742e142b1d9e50e4ca5b901dd8 +//Index for unique symlink install targets +__AMENT_CMAKE_SYMLINK_INSTALL_TARGETS_INDEX:INTERNAL=3 +__pkg_config_arguments__OPENSSL:INTERNAL=QUIET;openssl +__pkg_config_checked__OPENSSL:INTERNAL=1 +//ADVANCED property for variable: pkgcfg_lib__OPENSSL_crypto +pkgcfg_lib__OPENSSL_crypto-ADVANCED:INTERNAL=1 +//ADVANCED property for variable: pkgcfg_lib__OPENSSL_ssl +pkgcfg_lib__OPENSSL_ssl-ADVANCED:INTERNAL=1 +prefix_result:INTERNAL=/usr/lib/aarch64-linux-gnu + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeCCompiler.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeCCompiler.cmake new file mode 100644 index 0000000..0c0b1de --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeCCompiler.cmake @@ -0,0 +1,72 @@ +set(CMAKE_C_COMPILER "/usr/bin/cc") +set(CMAKE_C_COMPILER_ARG1 "") +set(CMAKE_C_COMPILER_ID "GNU") +set(CMAKE_C_COMPILER_VERSION "11.4.0") +set(CMAKE_C_COMPILER_VERSION_INTERNAL "") +set(CMAKE_C_COMPILER_WRAPPER "") +set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "17") +set(CMAKE_C_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert;c_std_17;c_std_23") +set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes") +set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros") +set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert") +set(CMAKE_C17_COMPILE_FEATURES "c_std_17") +set(CMAKE_C23_COMPILE_FEATURES "c_std_23") + +set(CMAKE_C_PLATFORM_ID "Linux") +set(CMAKE_C_SIMULATE_ID "") +set(CMAKE_C_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_C_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-11") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCC 1) +set(CMAKE_C_COMPILER_LOADED 1) +set(CMAKE_C_COMPILER_WORKS TRUE) +set(CMAKE_C_ABI_COMPILED TRUE) + +set(CMAKE_C_COMPILER_ENV_VAR "CC") + +set(CMAKE_C_COMPILER_ID_RUN 1) +set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m) +set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC) +set(CMAKE_C_LINKER_PREFERENCE 10) + +# Save compiler ABI information. +set(CMAKE_C_SIZEOF_DATA_PTR "8") +set(CMAKE_C_COMPILER_ABI "ELF") +set(CMAKE_C_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_C_LIBRARY_ARCHITECTURE "aarch64-linux-gnu") + +if(CMAKE_C_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_C_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}") +endif() + +if(CMAKE_C_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu") +endif() + +set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_C_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include") +set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s") +set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib") +set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake new file mode 100644 index 0000000..f59b84f --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake @@ -0,0 +1,83 @@ +set(CMAKE_CXX_COMPILER "/usr/bin/c++") +set(CMAKE_CXX_COMPILER_ARG1 "") +set(CMAKE_CXX_COMPILER_ID "GNU") +set(CMAKE_CXX_COMPILER_VERSION "11.4.0") +set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "") +set(CMAKE_CXX_COMPILER_WRAPPER "") +set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "17") +set(CMAKE_CXX_EXTENSIONS_COMPUTED_DEFAULT "ON") +set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20;cxx_std_23") +set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters") +set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates") +set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates") +set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17") +set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20") +set(CMAKE_CXX23_COMPILE_FEATURES "cxx_std_23") + +set(CMAKE_CXX_PLATFORM_ID "Linux") +set(CMAKE_CXX_SIMULATE_ID "") +set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "") +set(CMAKE_CXX_SIMULATE_VERSION "") + + + + +set(CMAKE_AR "/usr/bin/ar") +set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-11") +set(CMAKE_RANLIB "/usr/bin/ranlib") +set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-11") +set(CMAKE_LINKER "/usr/bin/ld") +set(CMAKE_MT "") +set(CMAKE_COMPILER_IS_GNUCXX 1) +set(CMAKE_CXX_COMPILER_LOADED 1) +set(CMAKE_CXX_COMPILER_WORKS TRUE) +set(CMAKE_CXX_ABI_COMPILED TRUE) + +set(CMAKE_CXX_COMPILER_ENV_VAR "CXX") + +set(CMAKE_CXX_COMPILER_ID_RUN 1) +set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;mpp;CPP;ixx;cppm) +set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC) + +foreach (lang C OBJC OBJCXX) + if (CMAKE_${lang}_COMPILER_ID_RUN) + foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS) + list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension}) + endforeach() + endif() +endforeach() + +set(CMAKE_CXX_LINKER_PREFERENCE 30) +set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1) + +# Save compiler ABI information. +set(CMAKE_CXX_SIZEOF_DATA_PTR "8") +set(CMAKE_CXX_COMPILER_ABI "ELF") +set(CMAKE_CXX_BYTE_ORDER "LITTLE_ENDIAN") +set(CMAKE_CXX_LIBRARY_ARCHITECTURE "aarch64-linux-gnu") + +if(CMAKE_CXX_SIZEOF_DATA_PTR) + set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}") +endif() + +if(CMAKE_CXX_COMPILER_ABI) + set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}") +endif() + +if(CMAKE_CXX_LIBRARY_ARCHITECTURE) + set(CMAKE_LIBRARY_ARCHITECTURE "aarch64-linux-gnu") +endif() + +set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "") +if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX) + set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}") +endif() + + + + + +set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/11;/usr/include/aarch64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include") +set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc") +set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib") +set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin new file mode 100755 index 0000000..b32aa4a Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_C.bin differ diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin new file mode 100755 index 0000000..13721a3 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin differ diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeSystem.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeSystem.cmake new file mode 100644 index 0000000..ac29dec --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CMakeSystem.cmake @@ -0,0 +1,15 @@ +set(CMAKE_HOST_SYSTEM "Linux-5.15.148-tegra") +set(CMAKE_HOST_SYSTEM_NAME "Linux") +set(CMAKE_HOST_SYSTEM_VERSION "5.15.148-tegra") +set(CMAKE_HOST_SYSTEM_PROCESSOR "aarch64") + + + +set(CMAKE_SYSTEM "Linux-5.15.148-tegra") +set(CMAKE_SYSTEM_NAME "Linux") +set(CMAKE_SYSTEM_VERSION "5.15.148-tegra") +set(CMAKE_SYSTEM_PROCESSOR "aarch64") + +set(CMAKE_CROSSCOMPILING "FALSE") + +set(CMAKE_SYSTEM_LOADED 1) diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdC/CMakeCCompilerId.c b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdC/CMakeCCompilerId.c new file mode 100644 index 0000000..41b99d7 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdC/CMakeCCompilerId.c @@ -0,0 +1,803 @@ +#ifdef __cplusplus +# error "A C++ compiler has been selected for C." +#endif + +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#if defined(__CLASSIC_C__) +/* cv-qualifiers did not exist in K&R C */ +# define const +# define volatile +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_C) +# define COMPILER_ID "SunPro" +# if __SUNPRO_C >= 0x5100 + /* __SUNPRO_C = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF) +# endif + +#elif defined(__HP_cc) +# define COMPILER_ID "HP" + /* __HP_cc = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100) + +#elif defined(__DECC) +# define COMPILER_ID "Compaq" + /* __DECC_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000) + +#elif defined(__IBMC__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800 +# define COMPILER_ID "XL" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMC__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__TINYC__) +# define COMPILER_ID "TinyCC" + +#elif defined(__BCC__) +# define COMPILER_ID "Bruce" + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) +# define COMPILER_ID "GNU" +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + +#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC) +# define COMPILER_ID "SDCC" +# if defined(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR) +# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR) +# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH) +# else + /* SDCC = VRP */ +# define COMPILER_VERSION_MAJOR DEC(SDCC/100) +# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10) +# define COMPILER_VERSION_PATCH DEC(SDCC % 10) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if !defined(__STDC__) && !defined(__clang__) +# if defined(_MSC_VER) || defined(__ibmxl__) || defined(__IBMC__) +# define C_VERSION "90" +# else +# define C_VERSION +# endif +#elif __STDC_VERSION__ > 201710L +# define C_VERSION "23" +#elif __STDC_VERSION__ >= 201710L +# define C_VERSION "17" +#elif __STDC_VERSION__ >= 201000L +# define C_VERSION "11" +#elif __STDC_VERSION__ >= 199901L +# define C_VERSION "99" +#else +# define C_VERSION "90" +#endif +const char* info_language_standard_default = + "INFO" ":" "standard_default[" C_VERSION "]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ +#if (defined(__clang__) || defined(__GNUC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) && !defined(_MSC_VER) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +#ifdef ID_VOID_MAIN +void main() {} +#else +# if defined(__CLASSIC_C__) +int main(argc, argv) int argc; char *argv[]; +# else +int main(int argc, char* argv[]) +# endif +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; + require += info_arch[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} +#endif diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdC/a.out b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdC/a.out new file mode 100755 index 0000000..a1c1e99 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdC/a.out differ diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp new file mode 100644 index 0000000..25c62a8 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp @@ -0,0 +1,791 @@ +/* This source file must have a .cpp extension so that all C++ compilers + recognize the extension without flags. Borland does not know .cxx for + example. */ +#ifndef __cplusplus +# error "A C compiler has been selected for C++." +#endif + +#if !defined(__has_include) +/* If the compiler does not have __has_include, pretend the answer is + always no. */ +# define __has_include(x) 0 +#endif + + +/* Version number components: V=Version, R=Revision, P=Patch + Version date components: YYYY=Year, MM=Month, DD=Day */ + +#if defined(__COMO__) +# define COMPILER_ID "Comeau" + /* __COMO_VERSION__ = VRR */ +# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100) +# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100) + +#elif defined(__INTEL_COMPILER) || defined(__ICC) +# define COMPILER_ID "Intel" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# if defined(__GNUC__) +# define SIMULATE_ID "GNU" +# endif + /* __INTEL_COMPILER = VRP prior to 2021, and then VVVV for 2021 and later, + except that a few beta releases use the old format with V=2021. */ +# if __INTEL_COMPILER < 2021 || __INTEL_COMPILER == 202110 || __INTEL_COMPILER == 202111 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) +# if defined(__INTEL_COMPILER_UPDATE) +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE) +# else +# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10) +# endif +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER) +# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER_UPDATE) + /* The third version component from --version is an update index, + but no macro is provided for it. */ +# define COMPILER_VERSION_PATCH DEC(0) +# endif +# if defined(__INTEL_COMPILER_BUILD_DATE) + /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */ +# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE) +# endif +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +# elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif (defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER) +# define COMPILER_ID "IntelLLVM" +#if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +#endif +#if defined(__GNUC__) +# define SIMULATE_ID "GNU" +#endif +/* __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and + * later. Look for 6 digit vs. 8 digit version number to decide encoding. + * VVVV is no smaller than the current year when a version is released. + */ +#if __INTEL_LLVM_COMPILER < 1000000L +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +#else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +#endif +#if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +#endif +#if defined(__GNUC__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUC__) +#elif defined(__GNUG__) +# define SIMULATE_VERSION_MAJOR DEC(__GNUG__) +#endif +#if defined(__GNUC_MINOR__) +# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__) +#endif +#if defined(__GNUC_PATCHLEVEL__) +# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +#endif + +#elif defined(__PATHCC__) +# define COMPILER_ID "PathScale" +# define COMPILER_VERSION_MAJOR DEC(__PATHCC__) +# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__) +# if defined(__PATHCC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__) +# endif + +#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__) +# define COMPILER_ID "Embarcadero" +# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF) +# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF) +# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF) + +#elif defined(__BORLANDC__) +# define COMPILER_ID "Borland" + /* __BORLANDC__ = 0xVRR */ +# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8) +# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF) + +#elif defined(__WATCOMC__) && __WATCOMC__ < 1200 +# define COMPILER_ID "Watcom" + /* __WATCOMC__ = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__WATCOMC__) +# define COMPILER_ID "OpenWatcom" + /* __WATCOMC__ = VVRP + 1100 */ +# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100) +# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10) +# if (__WATCOMC__ % 10) > 0 +# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10) +# endif + +#elif defined(__SUNPRO_CC) +# define COMPILER_ID "SunPro" +# if __SUNPRO_CC >= 0x5100 + /* __SUNPRO_CC = 0xVRRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# else + /* __SUNPRO_CC = 0xVRP */ +# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8) +# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF) +# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF) +# endif + +#elif defined(__HP_aCC) +# define COMPILER_ID "HP" + /* __HP_aCC = VVRRPP */ +# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000) +# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100) + +#elif defined(__DECCXX) +# define COMPILER_ID "Compaq" + /* __DECCXX_VER = VVRRTPPPP */ +# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000) +# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100) +# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000) + +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) +# define COMPILER_ID "zOS" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__ibmxl__) && defined(__clang__) +# define COMPILER_ID "XLClang" +# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__) +# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__) +# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__) +# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__) + + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800 +# define COMPILER_ID "XL" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800 +# define COMPILER_ID "VisualAge" + /* __IBMCPP__ = VRP */ +# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10) + +#elif defined(__NVCOMPILER) +# define COMPILER_ID "NVHPC" +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# endif + +#elif defined(__PGI) +# define COMPILER_ID "PGI" +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# if defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif + +#elif defined(_CRAYC) +# define COMPILER_ID "Cray" +# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR) +# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR) + +#elif defined(__TI_COMPILER_VERSION__) +# define COMPILER_ID "TI" + /* __TI_COMPILER_VERSION__ = VVVRRRPPP */ +# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000) +# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000) +# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000) + +#elif defined(__CLANG_FUJITSU) +# define COMPILER_ID "FujitsuClang" +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# define COMPILER_VERSION_INTERNAL_STR __clang_version__ + + +#elif defined(__FUJITSU) +# define COMPILER_ID "Fujitsu" +# if defined(__FCC_version__) +# define COMPILER_VERSION __FCC_version__ +# elif defined(__FCC_major__) +# define COMPILER_VERSION_MAJOR DEC(__FCC_major__) +# define COMPILER_VERSION_MINOR DEC(__FCC_minor__) +# define COMPILER_VERSION_PATCH DEC(__FCC_patchlevel__) +# endif +# if defined(__fcc_version) +# define COMPILER_VERSION_INTERNAL DEC(__fcc_version) +# elif defined(__FCC_VERSION) +# define COMPILER_VERSION_INTERNAL DEC(__FCC_VERSION) +# endif + + +#elif defined(__ghs__) +# define COMPILER_ID "GHS" +/* __GHS_VERSION_NUMBER = VVVVRP */ +# ifdef __GHS_VERSION_NUMBER +# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100) +# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10) +# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10) +# endif + +#elif defined(__SCO_VERSION__) +# define COMPILER_ID "SCO" + +#elif defined(__ARMCC_VERSION) && !defined(__clang__) +# define COMPILER_ID "ARMCC" +#if __ARMCC_VERSION >= 1000000 + /* __ARMCC_VERSION = VRRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#else + /* __ARMCC_VERSION = VRPPPP */ + # define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000) + # define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10) + # define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000) +#endif + + +#elif defined(__clang__) && defined(__apple_build_version__) +# define COMPILER_ID "AppleClang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif +# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__) + +#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION) +# define COMPILER_ID "ARMClang" + # define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000) + # define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100) + # define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000) +# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION) + +#elif defined(__clang__) +# define COMPILER_ID "Clang" +# if defined(_MSC_VER) +# define SIMULATE_ID "MSVC" +# endif +# define COMPILER_VERSION_MAJOR DEC(__clang_major__) +# define COMPILER_VERSION_MINOR DEC(__clang_minor__) +# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__) +# if defined(_MSC_VER) + /* _MSC_VER = VVRR */ +# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100) +# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100) +# endif + +#elif defined(__GNUC__) || defined(__GNUG__) +# define COMPILER_ID "GNU" +# if defined(__GNUC__) +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# else +# define COMPILER_VERSION_MAJOR DEC(__GNUG__) +# endif +# if defined(__GNUC_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# endif +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif + +#elif defined(_MSC_VER) +# define COMPILER_ID "MSVC" + /* _MSC_VER = VVRR */ +# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100) +# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100) +# if defined(_MSC_FULL_VER) +# if _MSC_VER >= 1400 + /* _MSC_FULL_VER = VVRRPPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000) +# else + /* _MSC_FULL_VER = VVRRPPPP */ +# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000) +# endif +# endif +# if defined(_MSC_BUILD) +# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD) +# endif + +#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__) +# define COMPILER_ID "ADSP" +#if defined(__VISUALDSPVERSION__) + /* __VISUALDSPVERSION__ = 0xVVRRPP00 */ +# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24) +# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF) +# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF) +#endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# define COMPILER_ID "IAR" +# if defined(__VER__) && defined(__ICCARM__) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000) +# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000) +# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__) || defined(__ICCSTM8__)) +# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100) +# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100)) +# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__) +# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__) +# endif + + +/* These compilers are either not known or too old to define an + identification macro. Try to identify the platform and guess that + it is the native compiler. */ +#elif defined(__hpux) || defined(__hpua) +# define COMPILER_ID "HP" + +#else /* unknown compiler */ +# define COMPILER_ID "" +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; +#ifdef SIMULATE_ID +char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; +#endif + +#ifdef __QNXNTO__ +char const* qnxnto = "INFO" ":" "qnxnto[]"; +#endif + +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) +char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]"; +#endif + +#define STRINGIFY_HELPER(X) #X +#define STRINGIFY(X) STRINGIFY_HELPER(X) + +/* Identify known platforms by name. */ +#if defined(__linux) || defined(__linux__) || defined(linux) +# define PLATFORM_ID "Linux" + +#elif defined(__MSYS__) +# define PLATFORM_ID "MSYS" + +#elif defined(__CYGWIN__) +# define PLATFORM_ID "Cygwin" + +#elif defined(__MINGW32__) +# define PLATFORM_ID "MinGW" + +#elif defined(__APPLE__) +# define PLATFORM_ID "Darwin" + +#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) +# define PLATFORM_ID "Windows" + +#elif defined(__FreeBSD__) || defined(__FreeBSD) +# define PLATFORM_ID "FreeBSD" + +#elif defined(__NetBSD__) || defined(__NetBSD) +# define PLATFORM_ID "NetBSD" + +#elif defined(__OpenBSD__) || defined(__OPENBSD) +# define PLATFORM_ID "OpenBSD" + +#elif defined(__sun) || defined(sun) +# define PLATFORM_ID "SunOS" + +#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) +# define PLATFORM_ID "AIX" + +#elif defined(__hpux) || defined(__hpux__) +# define PLATFORM_ID "HP-UX" + +#elif defined(__HAIKU__) +# define PLATFORM_ID "Haiku" + +#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) +# define PLATFORM_ID "BeOS" + +#elif defined(__QNX__) || defined(__QNXNTO__) +# define PLATFORM_ID "QNX" + +#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) +# define PLATFORM_ID "Tru64" + +#elif defined(__riscos) || defined(__riscos__) +# define PLATFORM_ID "RISCos" + +#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) +# define PLATFORM_ID "SINIX" + +#elif defined(__UNIX_SV__) +# define PLATFORM_ID "UNIX_SV" + +#elif defined(__bsdos__) +# define PLATFORM_ID "BSDOS" + +#elif defined(_MPRAS) || defined(MPRAS) +# define PLATFORM_ID "MP-RAS" + +#elif defined(__osf) || defined(__osf__) +# define PLATFORM_ID "OSF1" + +#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) +# define PLATFORM_ID "SCO_SV" + +#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) +# define PLATFORM_ID "ULTRIX" + +#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) +# define PLATFORM_ID "Xenix" + +#elif defined(__WATCOMC__) +# if defined(__LINUX__) +# define PLATFORM_ID "Linux" + +# elif defined(__DOS__) +# define PLATFORM_ID "DOS" + +# elif defined(__OS2__) +# define PLATFORM_ID "OS2" + +# elif defined(__WINDOWS__) +# define PLATFORM_ID "Windows3x" + +# elif defined(__VXWORKS__) +# define PLATFORM_ID "VxWorks" + +# else /* unknown platform */ +# define PLATFORM_ID +# endif + +#elif defined(__INTEGRITY) +# if defined(INT_178B) +# define PLATFORM_ID "Integrity178" + +# else /* regular Integrity */ +# define PLATFORM_ID "Integrity" +# endif + +#else /* unknown platform */ +# define PLATFORM_ID + +#endif + +/* For windows compilers MSVC and Intel we can determine + the architecture of the compiler being used. This is because + the compilers do not have flags that can change the architecture, + but rather depend on which compiler is being used +*/ +#if defined(_WIN32) && defined(_MSC_VER) +# if defined(_M_IA64) +# define ARCHITECTURE_ID "IA64" + +# elif defined(_M_ARM64EC) +# define ARCHITECTURE_ID "ARM64EC" + +# elif defined(_M_X64) || defined(_M_AMD64) +# define ARCHITECTURE_ID "x64" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# elif defined(_M_ARM64) +# define ARCHITECTURE_ID "ARM64" + +# elif defined(_M_ARM) +# if _M_ARM == 4 +# define ARCHITECTURE_ID "ARMV4I" +# elif _M_ARM == 5 +# define ARCHITECTURE_ID "ARMV5I" +# else +# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM) +# endif + +# elif defined(_M_MIPS) +# define ARCHITECTURE_ID "MIPS" + +# elif defined(_M_SH) +# define ARCHITECTURE_ID "SHx" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__WATCOMC__) +# if defined(_M_I86) +# define ARCHITECTURE_ID "I86" + +# elif defined(_M_IX86) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC) +# if defined(__ICCARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__ICCRX__) +# define ARCHITECTURE_ID "RX" + +# elif defined(__ICCRH850__) +# define ARCHITECTURE_ID "RH850" + +# elif defined(__ICCRL78__) +# define ARCHITECTURE_ID "RL78" + +# elif defined(__ICCRISCV__) +# define ARCHITECTURE_ID "RISCV" + +# elif defined(__ICCAVR__) +# define ARCHITECTURE_ID "AVR" + +# elif defined(__ICC430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__ICCV850__) +# define ARCHITECTURE_ID "V850" + +# elif defined(__ICC8051__) +# define ARCHITECTURE_ID "8051" + +# elif defined(__ICCSTM8__) +# define ARCHITECTURE_ID "STM8" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__ghs__) +# if defined(__PPC64__) +# define ARCHITECTURE_ID "PPC64" + +# elif defined(__ppc__) +# define ARCHITECTURE_ID "PPC" + +# elif defined(__ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__x86_64__) +# define ARCHITECTURE_ID "x64" + +# elif defined(__i386__) +# define ARCHITECTURE_ID "X86" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#elif defined(__TI_COMPILER_VERSION__) +# if defined(__TI_ARM__) +# define ARCHITECTURE_ID "ARM" + +# elif defined(__MSP430__) +# define ARCHITECTURE_ID "MSP430" + +# elif defined(__TMS320C28XX__) +# define ARCHITECTURE_ID "TMS320C28x" + +# elif defined(__TMS320C6X__) || defined(_TMS320C6X) +# define ARCHITECTURE_ID "TMS320C6x" + +# else /* unknown architecture */ +# define ARCHITECTURE_ID "" +# endif + +#else +# define ARCHITECTURE_ID +#endif + +/* Convert integer to decimal digit literals. */ +#define DEC(n) \ + ('0' + (((n) / 10000000)%10)), \ + ('0' + (((n) / 1000000)%10)), \ + ('0' + (((n) / 100000)%10)), \ + ('0' + (((n) / 10000)%10)), \ + ('0' + (((n) / 1000)%10)), \ + ('0' + (((n) / 100)%10)), \ + ('0' + (((n) / 10)%10)), \ + ('0' + ((n) % 10)) + +/* Convert integer to hex digit literals. */ +#define HEX(n) \ + ('0' + ((n)>>28 & 0xF)), \ + ('0' + ((n)>>24 & 0xF)), \ + ('0' + ((n)>>20 & 0xF)), \ + ('0' + ((n)>>16 & 0xF)), \ + ('0' + ((n)>>12 & 0xF)), \ + ('0' + ((n)>>8 & 0xF)), \ + ('0' + ((n)>>4 & 0xF)), \ + ('0' + ((n) & 0xF)) + +/* Construct a string literal encoding the version number. */ +#ifdef COMPILER_VERSION +char const* info_version = "INFO" ":" "compiler_version[" COMPILER_VERSION "]"; + +/* Construct a string literal encoding the version number components. */ +#elif defined(COMPILER_VERSION_MAJOR) +char const info_version[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[', + COMPILER_VERSION_MAJOR, +# ifdef COMPILER_VERSION_MINOR + '.', COMPILER_VERSION_MINOR, +# ifdef COMPILER_VERSION_PATCH + '.', COMPILER_VERSION_PATCH, +# ifdef COMPILER_VERSION_TWEAK + '.', COMPILER_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct a string literal encoding the internal version number. */ +#ifdef COMPILER_VERSION_INTERNAL +char const info_version_internal[] = { + 'I', 'N', 'F', 'O', ':', + 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_', + 'i','n','t','e','r','n','a','l','[', + COMPILER_VERSION_INTERNAL,']','\0'}; +#elif defined(COMPILER_VERSION_INTERNAL_STR) +char const* info_version_internal = "INFO" ":" "compiler_version_internal[" COMPILER_VERSION_INTERNAL_STR "]"; +#endif + +/* Construct a string literal encoding the version number components. */ +#ifdef SIMULATE_VERSION_MAJOR +char const info_simulate_version[] = { + 'I', 'N', 'F', 'O', ':', + 's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[', + SIMULATE_VERSION_MAJOR, +# ifdef SIMULATE_VERSION_MINOR + '.', SIMULATE_VERSION_MINOR, +# ifdef SIMULATE_VERSION_PATCH + '.', SIMULATE_VERSION_PATCH, +# ifdef SIMULATE_VERSION_TWEAK + '.', SIMULATE_VERSION_TWEAK, +# endif +# endif +# endif + ']','\0'}; +#endif + +/* Construct the string literal in pieces to prevent the source from + getting matched. Store it in a pointer rather than an array + because some compilers will just produce instructions to fill the + array rather than assigning a pointer to a static array. */ +char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]"; +char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]"; + + + +#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L +# if defined(__INTEL_CXX11_MODE__) +# if defined(__cpp_aggregate_nsdmi) +# define CXX_STD 201402L +# else +# define CXX_STD 201103L +# endif +# else +# define CXX_STD 199711L +# endif +#elif defined(_MSC_VER) && defined(_MSVC_LANG) +# define CXX_STD _MSVC_LANG +#else +# define CXX_STD __cplusplus +#endif + +const char* info_language_standard_default = "INFO" ":" "standard_default[" +#if CXX_STD > 202002L + "23" +#elif CXX_STD > 201703L + "20" +#elif CXX_STD >= 201703L + "17" +#elif CXX_STD >= 201402L + "14" +#elif CXX_STD >= 201103L + "11" +#else + "98" +#endif +"]"; + +const char* info_language_extensions_default = "INFO" ":" "extensions_default[" +/* !defined(_MSC_VER) to exclude Clang's MSVC compatibility mode. */ +#if (defined(__clang__) || defined(__GNUC__) || \ + defined(__TI_COMPILER_VERSION__)) && \ + !defined(__STRICT_ANSI__) && !defined(_MSC_VER) + "ON" +#else + "OFF" +#endif +"]"; + +/*--------------------------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + int require = 0; + require += info_compiler[argc]; + require += info_platform[argc]; +#ifdef COMPILER_VERSION_MAJOR + require += info_version[argc]; +#endif +#ifdef COMPILER_VERSION_INTERNAL + require += info_version_internal[argc]; +#endif +#ifdef SIMULATE_ID + require += info_simulate[argc]; +#endif +#ifdef SIMULATE_VERSION_MAJOR + require += info_simulate_version[argc]; +#endif +#if defined(__CRAYXT_COMPUTE_LINUX_TARGET) + require += info_cray[argc]; +#endif + require += info_language_standard_default[argc]; + require += info_language_extensions_default[argc]; + (void)argv; + return require; +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdCXX/a.out b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdCXX/a.out new file mode 100755 index 0000000..aa32546 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdCXX/a.out differ diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeDirectoryInformation.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeDirectoryInformation.cmake new file mode 100644 index 0000000..a032df3 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeDirectoryInformation.cmake @@ -0,0 +1,16 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# Relative path conversion top directories. +set(CMAKE_RELATIVE_PATH_TOP_SOURCE "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect") +set(CMAKE_RELATIVE_PATH_TOP_BINARY "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect") + +# Force unix paths in dependencies. +set(CMAKE_FORCE_UNIX_PATHS 1) + + +# The C and CXX include file regular expressions for this directory. +set(CMAKE_C_INCLUDE_REGEX_SCAN "^.*$") +set(CMAKE_C_INCLUDE_REGEX_COMPLAIN "^$") +set(CMAKE_CXX_INCLUDE_REGEX_SCAN ${CMAKE_C_INCLUDE_REGEX_SCAN}) +set(CMAKE_CXX_INCLUDE_REGEX_COMPLAIN ${CMAKE_C_INCLUDE_REGEX_COMPLAIN}) diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeOutput.log b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeOutput.log new file mode 100644 index 0000000..e5816e2 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeOutput.log @@ -0,0 +1,485 @@ +The system is: Linux - 5.15.148-tegra - aarch64 +Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded. +Compiler: /usr/bin/cc +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out" + +The C compiler identification is GNU, found in "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdC/a.out" + +Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. +Compiler: /usr/bin/c++ +Build flags: +Id flags: + +The output was: +0 + + +Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out" + +The CXX compiler identification is GNU, found in "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/3.22.1/CompilerIdCXX/a.out" + +Detecting C compiler ABI info compiled with the following output: +Change Dir: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_706ba/fast && /usr/bin/gmake -f CMakeFiles/cmTC_706ba.dir/build.make CMakeFiles/cmTC_706ba.dir/build +gmake[1]: Entering directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o +/usr/bin/cc -v -o CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c +Using built-in specs. +COLLECT_GCC=/usr/bin/cc +Target: aarch64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.3' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4 +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o' '-c' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_706ba.dir/' + /usr/lib/gcc/aarch64-linux-gnu/11/cc1 -quiet -v -imultiarch aarch64-linux-gnu /usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_706ba.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mlittle-endian -mabi=lp64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -o /tmp/ccx1Gkh8.s +GNU C17 (Ubuntu 11.4.0-1ubuntu1~22.04.3) version 11.4.0 (aarch64-linux-gnu) + compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring nonexistent directory "/usr/local/include/aarch64-linux-gnu" +ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/11/include-fixed" +ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/lib/gcc/aarch64-linux-gnu/11/include + /usr/local/include + /usr/include/aarch64-linux-gnu + /usr/include +End of search list. +GNU C17 (Ubuntu 11.4.0-1ubuntu1~22.04.3) version 11.4.0 (aarch64-linux-gnu) + compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: 44447769998af3517ef276c2696d65ed +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o' '-c' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_706ba.dir/' + as -v -EL -mabi=lp64 -o CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o /tmp/ccx1Gkh8.s +GNU assembler version 2.38 (aarch64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38 +COMPILER_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o' '-c' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.' +Linking C executable cmTC_706ba +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_706ba.dir/link.txt --verbose=1 +/usr/bin/cc -v CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o -o cmTC_706ba +Using built-in specs. +COLLECT_GCC=/usr/bin/cc +COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper +Target: aarch64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.3' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4 +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3) +COMPILER_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_706ba' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'cmTC_706ba.' + /usr/lib/gcc/aarch64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/aarch64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/cc25pahp.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr --hash-style=gnu --as-needed -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux --fix-cortex-a53-843419 -pie -z now -z relro -o cmTC_706ba /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o /usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/aarch64-linux-gnu/11 -L/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu -L/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib -L/lib/aarch64-linux-gnu -L/lib/../lib -L/usr/lib/aarch64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/aarch64-linux-gnu/11/../../.. CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_706ba' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'cmTC_706ba.' +gmake[1]: Leaving directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp' + + + +Parsed C implicit include dir info from above output: rv=done + found start of include info + found start of implicit include info + add: [/usr/lib/gcc/aarch64-linux-gnu/11/include] + add: [/usr/local/include] + add: [/usr/include/aarch64-linux-gnu] + add: [/usr/include] + end of search list found + collapse include dir [/usr/lib/gcc/aarch64-linux-gnu/11/include] ==> [/usr/lib/gcc/aarch64-linux-gnu/11/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include/aarch64-linux-gnu] ==> [/usr/include/aarch64-linux-gnu] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include] + + +Parsed C implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_706ba/fast && /usr/bin/gmake -f CMakeFiles/cmTC_706ba.dir/build.make CMakeFiles/cmTC_706ba.dir/build] + ignore line: [gmake[1]: Entering directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp'] + ignore line: [Building C object CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o] + ignore line: [/usr/bin/cc -v -o CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o -c /usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [Target: aarch64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.3' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o' '-c' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_706ba.dir/'] + ignore line: [ /usr/lib/gcc/aarch64-linux-gnu/11/cc1 -quiet -v -imultiarch aarch64-linux-gnu /usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c -quiet -dumpdir CMakeFiles/cmTC_706ba.dir/ -dumpbase CMakeCCompilerABI.c.c -dumpbase-ext .c -mlittle-endian -mabi=lp64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -o /tmp/ccx1Gkh8.s] + ignore line: [GNU C17 (Ubuntu 11.4.0-1ubuntu1~22.04.3) version 11.4.0 (aarch64-linux-gnu)] + ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring nonexistent directory "/usr/local/include/aarch64-linux-gnu"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/11/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/lib/gcc/aarch64-linux-gnu/11/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include/aarch64-linux-gnu] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C17 (Ubuntu 11.4.0-1ubuntu1~22.04.3) version 11.4.0 (aarch64-linux-gnu)] + ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: 44447769998af3517ef276c2696d65ed] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o' '-c' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_706ba.dir/'] + ignore line: [ as -v -EL -mabi=lp64 -o CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o /tmp/ccx1Gkh8.s] + ignore line: [GNU assembler version 2.38 (aarch64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38] + ignore line: [COMPILER_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o' '-c' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.'] + ignore line: [Linking C executable cmTC_706ba] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_706ba.dir/link.txt --verbose=1] + ignore line: [/usr/bin/cc -v CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o -o cmTC_706ba ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/cc] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper] + ignore line: [Target: aarch64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.3' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_706ba' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'cmTC_706ba.'] + link line: [ /usr/lib/gcc/aarch64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/aarch64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/cc25pahp.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr --hash-style=gnu --as-needed -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux --fix-cortex-a53-843419 -pie -z now -z relro -o cmTC_706ba /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o /usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/aarch64-linux-gnu/11 -L/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu -L/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib -L/lib/aarch64-linux-gnu -L/lib/../lib -L/usr/lib/aarch64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/aarch64-linux-gnu/11/../../.. CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/aarch64-linux-gnu/11/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/cc25pahp.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib/ld-linux-aarch64.so.1] ==> ignore + arg [-X] ==> ignore + arg [-EL] ==> ignore + arg [-maarch64linux] ==> ignore + arg [--fix-cortex-a53-843419] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_706ba] ==> ignore + arg [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o] + arg [-L/usr/lib/gcc/aarch64-linux-gnu/11] ==> dir [/usr/lib/gcc/aarch64-linux-gnu/11] + arg [-L/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu] ==> dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu] + arg [-L/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib] ==> dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib] + arg [-L/lib/aarch64-linux-gnu] ==> dir [/lib/aarch64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/aarch64-linux-gnu] ==> dir [/usr/lib/aarch64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/aarch64-linux-gnu/11/../../..] ==> dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../..] + arg [CMakeFiles/cmTC_706ba.dir/CMakeCCompilerABI.c.o] ==> ignore + arg [-lgcc] ==> lib [gcc] + arg [--push-state] ==> ignore + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--pop-state] ==> ignore + arg [-lc] ==> lib [c] + arg [-lgcc] ==> lib [gcc] + arg [--push-state] ==> ignore + arg [--as-needed] ==> ignore + arg [-lgcc_s] ==> lib [gcc_s] + arg [--pop-state] ==> ignore + arg [/usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o] + collapse obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o] ==> [/usr/lib/aarch64-linux-gnu/Scrt1.o] + collapse obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o] ==> [/usr/lib/aarch64-linux-gnu/crti.o] + collapse obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o] ==> [/usr/lib/aarch64-linux-gnu/crtn.o] + collapse library dir [/usr/lib/gcc/aarch64-linux-gnu/11] ==> [/usr/lib/gcc/aarch64-linux-gnu/11] + collapse library dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu] ==> [/usr/lib/aarch64-linux-gnu] + collapse library dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/aarch64-linux-gnu] ==> [/lib/aarch64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/aarch64-linux-gnu] ==> [/usr/lib/aarch64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../..] ==> [/usr/lib] + implicit libs: [gcc;gcc_s;c;gcc;gcc_s] + implicit objs: [/usr/lib/aarch64-linux-gnu/Scrt1.o;/usr/lib/aarch64-linux-gnu/crti.o;/usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o;/usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o;/usr/lib/aarch64-linux-gnu/crtn.o] + implicit dirs: [/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib] + implicit fwks: [] + + +Detecting CXX compiler ABI info compiled with the following output: +Change Dir: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_42c38/fast && /usr/bin/gmake -f CMakeFiles/cmTC_42c38.dir/build.make CMakeFiles/cmTC_42c38.dir/build +gmake[1]: Entering directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp' +Building CXX object CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o +/usr/bin/c++ -v -o CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp +Using built-in specs. +COLLECT_GCC=/usr/bin/c++ +Target: aarch64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.3' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4 +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3) +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_42c38.dir/' + /usr/lib/gcc/aarch64-linux-gnu/11/cc1plus -quiet -v -imultiarch aarch64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_42c38.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mlittle-endian -mabi=lp64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -o /tmp/cceAI70l.s +GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04.3) version 11.4.0 (aarch64-linux-gnu) + compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +ignoring duplicate directory "/usr/include/aarch64-linux-gnu/c++/11" +ignoring nonexistent directory "/usr/local/include/aarch64-linux-gnu" +ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/11/include-fixed" +ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/include" +#include "..." search starts here: +#include <...> search starts here: + /usr/include/c++/11 + /usr/include/aarch64-linux-gnu/c++/11 + /usr/include/c++/11/backward + /usr/lib/gcc/aarch64-linux-gnu/11/include + /usr/local/include + /usr/include/aarch64-linux-gnu + /usr/include +End of search list. +GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04.3) version 11.4.0 (aarch64-linux-gnu) + compiled by GNU C version 11.4.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP + +GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 +Compiler executable checksum: 1ec2e7097ef542eddc6fe6fb48e7bad4 +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_42c38.dir/' + as -v -EL -mabi=lp64 -o CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o /tmp/cceAI70l.s +GNU assembler version 2.38 (aarch64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38 +COMPILER_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.' +Linking CXX executable cmTC_42c38 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_42c38.dir/link.txt --verbose=1 +/usr/bin/c++ -v CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_42c38 +Using built-in specs. +COLLECT_GCC=/usr/bin/c++ +COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper +Target: aarch64-linux-gnu +Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.3' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4 +Thread model: posix +Supported LTO compression algorithms: zlib zstd +gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3) +COMPILER_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/ +LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../:/lib/:/usr/lib/ +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_42c38' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'cmTC_42c38.' + /usr/lib/gcc/aarch64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/aarch64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccb6eoYN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu --as-needed -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux --fix-cortex-a53-843419 -pie -z now -z relro -o cmTC_42c38 /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o /usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/aarch64-linux-gnu/11 -L/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu -L/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib -L/lib/aarch64-linux-gnu -L/lib/../lib -L/usr/lib/aarch64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/aarch64-linux-gnu/11/../../.. CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o +COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_42c38' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'cmTC_42c38.' +gmake[1]: Leaving directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp' + + + +Parsed CXX implicit include dir info from above output: rv=done + found start of include info + found start of implicit include info + add: [/usr/include/c++/11] + add: [/usr/include/aarch64-linux-gnu/c++/11] + add: [/usr/include/c++/11/backward] + add: [/usr/lib/gcc/aarch64-linux-gnu/11/include] + add: [/usr/local/include] + add: [/usr/include/aarch64-linux-gnu] + add: [/usr/include] + end of search list found + collapse include dir [/usr/include/c++/11] ==> [/usr/include/c++/11] + collapse include dir [/usr/include/aarch64-linux-gnu/c++/11] ==> [/usr/include/aarch64-linux-gnu/c++/11] + collapse include dir [/usr/include/c++/11/backward] ==> [/usr/include/c++/11/backward] + collapse include dir [/usr/lib/gcc/aarch64-linux-gnu/11/include] ==> [/usr/lib/gcc/aarch64-linux-gnu/11/include] + collapse include dir [/usr/local/include] ==> [/usr/local/include] + collapse include dir [/usr/include/aarch64-linux-gnu] ==> [/usr/include/aarch64-linux-gnu] + collapse include dir [/usr/include] ==> [/usr/include] + implicit include dirs: [/usr/include/c++/11;/usr/include/aarch64-linux-gnu/c++/11;/usr/include/c++/11/backward;/usr/lib/gcc/aarch64-linux-gnu/11/include;/usr/local/include;/usr/include/aarch64-linux-gnu;/usr/include] + + +Parsed CXX implicit link information from above output: + link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)] + ignore line: [Change Dir: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp] + ignore line: [] + ignore line: [Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_42c38/fast && /usr/bin/gmake -f CMakeFiles/cmTC_42c38.dir/build.make CMakeFiles/cmTC_42c38.dir/build] + ignore line: [gmake[1]: Entering directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp'] + ignore line: [Building CXX object CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o] + ignore line: [/usr/bin/c++ -v -o CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o -c /usr/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [Target: aarch64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.3' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3) ] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_42c38.dir/'] + ignore line: [ /usr/lib/gcc/aarch64-linux-gnu/11/cc1plus -quiet -v -imultiarch aarch64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpdir CMakeFiles/cmTC_42c38.dir/ -dumpbase CMakeCXXCompilerABI.cpp.cpp -dumpbase-ext .cpp -mlittle-endian -mabi=lp64 -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -o /tmp/cceAI70l.s] + ignore line: [GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04.3) version 11.4.0 (aarch64-linux-gnu)] + ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [ignoring duplicate directory "/usr/include/aarch64-linux-gnu/c++/11"] + ignore line: [ignoring nonexistent directory "/usr/local/include/aarch64-linux-gnu"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/11/include-fixed"] + ignore line: [ignoring nonexistent directory "/usr/lib/gcc/aarch64-linux-gnu/11/../../../../aarch64-linux-gnu/include"] + ignore line: [#include "..." search starts here:] + ignore line: [#include <...> search starts here:] + ignore line: [ /usr/include/c++/11] + ignore line: [ /usr/include/aarch64-linux-gnu/c++/11] + ignore line: [ /usr/include/c++/11/backward] + ignore line: [ /usr/lib/gcc/aarch64-linux-gnu/11/include] + ignore line: [ /usr/local/include] + ignore line: [ /usr/include/aarch64-linux-gnu] + ignore line: [ /usr/include] + ignore line: [End of search list.] + ignore line: [GNU C++17 (Ubuntu 11.4.0-1ubuntu1~22.04.3) version 11.4.0 (aarch64-linux-gnu)] + ignore line: [ compiled by GNU C version 11.4.0 GMP version 6.2.1 MPFR version 4.1.0 MPC version 1.2.1 isl version isl-0.24-GMP] + ignore line: [] + ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072] + ignore line: [Compiler executable checksum: 1ec2e7097ef542eddc6fe6fb48e7bad4] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_42c38.dir/'] + ignore line: [ as -v -EL -mabi=lp64 -o CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o /tmp/cceAI70l.s] + ignore line: [GNU assembler version 2.38 (aarch64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38] + ignore line: [COMPILER_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.'] + ignore line: [Linking CXX executable cmTC_42c38] + ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_42c38.dir/link.txt --verbose=1] + ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_42c38 ] + ignore line: [Using built-in specs.] + ignore line: [COLLECT_GCC=/usr/bin/c++] + ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper] + ignore line: [Target: aarch64-linux-gnu] + ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04.3' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c ada c++ go d fortran objc obj-c++ m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=4] + ignore line: [Thread model: posix] + ignore line: [Supported LTO compression algorithms: zlib zstd] + ignore line: [gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04.3) ] + ignore line: [COMPILER_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/] + ignore line: [LIBRARY_PATH=/usr/lib/gcc/aarch64-linux-gnu/11/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib/:/lib/aarch64-linux-gnu/:/lib/../lib/:/usr/lib/aarch64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/aarch64-linux-gnu/11/../../../:/lib/:/usr/lib/] + ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_42c38' '-shared-libgcc' '-mlittle-endian' '-mabi=lp64' '-dumpdir' 'cmTC_42c38.'] + link line: [ /usr/lib/gcc/aarch64-linux-gnu/11/collect2 -plugin /usr/lib/gcc/aarch64-linux-gnu/11/liblto_plugin.so -plugin-opt=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper -plugin-opt=-fresolution=/tmp/ccb6eoYN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr --hash-style=gnu --as-needed -dynamic-linker /lib/ld-linux-aarch64.so.1 -X -EL -maarch64linux --fix-cortex-a53-843419 -pie -z now -z relro -o cmTC_42c38 /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o /usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o -L/usr/lib/gcc/aarch64-linux-gnu/11 -L/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu -L/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib -L/lib/aarch64-linux-gnu -L/lib/../lib -L/usr/lib/aarch64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/aarch64-linux-gnu/11/../../.. CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o /usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/collect2] ==> ignore + arg [-plugin] ==> ignore + arg [/usr/lib/gcc/aarch64-linux-gnu/11/liblto_plugin.so] ==> ignore + arg [-plugin-opt=/usr/lib/gcc/aarch64-linux-gnu/11/lto-wrapper] ==> ignore + arg [-plugin-opt=-fresolution=/tmp/ccb6eoYN.res] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [-plugin-opt=-pass-through=-lc] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore + arg [-plugin-opt=-pass-through=-lgcc] ==> ignore + arg [--build-id] ==> ignore + arg [--eh-frame-hdr] ==> ignore + arg [--hash-style=gnu] ==> ignore + arg [--as-needed] ==> ignore + arg [-dynamic-linker] ==> ignore + arg [/lib/ld-linux-aarch64.so.1] ==> ignore + arg [-X] ==> ignore + arg [-EL] ==> ignore + arg [-maarch64linux] ==> ignore + arg [--fix-cortex-a53-843419] ==> ignore + arg [-pie] ==> ignore + arg [-znow] ==> ignore + arg [-zrelro] ==> ignore + arg [-o] ==> ignore + arg [cmTC_42c38] ==> ignore + arg [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o] + arg [-L/usr/lib/gcc/aarch64-linux-gnu/11] ==> dir [/usr/lib/gcc/aarch64-linux-gnu/11] + arg [-L/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu] ==> dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu] + arg [-L/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib] ==> dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib] + arg [-L/lib/aarch64-linux-gnu] ==> dir [/lib/aarch64-linux-gnu] + arg [-L/lib/../lib] ==> dir [/lib/../lib] + arg [-L/usr/lib/aarch64-linux-gnu] ==> dir [/usr/lib/aarch64-linux-gnu] + arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib] + arg [-L/usr/lib/gcc/aarch64-linux-gnu/11/../../..] ==> dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../..] + arg [CMakeFiles/cmTC_42c38.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore + arg [-lstdc++] ==> lib [stdc++] + arg [-lm] ==> lib [m] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [-lc] ==> lib [c] + arg [-lgcc_s] ==> lib [gcc_s] + arg [-lgcc] ==> lib [gcc] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o] + arg [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o] ==> obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o] + collapse obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/Scrt1.o] ==> [/usr/lib/aarch64-linux-gnu/Scrt1.o] + collapse obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crti.o] ==> [/usr/lib/aarch64-linux-gnu/crti.o] + collapse obj [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu/crtn.o] ==> [/usr/lib/aarch64-linux-gnu/crtn.o] + collapse library dir [/usr/lib/gcc/aarch64-linux-gnu/11] ==> [/usr/lib/gcc/aarch64-linux-gnu/11] + collapse library dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../../aarch64-linux-gnu] ==> [/usr/lib/aarch64-linux-gnu] + collapse library dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../../../lib] ==> [/usr/lib] + collapse library dir [/lib/aarch64-linux-gnu] ==> [/lib/aarch64-linux-gnu] + collapse library dir [/lib/../lib] ==> [/lib] + collapse library dir [/usr/lib/aarch64-linux-gnu] ==> [/usr/lib/aarch64-linux-gnu] + collapse library dir [/usr/lib/../lib] ==> [/usr/lib] + collapse library dir [/usr/lib/gcc/aarch64-linux-gnu/11/../../..] ==> [/usr/lib] + implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc] + implicit objs: [/usr/lib/aarch64-linux-gnu/Scrt1.o;/usr/lib/aarch64-linux-gnu/crti.o;/usr/lib/gcc/aarch64-linux-gnu/11/crtbeginS.o;/usr/lib/gcc/aarch64-linux-gnu/11/crtendS.o;/usr/lib/aarch64-linux-gnu/crtn.o] + implicit dirs: [/usr/lib/gcc/aarch64-linux-gnu/11;/usr/lib/aarch64-linux-gnu;/usr/lib;/lib/aarch64-linux-gnu;/lib] + implicit fwks: [] + + +Determining if the include file pthread.h exists passed with the following output: +Change Dir: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_f8885/fast && /usr/bin/gmake -f CMakeFiles/cmTC_f8885.dir/build.make CMakeFiles/cmTC_f8885.dir/build +gmake[1]: Entering directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_f8885.dir/CheckIncludeFile.c.o +/usr/bin/cc -o CMakeFiles/cmTC_f8885.dir/CheckIncludeFile.c.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp/CheckIncludeFile.c +Linking C executable cmTC_f8885 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f8885.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_f8885.dir/CheckIncludeFile.c.o -o cmTC_f8885 +gmake[1]: Leaving directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp' + + + +Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD succeeded with the following output: +Change Dir: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp + +Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_63354/fast && /usr/bin/gmake -f CMakeFiles/cmTC_63354.dir/build.make CMakeFiles/cmTC_63354.dir/build +gmake[1]: Entering directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp' +Building C object CMakeFiles/cmTC_63354.dir/src.c.o +/usr/bin/cc -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_63354.dir/src.c.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp/src.c +Linking C executable cmTC_63354 +/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_63354.dir/link.txt --verbose=1 +/usr/bin/cc CMakeFiles/cmTC_63354.dir/src.c.o -o cmTC_63354 +gmake[1]: Leaving directory '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeTmp' + + +Source file was: +#include + +static void* test_func(void* data) +{ + return data; +} + +int main(void) +{ + pthread_t thread; + pthread_create(&thread, NULL, test_func, NULL); + pthread_detach(thread); + pthread_cancel(thread); + pthread_join(thread, NULL); + pthread_atfork(NULL, NULL, NULL); + pthread_exit(NULL); + + return 0; +} + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeRuleHashes.txt b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeRuleHashes.txt new file mode 100644 index 0000000..4e021bc --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/CMakeRuleHashes.txt @@ -0,0 +1,2 @@ +# Hashes of file build rules. +097f62fc9f3acf6f7485c8604b0a928b CMakeFiles/armor_yolo_detect_uninstall diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Makefile.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Makefile.cmake new file mode 100644 index 0000000..61ab124 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Makefile.cmake @@ -0,0 +1,1111 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# The generator used is: +set(CMAKE_DEPENDS_GENERATOR "Unix Makefiles") + +# The top level Makefile was generated from the following files: +set(CMAKE_MAKEFILE_DEPENDS + "CMakeCache.txt" + "../../CMakeLists.txt" + "CMakeFiles/3.22.1/CMakeCCompiler.cmake" + "CMakeFiles/3.22.1/CMakeCXXCompiler.cmake" + "CMakeFiles/3.22.1/CMakeSystem.cmake" + "ament_cmake_core/package.cmake" + "ament_cmake_export_dependencies/ament_cmake_export_dependencies-extras.cmake" + "ament_cmake_export_include_directories/ament_cmake_export_include_directories-extras.cmake" + "ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake" + "ament_cmake_package_templates/templates.cmake" + "rclcpp_components/node_main_configured_armor_yolo_detector_node.cpp.in" + "../../package.xml" + "/opt/ros/humble/cmake/yamlConfig.cmake" + "/opt/ros/humble/cmake/yamlConfigVersion.cmake" + "/opt/ros/humble/cmake/yamlTargets-none.cmake" + "/opt/ros/humble/cmake/yamlTargets.cmake" + "/opt/ros/humble/lib/cmake/fastcdr/fastcdr-config-version.cmake" + "/opt/ros/humble/lib/cmake/fastcdr/fastcdr-config.cmake" + "/opt/ros/humble/lib/cmake/fastcdr/fastcdr-dynamic-targets-none.cmake" + "/opt/ros/humble/lib/cmake/fastcdr/fastcdr-dynamic-targets.cmake" + "/opt/ros/humble/lib/foonathan_memory/cmake/foonathan_memory-config-none.cmake" + "/opt/ros/humble/lib/foonathan_memory/cmake/foonathan_memory-config-version.cmake" + "/opt/ros/humble/lib/foonathan_memory/cmake/foonathan_memory-config.cmake" + "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/environment_hook/library_path.sh" + "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.bash.in" + "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.sh.in" + "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.zsh.in" + "/opt/ros/humble/share/action_msgs/cmake/action_msgsConfig-version.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgsConfig.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/action_msgs/cmake/action_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/action_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/action_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/action_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/action_msgs/cmake/export_action_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/action_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/action_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/action_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig.cmake" + "/opt/ros/humble/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_executable.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_gmock.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_gtest.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_add_library.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_find_build_dependencies.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_find_test_dependencies.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_generate_code.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_package.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_auto-extras.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_autoConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_auto/cmake/ament_cmake_autoConfig.cmake" + "/opt/ros/humble/share/ament_cmake_copyright/cmake/ament_cmake_copyright-extras.cmake" + "/opt/ros/humble/share/ament_cmake_copyright/cmake/ament_cmake_copyrightConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_copyright/cmake/ament_cmake_copyrightConfig.cmake" + "/opt/ros/humble/share/ament_cmake_copyright/cmake/ament_copyright.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_core-extras.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_coreConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_environment-extras.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_environment_hooks-extras.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_index-extras.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_package_templates-extras.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_symlink_install-extras.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_uninstall_target-extras.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/all.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_package.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_package_xml.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_register_extension.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/assert_file_exists.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/get_executable_path.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/list_append_unique.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/normalize_path.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/package_xml_2_cmake.py" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/python.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/stamp.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/string_ends_with.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/templates/nameConfig-version.cmake.in" + "/opt/ros/humble/share/ament_cmake_core/cmake/core/templates/nameConfig.cmake.in" + "/opt/ros/humble/share/ament_cmake_core/cmake/environment/ament_cmake_environment_package_hook.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/environment/ament_generate_environment.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/ament_cmake_environment_hooks_package_hook.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/ament_environment_hooks.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/ament_generate_package_environment.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh" + "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/environment/path.sh" + "/opt/ros/humble/share/ament_cmake_core/cmake/index/ament_cmake_index_package_hook.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/index/ament_index_get_prefix_path.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/index/ament_index_get_resource.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/index/ament_index_get_resources.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/index/ament_index_has_resource.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/index/ament_index_register_package.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/index/ament_index_register_resource.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py" + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install.cmake.in" + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_append_install_code.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_directory.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_files.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_programs.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_targets.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_uninstall_script.cmake.in" + "/opt/ros/humble/share/ament_cmake_core/cmake/symlink_install/install.cmake" + "/opt/ros/humble/share/ament_cmake_core/cmake/uninstall_target/ament_cmake_uninstall_target.cmake.in" + "/opt/ros/humble/share/ament_cmake_core/cmake/uninstall_target/ament_cmake_uninstall_target_append_uninstall_code.cmake" + "/opt/ros/humble/share/ament_cmake_cppcheck/cmake/ament_cmake_cppcheck-extras.cmake" + "/opt/ros/humble/share/ament_cmake_cppcheck/cmake/ament_cmake_cppcheckConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_cppcheck/cmake/ament_cmake_cppcheckConfig.cmake" + "/opt/ros/humble/share/ament_cmake_cppcheck/cmake/ament_cmake_cppcheck_lint_hook.cmake" + "/opt/ros/humble/share/ament_cmake_cppcheck/cmake/ament_cppcheck.cmake" + "/opt/ros/humble/share/ament_cmake_cpplint/cmake/ament_cmake_cpplint-extras.cmake" + "/opt/ros/humble/share/ament_cmake_cpplint/cmake/ament_cmake_cpplintConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_cpplint/cmake/ament_cmake_cpplintConfig.cmake" + "/opt/ros/humble/share/ament_cmake_cpplint/cmake/ament_cpplint.cmake" + "/opt/ros/humble/share/ament_cmake_export_definitions/cmake/ament_cmake_export_definitions-extras.cmake" + "/opt/ros/humble/share/ament_cmake_export_definitions/cmake/ament_cmake_export_definitionsConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_export_definitions/cmake/ament_cmake_export_definitionsConfig.cmake" + "/opt/ros/humble/share/ament_cmake_export_definitions/cmake/ament_export_definitions.cmake" + "/opt/ros/humble/share/ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies-extras.cmake.in" + "/opt/ros/humble/share/ament_cmake_export_dependencies/cmake/ament_cmake_export_dependenciesConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_export_dependencies/cmake/ament_cmake_export_dependenciesConfig.cmake" + "/opt/ros/humble/share/ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies_package_hook.cmake" + "/opt/ros/humble/share/ament_cmake_export_dependencies/cmake/ament_export_dependencies.cmake" + "/opt/ros/humble/share/ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake.in" + "/opt/ros/humble/share/ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directoriesConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directoriesConfig.cmake" + "/opt/ros/humble/share/ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories_package_hook.cmake" + "/opt/ros/humble/share/ament_cmake_export_include_directories/cmake/ament_export_include_directories.cmake" + "/opt/ros/humble/share/ament_cmake_export_interfaces/cmake/ament_cmake_export_interfaces-extras.cmake" + "/opt/ros/humble/share/ament_cmake_export_interfaces/cmake/ament_cmake_export_interfacesConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_export_interfaces/cmake/ament_cmake_export_interfacesConfig.cmake" + "/opt/ros/humble/share/ament_cmake_export_interfaces/cmake/ament_export_interfaces.cmake" + "/opt/ros/humble/share/ament_cmake_export_libraries/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/ament_cmake_export_libraries/cmake/ament_cmake_export_libraries-extras.cmake.in" + "/opt/ros/humble/share/ament_cmake_export_libraries/cmake/ament_cmake_export_librariesConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_export_libraries/cmake/ament_cmake_export_librariesConfig.cmake" + "/opt/ros/humble/share/ament_cmake_export_libraries/cmake/ament_cmake_export_libraries_package_hook.cmake" + "/opt/ros/humble/share/ament_cmake_export_libraries/cmake/ament_export_libraries.cmake" + "/opt/ros/humble/share/ament_cmake_export_libraries/cmake/ament_export_library_names.cmake" + "/opt/ros/humble/share/ament_cmake_export_link_flags/cmake/ament_cmake_export_link_flags-extras.cmake" + "/opt/ros/humble/share/ament_cmake_export_link_flags/cmake/ament_cmake_export_link_flagsConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_export_link_flags/cmake/ament_cmake_export_link_flagsConfig.cmake" + "/opt/ros/humble/share/ament_cmake_export_link_flags/cmake/ament_export_link_flags.cmake" + "/opt/ros/humble/share/ament_cmake_export_targets/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/ament_cmake_export_targets/cmake/ament_cmake_export_targetsConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_export_targets/cmake/ament_cmake_export_targetsConfig.cmake" + "/opt/ros/humble/share/ament_cmake_export_targets/cmake/ament_export_targets.cmake" + "/opt/ros/humble/share/ament_cmake_flake8/cmake/ament_cmake_flake8-extras.cmake" + "/opt/ros/humble/share/ament_cmake_flake8/cmake/ament_cmake_flake8Config-version.cmake" + "/opt/ros/humble/share/ament_cmake_flake8/cmake/ament_cmake_flake8Config.cmake" + "/opt/ros/humble/share/ament_cmake_flake8/cmake/ament_cmake_flake8_lint_hook.cmake" + "/opt/ros/humble/share/ament_cmake_flake8/cmake/ament_flake8.cmake" + "/opt/ros/humble/share/ament_cmake_gen_version_h/cmake/ament_cmake_gen_version_h-extras.cmake" + "/opt/ros/humble/share/ament_cmake_gen_version_h/cmake/ament_cmake_gen_version_h.cmake" + "/opt/ros/humble/share/ament_cmake_gen_version_h/cmake/ament_cmake_gen_version_hConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_gen_version_h/cmake/ament_cmake_gen_version_hConfig.cmake" + "/opt/ros/humble/share/ament_cmake_gen_version_h/cmake/ament_generate_version_header.cmake" + "/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest.cmake" + "/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_executable.cmake" + "/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_add_gtest_test.cmake" + "/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtest-extras.cmake" + "/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtestConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_cmake_gtestConfig.cmake" + "/opt/ros/humble/share/ament_cmake_gtest/cmake/ament_find_gtest.cmake" + "/opt/ros/humble/share/ament_cmake_include_directories/cmake/ament_cmake_include_directories-extras.cmake" + "/opt/ros/humble/share/ament_cmake_include_directories/cmake/ament_cmake_include_directoriesConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_include_directories/cmake/ament_cmake_include_directoriesConfig.cmake" + "/opt/ros/humble/share/ament_cmake_include_directories/cmake/ament_include_directories_order.cmake" + "/opt/ros/humble/share/ament_cmake_libraries/cmake/ament_cmake_libraries-extras.cmake" + "/opt/ros/humble/share/ament_cmake_libraries/cmake/ament_cmake_librariesConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_libraries/cmake/ament_cmake_librariesConfig.cmake" + "/opt/ros/humble/share/ament_cmake_libraries/cmake/ament_libraries_deduplicate.cmake" + "/opt/ros/humble/share/ament_cmake_lint_cmake/cmake/ament_cmake_lint_cmake-extras.cmake" + "/opt/ros/humble/share/ament_cmake_lint_cmake/cmake/ament_cmake_lint_cmakeConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_lint_cmake/cmake/ament_cmake_lint_cmakeConfig.cmake" + "/opt/ros/humble/share/ament_cmake_lint_cmake/cmake/ament_lint_cmake.cmake" + "/opt/ros/humble/share/ament_cmake_pep257/cmake/ament_cmake_pep257-extras.cmake" + "/opt/ros/humble/share/ament_cmake_pep257/cmake/ament_cmake_pep257Config-version.cmake" + "/opt/ros/humble/share/ament_cmake_pep257/cmake/ament_cmake_pep257Config.cmake" + "/opt/ros/humble/share/ament_cmake_pep257/cmake/ament_cmake_pep257_lint_hook.cmake" + "/opt/ros/humble/share/ament_cmake_pep257/cmake/ament_pep257.cmake" + "/opt/ros/humble/share/ament_cmake_python/cmake/ament_cmake_python-extras.cmake" + "/opt/ros/humble/share/ament_cmake_python/cmake/ament_cmake_pythonConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_python/cmake/ament_cmake_pythonConfig.cmake" + "/opt/ros/humble/share/ament_cmake_python/cmake/ament_get_python_install_dir.cmake" + "/opt/ros/humble/share/ament_cmake_python/cmake/ament_python_install_module.cmake" + "/opt/ros/humble/share/ament_cmake_python/cmake/ament_python_install_package.cmake" + "/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_cmake_target_dependencies-extras.cmake" + "/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_cmake_target_dependenciesConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_cmake_target_dependenciesConfig.cmake" + "/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_get_recursive_properties.cmake" + "/opt/ros/humble/share/ament_cmake_target_dependencies/cmake/ament_target_dependencies.cmake" + "/opt/ros/humble/share/ament_cmake_test/cmake/ament_add_test.cmake" + "/opt/ros/humble/share/ament_cmake_test/cmake/ament_add_test_label.cmake" + "/opt/ros/humble/share/ament_cmake_test/cmake/ament_cmake_test-extras.cmake" + "/opt/ros/humble/share/ament_cmake_test/cmake/ament_cmake_testConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_test/cmake/ament_cmake_testConfig.cmake" + "/opt/ros/humble/share/ament_cmake_uncrustify/cmake/ament_cmake_uncrustify-extras.cmake" + "/opt/ros/humble/share/ament_cmake_uncrustify/cmake/ament_cmake_uncrustifyConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_uncrustify/cmake/ament_cmake_uncrustifyConfig.cmake" + "/opt/ros/humble/share/ament_cmake_uncrustify/cmake/ament_uncrustify.cmake" + "/opt/ros/humble/share/ament_cmake_version/cmake/ament_cmake_version-extras.cmake" + "/opt/ros/humble/share/ament_cmake_version/cmake/ament_cmake_versionConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_version/cmake/ament_cmake_versionConfig.cmake" + "/opt/ros/humble/share/ament_cmake_version/cmake/ament_export_development_version_if_higher_than_manifest.cmake" + "/opt/ros/humble/share/ament_cmake_xmllint/cmake/ament_cmake_xmllint-extras.cmake" + "/opt/ros/humble/share/ament_cmake_xmllint/cmake/ament_cmake_xmllintConfig-version.cmake" + "/opt/ros/humble/share/ament_cmake_xmllint/cmake/ament_cmake_xmllintConfig.cmake" + "/opt/ros/humble/share/ament_cmake_xmllint/cmake/ament_cmake_xmllint_lint_hook.cmake" + "/opt/ros/humble/share/ament_cmake_xmllint/cmake/ament_xmllint.cmake" + "/opt/ros/humble/share/ament_index_cpp/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/ament_index_cpp/cmake/ament_index_cppConfig-version.cmake" + "/opt/ros/humble/share/ament_index_cpp/cmake/ament_index_cppConfig.cmake" + "/opt/ros/humble/share/ament_index_cpp/cmake/export_ament_index_cppExport-none.cmake" + "/opt/ros/humble/share/ament_index_cpp/cmake/export_ament_index_cppExport.cmake" + "/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto-extras.cmake" + "/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_autoConfig-version.cmake" + "/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_autoConfig.cmake" + "/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_find_test_dependencies.cmake" + "/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake" + "/opt/ros/humble/share/ament_lint_common/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/ament_lint_common/cmake/ament_lint_commonConfig-version.cmake" + "/opt/ros/humble/share/ament_lint_common/cmake/ament_lint_commonConfig.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfacesConfig-version.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfacesConfig.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfaces__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfaces__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfaces__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfaces__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfaces__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfaces__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfaces__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/builtin_interfaces__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/export_builtin_interfaces__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/builtin_interfaces/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/class_loader/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/class_loader/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/class_loader/cmake/class_loader-extras.cmake" + "/opt/ros/humble/share/class_loader/cmake/class_loaderConfig-version.cmake" + "/opt/ros/humble/share/class_loader/cmake/class_loaderConfig.cmake" + "/opt/ros/humble/share/class_loader/cmake/class_loaderExport-none.cmake" + "/opt/ros/humble/share/class_loader/cmake/class_loaderExport.cmake" + "/opt/ros/humble/share/class_loader/cmake/class_loader_hide_library_symbols.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfacesConfig-version.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfacesConfig.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfaces__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfaces__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfaces__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfaces__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfaces__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfaces__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfaces__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/composition_interfaces__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/export_composition_interfaces__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/composition_interfaces/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/cv_bridge/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/cv_bridge/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/cv_bridge/cmake/cv_bridge-extras.cmake" + "/opt/ros/humble/share/cv_bridge/cmake/cv_bridgeConfig-version.cmake" + "/opt/ros/humble/share/cv_bridge/cmake/cv_bridgeConfig.cmake" + "/opt/ros/humble/share/cv_bridge/cmake/export_cv_bridgeExport-none.cmake" + "/opt/ros/humble/share/cv_bridge/cmake/export_cv_bridgeExport.cmake" + "/opt/ros/humble/share/eigen3_cmake_module/cmake/Modules/FindEigen3.cmake" + "/opt/ros/humble/share/eigen3_cmake_module/cmake/eigen3_cmake_module-extras.cmake" + "/opt/ros/humble/share/eigen3_cmake_module/cmake/eigen3_cmake_moduleConfig-version.cmake" + "/opt/ros/humble/share/eigen3_cmake_module/cmake/eigen3_cmake_moduleConfig.cmake" + "/opt/ros/humble/share/fastrtps/cmake/fast-discovery-server-targets-none.cmake" + "/opt/ros/humble/share/fastrtps/cmake/fast-discovery-server-targets.cmake" + "/opt/ros/humble/share/fastrtps/cmake/fastrtps-config-version.cmake" + "/opt/ros/humble/share/fastrtps/cmake/fastrtps-config.cmake" + "/opt/ros/humble/share/fastrtps/cmake/fastrtps-dynamic-targets-none.cmake" + "/opt/ros/humble/share/fastrtps/cmake/fastrtps-dynamic-targets.cmake" + "/opt/ros/humble/share/fastrtps/cmake/optionparser-targets.cmake" + "/opt/ros/humble/share/fastrtps_cmake_module/cmake/Modules/FindFastRTPS.cmake" + "/opt/ros/humble/share/fastrtps_cmake_module/cmake/fastrtps_cmake_module-extras.cmake" + "/opt/ros/humble/share/fastrtps_cmake_module/cmake/fastrtps_cmake_moduleConfig-version.cmake" + "/opt/ros/humble/share/fastrtps_cmake_module/cmake/fastrtps_cmake_moduleConfig.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/export_geometry_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgsConfig-version.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgsConfig.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/geometry_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/geometry_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/image_transport/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/image_transport/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/image_transport/cmake/export_image_transportExport-none.cmake" + "/opt/ros/humble/share/image_transport/cmake/export_image_transportExport.cmake" + "/opt/ros/humble/share/image_transport/cmake/image_transportConfig-version.cmake" + "/opt/ros/humble/share/image_transport/cmake/image_transportConfig.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/libstatistics_collectorConfig-version.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/libstatistics_collectorConfig.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/libstatistics_collectorExport-none.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/libstatistics_collectorExport.cmake" + "/opt/ros/humble/share/libstatistics_collector/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/libyaml_vendor/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/libyaml_vendor/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/libyaml_vendor/cmake/libyaml_vendor-extras.cmake" + "/opt/ros/humble/share/libyaml_vendor/cmake/libyaml_vendorConfig-version.cmake" + "/opt/ros/humble/share/libyaml_vendor/cmake/libyaml_vendorConfig.cmake" + "/opt/ros/humble/share/message_filters/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/message_filters/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/message_filters/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/message_filters/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/message_filters/cmake/message_filtersConfig-version.cmake" + "/opt/ros/humble/share/message_filters/cmake/message_filtersConfig.cmake" + "/opt/ros/humble/share/message_filters/cmake/message_filtersExport-none.cmake" + "/opt/ros/humble/share/message_filters/cmake/message_filtersExport.cmake" + "/opt/ros/humble/share/orocos_kdl_vendor/cmake/orocos_kdl_vendor-extras.cmake" + "/opt/ros/humble/share/orocos_kdl_vendor/cmake/orocos_kdl_vendorConfig-version.cmake" + "/opt/ros/humble/share/orocos_kdl_vendor/cmake/orocos_kdl_vendorConfig.cmake" + "/opt/ros/humble/share/pluginlib/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/pluginlib/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/pluginlib/cmake/export_pluginlibExport.cmake" + "/opt/ros/humble/share/pluginlib/cmake/pluginlib-extras.cmake" + "/opt/ros/humble/share/pluginlib/cmake/pluginlibConfig-version.cmake" + "/opt/ros/humble/share/pluginlib/cmake/pluginlibConfig.cmake" + "/opt/ros/humble/share/pluginlib/cmake/pluginlib_enable_plugin_testing.cmake" + "/opt/ros/humble/share/pluginlib/cmake/pluginlib_export_plugin_description_file.cmake" + "/opt/ros/humble/share/pluginlib/cmake/pluginlib_package_hook.cmake" + "/opt/ros/humble/share/rcl/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rcl/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rcl/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rcl/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rcl/cmake/rcl-extras.cmake" + "/opt/ros/humble/share/rcl/cmake/rclConfig-version.cmake" + "/opt/ros/humble/share/rcl/cmake/rclConfig.cmake" + "/opt/ros/humble/share/rcl/cmake/rclExport-none.cmake" + "/opt/ros/humble/share/rcl/cmake/rclExport.cmake" + "/opt/ros/humble/share/rcl/cmake/rcl_set_symbol_visibility_hidden.cmake" + "/opt/ros/humble/share/rcl_action/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rcl_action/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rcl_action/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rcl_action/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rcl_action/cmake/rcl_actionConfig-version.cmake" + "/opt/ros/humble/share/rcl_action/cmake/rcl_actionConfig.cmake" + "/opt/ros/humble/share/rcl_action/cmake/rcl_actionExport-none.cmake" + "/opt/ros/humble/share/rcl_action/cmake/rcl_actionExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/export_rcl_interfaces__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfacesConfig-version.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfacesConfig.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfaces__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfaces__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfaces__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfaces__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfaces__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfaces__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfaces__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rcl_interfaces__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/rcl_interfaces/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/rcl_logging_interface/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rcl_logging_interface/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rcl_logging_interface/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rcl_logging_interface/cmake/rcl_logging_interfaceConfig-version.cmake" + "/opt/ros/humble/share/rcl_logging_interface/cmake/rcl_logging_interfaceConfig.cmake" + "/opt/ros/humble/share/rcl_logging_interface/cmake/rcl_logging_interfaceExport-none.cmake" + "/opt/ros/humble/share/rcl_logging_interface/cmake/rcl_logging_interfaceExport.cmake" + "/opt/ros/humble/share/rcl_logging_spdlog/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rcl_logging_spdlog/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rcl_logging_spdlog/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rcl_logging_spdlog/cmake/rcl_logging_spdlogConfig-version.cmake" + "/opt/ros/humble/share/rcl_logging_spdlog/cmake/rcl_logging_spdlogConfig.cmake" + "/opt/ros/humble/share/rcl_logging_spdlog/cmake/rcl_logging_spdlogExport-none.cmake" + "/opt/ros/humble/share/rcl_logging_spdlog/cmake/rcl_logging_spdlogExport.cmake" + "/opt/ros/humble/share/rcl_yaml_param_parser/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rcl_yaml_param_parser/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rcl_yaml_param_parser/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rcl_yaml_param_parser/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rcl_yaml_param_parser/cmake/rcl_yaml_param_parserConfig-version.cmake" + "/opt/ros/humble/share/rcl_yaml_param_parser/cmake/rcl_yaml_param_parserConfig.cmake" + "/opt/ros/humble/share/rcl_yaml_param_parser/cmake/rcl_yaml_param_parserExport-none.cmake" + "/opt/ros/humble/share/rcl_yaml_param_parser/cmake/rcl_yaml_param_parserExport.cmake" + "/opt/ros/humble/share/rclcpp/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rclcpp/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rclcpp/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rclcpp/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rclcpp/cmake/rclcppConfig-version.cmake" + "/opt/ros/humble/share/rclcpp/cmake/rclcppConfig.cmake" + "/opt/ros/humble/share/rclcpp/cmake/rclcppExport-none.cmake" + "/opt/ros/humble/share/rclcpp/cmake/rclcppExport.cmake" + "/opt/ros/humble/share/rclcpp_action/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rclcpp_action/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rclcpp_action/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rclcpp_action/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rclcpp_action/cmake/rclcpp_actionConfig-version.cmake" + "/opt/ros/humble/share/rclcpp_action/cmake/rclcpp_actionConfig.cmake" + "/opt/ros/humble/share/rclcpp_action/cmake/rclcpp_actionExport-none.cmake" + "/opt/ros/humble/share/rclcpp_action/cmake/rclcpp_actionExport.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/export_rclcpp_componentsExport-none.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/export_rclcpp_componentsExport.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/rclcpp_components-extras.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/rclcpp_componentsConfig-version.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/rclcpp_componentsConfig.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/rclcpp_components_package_hook.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/rclcpp_components_register_node.cmake" + "/opt/ros/humble/share/rclcpp_components/cmake/rclcpp_components_register_nodes.cmake" + "/opt/ros/humble/share/rclcpp_components/node_main.cpp.in" + "/opt/ros/humble/share/rcpputils/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rcpputils/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rcpputils/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rcpputils/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rcpputils/cmake/rcpputilsConfig-version.cmake" + "/opt/ros/humble/share/rcpputils/cmake/rcpputilsConfig.cmake" + "/opt/ros/humble/share/rcpputils/cmake/rcpputilsExport-none.cmake" + "/opt/ros/humble/share/rcpputils/cmake/rcpputilsExport.cmake" + "/opt/ros/humble/share/rcutils/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rcutils/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rcutils/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rcutils/cmake/ament_cmake_export_link_flags-extras.cmake" + "/opt/ros/humble/share/rcutils/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rcutils/cmake/rcutilsConfig-version.cmake" + "/opt/ros/humble/share/rcutils/cmake/rcutilsConfig.cmake" + "/opt/ros/humble/share/rcutils/cmake/rcutilsExport-none.cmake" + "/opt/ros/humble/share/rcutils/cmake/rcutilsExport.cmake" + "/opt/ros/humble/share/rmw/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rmw/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rmw/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rmw/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rmw/cmake/configure_rmw_library.cmake" + "/opt/ros/humble/share/rmw/cmake/get_rmw_typesupport.cmake" + "/opt/ros/humble/share/rmw/cmake/register_rmw_implementation.cmake" + "/opt/ros/humble/share/rmw/cmake/rmw-extras.cmake" + "/opt/ros/humble/share/rmw/cmake/rmwConfig-version.cmake" + "/opt/ros/humble/share/rmw/cmake/rmwConfig.cmake" + "/opt/ros/humble/share/rmw/cmake/rmwExport-none.cmake" + "/opt/ros/humble/share/rmw/cmake/rmwExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/export_rmw_dds_common__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_commonConfig-version.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_commonConfig.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common_libraryExport-none.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rmw_dds_common_libraryExport.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/rmw_dds_common/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_cpp/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_cpp/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_cpp/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cpp-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cppConfig-version.cmake" + "/opt/ros/humble/share/rmw_fastrtps_cpp/cmake/rmw_fastrtps_cppConfig.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/rmw_fastrtps_shared_cpp-extras.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/rmw_fastrtps_shared_cppConfig-version.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/rmw_fastrtps_shared_cppConfig.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/rmw_fastrtps_shared_cppExport-none.cmake" + "/opt/ros/humble/share/rmw_fastrtps_shared_cpp/cmake/rmw_fastrtps_shared_cppExport.cmake" + "/opt/ros/humble/share/rmw_implementation/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rmw_implementation/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rmw_implementation/cmake/export_rmw_implementationExport-none.cmake" + "/opt/ros/humble/share/rmw_implementation/cmake/export_rmw_implementationExport.cmake" + "/opt/ros/humble/share/rmw_implementation/cmake/rmw_implementation-extras.cmake" + "/opt/ros/humble/share/rmw_implementation/cmake/rmw_implementationConfig-version.cmake" + "/opt/ros/humble/share/rmw_implementation/cmake/rmw_implementationConfig.cmake" + "/opt/ros/humble/share/rmw_implementation_cmake/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rmw_implementation_cmake/cmake/call_for_each_rmw_implementation.cmake" + "/opt/ros/humble/share/rmw_implementation_cmake/cmake/get_available_rmw_implementations.cmake" + "/opt/ros/humble/share/rmw_implementation_cmake/cmake/get_default_rmw_implementation.cmake" + "/opt/ros/humble/share/rmw_implementation_cmake/cmake/rmw_implementation_cmake-extras.cmake" + "/opt/ros/humble/share/rmw_implementation_cmake/cmake/rmw_implementation_cmakeConfig-version.cmake" + "/opt/ros/humble/share/rmw_implementation_cmake/cmake/rmw_implementation_cmakeConfig.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/export_rosgraph_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgsConfig-version.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgsConfig.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosgraph_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/rosgraph_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_adapter/cmake/rosidl_adapt_interfaces.cmake" + "/opt/ros/humble/share/rosidl_adapter/cmake/rosidl_adapter-extras.cmake" + "/opt/ros/humble/share/rosidl_adapter/cmake/rosidl_adapterConfig-version.cmake" + "/opt/ros/humble/share/rosidl_adapter/cmake/rosidl_adapterConfig.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_cmakeConfig-version.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_cmakeConfig.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_export_typesupport_libraries.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_export_typesupport_targets.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_get_typesupport_target.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_target_interfaces.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/rosidl_write_generator_arguments.cmake" + "/opt/ros/humble/share/rosidl_cmake/cmake/string_camel_case_to_lower_case_underscore.cmake" + "/opt/ros/humble/share/rosidl_default_runtime/cmake/rosidl_default_runtime-extras.cmake" + "/opt/ros/humble/share/rosidl_default_runtime/cmake/rosidl_default_runtimeConfig-version.cmake" + "/opt/ros/humble/share/rosidl_default_runtime/cmake/rosidl_default_runtimeConfig.cmake" + "/opt/ros/humble/share/rosidl_generator_c/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_generator_c/cmake/register_c.cmake" + "/opt/ros/humble/share/rosidl_generator_c/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/rosidl_generator_c/cmake/rosidl_generator_c-extras.cmake" + "/opt/ros/humble/share/rosidl_generator_c/cmake/rosidl_generator_cConfig-version.cmake" + "/opt/ros/humble/share/rosidl_generator_c/cmake/rosidl_generator_cConfig.cmake" + "/opt/ros/humble/share/rosidl_generator_cpp/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_generator_cpp/cmake/register_cpp.cmake" + "/opt/ros/humble/share/rosidl_generator_cpp/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/rosidl_generator_cpp/cmake/rosidl_generator_cpp-extras.cmake" + "/opt/ros/humble/share/rosidl_generator_cpp/cmake/rosidl_generator_cppConfig-version.cmake" + "/opt/ros/humble/share/rosidl_generator_cpp/cmake/rosidl_generator_cppConfig.cmake" + "/opt/ros/humble/share/rosidl_runtime_c/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_runtime_c/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_runtime_c/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rosidl_runtime_c/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_runtime_c/cmake/rosidl_runtime_cConfig-version.cmake" + "/opt/ros/humble/share/rosidl_runtime_c/cmake/rosidl_runtime_cConfig.cmake" + "/opt/ros/humble/share/rosidl_runtime_c/cmake/rosidl_runtime_cExport-none.cmake" + "/opt/ros/humble/share/rosidl_runtime_c/cmake/rosidl_runtime_cExport.cmake" + "/opt/ros/humble/share/rosidl_runtime_cpp/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_runtime_cpp/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_runtime_cpp/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_runtime_cpp/cmake/rosidl_runtime_cppConfig-version.cmake" + "/opt/ros/humble/share/rosidl_runtime_cpp/cmake/rosidl_runtime_cppConfig.cmake" + "/opt/ros/humble/share/rosidl_runtime_cpp/cmake/rosidl_runtime_cppExport.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/get_used_typesupports.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/rosidl_typesupport_c-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/rosidl_typesupport_cConfig-version.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/rosidl_typesupport_cConfig.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/rosidl_typesupport_c/cmake/rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cpp-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cppConfig-version.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cppConfig.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/rosidl_typesupport_fastrtps_c-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/rosidl_typesupport_fastrtps_cConfig-version.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/rosidl_typesupport_fastrtps_cConfig.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_c/cmake/rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/rosidl_typesupport_fastrtps_cpp-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/rosidl_typesupport_fastrtps_cppConfig-version.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/rosidl_typesupport_fastrtps_cppConfig.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/rosidl_typesupport_fastrtps_cpp/cmake/rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/rosidl_typesupport_interface/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_interface/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_interface/cmake/rosidl_typesupport_interfaceConfig-version.cmake" + "/opt/ros/humble/share/rosidl_typesupport_interface/cmake/rosidl_typesupport_interfaceConfig.cmake" + "/opt/ros/humble/share/rosidl_typesupport_interface/cmake/rosidl_typesupport_interfaceExport.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/rosidl_typesupport_introspection_c-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/rosidl_typesupport_introspection_cConfig-version.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/rosidl_typesupport_introspection_cConfig.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_c/cmake/rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cpp-extras.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cppConfig-version.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cppConfig.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/rosidl_typesupport_introspection_cpp/cmake/rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgsExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/export_sensor_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgsConfig-version.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgsConfig.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/sensor_msgs/cmake/sensor_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/spdlog_vendor/cmake/spdlog_vendorConfig-version.cmake" + "/opt/ros/humble/share/spdlog_vendor/cmake/spdlog_vendorConfig.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/export_statistics_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgsConfig-version.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgsConfig.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/statistics_msgs/cmake/statistics_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/std_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/std_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/std_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/std_msgs/cmake/export_std_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/std_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/std_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgsConfig-version.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgsConfig.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/std_msgs/cmake/std_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/std_srvs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/std_srvs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/std_srvs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/std_srvs/cmake/export_std_srvs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/std_srvs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/std_srvs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvsConfig-version.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvsConfig.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/std_srvs/cmake/std_srvs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/tf2/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/tf2/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/tf2/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/tf2/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/tf2/cmake/export_tf2Export-none.cmake" + "/opt/ros/humble/share/tf2/cmake/export_tf2Export.cmake" + "/opt/ros/humble/share/tf2/cmake/tf2Config-version.cmake" + "/opt/ros/humble/share/tf2/cmake/tf2Config.cmake" + "/opt/ros/humble/share/tf2_geometry_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/tf2_geometry_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/tf2_geometry_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/tf2_geometry_msgs/cmake/export_tf2_geometry_msgsExport.cmake" + "/opt/ros/humble/share/tf2_geometry_msgs/cmake/tf2_geometry_msgsConfig-version.cmake" + "/opt/ros/humble/share/tf2_geometry_msgs/cmake/tf2_geometry_msgsConfig.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/export_tf2_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgsConfig-version.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgsConfig.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/tf2_msgs/cmake/tf2_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/tf2_ros/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/tf2_ros/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/tf2_ros/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/tf2_ros/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/tf2_ros/cmake/export_tf2_rosExport-none.cmake" + "/opt/ros/humble/share/tf2_ros/cmake/export_tf2_rosExport.cmake" + "/opt/ros/humble/share/tf2_ros/cmake/tf2_rosConfig-version.cmake" + "/opt/ros/humble/share/tf2_ros/cmake/tf2_rosConfig.cmake" + "/opt/ros/humble/share/tinyxml2_vendor/cmake/Modules/FindTinyXML2.cmake" + "/opt/ros/humble/share/tinyxml2_vendor/cmake/tinyxml2_vendor-extras.cmake" + "/opt/ros/humble/share/tinyxml2_vendor/cmake/tinyxml2_vendorConfig-version.cmake" + "/opt/ros/humble/share/tinyxml2_vendor/cmake/tinyxml2_vendorConfig.cmake" + "/opt/ros/humble/share/tracetools/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/tracetools/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/tracetools/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/tracetools/cmake/tracetoolsConfig-version.cmake" + "/opt/ros/humble/share/tracetools/cmake/tracetoolsConfig.cmake" + "/opt/ros/humble/share/tracetools/cmake/tracetools_exportExport-none.cmake" + "/opt/ros/humble/share/tracetools/cmake/tracetools_exportExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/export_unique_identifier_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgsConfig-version.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgsConfig.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/unique_identifier_msgs/cmake/unique_identifier_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/opt/ros/humble/share/vision_opencv/cmake/vision_opencvConfig-version.cmake" + "/opt/ros/humble/share/vision_opencv/cmake/vision_opencvConfig.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/ament_cmake_export_dependencies-extras.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/ament_cmake_export_include_directories-extras.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/ament_cmake_export_libraries-extras.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/ament_cmake_export_targets-extras.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_generator_cExport-none.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_generator_cExport.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_generator_cppExport.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_generator_pyExport-none.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_generator_pyExport.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_typesupport_fastrtps_cExport-none.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_typesupport_fastrtps_cExport.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_typesupport_fastrtps_cppExport-none.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/export_visualization_msgs__rosidl_typesupport_fastrtps_cppExport.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/rosidl_cmake-extras.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/rosidl_cmake_export_typesupport_libraries-extras.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/rosidl_cmake_export_typesupport_targets-extras.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgsConfig-version.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgsConfig.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgs__rosidl_typesupport_cExport-none.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgs__rosidl_typesupport_cExport.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgs__rosidl_typesupport_cppExport-none.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgs__rosidl_typesupport_cppExport.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgs__rosidl_typesupport_introspection_cExport-none.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgs__rosidl_typesupport_introspection_cExport.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgs__rosidl_typesupport_introspection_cppExport-none.cmake" + "/opt/ros/humble/share/visualization_msgs/cmake/visualization_msgs__rosidl_typesupport_introspection_cppExport.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/fmt/fmt-config-version.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/fmt/fmt-config.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/fmt/fmt-targets-none.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/fmt/fmt-targets.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/opencv4/OpenCVConfig-version.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/opencv4/OpenCVConfig.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/opencv4/OpenCVModules-release.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/opencv4/OpenCVModules.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/orocos_kdl/orocos_kdl-config-version.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/orocos_kdl/orocos_kdl-config.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/spdlog/spdlogConfig.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/spdlog/spdlogConfigTargets-none.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/spdlog/spdlogConfigTargets.cmake" + "/usr/lib/aarch64-linux-gnu/cmake/spdlog/spdlogConfigVersion.cmake" + "/usr/lib/aarch64-linux-gnu/console_bridge/cmake/console_bridge-config-version.cmake" + "/usr/lib/aarch64-linux-gnu/console_bridge/cmake/console_bridge-config.cmake" + "/usr/lib/aarch64-linux-gnu/console_bridge/cmake/console_bridge-targets-none.cmake" + "/usr/lib/aarch64-linux-gnu/console_bridge/cmake/console_bridge-targets.cmake" + "/usr/local/share/sophus/cmake/SophusConfig.cmake" + "/usr/local/share/sophus/cmake/SophusConfigVersion.cmake" + "/usr/local/share/sophus/cmake/SophusTargets.cmake" + "/usr/share/cmake-3.22/Modules/CMakeCCompiler.cmake.in" + "/usr/share/cmake-3.22/Modules/CMakeCCompilerABI.c" + "/usr/share/cmake-3.22/Modules/CMakeCInformation.cmake" + "/usr/share/cmake-3.22/Modules/CMakeCXXCompiler.cmake.in" + "/usr/share/cmake-3.22/Modules/CMakeCXXCompilerABI.cpp" + "/usr/share/cmake-3.22/Modules/CMakeCXXInformation.cmake" + "/usr/share/cmake-3.22/Modules/CMakeCommonLanguageInclude.cmake" + "/usr/share/cmake-3.22/Modules/CMakeCompilerIdDetection.cmake" + "/usr/share/cmake-3.22/Modules/CMakeDetermineCCompiler.cmake" + "/usr/share/cmake-3.22/Modules/CMakeDetermineCXXCompiler.cmake" + "/usr/share/cmake-3.22/Modules/CMakeDetermineCompileFeatures.cmake" + "/usr/share/cmake-3.22/Modules/CMakeDetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/CMakeDetermineCompilerABI.cmake" + "/usr/share/cmake-3.22/Modules/CMakeDetermineCompilerId.cmake" + "/usr/share/cmake-3.22/Modules/CMakeDetermineSystem.cmake" + "/usr/share/cmake-3.22/Modules/CMakeFindBinUtils.cmake" + "/usr/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake" + "/usr/share/cmake-3.22/Modules/CMakeGenericSystem.cmake" + "/usr/share/cmake-3.22/Modules/CMakeInitializeConfigs.cmake" + "/usr/share/cmake-3.22/Modules/CMakeLanguageInformation.cmake" + "/usr/share/cmake-3.22/Modules/CMakeParseImplicitIncludeInfo.cmake" + "/usr/share/cmake-3.22/Modules/CMakeParseImplicitLinkInfo.cmake" + "/usr/share/cmake-3.22/Modules/CMakeParseLibraryArchitecture.cmake" + "/usr/share/cmake-3.22/Modules/CMakeSystem.cmake.in" + "/usr/share/cmake-3.22/Modules/CMakeSystemSpecificInformation.cmake" + "/usr/share/cmake-3.22/Modules/CMakeSystemSpecificInitialize.cmake" + "/usr/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake" + "/usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake" + "/usr/share/cmake-3.22/Modules/CMakeTestCompilerCommon.cmake" + "/usr/share/cmake-3.22/Modules/CMakeUnixFindMake.cmake" + "/usr/share/cmake-3.22/Modules/CheckCSourceCompiles.cmake" + "/usr/share/cmake-3.22/Modules/CheckIncludeFile.c.in" + "/usr/share/cmake-3.22/Modules/CheckIncludeFile.cmake" + "/usr/share/cmake-3.22/Modules/CheckLibraryExists.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/ADSP-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/ARMCC-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/ARMClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/AppleClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Borland-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Bruce-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/CMakeCommonCompilerMacros.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Clang-DetermineCompilerInternal.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Comeau-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Compaq-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Compaq-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Cray-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Embarcadero-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Fujitsu-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/FujitsuClang-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/GHS-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/GNU-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/GNU-C.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/GNU-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/GNU-CXX.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/GNU-FindBinUtils.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/GNU.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/HP-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/HP-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/IAR-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/IBMCPP-C-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/IBMCPP-CXX-DetermineVersionInternal.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Intel-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/MSVC-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/NVHPC-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/NVIDIA-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/OpenWatcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/PGI-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/PathScale-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/SCO-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/SDCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/SunPro-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/SunPro-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/TI-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/TinyCC-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/VisualAge-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/VisualAge-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/Watcom-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/XL-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/XL-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/XLClang-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/zOS-C-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/Compiler/zOS-CXX-DetermineCompiler.cmake" + "/usr/share/cmake-3.22/Modules/DartConfiguration.tcl.in" + "/usr/share/cmake-3.22/Modules/FindCUDA.cmake" + "/usr/share/cmake-3.22/Modules/FindCUDA/select_compute_arch.cmake" + "/usr/share/cmake-3.22/Modules/FindOpenSSL.cmake" + "/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake" + "/usr/share/cmake-3.22/Modules/FindPackageMessage.cmake" + "/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake" + "/usr/share/cmake-3.22/Modules/FindPython/Support.cmake" + "/usr/share/cmake-3.22/Modules/FindPython3.cmake" + "/usr/share/cmake-3.22/Modules/FindThreads.cmake" + "/usr/share/cmake-3.22/Modules/Internal/CheckSourceCompiles.cmake" + "/usr/share/cmake-3.22/Modules/Internal/FeatureTesting.cmake" + "/usr/share/cmake-3.22/Modules/Platform/Linux-Determine-CXX.cmake" + "/usr/share/cmake-3.22/Modules/Platform/Linux-GNU-C.cmake" + "/usr/share/cmake-3.22/Modules/Platform/Linux-GNU-CXX.cmake" + "/usr/share/cmake-3.22/Modules/Platform/Linux-GNU.cmake" + "/usr/share/cmake-3.22/Modules/Platform/Linux.cmake" + "/usr/share/cmake-3.22/Modules/Platform/UnixPaths.cmake" + "/usr/share/eigen3/cmake/Eigen3Config.cmake" + "/usr/share/eigen3/cmake/Eigen3ConfigVersion.cmake" + "/usr/share/eigen3/cmake/Eigen3Targets.cmake" + ) + +# The corresponding makefile is: +set(CMAKE_MAKEFILE_OUTPUTS + "Makefile" + "CMakeFiles/cmake.check_cache" + ) + +# Byproducts of CMake generate step: +set(CMAKE_MAKEFILE_PRODUCTS + "CMakeFiles/3.22.1/CMakeSystem.cmake" + "CMakeFiles/3.22.1/CMakeCCompiler.cmake" + "CMakeFiles/3.22.1/CMakeCXXCompiler.cmake" + "CMakeFiles/3.22.1/CMakeCCompiler.cmake" + "CMakeFiles/3.22.1/CMakeCXXCompiler.cmake" + "ament_cmake_core/stamps/templates_2_cmake.py.stamp" + "ament_cmake_uninstall_target/ament_cmake_uninstall_target.cmake" + "ament_cmake_symlink_install/ament_cmake_symlink_install.cmake" + "ament_cmake_symlink_install/ament_cmake_symlink_install_uninstall_script.cmake" + "CTestConfiguration.ini" + "ament_cmake_core/stamps/package.xml.stamp" + "ament_cmake_core/stamps/package_xml_2_cmake.py.stamp" + "rclcpp_components/node_main_configured_armor_yolo_detector_node.cpp.in" + "ament_cmake_core/stamps/library_path.sh.stamp" + "ament_cmake_core/stamps/ament_prefix_path.sh.stamp" + "ament_cmake_core/stamps/path.sh.stamp" + "ament_cmake_environment_hooks/local_setup.bash" + "ament_cmake_environment_hooks/local_setup.sh" + "ament_cmake_environment_hooks/local_setup.zsh" + "ament_cmake_export_dependencies/ament_cmake_export_dependencies-extras.cmake" + "ament_cmake_export_include_directories/ament_cmake_export_include_directories-extras.cmake" + "ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake" + "ament_cmake_core/stamps/ament_cmake_export_dependencies-extras.cmake.stamp" + "ament_cmake_core/stamps/ament_cmake_export_include_directories-extras.cmake.stamp" + "ament_cmake_core/stamps/ament_cmake_export_libraries-extras.cmake.stamp" + "ament_cmake_core/stamps/nameConfig.cmake.in.stamp" + "ament_cmake_core/armor_yolo_detectConfig.cmake" + "ament_cmake_core/stamps/nameConfig-version.cmake.in.stamp" + "ament_cmake_core/armor_yolo_detectConfig-version.cmake" + "rclcpp_components/node_main_armor_yolo_detector_node.cpp" + "ament_cmake_symlink_install_targets_0_.cmake" + "ament_cmake_symlink_install_targets_1_.cmake" + "ament_cmake_symlink_install_targets_2_.cmake" + "ament_cmake_index/share/ament_index/resource_index/package_run_dependencies/armor_yolo_detect" + "ament_cmake_index/share/ament_index/resource_index/parent_prefix_path/armor_yolo_detect" + "ament_cmake_index/share/ament_index/resource_index/packages/armor_yolo_detect" + "ament_cmake_index/share/ament_index/resource_index/rclcpp_components/armor_yolo_detect" + "CMakeFiles/CMakeDirectoryInformation.cmake" + ) + +# Dependency information for all targets: +set(CMAKE_DEPEND_INFO_FILES + "CMakeFiles/uninstall.dir/DependInfo.cmake" + "CMakeFiles/armor_yolo_detect_uninstall.dir/DependInfo.cmake" + "CMakeFiles/armor_yolo_detect.dir/DependInfo.cmake" + "CMakeFiles/trt_inference_test.dir/DependInfo.cmake" + "CMakeFiles/armor_yolo_detector_node.dir/DependInfo.cmake" + ) diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Makefile2 b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Makefile2 new file mode 100644 index 0000000..1ac4af8 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Makefile2 @@ -0,0 +1,222 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +#============================================================================= +# Directory level rules for the build root directory + +# The main recursive "all" target. +all: CMakeFiles/armor_yolo_detect.dir/all +all: CMakeFiles/trt_inference_test.dir/all +all: CMakeFiles/armor_yolo_detector_node.dir/all +.PHONY : all + +# The main recursive "preinstall" target. +preinstall: +.PHONY : preinstall + +# The main recursive "clean" target. +clean: CMakeFiles/uninstall.dir/clean +clean: CMakeFiles/armor_yolo_detect_uninstall.dir/clean +clean: CMakeFiles/armor_yolo_detect.dir/clean +clean: CMakeFiles/trt_inference_test.dir/clean +clean: CMakeFiles/armor_yolo_detector_node.dir/clean +.PHONY : clean + +#============================================================================= +# Target rules for target CMakeFiles/uninstall.dir + +# All Build rule for target. +CMakeFiles/uninstall.dir/all: CMakeFiles/armor_yolo_detect_uninstall.dir/all + $(MAKE) $(MAKESILENT) -f CMakeFiles/uninstall.dir/build.make CMakeFiles/uninstall.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles/uninstall.dir/build.make CMakeFiles/uninstall.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num= "Built target uninstall" +.PHONY : CMakeFiles/uninstall.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/uninstall.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 0 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/uninstall.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 0 +.PHONY : CMakeFiles/uninstall.dir/rule + +# Convenience name for target. +uninstall: CMakeFiles/uninstall.dir/rule +.PHONY : uninstall + +# clean rule for target. +CMakeFiles/uninstall.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/uninstall.dir/build.make CMakeFiles/uninstall.dir/clean +.PHONY : CMakeFiles/uninstall.dir/clean + +#============================================================================= +# Target rules for target CMakeFiles/armor_yolo_detect_uninstall.dir + +# All Build rule for target. +CMakeFiles/armor_yolo_detect_uninstall.dir/all: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect_uninstall.dir/build.make CMakeFiles/armor_yolo_detect_uninstall.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect_uninstall.dir/build.make CMakeFiles/armor_yolo_detect_uninstall.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num= "Built target armor_yolo_detect_uninstall" +.PHONY : CMakeFiles/armor_yolo_detect_uninstall.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/armor_yolo_detect_uninstall.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 0 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/armor_yolo_detect_uninstall.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 0 +.PHONY : CMakeFiles/armor_yolo_detect_uninstall.dir/rule + +# Convenience name for target. +armor_yolo_detect_uninstall: CMakeFiles/armor_yolo_detect_uninstall.dir/rule +.PHONY : armor_yolo_detect_uninstall + +# clean rule for target. +CMakeFiles/armor_yolo_detect_uninstall.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect_uninstall.dir/build.make CMakeFiles/armor_yolo_detect_uninstall.dir/clean +.PHONY : CMakeFiles/armor_yolo_detect_uninstall.dir/clean + +#============================================================================= +# Target rules for target CMakeFiles/armor_yolo_detect.dir + +# All Build rule for target. +CMakeFiles/armor_yolo_detect.dir/all: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=1,2,3,4,5 "Built target armor_yolo_detect" +.PHONY : CMakeFiles/armor_yolo_detect.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/armor_yolo_detect.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 5 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/armor_yolo_detect.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 0 +.PHONY : CMakeFiles/armor_yolo_detect.dir/rule + +# Convenience name for target. +armor_yolo_detect: CMakeFiles/armor_yolo_detect.dir/rule +.PHONY : armor_yolo_detect + +# clean rule for target. +CMakeFiles/armor_yolo_detect.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/clean +.PHONY : CMakeFiles/armor_yolo_detect.dir/clean + +#============================================================================= +# Target rules for target CMakeFiles/trt_inference_test.dir + +# All Build rule for target. +CMakeFiles/trt_inference_test.dir/all: CMakeFiles/armor_yolo_detect.dir/all + $(MAKE) $(MAKESILENT) -f CMakeFiles/trt_inference_test.dir/build.make CMakeFiles/trt_inference_test.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles/trt_inference_test.dir/build.make CMakeFiles/trt_inference_test.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=8,9 "Built target trt_inference_test" +.PHONY : CMakeFiles/trt_inference_test.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/trt_inference_test.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 7 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/trt_inference_test.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 0 +.PHONY : CMakeFiles/trt_inference_test.dir/rule + +# Convenience name for target. +trt_inference_test: CMakeFiles/trt_inference_test.dir/rule +.PHONY : trt_inference_test + +# clean rule for target. +CMakeFiles/trt_inference_test.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/trt_inference_test.dir/build.make CMakeFiles/trt_inference_test.dir/clean +.PHONY : CMakeFiles/trt_inference_test.dir/clean + +#============================================================================= +# Target rules for target CMakeFiles/armor_yolo_detector_node.dir + +# All Build rule for target. +CMakeFiles/armor_yolo_detector_node.dir/all: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detector_node.dir/build.make CMakeFiles/armor_yolo_detector_node.dir/depend + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detector_node.dir/build.make CMakeFiles/armor_yolo_detector_node.dir/build + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=6,7 "Built target armor_yolo_detector_node" +.PHONY : CMakeFiles/armor_yolo_detector_node.dir/all + +# Build rule for subdir invocation for target. +CMakeFiles/armor_yolo_detector_node.dir/rule: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 2 + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 CMakeFiles/armor_yolo_detector_node.dir/all + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 0 +.PHONY : CMakeFiles/armor_yolo_detector_node.dir/rule + +# Convenience name for target. +armor_yolo_detector_node: CMakeFiles/armor_yolo_detector_node.dir/rule +.PHONY : armor_yolo_detector_node + +# clean rule for target. +CMakeFiles/armor_yolo_detector_node.dir/clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detector_node.dir/build.make CMakeFiles/armor_yolo_detector_node.dir/clean +.PHONY : CMakeFiles/armor_yolo_detector_node.dir/clean + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/1 b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/1 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/1 @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/2 b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/2 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/2 @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/4 b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/4 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/4 @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/6 b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/6 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/6 @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/7 b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/7 new file mode 100644 index 0000000..7b4d68d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/7 @@ -0,0 +1 @@ +empty \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/count.txt b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/count.txt new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/Progress/count.txt @@ -0,0 +1 @@ +9 diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/TargetDirectories.txt b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/TargetDirectories.txt new file mode 100644 index 0000000..ffd30f7 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/TargetDirectories.txt @@ -0,0 +1,12 @@ +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/test.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/edit_cache.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/rebuild_cache.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/list_install_components.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/install.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/install/local.dir +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/install/strip.dir diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/DependInfo.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/DependInfo.cmake new file mode 100644 index 0000000..5b95dd2 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/DependInfo.cmake @@ -0,0 +1,22 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp" "CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o" "gcc" "CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o.d" + "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp" "CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o" "gcc" "CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o.d" + "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp" "CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o" "gcc" "CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o.d" + "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp" "CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o" "gcc" "CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o.d" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/build.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/build.make new file mode 100644 index 0000000..995f212 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/build.make @@ -0,0 +1,353 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +# Include any dependencies generated for this target. +include CMakeFiles/armor_yolo_detect.dir/depend.make +# Include any dependencies generated by the compiler for this target. +include CMakeFiles/armor_yolo_detect.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/armor_yolo_detect.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/armor_yolo_detect.dir/flags.make + +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o: CMakeFiles/armor_yolo_detect.dir/flags.make +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o: ../../src/armor_yolo_detector.cpp +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o: CMakeFiles/armor_yolo_detect.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o -MF CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o.d -o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp + +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp > CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.i + +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp -o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.s + +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o: CMakeFiles/armor_yolo_detect.dir/flags.make +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o: ../../src/armor_yolo_detector_node.cpp +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o: CMakeFiles/armor_yolo_detect.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o -MF CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o.d -o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp + +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp > CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.i + +CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp -o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.s + +CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o: CMakeFiles/armor_yolo_detect.dir/flags.make +CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o: ../../src/trt_logger.cpp +CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o: CMakeFiles/armor_yolo_detect.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Building CXX object CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o -MF CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o.d -o CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp + +CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp > CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.i + +CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp -o CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.s + +CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o: CMakeFiles/armor_yolo_detect.dir/flags.make +CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o: ../../src/yolo_tensorrt.cpp +CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o: CMakeFiles/armor_yolo_detect.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_4) "Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o -MF CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o.d -o CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp + +CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp > CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.i + +CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp -o CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.s + +# Object files for target armor_yolo_detect +armor_yolo_detect_OBJECTS = \ +"CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o" \ +"CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o" \ +"CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o" \ +"CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o" + +# External object files for target armor_yolo_detect +armor_yolo_detect_EXTERNAL_OBJECTS = + +libarmor_yolo_detect.so: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +libarmor_yolo_detect.so: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +libarmor_yolo_detect.so: CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o +libarmor_yolo_detect.so: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +libarmor_yolo_detect.so: CMakeFiles/armor_yolo_detect.dir/build.make +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomponent_manager.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_srvs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcv_bridge.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/aarch64-linux-gnu/libimage_transport.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatic_transform_broadcaster_node.so +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_stitching.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_alphamat.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_aruco.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_barcode.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_bgsegm.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_bioinspired.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_ccalib.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_dnn_objdetect.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_dnn_superres.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_dpm.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_face.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_freetype.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_fuzzy.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_hdf.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_hfs.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_img_hash.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_intensity_transform.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_line_descriptor.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_mcc.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_quality.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_rapid.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_reg.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_rgbd.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_saliency.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_shape.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_stereo.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_structured_light.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_superres.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_surface_matching.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_tracking.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_videostab.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_viz.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_wechat_qrcode.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_xobjdetect.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_xphoto.so.4.5.4d +libarmor_yolo_detect.so: /usr/local/cuda-12.6/lib64/libcudart_static.a +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/librt.a +libarmor_yolo_detect.so: /opt/ros/humble/lib/libclass_loader.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_srvs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libsensor_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libsensor_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_ros.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2.so +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0 +libarmor_yolo_detect.so: /opt/ros/humble/lib/libmessage_filters.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librclcpp_action.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librclcpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/liblibstatistics_collector.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_action.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_yaml_param_parser.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libyaml.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtracetools.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librmw_implementation.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libament_index_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_logging_spdlog.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcl_logging_interface.so +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libfmt.so.8.1.1 +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libfastcdr.so.1.0.24 +libarmor_yolo_detect.so: /opt/ros/humble/lib/librmw.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosidl_typesupport_introspection_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosidl_typesupport_cpp.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libtf2_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libstd_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libaction_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libaction_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_py.so +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libpython3.10.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosidl_typesupport_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcpputils.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librosidl_runtime_c.so +libarmor_yolo_detect.so: /opt/ros/humble/lib/librcutils.so +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/liborocos-kdl.so +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_highgui.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_datasets.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_plot.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_text.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_ml.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_phase_unwrapping.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_optflow.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_ximgproc.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_video.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_videoio.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_objdetect.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_calib3d.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_dnn.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_features2d.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_flann.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_photo.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.4.5.4d +libarmor_yolo_detect.so: /usr/lib/aarch64-linux-gnu/libopencv_core.so.4.5.4d +libarmor_yolo_detect.so: CMakeFiles/armor_yolo_detect.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_5) "Linking CXX shared library libarmor_yolo_detect.so" + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/armor_yolo_detect.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/armor_yolo_detect.dir/build: libarmor_yolo_detect.so +.PHONY : CMakeFiles/armor_yolo_detect.dir/build + +CMakeFiles/armor_yolo_detect.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/armor_yolo_detect.dir/cmake_clean.cmake +.PHONY : CMakeFiles/armor_yolo_detect.dir/clean + +CMakeFiles/armor_yolo_detect.dir/depend: + cd /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/armor_yolo_detect.dir/depend + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/cmake_clean.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/cmake_clean.cmake new file mode 100644 index 0000000..1aad1a7 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/cmake_clean.cmake @@ -0,0 +1,17 @@ +file(REMOVE_RECURSE + "CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o" + "CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o.d" + "CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o" + "CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o.d" + "CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o" + "CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o.d" + "CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o" + "CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o.d" + "libarmor_yolo_detect.pdb" + "libarmor_yolo_detect.so" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/armor_yolo_detect.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.internal b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.internal new file mode 100644 index 0000000..4583c4a --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.internal @@ -0,0 +1,227 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o + /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp + /usr/include/stdc-predef.h + /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/trt_logger.hpp + /usr/include/aarch64-linux-gnu/NvInfer.h + /usr/include/aarch64-linux-gnu/NvInferLegacyDims.h + /usr/include/aarch64-linux-gnu/NvInferRuntimeBase.h + /usr/include/aarch64-linux-gnu/NvInferVersion.h + /usr/include/c++/11/cstddef + /usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h + /usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h + /usr/include/features.h + /usr/include/features-time64.h + /usr/include/aarch64-linux-gnu/bits/wordsize.h + /usr/include/aarch64-linux-gnu/bits/timesize.h + /usr/include/aarch64-linux-gnu/sys/cdefs.h + /usr/include/aarch64-linux-gnu/bits/long-double.h + /usr/include/aarch64-linux-gnu/gnu/stubs.h + /usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h + /usr/include/aarch64-linux-gnu/c++/11/bits/cpu_defines.h + /usr/include/c++/11/pstl/pstl_config.h + /usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h + /usr/include/c++/11/cstdint + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdint.h + /usr/include/stdint.h + /usr/include/aarch64-linux-gnu/bits/libc-header-start.h + /usr/include/aarch64-linux-gnu/bits/types.h + /usr/include/aarch64-linux-gnu/bits/typesizes.h + /usr/include/aarch64-linux-gnu/bits/time64.h + /usr/include/aarch64-linux-gnu/bits/wchar.h + /usr/include/aarch64-linux-gnu/bits/stdint-intn.h + /usr/include/aarch64-linux-gnu/bits/stdint-uintn.h + /usr/local/cuda-12.6/include/cuda_runtime_api.h + /usr/local/cuda-12.6/include/crt/host_defines.h + /usr/local/cuda-12.6/include/builtin_types.h + /usr/local/cuda-12.6/include/device_types.h + /usr/local/cuda-12.6/include/driver_types.h + /usr/local/cuda-12.6/include/vector_types.h + /usr/lib/gcc/aarch64-linux-gnu/11/include/limits.h + /usr/lib/gcc/aarch64-linux-gnu/11/include/syslimits.h + /usr/include/limits.h + /usr/include/aarch64-linux-gnu/bits/posix1_lim.h + /usr/include/aarch64-linux-gnu/bits/local_lim.h + /usr/include/linux/limits.h + /usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h + /usr/include/aarch64-linux-gnu/bits/posix2_lim.h + /usr/include/aarch64-linux-gnu/bits/xopen_lim.h + /usr/include/aarch64-linux-gnu/bits/uio_lim.h + /usr/local/cuda-12.6/include/surface_types.h + /usr/local/cuda-12.6/include/texture_types.h + /usr/local/cuda-12.6/include/cuda_device_runtime_api.h + /usr/include/aarch64-linux-gnu/NvInferRuntime.h + /usr/include/aarch64-linux-gnu/NvInferImpl.h + /usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h + /usr/include/aarch64-linux-gnu/NvInferRuntimePlugin.h + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/aarch64-linux-gnu/bits/floatn.h + /usr/include/aarch64-linux-gnu/bits/floatn-common.h + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdarg.h + /usr/include/aarch64-linux-gnu/bits/types/wint_t.h + /usr/include/aarch64-linux-gnu/bits/types/mbstate_t.h + /usr/include/aarch64-linux-gnu/bits/types/__mbstate_t.h + /usr/include/aarch64-linux-gnu/bits/types/__FILE.h + /usr/include/aarch64-linux-gnu/bits/types/FILE.h + /usr/include/aarch64-linux-gnu/bits/types/locale_t.h + /usr/include/aarch64-linux-gnu/bits/types/__locale_t.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/localefwd.h + /usr/include/aarch64-linux-gnu/c++/11/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/aarch64-linux-gnu/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/aarch64-linux-gnu/bits/endian.h + /usr/include/aarch64-linux-gnu/bits/endianness.h + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/aarch64-linux-gnu/bits/types/time_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h + /usr/include/aarch64-linux-gnu/bits/sched.h + /usr/include/aarch64-linux-gnu/bits/types/struct_sched_param.h + /usr/include/aarch64-linux-gnu/bits/cpu-set.h + /usr/include/time.h + /usr/include/aarch64-linux-gnu/bits/time.h + /usr/include/aarch64-linux-gnu/bits/timex.h + /usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h + /usr/include/aarch64-linux-gnu/bits/types/clock_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct_tm.h + /usr/include/aarch64-linux-gnu/bits/types/clockid_t.h + /usr/include/aarch64-linux-gnu/bits/types/timer_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct_itimerspec.h + /usr/include/aarch64-linux-gnu/bits/pthreadtypes.h + /usr/include/aarch64-linux-gnu/bits/thread-shared-types.h + /usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h + /usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h + /usr/include/aarch64-linux-gnu/bits/struct_mutex.h + /usr/include/aarch64-linux-gnu/bits/struct_rwlock.h + /usr/include/aarch64-linux-gnu/bits/setjmp.h + /usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct___jmp_buf_tag.h + /usr/include/aarch64-linux-gnu/c++/11/bits/atomic_word.h + /usr/include/aarch64-linux-gnu/sys/single_threaded.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/allocator.h + /usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/string_view + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/string_view.tcc + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/aarch64-linux-gnu/bits/waitflags.h + /usr/include/aarch64-linux-gnu/bits/waitstatus.h + /usr/include/aarch64-linux-gnu/sys/types.h + /usr/include/endian.h + /usr/include/aarch64-linux-gnu/bits/byteswap.h + /usr/include/aarch64-linux-gnu/bits/uintn-identity.h + /usr/include/aarch64-linux-gnu/sys/select.h + /usr/include/aarch64-linux-gnu/bits/select.h + /usr/include/aarch64-linux-gnu/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/aarch64-linux-gnu/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/aarch64-linux-gnu/bits/types/__fpos_t.h + /usr/include/aarch64-linux-gnu/bits/types/__fpos64_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct_FILE.h + /usr/include/aarch64-linux-gnu/bits/types/cookie_io_functions_t.h + /usr/include/aarch64-linux-gnu/bits/stdio_lim.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/aarch64-linux-gnu/bits/errno.h + /usr/include/linux/errno.h + /usr/include/aarch64-linux-gnu/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/aarch64-linux-gnu/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/system_error + /usr/include/aarch64-linux-gnu/c++/11/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/aarch64-linux-gnu/bits/wctype-wchar.h + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/mutex + /usr/include/c++/11/tuple + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/array + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.make new file mode 100644 index 0000000..cef343d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.make @@ -0,0 +1,670 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o: ../../src/trt_logger.cpp \ + /usr/include/stdc-predef.h \ + ../../include/armor_yolo_detect/trt_logger.hpp \ + /usr/include/aarch64-linux-gnu/NvInfer.h \ + /usr/include/aarch64-linux-gnu/NvInferLegacyDims.h \ + /usr/include/aarch64-linux-gnu/NvInferRuntimeBase.h \ + /usr/include/aarch64-linux-gnu/NvInferVersion.h \ + /usr/include/c++/11/cstddef \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/features-time64.h \ + /usr/include/aarch64-linux-gnu/bits/wordsize.h \ + /usr/include/aarch64-linux-gnu/bits/timesize.h \ + /usr/include/aarch64-linux-gnu/sys/cdefs.h \ + /usr/include/aarch64-linux-gnu/bits/long-double.h \ + /usr/include/aarch64-linux-gnu/gnu/stubs.h \ + /usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/pstl/pstl_config.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/aarch64-linux-gnu/bits/libc-header-start.h \ + /usr/include/aarch64-linux-gnu/bits/types.h \ + /usr/include/aarch64-linux-gnu/bits/typesizes.h \ + /usr/include/aarch64-linux-gnu/bits/time64.h \ + /usr/include/aarch64-linux-gnu/bits/wchar.h \ + /usr/include/aarch64-linux-gnu/bits/stdint-intn.h \ + /usr/include/aarch64-linux-gnu/bits/stdint-uintn.h \ + /usr/local/cuda-12.6/include/cuda_runtime_api.h \ + /usr/local/cuda-12.6/include/crt/host_defines.h \ + /usr/local/cuda-12.6/include/builtin_types.h \ + /usr/local/cuda-12.6/include/device_types.h \ + /usr/local/cuda-12.6/include/driver_types.h \ + /usr/local/cuda-12.6/include/vector_types.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/limits.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/syslimits.h \ + /usr/include/limits.h \ + /usr/include/aarch64-linux-gnu/bits/posix1_lim.h \ + /usr/include/aarch64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/aarch64-linux-gnu/bits/posix2_lim.h \ + /usr/include/aarch64-linux-gnu/bits/xopen_lim.h \ + /usr/include/aarch64-linux-gnu/bits/uio_lim.h \ + /usr/local/cuda-12.6/include/surface_types.h \ + /usr/local/cuda-12.6/include/texture_types.h \ + /usr/local/cuda-12.6/include/cuda_device_runtime_api.h \ + /usr/include/aarch64-linux-gnu/NvInferRuntime.h \ + /usr/include/aarch64-linux-gnu/NvInferImpl.h \ + /usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h \ + /usr/include/aarch64-linux-gnu/NvInferRuntimePlugin.h \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/aarch64-linux-gnu/bits/floatn.h \ + /usr/include/aarch64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdarg.h \ + /usr/include/aarch64-linux-gnu/bits/types/wint_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/locale_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/aarch64-linux-gnu/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/aarch64-linux-gnu/bits/endian.h \ + /usr/include/aarch64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/aarch64-linux-gnu/bits/types/time_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/aarch64-linux-gnu/bits/sched.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/aarch64-linux-gnu/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/aarch64-linux-gnu/bits/time.h \ + /usr/include/aarch64-linux-gnu/bits/timex.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/aarch64-linux-gnu/bits/types/clock_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/aarch64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/timer_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/aarch64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/aarch64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/aarch64-linux-gnu/bits/struct_mutex.h \ + /usr/include/aarch64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/aarch64-linux-gnu/bits/setjmp.h \ + /usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/aarch64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/string_view \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/string_view.tcc \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/aarch64-linux-gnu/bits/waitflags.h \ + /usr/include/aarch64-linux-gnu/bits/waitstatus.h \ + /usr/include/aarch64-linux-gnu/sys/types.h \ + /usr/include/endian.h \ + /usr/include/aarch64-linux-gnu/bits/byteswap.h \ + /usr/include/aarch64-linux-gnu/bits/uintn-identity.h \ + /usr/include/aarch64-linux-gnu/sys/select.h \ + /usr/include/aarch64-linux-gnu/bits/select.h \ + /usr/include/aarch64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/aarch64-linux-gnu/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/aarch64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/aarch64-linux-gnu/bits/stdio_lim.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/aarch64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/aarch64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/aarch64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/aarch64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/aarch64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h + + +/usr/include/c++/11/bits/unique_lock.h: + +/usr/include/c++/11/bits/std_mutex.h: + +/usr/include/c++/11/bits/parse_numbers.h: + +/usr/include/c++/11/bits/uses_allocator.h: + +/usr/include/c++/11/array: + +/usr/include/c++/11/bits/stl_relops.h: + +/usr/include/c++/11/mutex: + +/usr/include/c++/11/istream: + +/usr/include/aarch64-linux-gnu/c++/11/bits/ctype_inline.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/ctype_base.h: + +/usr/include/wctype.h: + +/usr/include/c++/11/cwctype: + +/usr/include/c++/11/bits/locale_facets.h: + +/usr/include/c++/11/bits/basic_ios.h: + +/usr/include/c++/11/stdexcept: + +/usr/include/aarch64-linux-gnu/c++/11/bits/error_constants.h: + +/usr/include/c++/11/bits/locale_classes.tcc: + +/usr/include/c++/11/bits/basic_string.tcc: + +/usr/include/asm-generic/errno.h: + +/usr/include/aarch64-linux-gnu/bits/types/error_t.h: + +/usr/include/linux/errno.h: + +/usr/include/c++/11/utility: + +/usr/include/errno.h: + +/usr/include/aarch64-linux-gnu/bits/stdio_lim.h: + +/usr/include/aarch64-linux-gnu/bits/wctype-wchar.h: + +/usr/include/aarch64-linux-gnu/bits/types/struct_FILE.h: + +/usr/include/aarch64-linux-gnu/bits/types/__fpos64_t.h: + +/usr/include/c++/11/bits/streambuf.tcc: + +/usr/include/aarch64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/stdio.h: + +/usr/include/c++/11/bits/std_abs.h: + +/usr/include/aarch64-linux-gnu/bits/types/sigset_t.h: + +/usr/include/aarch64-linux-gnu/sys/select.h: + +/usr/include/aarch64-linux-gnu/bits/uintn-identity.h: + +/usr/include/endian.h: + +/usr/include/aarch64-linux-gnu/sys/types.h: + +/usr/include/aarch64-linux-gnu/bits/waitstatus.h: + +/usr/include/aarch64-linux-gnu/bits/waitflags.h: + +/usr/include/stdlib.h: + +/usr/include/c++/11/bits/functional_hash.h: + +/usr/include/c++/11/string_view: + +/usr/include/c++/11/bits/stl_construct.h: + +/usr/include/c++/11/bits/alloc_traits.h: + +/usr/include/c++/11/bits/basic_string.h: + +/usr/include/c++/11/bits/stl_function.h: + +/usr/include/c++/11/ext/alloc_traits.h: + +/usr/include/c++/11/bits/cxxabi_forced.h: + +/usr/include/c++/11/bits/ostream_insert.h: + +/usr/include/c++/11/ext/new_allocator.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h: + +/usr/include/c++/11/bits/locale_classes.h: + +/usr/include/aarch64-linux-gnu/sys/single_threaded.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/atomic_word.h: + +/usr/include/aarch64-linux-gnu/bits/types/struct___jmp_buf_tag.h: + +/usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h: + +/usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h: + +/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/aarch64-linux-gnu/bits/types/struct_itimerspec.h: + +/usr/include/c++/11/iosfwd: + +/usr/include/c++/11/ios: + +/usr/include/c++/11/chrono: + +/usr/include/c++/11/cstdio: + +/usr/include/aarch64-linux-gnu/bits/stdint-uintn.h: + +/usr/include/c++/11/ostream: + +/usr/include/c++/11/system_error: + +/usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h: + +/usr/include/aarch64-linux-gnu/NvInferRuntime.h: + +/usr/include/aarch64-linux-gnu/bits/uio_lim.h: + +/usr/include/aarch64-linux-gnu/bits/xopen_lim.h: + +/usr/include/c++/11/bits/invoke.h: + +/usr/include/aarch64-linux-gnu/bits/posix2_lim.h: + +/usr/include/aarch64-linux-gnu/bits/struct_rwlock.h: + +/usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h: + +/usr/include/c++/11/bits/exception.h: + +/usr/include/aarch64-linux-gnu/bits/sched.h: + +/usr/include/c++/11/bits/ostream.tcc: + +/usr/include/c++/11/clocale: + +/usr/include/aarch64-linux-gnu/bits/types/timer_t.h: + +/usr/include/c++/11/bits/istream.tcc: + +/usr/include/limits.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/syslimits.h: + +/usr/local/cuda-12.6/include/vector_types.h: + +/usr/include/c++/11/bits/predefined_ops.h: + +/usr/local/cuda-12.6/include/driver_types.h: + +/usr/include/aarch64-linux-gnu/bits/pthreadtypes.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/limits.h: + +/usr/include/c++/11/cstdint: + +/usr/include/c++/11/string: + +/usr/local/cuda-12.6/include/device_types.h: + +/usr/include/features-time64.h: + +/usr/local/cuda-12.6/include/crt/host_defines.h: + +/usr/include/aarch64-linux-gnu/bits/wchar.h: + +/usr/include/features.h: + +/usr/include/c++/11/ext/numeric_traits.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h: + +/usr/include/aarch64-linux-gnu/bits/types/clock_t.h: + +/usr/include/c++/11/limits: + +/usr/include/aarch64-linux-gnu/c++/11/bits/cpu_defines.h: + +/usr/include/locale.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h: + +/usr/include/c++/11/bits/locale_facets.tcc: + +/usr/include/aarch64-linux-gnu/bits/stdint-intn.h: + +/usr/include/aarch64-linux-gnu/gnu/stubs.h: + +/usr/include/aarch64-linux-gnu/bits/types/cookie_io_functions_t.h: + +/usr/include/linux/limits.h: + +/usr/include/stdint.h: + +/usr/include/aarch64-linux-gnu/bits/long-double.h: + +/usr/include/c++/11/ext/string_conversions.h: + +/usr/include/c++/11/bits/exception_ptr.h: + +/usr/include/aarch64-linux-gnu/bits/byteswap.h: + +/usr/include/aarch64-linux-gnu/NvInferRuntimeBase.h: + +/usr/include/c++/11/bits/concept_check.h: + +/usr/include/c++/11/ratio: + +/usr/include/aarch64-linux-gnu/bits/libc-header-start.h: + +/usr/include/aarch64-linux-gnu/NvInfer.h: + +/usr/include/aarch64-linux-gnu/NvInferLegacyDims.h: + +../../src/trt_logger.cpp: + +/usr/local/cuda-12.6/include/builtin_types.h: + +/usr/include/asm-generic/errno-base.h: + +/usr/include/aarch64-linux-gnu/bits/wordsize.h: + +/usr/include/c++/11/bits/char_traits.h: + +../../include/armor_yolo_detect/trt_logger.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h: + +/usr/include/c++/11/ctime: + +/usr/local/cuda-12.6/include/cuda_device_runtime_api.h: + +/usr/include/aarch64-linux-gnu/bits/select.h: + +/usr/include/aarch64-linux-gnu/bits/timesize.h: + +/usr/include/aarch64-linux-gnu/bits/setjmp.h: + +/usr/include/aarch64-linux-gnu/bits/struct_mutex.h: + +/usr/include/aarch64-linux-gnu/bits/types.h: + +/usr/include/c++/11/bits/range_access.h: + +/usr/include/c++/11/cstddef: + +/usr/include/c++/11/bits/stl_algobase.h: + +/usr/include/c++/11/cwchar: + +/usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h: + +/usr/include/c++/11/bits/nested_exception.h: + +/usr/include/aarch64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/aarch64-linux-gnu/bits/errno.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h: + +/usr/include/c++/11/tuple: + +/usr/include/c++/11/type_traits: + +/usr/include/aarch64-linux-gnu/bits/types/FILE.h: + +/usr/include/stdc-predef.h: + +/usr/include/aarch64-linux-gnu/bits/typesizes.h: + +/usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h: + +/usr/include/aarch64-linux-gnu/bits/types/__mbstate_t.h: + +/usr/include/c++/11/ext/type_traits.h: + +/usr/local/cuda-12.6/include/texture_types.h: + +/usr/include/alloca.h: + +/usr/include/aarch64-linux-gnu/bits/time64.h: + +/usr/include/c++/11/streambuf: + +/usr/include/aarch64-linux-gnu/bits/stdlib-float.h: + +/usr/include/c++/11/bits/functexcept.h: + +/usr/include/aarch64-linux-gnu/bits/time.h: + +/usr/include/c++/11/bits/stringfwd.h: + +/usr/include/c++/11/bits/memoryfwd.h: + +/usr/include/c++/11/bits/postypes.h: + +/usr/include/aarch64-linux-gnu/bits/timex.h: + +/usr/include/c++/11/backward/binders.h: + +/usr/include/aarch64-linux-gnu/bits/posix1_lim.h: + +/usr/include/c++/11/iostream: + +/usr/include/aarch64-linux-gnu/bits/floatn.h: + +/usr/include/aarch64-linux-gnu/bits/floatn-common.h: + +/usr/include/c++/11/bits/string_view.tcc: + +/usr/local/cuda-12.6/include/cuda_runtime_api.h: + +/usr/include/c++/11/bits/hash_bytes.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/stdarg.h: + +/usr/include/aarch64-linux-gnu/bits/types/__locale_t.h: + +/usr/include/aarch64-linux-gnu/bits/locale.h: + +/usr/include/c++/11/bits/charconv.h: + +/usr/include/aarch64-linux-gnu/bits/types/mbstate_t.h: + +/usr/include/aarch64-linux-gnu/bits/types/__FILE.h: + +/usr/include/aarch64-linux-gnu/bits/types/locale_t.h: + +/usr/include/aarch64-linux-gnu/sys/cdefs.h: + +/usr/include/c++/11/exception: + +/usr/include/c++/11/bits/exception_defines.h: + +/usr/include/wchar.h: + +/usr/include/c++/11/bits/cxxabi_init_exception.h: + +/usr/include/aarch64-linux-gnu/bits/types/wint_t.h: + +/usr/include/c++/11/typeinfo: + +/usr/include/c++/11/bits/ptr_traits.h: + +/usr/include/c++/11/bits/stl_iterator.h: + +/usr/include/c++/11/new: + +/usr/include/c++/11/bits/move.h: + +/usr/include/pthread.h: + +/usr/include/c++/11/bits/cpp_type_traits.h: + +/usr/include/c++/11/bits/stl_pair.h: + +/usr/include/c++/11/ext/atomicity.h: + +/usr/include/c++/11/cstdlib: + +/usr/include/c++/11/bits/stl_iterator_base_types.h: + +/usr/include/c++/11/bits/stl_iterator_base_funcs.h: + +/usr/include/aarch64-linux-gnu/NvInferRuntimePlugin.h: + +/usr/include/aarch64-linux-gnu/bits/endianness.h: + +/usr/include/aarch64-linux-gnu/bits/local_lim.h: + +/usr/include/ctype.h: + +/usr/include/c++/11/debug/assertions.h: + +/usr/include/c++/11/bits/localefwd.h: + +/usr/include/c++/11/cerrno: + +/usr/include/aarch64-linux-gnu/c++/11/bits/c++locale.h: + +/usr/include/c++/11/bits/streambuf_iterator.h: + +/usr/include/aarch64-linux-gnu/bits/types/time_t.h: + +/usr/include/aarch64-linux-gnu/asm/errno.h: + +/usr/include/aarch64-linux-gnu/NvInferImpl.h: + +/usr/include/c++/11/cctype: + +/usr/include/aarch64-linux-gnu/NvInferVersion.h: + +/usr/include/aarch64-linux-gnu/bits/endian.h: + +/usr/include/c++/11/bits/ios_base.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h: + +/usr/local/cuda-12.6/include/surface_types.h: + +/usr/include/sched.h: + +/usr/include/c++/11/debug/debug.h: + +/usr/include/aarch64-linux-gnu/bits/types/struct_sched_param.h: + +/usr/include/c++/11/bits/basic_ios.tcc: + +/usr/include/aarch64-linux-gnu/bits/cpu-set.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/stdint.h: + +/usr/include/time.h: + +/usr/include/c++/11/initializer_list: + +/usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/c++/11/bits/allocator.h: + +/usr/include/c++/11/pstl/pstl_config.h: + +/usr/include/aarch64-linux-gnu/bits/types/clockid_t.h: diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.ts b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.ts new file mode 100644 index 0000000..924cd49 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for compiler generated dependencies management for armor_yolo_detect. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/depend.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/depend.make new file mode 100644 index 0000000..9f82b12 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for armor_yolo_detect. +# This may be replaced when dependencies are built. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/flags.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/flags.make new file mode 100644 index 0000000..61f9d20 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# compile CXX with /usr/bin/c++ +CXX_DEFINES = -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS + +CXX_INCLUDES = -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs + +CXX_FLAGS = -fPIC -std=gnu++17 + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/link.txt b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/link.txt new file mode 100644 index 0000000..3e0e801 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ -fPIC -shared -Wl,-soname,libarmor_yolo_detect.so -o libarmor_yolo_detect.so CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o -Wl,-rpath,/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib /opt/ros/humble/lib/libcomponent_manager.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstd_srvs__rosidl_generator_py.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libcv_bridge.so /opt/ros/humble/lib/aarch64-linux-gnu/libimage_transport.so /opt/ros/humble/lib/libstatic_transform_broadcaster_node.so /usr/lib/aarch64-linux-gnu/libopencv_stitching.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_alphamat.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_aruco.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_barcode.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_bgsegm.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_bioinspired.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_ccalib.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_dnn_objdetect.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_dnn_superres.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_dpm.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_face.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_freetype.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_fuzzy.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_hdf.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_hfs.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_img_hash.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_intensity_transform.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_line_descriptor.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_mcc.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_quality.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_rapid.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_reg.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_rgbd.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_saliency.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_shape.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_stereo.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_structured_light.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_superres.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_surface_matching.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_tracking.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_videostab.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_viz.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_wechat_qrcode.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_xobjdetect.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_xphoto.so.4.5.4d /usr/local/cuda-12.6/lib64/libcudart_static.a -ldl /usr/lib/aarch64-linux-gnu/librt.a -lnvinfer -lnvinfer_plugin -lnvonnxparser /opt/ros/humble/lib/libclass_loader.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_c.so /opt/ros/humble/lib/libstd_srvs__rosidl_generator_c.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libsensor_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libtf2_ros.so /opt/ros/humble/lib/libtf2.so /usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0 /opt/ros/humble/lib/libmessage_filters.so /opt/ros/humble/lib/librclcpp_action.so /opt/ros/humble/lib/librclcpp.so /opt/ros/humble/lib/liblibstatistics_collector.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so /opt/ros/humble/lib/librcl_action.so /opt/ros/humble/lib/librcl.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/librcl_yaml_param_parser.so /opt/ros/humble/lib/libyaml.so /opt/ros/humble/lib/libtracetools.so /opt/ros/humble/lib/librmw_implementation.so /opt/ros/humble/lib/libament_index_cpp.so /opt/ros/humble/lib/librcl_logging_spdlog.so /opt/ros/humble/lib/librcl_logging_interface.so /usr/lib/aarch64-linux-gnu/libfmt.so.8.1.1 -Wl,--as-needed /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libfastcdr.so.1.0.24 /opt/ros/humble/lib/librmw.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librosidl_typesupport_cpp.so /opt/ros/humble/lib/libtf2_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libstd_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libtf2_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libstd_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libaction_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/libaction_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_py.so /usr/lib/aarch64-linux-gnu/libpython3.10.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/librosidl_typesupport_c.so /opt/ros/humble/lib/librcpputils.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_c.so /opt/ros/humble/lib/librosidl_runtime_c.so /opt/ros/humble/lib/librcutils.so /usr/lib/aarch64-linux-gnu/liborocos-kdl.so /usr/lib/aarch64-linux-gnu/libopencv_highgui.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_datasets.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_plot.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_text.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_ml.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_phase_unwrapping.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_optflow.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_ximgproc.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_video.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_videoio.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_objdetect.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_calib3d.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_dnn.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_features2d.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_flann.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_photo.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_core.so.4.5.4d -ldl diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/progress.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/progress.make new file mode 100644 index 0000000..33e6bff --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/progress.make @@ -0,0 +1,6 @@ +CMAKE_PROGRESS_1 = 1 +CMAKE_PROGRESS_2 = 2 +CMAKE_PROGRESS_3 = 3 +CMAKE_PROGRESS_4 = 4 +CMAKE_PROGRESS_5 = 5 + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o new file mode 100644 index 0000000..bd31f6e Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o differ diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o.d b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o.d new file mode 100644 index 0000000..452882f --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o.d @@ -0,0 +1,186 @@ +CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o: \ + /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp \ + /usr/include/stdc-predef.h \ + /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/trt_logger.hpp \ + /usr/include/aarch64-linux-gnu/NvInfer.h \ + /usr/include/aarch64-linux-gnu/NvInferLegacyDims.h \ + /usr/include/aarch64-linux-gnu/NvInferRuntimeBase.h \ + /usr/include/aarch64-linux-gnu/NvInferVersion.h \ + /usr/include/c++/11/cstddef \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/aarch64-linux-gnu/bits/wordsize.h \ + /usr/include/aarch64-linux-gnu/bits/timesize.h \ + /usr/include/aarch64-linux-gnu/sys/cdefs.h \ + /usr/include/aarch64-linux-gnu/bits/long-double.h \ + /usr/include/aarch64-linux-gnu/gnu/stubs.h \ + /usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/pstl/pstl_config.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h \ + /usr/include/c++/11/cstdint \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/aarch64-linux-gnu/bits/libc-header-start.h \ + /usr/include/aarch64-linux-gnu/bits/types.h \ + /usr/include/aarch64-linux-gnu/bits/typesizes.h \ + /usr/include/aarch64-linux-gnu/bits/time64.h \ + /usr/include/aarch64-linux-gnu/bits/wchar.h \ + /usr/include/aarch64-linux-gnu/bits/stdint-intn.h \ + /usr/include/aarch64-linux-gnu/bits/stdint-uintn.h \ + /usr/local/cuda-12.6/include/cuda_runtime_api.h \ + /usr/local/cuda-12.6/include/crt/host_defines.h \ + /usr/local/cuda-12.6/include/builtin_types.h \ + /usr/local/cuda-12.6/include/device_types.h \ + /usr/local/cuda-12.6/include/driver_types.h \ + /usr/local/cuda-12.6/include/vector_types.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/limits.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/syslimits.h \ + /usr/include/limits.h /usr/include/aarch64-linux-gnu/bits/posix1_lim.h \ + /usr/include/aarch64-linux-gnu/bits/local_lim.h \ + /usr/include/linux/limits.h \ + /usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/aarch64-linux-gnu/bits/posix2_lim.h \ + /usr/include/aarch64-linux-gnu/bits/xopen_lim.h \ + /usr/include/aarch64-linux-gnu/bits/uio_lim.h \ + /usr/local/cuda-12.6/include/surface_types.h \ + /usr/local/cuda-12.6/include/texture_types.h \ + /usr/local/cuda-12.6/include/cuda_device_runtime_api.h \ + /usr/include/aarch64-linux-gnu/NvInferRuntime.h \ + /usr/include/aarch64-linux-gnu/NvInferImpl.h \ + /usr/include/aarch64-linux-gnu/NvInferRuntimeCommon.h \ + /usr/include/aarch64-linux-gnu/NvInferRuntimePlugin.h \ + /usr/include/c++/11/iostream /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/memoryfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/aarch64-linux-gnu/bits/floatn.h \ + /usr/include/aarch64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdarg.h \ + /usr/include/aarch64-linux-gnu/bits/types/wint_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/locale_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/c++/11/exception /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/typeinfo /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/new /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/aarch64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/aarch64-linux-gnu/bits/endian.h \ + /usr/include/aarch64-linux-gnu/bits/endianness.h \ + /usr/include/c++/11/bits/ios_base.h /usr/include/c++/11/ext/atomicity.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/aarch64-linux-gnu/bits/types/time_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/aarch64-linux-gnu/bits/sched.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/aarch64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/aarch64-linux-gnu/bits/time.h \ + /usr/include/aarch64-linux-gnu/bits/timex.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/aarch64-linux-gnu/bits/types/clock_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/aarch64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/timer_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/aarch64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/aarch64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/aarch64-linux-gnu/bits/struct_mutex.h \ + /usr/include/aarch64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/aarch64-linux-gnu/bits/setjmp.h \ + /usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/aarch64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/bits/locale_classes.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_construct.h /usr/include/c++/11/string_view \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/string_view.tcc \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/aarch64-linux-gnu/bits/waitflags.h \ + /usr/include/aarch64-linux-gnu/bits/waitstatus.h \ + /usr/include/aarch64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/aarch64-linux-gnu/bits/byteswap.h \ + /usr/include/aarch64-linux-gnu/bits/uintn-identity.h \ + /usr/include/aarch64-linux-gnu/sys/select.h \ + /usr/include/aarch64-linux-gnu/bits/select.h \ + /usr/include/aarch64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/alloca.h /usr/include/aarch64-linux-gnu/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/aarch64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/aarch64-linux-gnu/bits/stdio_lim.h \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/aarch64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/aarch64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/aarch64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/system_error \ + /usr/include/aarch64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/aarch64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/mutex \ + /usr/include/c++/11/tuple /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h /usr/include/c++/11/array \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/invoke.h /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/DependInfo.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/DependInfo.cmake new file mode 100644 index 0000000..dc55e44 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/DependInfo.cmake @@ -0,0 +1,18 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/build.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/build.make new file mode 100644 index 0000000..48e92db --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/build.make @@ -0,0 +1,87 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +# Utility rule file for armor_yolo_detect_uninstall. + +# Include any custom commands dependencies for this target. +include CMakeFiles/armor_yolo_detect_uninstall.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/armor_yolo_detect_uninstall.dir/progress.make + +CMakeFiles/armor_yolo_detect_uninstall: + /usr/bin/cmake -P /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_uninstall_target/ament_cmake_uninstall_target.cmake + +armor_yolo_detect_uninstall: CMakeFiles/armor_yolo_detect_uninstall +armor_yolo_detect_uninstall: CMakeFiles/armor_yolo_detect_uninstall.dir/build.make +.PHONY : armor_yolo_detect_uninstall + +# Rule to build all files generated by this target. +CMakeFiles/armor_yolo_detect_uninstall.dir/build: armor_yolo_detect_uninstall +.PHONY : CMakeFiles/armor_yolo_detect_uninstall.dir/build + +CMakeFiles/armor_yolo_detect_uninstall.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/armor_yolo_detect_uninstall.dir/cmake_clean.cmake +.PHONY : CMakeFiles/armor_yolo_detect_uninstall.dir/clean + +CMakeFiles/armor_yolo_detect_uninstall.dir/depend: + cd /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/armor_yolo_detect_uninstall.dir/depend + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/cmake_clean.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/cmake_clean.cmake new file mode 100644 index 0000000..faa2274 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/cmake_clean.cmake @@ -0,0 +1,8 @@ +file(REMOVE_RECURSE + "CMakeFiles/armor_yolo_detect_uninstall" +) + +# Per-language clean rules from dependency scanning. +foreach(lang ) + include(CMakeFiles/armor_yolo_detect_uninstall.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/compiler_depend.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/compiler_depend.make new file mode 100644 index 0000000..0922637 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty custom commands generated dependencies file for armor_yolo_detect_uninstall. +# This may be replaced when dependencies are built. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/compiler_depend.ts b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/compiler_depend.ts new file mode 100644 index 0000000..95e9e0a --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for custom commands dependencies management for armor_yolo_detect_uninstall. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/progress.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect_uninstall.dir/progress.make @@ -0,0 +1 @@ + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/DependInfo.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/DependInfo.cmake new file mode 100644 index 0000000..233e5a9 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/DependInfo.cmake @@ -0,0 +1,19 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp" "CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o" "gcc" "CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o.d" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/build.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/build.make new file mode 100644 index 0000000..0ddddca --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/build.make @@ -0,0 +1,175 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +# Include any dependencies generated for this target. +include CMakeFiles/armor_yolo_detector_node.dir/depend.make +# Include any dependencies generated by the compiler for this target. +include CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/armor_yolo_detector_node.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/armor_yolo_detector_node.dir/flags.make + +CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o: CMakeFiles/armor_yolo_detector_node.dir/flags.make +CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o: rclcpp_components/node_main_armor_yolo_detector_node.cpp +CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o: CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o -MF CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o.d -o CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp + +CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp > CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.i + +CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp -o CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.s + +# Object files for target armor_yolo_detector_node +armor_yolo_detector_node_OBJECTS = \ +"CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o" + +# External object files for target armor_yolo_detector_node +armor_yolo_detector_node_EXTERNAL_OBJECTS = + +armor_yolo_detector_node: CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o +armor_yolo_detector_node: CMakeFiles/armor_yolo_detector_node.dir/build.make +armor_yolo_detector_node: /opt/ros/humble/lib/libcomponent_manager.so +armor_yolo_detector_node: /opt/ros/humble/lib/librclcpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/liblibstatistics_collector.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl.so +armor_yolo_detector_node: /opt/ros/humble/lib/librmw_implementation.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_logging_spdlog.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_logging_interface.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_yaml_param_parser.so +armor_yolo_detector_node: /opt/ros/humble/lib/libyaml.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so +armor_yolo_detector_node: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libtracetools.so +armor_yolo_detector_node: /opt/ros/humble/lib/libclass_loader.so +armor_yolo_detector_node: /usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0 +armor_yolo_detector_node: /opt/ros/humble/lib/libament_index_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librmw.so +armor_yolo_detector_node: /opt/ros/humble/lib/libfastcdr.so.1.0.24 +armor_yolo_detector_node: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosidl_typesupport_introspection_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosidl_typesupport_cpp.so +armor_yolo_detector_node: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so +armor_yolo_detector_node: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so +armor_yolo_detector_node: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosidl_typesupport_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcpputils.so +armor_yolo_detector_node: /opt/ros/humble/lib/librosidl_runtime_c.so +armor_yolo_detector_node: /opt/ros/humble/lib/librcutils.so +armor_yolo_detector_node: /usr/lib/aarch64-linux-gnu/libpython3.10.so +armor_yolo_detector_node: CMakeFiles/armor_yolo_detector_node.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable armor_yolo_detector_node" + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/armor_yolo_detector_node.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/armor_yolo_detector_node.dir/build: armor_yolo_detector_node +.PHONY : CMakeFiles/armor_yolo_detector_node.dir/build + +CMakeFiles/armor_yolo_detector_node.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/armor_yolo_detector_node.dir/cmake_clean.cmake +.PHONY : CMakeFiles/armor_yolo_detector_node.dir/clean + +CMakeFiles/armor_yolo_detector_node.dir/depend: + cd /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/armor_yolo_detector_node.dir/depend + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/cmake_clean.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/cmake_clean.cmake new file mode 100644 index 0000000..5e8aa92 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/cmake_clean.cmake @@ -0,0 +1,11 @@ +file(REMOVE_RECURSE + "CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o" + "CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o.d" + "armor_yolo_detector_node" + "armor_yolo_detector_node.pdb" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/armor_yolo_detector_node.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.internal b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.internal new file mode 100644 index 0000000..1e23c2c --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.internal @@ -0,0 +1,719 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o + /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp + /usr/include/stdc-predef.h + /usr/include/c++/11/memory + /usr/include/c++/11/bits/stl_algobase.h + /usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h + /usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h + /usr/include/features.h + /usr/include/features-time64.h + /usr/include/aarch64-linux-gnu/bits/wordsize.h + /usr/include/aarch64-linux-gnu/bits/timesize.h + /usr/include/aarch64-linux-gnu/sys/cdefs.h + /usr/include/aarch64-linux-gnu/bits/long-double.h + /usr/include/aarch64-linux-gnu/gnu/stubs.h + /usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h + /usr/include/aarch64-linux-gnu/c++/11/bits/cpu_defines.h + /usr/include/c++/11/pstl/pstl_config.h + /usr/include/c++/11/bits/functexcept.h + /usr/include/c++/11/bits/exception_defines.h + /usr/include/c++/11/bits/cpp_type_traits.h + /usr/include/c++/11/ext/type_traits.h + /usr/include/c++/11/ext/numeric_traits.h + /usr/include/c++/11/bits/stl_pair.h + /usr/include/c++/11/bits/move.h + /usr/include/c++/11/type_traits + /usr/include/c++/11/bits/stl_iterator_base_types.h + /usr/include/c++/11/bits/stl_iterator_base_funcs.h + /usr/include/c++/11/bits/concept_check.h + /usr/include/c++/11/debug/assertions.h + /usr/include/c++/11/bits/stl_iterator.h + /usr/include/c++/11/bits/ptr_traits.h + /usr/include/c++/11/debug/debug.h + /usr/include/c++/11/bits/predefined_ops.h + /usr/include/c++/11/bits/allocator.h + /usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h + /usr/include/c++/11/ext/new_allocator.h + /usr/include/c++/11/new + /usr/include/c++/11/bits/exception.h + /usr/include/c++/11/bits/memoryfwd.h + /usr/include/c++/11/bits/stl_construct.h + /usr/include/c++/11/bits/stl_uninitialized.h + /usr/include/c++/11/ext/alloc_traits.h + /usr/include/c++/11/bits/alloc_traits.h + /usr/include/c++/11/bits/stl_tempbuf.h + /usr/include/c++/11/bits/stl_raw_storage_iter.h + /usr/include/c++/11/bits/align.h + /usr/include/c++/11/bit + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdint.h + /usr/include/stdint.h + /usr/include/aarch64-linux-gnu/bits/libc-header-start.h + /usr/include/aarch64-linux-gnu/bits/types.h + /usr/include/aarch64-linux-gnu/bits/typesizes.h + /usr/include/aarch64-linux-gnu/bits/time64.h + /usr/include/aarch64-linux-gnu/bits/wchar.h + /usr/include/aarch64-linux-gnu/bits/stdint-intn.h + /usr/include/aarch64-linux-gnu/bits/stdint-uintn.h + /usr/include/c++/11/bits/uses_allocator.h + /usr/include/c++/11/bits/unique_ptr.h + /usr/include/c++/11/utility + /usr/include/c++/11/bits/stl_relops.h + /usr/include/c++/11/initializer_list + /usr/include/c++/11/tuple + /usr/include/c++/11/array + /usr/include/c++/11/bits/range_access.h + /usr/include/c++/11/bits/invoke.h + /usr/include/c++/11/bits/stl_function.h + /usr/include/c++/11/backward/binders.h + /usr/include/c++/11/bits/functional_hash.h + /usr/include/c++/11/bits/hash_bytes.h + /usr/include/c++/11/bits/shared_ptr.h + /usr/include/c++/11/iosfwd + /usr/include/c++/11/bits/stringfwd.h + /usr/include/c++/11/bits/postypes.h + /usr/include/c++/11/cwchar + /usr/include/wchar.h + /usr/include/aarch64-linux-gnu/bits/floatn.h + /usr/include/aarch64-linux-gnu/bits/floatn-common.h + /usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdarg.h + /usr/include/aarch64-linux-gnu/bits/types/wint_t.h + /usr/include/aarch64-linux-gnu/bits/types/mbstate_t.h + /usr/include/aarch64-linux-gnu/bits/types/__mbstate_t.h + /usr/include/aarch64-linux-gnu/bits/types/__FILE.h + /usr/include/aarch64-linux-gnu/bits/types/FILE.h + /usr/include/aarch64-linux-gnu/bits/types/locale_t.h + /usr/include/aarch64-linux-gnu/bits/types/__locale_t.h + /usr/include/c++/11/bits/shared_ptr_base.h + /usr/include/c++/11/typeinfo + /usr/include/c++/11/bits/allocated_ptr.h + /usr/include/c++/11/bits/refwrap.h + /usr/include/c++/11/ext/aligned_buffer.h + /usr/include/c++/11/ext/atomicity.h + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h + /usr/include/pthread.h + /usr/include/sched.h + /usr/include/aarch64-linux-gnu/bits/types/time_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h + /usr/include/aarch64-linux-gnu/bits/endian.h + /usr/include/aarch64-linux-gnu/bits/endianness.h + /usr/include/aarch64-linux-gnu/bits/sched.h + /usr/include/aarch64-linux-gnu/bits/types/struct_sched_param.h + /usr/include/aarch64-linux-gnu/bits/cpu-set.h + /usr/include/time.h + /usr/include/aarch64-linux-gnu/bits/time.h + /usr/include/aarch64-linux-gnu/bits/timex.h + /usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h + /usr/include/aarch64-linux-gnu/bits/types/clock_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct_tm.h + /usr/include/aarch64-linux-gnu/bits/types/clockid_t.h + /usr/include/aarch64-linux-gnu/bits/types/timer_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct_itimerspec.h + /usr/include/aarch64-linux-gnu/bits/pthreadtypes.h + /usr/include/aarch64-linux-gnu/bits/thread-shared-types.h + /usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h + /usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h + /usr/include/aarch64-linux-gnu/bits/struct_mutex.h + /usr/include/aarch64-linux-gnu/bits/struct_rwlock.h + /usr/include/aarch64-linux-gnu/bits/setjmp.h + /usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct___jmp_buf_tag.h + /usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h + /usr/include/aarch64-linux-gnu/c++/11/bits/atomic_word.h + /usr/include/aarch64-linux-gnu/sys/single_threaded.h + /usr/include/c++/11/ext/concurrence.h + /usr/include/c++/11/exception + /usr/include/c++/11/bits/exception_ptr.h + /usr/include/c++/11/bits/cxxabi_init_exception.h + /usr/include/c++/11/bits/nested_exception.h + /usr/include/c++/11/bits/shared_ptr_atomic.h + /usr/include/c++/11/bits/atomic_base.h + /usr/include/c++/11/bits/atomic_lockfree_defines.h + /usr/include/c++/11/backward/auto_ptr.h + /usr/include/c++/11/pstl/glue_memory_defs.h + /usr/include/c++/11/pstl/execution_defs.h + /usr/include/c++/11/string + /usr/include/c++/11/bits/char_traits.h + /usr/include/c++/11/cstdint + /usr/include/c++/11/bits/localefwd.h + /usr/include/aarch64-linux-gnu/c++/11/bits/c++locale.h + /usr/include/c++/11/clocale + /usr/include/locale.h + /usr/include/aarch64-linux-gnu/bits/locale.h + /usr/include/c++/11/cctype + /usr/include/ctype.h + /usr/include/c++/11/bits/ostream_insert.h + /usr/include/c++/11/bits/cxxabi_forced.h + /usr/include/c++/11/bits/basic_string.h + /usr/include/c++/11/string_view + /usr/include/c++/11/bits/string_view.tcc + /usr/include/c++/11/ext/string_conversions.h + /usr/include/c++/11/cstdlib + /usr/include/stdlib.h + /usr/include/aarch64-linux-gnu/bits/waitflags.h + /usr/include/aarch64-linux-gnu/bits/waitstatus.h + /usr/include/aarch64-linux-gnu/sys/types.h + /usr/include/endian.h + /usr/include/aarch64-linux-gnu/bits/byteswap.h + /usr/include/aarch64-linux-gnu/bits/uintn-identity.h + /usr/include/aarch64-linux-gnu/sys/select.h + /usr/include/aarch64-linux-gnu/bits/select.h + /usr/include/aarch64-linux-gnu/bits/types/sigset_t.h + /usr/include/alloca.h + /usr/include/aarch64-linux-gnu/bits/stdlib-float.h + /usr/include/c++/11/bits/std_abs.h + /usr/include/c++/11/cstdio + /usr/include/stdio.h + /usr/include/aarch64-linux-gnu/bits/types/__fpos_t.h + /usr/include/aarch64-linux-gnu/bits/types/__fpos64_t.h + /usr/include/aarch64-linux-gnu/bits/types/struct_FILE.h + /usr/include/aarch64-linux-gnu/bits/types/cookie_io_functions_t.h + /usr/include/aarch64-linux-gnu/bits/stdio_lim.h + /usr/include/c++/11/cerrno + /usr/include/errno.h + /usr/include/aarch64-linux-gnu/bits/errno.h + /usr/include/linux/errno.h + /usr/include/aarch64-linux-gnu/asm/errno.h + /usr/include/asm-generic/errno.h + /usr/include/asm-generic/errno-base.h + /usr/include/aarch64-linux-gnu/bits/types/error_t.h + /usr/include/c++/11/bits/charconv.h + /usr/include/c++/11/bits/basic_string.tcc + /usr/include/c++/11/vector + /usr/include/c++/11/bits/stl_vector.h + /usr/include/c++/11/bits/stl_bvector.h + /usr/include/c++/11/bits/vector.tcc + /opt/ros/humble/include/class_loader/class_loader/class_loader.hpp + /usr/include/c++/11/algorithm + /usr/include/c++/11/bits/stl_algo.h + /usr/include/c++/11/bits/algorithmfwd.h + /usr/include/c++/11/bits/stl_heap.h + /usr/include/c++/11/bits/uniform_int_dist.h + /usr/include/c++/11/pstl/glue_algorithm_defs.h + /usr/include/c++/11/functional + /usr/include/c++/11/bits/std_function.h + /usr/include/c++/11/unordered_map + /usr/include/c++/11/bits/hashtable.h + /usr/include/c++/11/bits/hashtable_policy.h + /usr/include/c++/11/bits/enable_special_members.h + /usr/include/c++/11/bits/node_handle.h + /usr/include/c++/11/bits/unordered_map.h + /usr/include/c++/11/bits/erase_if.h + /usr/include/c++/11/cassert + /usr/include/assert.h + /usr/include/c++/11/cstddef + /usr/include/c++/11/mutex + /usr/include/c++/11/chrono + /usr/include/c++/11/ratio + /usr/include/c++/11/limits + /usr/include/c++/11/ctime + /usr/include/c++/11/bits/parse_numbers.h + /usr/include/c++/11/system_error + /usr/include/aarch64-linux-gnu/c++/11/bits/error_constants.h + /usr/include/c++/11/stdexcept + /usr/include/c++/11/bits/std_mutex.h + /usr/include/c++/11/bits/unique_lock.h + /usr/include/console_bridge/console.h + /usr/include/console_bridge_export.h + /opt/ros/humble/include/class_loader/class_loader/class_loader_core.hpp + /usr/include/c++/11/map + /usr/include/c++/11/bits/stl_tree.h + /usr/include/c++/11/bits/stl_map.h + /usr/include/c++/11/bits/stl_multimap.h + /opt/ros/humble/include/class_loader/class_loader/exceptions.hpp + /opt/ros/humble/include/class_loader/class_loader/visibility_control.hpp + /opt/ros/humble/include/class_loader/class_loader/meta_object.hpp + /opt/ros/humble/include/rcpputils/rcpputils/shared_library.hpp + /opt/ros/humble/include/rcutils/rcutils/shared_library.h + /usr/include/string.h + /usr/include/strings.h + /opt/ros/humble/include/rcutils/rcutils/allocator.h + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdbool.h + /opt/ros/humble/include/rcutils/rcutils/macros.h + /opt/ros/humble/include/rcutils/rcutils/testing/fault_injection.h + /opt/ros/humble/include/rcutils/rcutils/visibility_control.h + /opt/ros/humble/include/rcutils/rcutils/visibility_control_macros.h + /opt/ros/humble/include/rcutils/rcutils/types/rcutils_ret.h + /opt/ros/humble/include/rcpputils/rcpputils/visibility_control.hpp + /opt/ros/humble/include/class_loader/class_loader/register_macro.hpp + /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp + /usr/include/c++/11/csignal + /usr/include/signal.h + /usr/include/aarch64-linux-gnu/bits/signum-generic.h + /usr/include/aarch64-linux-gnu/bits/signum-arch.h + /usr/include/aarch64-linux-gnu/bits/types/sig_atomic_t.h + /usr/include/aarch64-linux-gnu/bits/types/siginfo_t.h + /usr/include/aarch64-linux-gnu/bits/types/__sigval_t.h + /usr/include/aarch64-linux-gnu/bits/siginfo-arch.h + /usr/include/aarch64-linux-gnu/bits/siginfo-consts.h + /usr/include/aarch64-linux-gnu/bits/siginfo-consts-arch.h + /usr/include/aarch64-linux-gnu/bits/types/sigval_t.h + /usr/include/aarch64-linux-gnu/bits/types/sigevent_t.h + /usr/include/aarch64-linux-gnu/bits/sigevent-consts.h + /usr/include/aarch64-linux-gnu/bits/sigaction.h + /usr/include/aarch64-linux-gnu/bits/sigcontext.h + /usr/include/aarch64-linux-gnu/asm/sigcontext.h + /usr/include/linux/types.h + /usr/include/aarch64-linux-gnu/asm/types.h + /usr/include/asm-generic/types.h + /usr/include/asm-generic/int-ll64.h + /usr/include/aarch64-linux-gnu/asm/bitsperlong.h + /usr/include/asm-generic/bitsperlong.h + /usr/include/linux/posix_types.h + /usr/include/linux/stddef.h + /usr/include/aarch64-linux-gnu/asm/posix_types.h + /usr/include/asm-generic/posix_types.h + /usr/include/aarch64-linux-gnu/asm/sve_context.h + /usr/include/aarch64-linux-gnu/bits/types/stack_t.h + /usr/include/aarch64-linux-gnu/sys/ucontext.h + /usr/include/aarch64-linux-gnu/sys/procfs.h + /usr/include/aarch64-linux-gnu/sys/time.h + /usr/include/aarch64-linux-gnu/sys/user.h + /usr/include/aarch64-linux-gnu/bits/procfs.h + /usr/include/aarch64-linux-gnu/bits/procfs-id.h + /usr/include/aarch64-linux-gnu/bits/procfs-prregset.h + /usr/include/aarch64-linux-gnu/bits/procfs-extra.h + /usr/include/aarch64-linux-gnu/bits/sigstack.h + /usr/include/aarch64-linux-gnu/bits/sigstksz.h + /usr/include/unistd.h + /usr/include/aarch64-linux-gnu/bits/posix_opt.h + /usr/include/aarch64-linux-gnu/bits/environments.h + /usr/include/aarch64-linux-gnu/bits/confname.h + /usr/include/aarch64-linux-gnu/bits/getopt_posix.h + /usr/include/aarch64-linux-gnu/bits/getopt_core.h + /usr/include/aarch64-linux-gnu/bits/unistd_ext.h + /usr/include/linux/close_range.h + /usr/include/aarch64-linux-gnu/bits/ss_flags.h + /usr/include/aarch64-linux-gnu/bits/types/struct_sigstack.h + /usr/include/aarch64-linux-gnu/bits/sigthread.h + /usr/include/aarch64-linux-gnu/bits/signal_ext.h + /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp + /usr/include/c++/11/future + /usr/include/c++/11/condition_variable + /usr/include/c++/11/atomic + /usr/include/c++/11/bits/atomic_futex.h + /usr/include/c++/11/bits/std_thread.h + /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp + /usr/include/c++/11/set + /usr/include/c++/11/bits/stl_set.h + /usr/include/c++/11/bits/stl_multiset.h + /usr/include/c++/11/thread + /usr/include/c++/11/bits/this_thread_sleep.h + /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp + /usr/include/c++/11/iostream + /usr/include/c++/11/ostream + /usr/include/c++/11/ios + /usr/include/c++/11/bits/ios_base.h + /usr/include/c++/11/bits/locale_classes.h + /usr/include/c++/11/bits/locale_classes.tcc + /usr/include/c++/11/streambuf + /usr/include/c++/11/bits/streambuf.tcc + /usr/include/c++/11/bits/basic_ios.h + /usr/include/c++/11/bits/locale_facets.h + /usr/include/c++/11/cwctype + /usr/include/wctype.h + /usr/include/aarch64-linux-gnu/bits/wctype-wchar.h + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_base.h + /usr/include/c++/11/bits/streambuf_iterator.h + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_inline.h + /usr/include/c++/11/bits/locale_facets.tcc + /usr/include/c++/11/bits/basic_ios.tcc + /usr/include/c++/11/bits/ostream.tcc + /usr/include/c++/11/istream + /usr/include/c++/11/bits/istream.tcc + /usr/include/c++/11/list + /usr/include/c++/11/bits/stl_list.h + /usr/include/c++/11/bits/list.tcc + /opt/ros/humble/include/rcl/rcl/guard_condition.h + /opt/ros/humble/include/rcl/rcl/allocator.h + /opt/ros/humble/include/rcl/rcl/context.h + /opt/ros/humble/include/rmw/rmw/init.h + /opt/ros/humble/include/rmw/rmw/init_options.h + /opt/ros/humble/include/rmw/rmw/domain_id.h + /opt/ros/humble/include/rmw/rmw/localhost.h + /opt/ros/humble/include/rmw/rmw/visibility_control.h + /opt/ros/humble/include/rmw/rmw/macros.h + /opt/ros/humble/include/rmw/rmw/ret_types.h + /opt/ros/humble/include/rmw/rmw/security_options.h + /opt/ros/humble/include/rcl/rcl/arguments.h + /opt/ros/humble/include/rcl/rcl/log_level.h + /opt/ros/humble/include/rcl/rcl/macros.h + /opt/ros/humble/include/rcl/rcl/types.h + /opt/ros/humble/include/rmw/rmw/types.h + /opt/ros/humble/include/rcutils/rcutils/logging.h + /opt/ros/humble/include/rcutils/rcutils/error_handling.h + /usr/include/c++/11/stdlib.h + /opt/ros/humble/include/rcutils/rcutils/snprintf.h + /opt/ros/humble/include/rcutils/rcutils/time.h + /opt/ros/humble/include/rcutils/rcutils/types.h + /opt/ros/humble/include/rcutils/rcutils/types/array_list.h + /opt/ros/humble/include/rcutils/rcutils/types/char_array.h + /opt/ros/humble/include/rcutils/rcutils/types/hash_map.h + /opt/ros/humble/include/rcutils/rcutils/types/string_array.h + /opt/ros/humble/include/rcutils/rcutils/qsort.h + /opt/ros/humble/include/rcutils/rcutils/types/string_map.h + /opt/ros/humble/include/rcutils/rcutils/types/uint8_array.h + /opt/ros/humble/include/rmw/rmw/events_statuses/events_statuses.h + /opt/ros/humble/include/rmw/rmw/events_statuses/incompatible_qos.h + /opt/ros/humble/include/rmw/rmw/qos_policy_kind.h + /opt/ros/humble/include/rmw/rmw/events_statuses/liveliness_changed.h + /opt/ros/humble/include/rmw/rmw/events_statuses/liveliness_lost.h + /opt/ros/humble/include/rmw/rmw/events_statuses/message_lost.h + /opt/ros/humble/include/rmw/rmw/events_statuses/offered_deadline_missed.h + /opt/ros/humble/include/rmw/rmw/events_statuses/requested_deadline_missed.h + /opt/ros/humble/include/rmw/rmw/serialized_message.h + /opt/ros/humble/include/rmw/rmw/subscription_content_filter_options.h + /opt/ros/humble/include/rmw/rmw/time.h + /opt/ros/humble/include/rcl/rcl/visibility_control.h + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/types.h + /opt/ros/humble/include/rcl/rcl/init_options.h + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdalign.h + /opt/ros/humble/include/rcl/rcl/wait.h + /opt/ros/humble/include/rcl/rcl/client.h + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/service_type_support_struct.h + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/visibility_control.h + /opt/ros/humble/include/rosidl_typesupport_interface/rosidl_typesupport_interface/macros.h + /opt/ros/humble/include/rcl/rcl/event_callback.h + /opt/ros/humble/include/rmw/rmw/event_callback_type.h + /opt/ros/humble/include/rcl/rcl/node.h + /opt/ros/humble/include/rcl/rcl/node_options.h + /opt/ros/humble/include/rcl/rcl/domain_id.h + /opt/ros/humble/include/rcl/rcl/service.h + /opt/ros/humble/include/rcl/rcl/subscription.h + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/message_type_support_struct.h + /opt/ros/humble/include/rmw/rmw/message_sequence.h + /opt/ros/humble/include/rcl/rcl/timer.h + /opt/ros/humble/include/rcl/rcl/time.h + /opt/ros/humble/include/rmw/rmw/rmw.h + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/sequence_bound.h + /opt/ros/humble/include/rmw/rmw/event.h + /opt/ros/humble/include/rmw/rmw/publisher_options.h + /opt/ros/humble/include/rmw/rmw/qos_profiles.h + /opt/ros/humble/include/rmw/rmw/subscription_options.h + /opt/ros/humble/include/rcl/rcl/event.h + /opt/ros/humble/include/rcl/rcl/publisher.h + /opt/ros/humble/include/rcpputils/rcpputils/scope_exit.hpp + /opt/ros/humble/include/rclcpp/rclcpp/context.hpp + /usr/include/c++/11/typeindex + /usr/include/c++/11/unordered_set + /usr/include/c++/11/bits/unordered_set.h + /opt/ros/humble/include/rclcpp/rclcpp/init_options.hpp + /opt/ros/humble/include/rclcpp/rclcpp/visibility_control.hpp + /opt/ros/humble/include/rclcpp/rclcpp/macros.hpp + /opt/ros/humble/include/rclcpp/rclcpp/contexts/default_context.hpp + /opt/ros/humble/include/rclcpp/rclcpp/guard_condition.hpp + /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp + /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp + /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp + /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp + /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp + /opt/ros/humble/include/rclcpp/rclcpp/client.hpp + /usr/include/c++/11/optional + /usr/include/c++/11/sstream + /usr/include/c++/11/bits/sstream.tcc + /usr/include/c++/11/variant + /opt/ros/humble/include/rcl/rcl/error_handling.h + /opt/ros/humble/include/rclcpp/rclcpp/detail/cpp_callback_trampoline.hpp + /opt/ros/humble/include/rclcpp/rclcpp/exceptions.hpp + /opt/ros/humble/include/rclcpp/rclcpp/exceptions/exceptions.hpp + /opt/ros/humble/include/rcpputils/rcpputils/join.hpp + /usr/include/c++/11/iterator + /usr/include/c++/11/bits/stream_iterator.h + /opt/ros/humble/include/rclcpp/rclcpp/expand_topic_or_service_name.hpp + /opt/ros/humble/include/rclcpp/rclcpp/function_traits.hpp + /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp + /opt/ros/humble/include/rclcpp/rclcpp/logger.hpp + /opt/ros/humble/include/rcpputils/rcpputils/filesystem_helper.hpp + /opt/ros/humble/include/rcutils/rcutils/logging_macros.h + /opt/ros/humble/include/rclcpp/rclcpp/utilities.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_graph_interface.hpp + /opt/ros/humble/include/rcl/rcl/graph.h + /opt/ros/humble/include/rmw/rmw/names_and_types.h + /opt/ros/humble/include/rmw/rmw/get_topic_names_and_types.h + /opt/ros/humble/include/rmw/rmw/topic_endpoint_info_array.h + /opt/ros/humble/include/rmw/rmw/topic_endpoint_info.h + /opt/ros/humble/include/rclcpp/rclcpp/event.hpp + /opt/ros/humble/include/rclcpp/rclcpp/qos.hpp + /opt/ros/humble/include/rclcpp/rclcpp/duration.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/duration.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.hpp + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/bounded_vector.hpp + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/message_initialization.hpp + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/message_initialization.h + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__builder.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__traits.hpp + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/traits.hpp + /usr/include/c++/11/codecvt + /usr/include/c++/11/bits/codecvt.h + /usr/include/c++/11/iomanip + /usr/include/c++/11/locale + /usr/include/c++/11/bits/locale_facets_nonio.h + /usr/include/aarch64-linux-gnu/c++/11/bits/time_members.h + /usr/include/aarch64-linux-gnu/c++/11/bits/messages_members.h + /usr/include/libintl.h + /usr/include/c++/11/bits/locale_facets_nonio.tcc + /usr/include/c++/11/bits/locale_conv.h + /usr/include/c++/11/bits/quoted_string.h + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_typesupport_cpp/message_type_support.hpp + /opt/ros/humble/include/rcl/rcl/logging_rosout.h + /opt/ros/humble/include/rmw/rmw/incompatible_qos_events_statuses.h + /opt/ros/humble/include/rclcpp/rclcpp/type_support_decl.hpp + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/message_type_support_decl.hpp + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/service_type_support_decl.hpp + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_typesupport_cpp/service_type_support.hpp + /opt/ros/humble/include/rmw/rmw/error_handling.h + /opt/ros/humble/include/rmw/rmw/impl/cpp/demangle.hpp + /usr/include/c++/11/cxxabi.h + /usr/include/aarch64-linux-gnu/c++/11/bits/cxxabi_tweaks.h + /opt/ros/humble/include/rmw/rmw/impl/config.h + /opt/ros/humble/include/rclcpp/rclcpp/publisher_base.hpp + /opt/ros/humble/include/rclcpp/rclcpp/network_flow_endpoint.hpp + /opt/ros/humble/include/rcl/rcl/network_flow_endpoints.h + /opt/ros/humble/include/rmw/rmw/network_flow_endpoint.h + /opt/ros/humble/include/rmw/rmw/network_flow_endpoint_array.h + /opt/ros/humble/include/rclcpp/rclcpp/qos_event.hpp + /opt/ros/humble/include/rclcpp/rclcpp/waitable.hpp + /opt/ros/humble/include/rcpputils/rcpputils/time.hpp + /opt/ros/humble/include/rclcpp/rclcpp/service.hpp + /opt/ros/humble/include/tracetools/tracetools/tracetools.h + /opt/ros/humble/include/tracetools/tracetools/config.h + /opt/ros/humble/include/tracetools/tracetools/visibility_control.hpp + /opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp + /opt/ros/humble/include/tracetools/tracetools/utils.hpp + /opt/ros/humble/include/rclcpp/rclcpp/subscription_base.hpp + /opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp + /opt/ros/humble/include/rclcpp/rclcpp/allocator/allocator_common.hpp + /usr/include/c++/11/cstring + /opt/ros/humble/include/rclcpp/rclcpp/allocator/allocator_deleter.hpp + /opt/ros/humble/include/rclcpp/rclcpp/detail/subscription_callback_type_helper.hpp + /opt/ros/humble/include/rclcpp/rclcpp/message_info.hpp + /opt/ros/humble/include/rclcpp/rclcpp/serialized_message.hpp + /opt/ros/humble/include/rclcpp/rclcpp/type_adapter.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/intra_process_manager.hpp + /usr/include/c++/11/shared_mutex + /opt/ros/humble/include/rclcpp/rclcpp/experimental/ros_message_intra_process_buffer.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process_base.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/intra_process_buffer.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/buffer_implementation_base.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process_buffer.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/create_intra_process_buffer.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/ring_buffer_implementation.hpp + /opt/ros/humble/include/rclcpp/rclcpp/intra_process_buffer_type.hpp + /opt/ros/humble/include/rclcpp/rclcpp/subscription_content_filter_options.hpp + /opt/ros/humble/include/rclcpp/rclcpp/timer.hpp + /opt/ros/humble/include/rclcpp/rclcpp/clock.hpp + /opt/ros/humble/include/rclcpp/rclcpp/time.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/time.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__builder.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__traits.hpp + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.hpp + /opt/ros/humble/include/rclcpp/rclcpp/rate.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_base_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/subscription.hpp + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_use_intra_process.hpp + /opt/ros/humble/include/rclcpp/rclcpp/intra_process_setting.hpp + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_intra_process_buffer_type.hpp + /opt/ros/humble/include/rclcpp/rclcpp/message_memory_strategy.hpp + /opt/ros/humble/include/rclcpp/rclcpp/subscription_options.hpp + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_subscription_payload.hpp + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_payload.hpp + /opt/ros/humble/include/rclcpp/rclcpp/qos_overriding_options.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/set_parameters_result.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp + /opt/ros/humble/include/rclcpp/rclcpp/topic_statistics_state.hpp + /opt/ros/humble/include/rclcpp/rclcpp/subscription_traits.hpp + /opt/ros/humble/include/rclcpp/rclcpp/topic_statistics/subscription_topic_statistics.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/generate_statistics_message.hpp + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/metrics_message.hpp + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__struct.hpp + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/statistic_data_point__struct.hpp + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__builder.hpp + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__traits.hpp + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/statistic_data_point__traits.hpp + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__type_support.hpp + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/rosidl_generator_cpp__visibility_control.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/visibility_control.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/types.hpp + /usr/include/c++/11/cmath + /usr/include/math.h + /usr/include/aarch64-linux-gnu/bits/math-vector.h + /usr/include/aarch64-linux-gnu/bits/libm-simd-decl-stubs.h + /usr/include/aarch64-linux-gnu/bits/flt-eval-method.h + /usr/include/aarch64-linux-gnu/bits/fp-logb.h + /usr/include/aarch64-linux-gnu/bits/fp-fast.h + /usr/include/aarch64-linux-gnu/bits/mathcalls-helper-functions.h + /usr/include/aarch64-linux-gnu/bits/mathcalls.h + /usr/include/aarch64-linux-gnu/bits/mathcalls-narrow.h + /usr/include/aarch64-linux-gnu/bits/iscanonical.h + /usr/include/c++/11/bits/specfun.h + /usr/include/c++/11/tr1/gamma.tcc + /usr/include/c++/11/tr1/special_function_util.h + /usr/include/c++/11/tr1/bessel_function.tcc + /usr/include/c++/11/tr1/beta_function.tcc + /usr/include/c++/11/tr1/ell_integral.tcc + /usr/include/c++/11/tr1/exp_integral.tcc + /usr/include/c++/11/tr1/hypergeometric.tcc + /usr/include/c++/11/tr1/legendre_function.tcc + /usr/include/c++/11/tr1/modified_bessel_func.tcc + /usr/include/c++/11/tr1/poly_hermite.tcc + /usr/include/c++/11/tr1/poly_laguerre.tcc + /usr/include/c++/11/tr1/riemann_zeta.tcc + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/constants.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/received_message_age.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/constants.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/topic_statistics_collector.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/collector.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/moving_average.hpp + /usr/include/c++/11/numeric + /usr/include/c++/11/bits/stl_numeric.h + /usr/include/c++/11/pstl/glue_numeric_defs.h + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/types.hpp + /opt/ros/humble/include/rcpputils/rcpputils/thread_safety_annotations.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/metric_details_interface.hpp + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/received_message_period.hpp + /opt/ros/humble/include/rclcpp/rclcpp/publisher.hpp + /opt/ros/humble/include/rclcpp/rclcpp/get_message_type_support_handle.hpp + /opt/ros/humble/include/rclcpp/rclcpp/is_ros_compatible_type.hpp + /opt/ros/humble/include/rclcpp/rclcpp/loaned_message.hpp + /opt/ros/humble/include/rclcpp/rclcpp/publisher_options.hpp + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_publisher_payload.hpp + /opt/ros/humble/include/rclcpp/rclcpp/future_return_code.hpp + /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/list_parameters_result.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_descriptor.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_event.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.hpp + /opt/ros/humble/include/rclcpp/rclcpp/generic_publisher.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_topics_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_timers_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/publisher_factory.hpp + /opt/ros/humble/include/rclcpp/rclcpp/subscription_factory.hpp + /opt/ros/humble/include/rclcpp/rclcpp/typesupport_helpers.hpp + /opt/ros/humble/include/rclcpp/rclcpp/generic_subscription.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_clock_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_logging_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/parameter.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.hpp + /opt/ros/humble/include/rclcpp/rclcpp/parameter_value.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_type.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_value.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_services_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_time_source_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_waitables_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_options.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp + /opt/ros/humble/include/rclcpp/rclcpp/create_client.hpp + /opt/ros/humble/include/rclcpp/rclcpp/create_generic_publisher.hpp + /opt/ros/humble/include/rclcpp/rclcpp/create_generic_subscription.hpp + /opt/ros/humble/include/rclcpp/rclcpp/create_publisher.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_topics_interface.hpp + /opt/ros/humble/include/rcpputils/rcpputils/pointer_traits.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_topics_interface_traits.hpp + /opt/ros/humble/include/rclcpp/rclcpp/detail/qos_parameters.hpp + /opt/ros/humble/include/rmw/rmw/qos_string_conversions.h + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_parameters_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface_traits.hpp + /opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp + /opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_enable_topic_statistics.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_timers_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_timers_interface_traits.hpp + /opt/ros/humble/include/rclcpp/rclcpp/create_timer.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_base_interface.hpp + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_base_interface_traits.hpp + /opt/ros/humble/include/rclcpp/rclcpp/executors/static_single_threaded_executor.hpp + /opt/ros/humble/include/rclcpp/rclcpp/executors/static_executor_entities_collector.hpp + /opt/ros/humble/include/rclcpp/rclcpp/experimental/executable_list.hpp + /opt/ros/humble/include/rclcpp/rclcpp/parameter_client.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/describe_parameters.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/get_parameter_types.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/get_parameters.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/list_parameters.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/set_parameters.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/set_parameters_atomically.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.hpp + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/parser.h + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/visibility_control.h + /opt/ros/humble/include/rclcpp/rclcpp/parameter_map.hpp + /opt/ros/humble/include/rclcpp/rclcpp/parameter_event_handler.hpp + /opt/ros/humble/include/rclcpp/rclcpp/parameter_service.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/dynamic_storage.hpp + /opt/ros/humble/include/rclcpp/rclcpp/subscription_wait_set_mask.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/storage_policy_common.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/sequential_synchronization.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_result.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_result_kind.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/synchronization_policy_common.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/static_storage.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/thread_safe_synchronization.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/write_preferring_read_write_lock.hpp + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_template.hpp + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory.hpp + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_instance_wrapper.hpp + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory_template.hpp + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.make new file mode 100644 index 0000000..38d594b --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.make @@ -0,0 +1,2142 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o: rclcpp_components/node_main_armor_yolo_detector_node.cpp \ + /usr/include/stdc-predef.h \ + /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h \ + /usr/include/features-time64.h \ + /usr/include/aarch64-linux-gnu/bits/wordsize.h \ + /usr/include/aarch64-linux-gnu/bits/timesize.h \ + /usr/include/aarch64-linux-gnu/sys/cdefs.h \ + /usr/include/aarch64-linux-gnu/bits/long-double.h \ + /usr/include/aarch64-linux-gnu/gnu/stubs.h \ + /usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/pstl/pstl_config.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h \ + /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h \ + /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h \ + /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h \ + /usr/include/c++/11/bit \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdint.h \ + /usr/include/stdint.h \ + /usr/include/aarch64-linux-gnu/bits/libc-header-start.h \ + /usr/include/aarch64-linux-gnu/bits/types.h \ + /usr/include/aarch64-linux-gnu/bits/typesizes.h \ + /usr/include/aarch64-linux-gnu/bits/time64.h \ + /usr/include/aarch64-linux-gnu/bits/wchar.h \ + /usr/include/aarch64-linux-gnu/bits/stdint-intn.h \ + /usr/include/aarch64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h \ + /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/initializer_list \ + /usr/include/c++/11/tuple \ + /usr/include/c++/11/array \ + /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h \ + /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h \ + /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar \ + /usr/include/wchar.h \ + /usr/include/aarch64-linux-gnu/bits/floatn.h \ + /usr/include/aarch64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdarg.h \ + /usr/include/aarch64-linux-gnu/bits/types/wint_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/locale_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/c++/11/bits/shared_ptr_base.h \ + /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h \ + /usr/include/sched.h \ + /usr/include/aarch64-linux-gnu/bits/types/time_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/aarch64-linux-gnu/bits/endian.h \ + /usr/include/aarch64-linux-gnu/bits/endianness.h \ + /usr/include/aarch64-linux-gnu/bits/sched.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/aarch64-linux-gnu/bits/cpu-set.h \ + /usr/include/time.h \ + /usr/include/aarch64-linux-gnu/bits/time.h \ + /usr/include/aarch64-linux-gnu/bits/timex.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/aarch64-linux-gnu/bits/types/clock_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/aarch64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/timer_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/aarch64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/aarch64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/aarch64-linux-gnu/bits/struct_mutex.h \ + /usr/include/aarch64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/aarch64-linux-gnu/bits/setjmp.h \ + /usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/aarch64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h \ + /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/pstl/glue_memory_defs.h \ + /usr/include/c++/11/pstl/execution_defs.h \ + /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h \ + /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale \ + /usr/include/locale.h \ + /usr/include/aarch64-linux-gnu/bits/locale.h \ + /usr/include/c++/11/cctype \ + /usr/include/ctype.h \ + /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h \ + /usr/include/c++/11/string_view \ + /usr/include/c++/11/bits/string_view.tcc \ + /usr/include/c++/11/ext/string_conversions.h \ + /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h \ + /usr/include/aarch64-linux-gnu/bits/waitflags.h \ + /usr/include/aarch64-linux-gnu/bits/waitstatus.h \ + /usr/include/aarch64-linux-gnu/sys/types.h \ + /usr/include/endian.h \ + /usr/include/aarch64-linux-gnu/bits/byteswap.h \ + /usr/include/aarch64-linux-gnu/bits/uintn-identity.h \ + /usr/include/aarch64-linux-gnu/sys/select.h \ + /usr/include/aarch64-linux-gnu/bits/select.h \ + /usr/include/aarch64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/alloca.h \ + /usr/include/aarch64-linux-gnu/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h \ + /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/aarch64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/aarch64-linux-gnu/bits/stdio_lim.h \ + /usr/include/c++/11/cerrno \ + /usr/include/errno.h \ + /usr/include/aarch64-linux-gnu/bits/errno.h \ + /usr/include/linux/errno.h \ + /usr/include/aarch64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h \ + /usr/include/asm-generic/errno-base.h \ + /usr/include/aarch64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc \ + /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /opt/ros/humble/include/class_loader/class_loader/class_loader.hpp \ + /usr/include/c++/11/algorithm \ + /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/pstl/glue_algorithm_defs.h \ + /usr/include/c++/11/functional \ + /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/unordered_map \ + /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/node_handle.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /usr/include/c++/11/bits/erase_if.h \ + /usr/include/c++/11/cassert \ + /usr/include/assert.h \ + /usr/include/c++/11/cstddef \ + /usr/include/c++/11/mutex \ + /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio \ + /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime \ + /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/system_error \ + /usr/include/aarch64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept \ + /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + /usr/include/console_bridge/console.h \ + /usr/include/console_bridge_export.h \ + /opt/ros/humble/include/class_loader/class_loader/class_loader_core.hpp \ + /usr/include/c++/11/map \ + /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /opt/ros/humble/include/class_loader/class_loader/exceptions.hpp \ + /opt/ros/humble/include/class_loader/class_loader/visibility_control.hpp \ + /opt/ros/humble/include/class_loader/class_loader/meta_object.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/shared_library.hpp \ + /opt/ros/humble/include/rcutils/rcutils/shared_library.h \ + /usr/include/string.h \ + /usr/include/strings.h \ + /opt/ros/humble/include/rcutils/rcutils/allocator.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdbool.h \ + /opt/ros/humble/include/rcutils/rcutils/macros.h \ + /opt/ros/humble/include/rcutils/rcutils/testing/fault_injection.h \ + /opt/ros/humble/include/rcutils/rcutils/visibility_control.h \ + /opt/ros/humble/include/rcutils/rcutils/visibility_control_macros.h \ + /opt/ros/humble/include/rcutils/rcutils/types/rcutils_ret.h \ + /opt/ros/humble/include/rcpputils/rcpputils/visibility_control.hpp \ + /opt/ros/humble/include/class_loader/class_loader/register_macro.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp \ + /usr/include/c++/11/csignal \ + /usr/include/signal.h \ + /usr/include/aarch64-linux-gnu/bits/signum-generic.h \ + /usr/include/aarch64-linux-gnu/bits/signum-arch.h \ + /usr/include/aarch64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/aarch64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/aarch64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/aarch64-linux-gnu/bits/siginfo-consts-arch.h \ + /usr/include/aarch64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/aarch64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/aarch64-linux-gnu/bits/sigaction.h \ + /usr/include/aarch64-linux-gnu/bits/sigcontext.h \ + /usr/include/aarch64-linux-gnu/asm/sigcontext.h \ + /usr/include/linux/types.h \ + /usr/include/aarch64-linux-gnu/asm/types.h \ + /usr/include/asm-generic/types.h \ + /usr/include/asm-generic/int-ll64.h \ + /usr/include/aarch64-linux-gnu/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h \ + /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/aarch64-linux-gnu/asm/posix_types.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/aarch64-linux-gnu/asm/sve_context.h \ + /usr/include/aarch64-linux-gnu/bits/types/stack_t.h \ + /usr/include/aarch64-linux-gnu/sys/ucontext.h \ + /usr/include/aarch64-linux-gnu/sys/procfs.h \ + /usr/include/aarch64-linux-gnu/sys/time.h \ + /usr/include/aarch64-linux-gnu/sys/user.h \ + /usr/include/aarch64-linux-gnu/bits/procfs.h \ + /usr/include/aarch64-linux-gnu/bits/procfs-id.h \ + /usr/include/aarch64-linux-gnu/bits/procfs-prregset.h \ + /usr/include/aarch64-linux-gnu/bits/procfs-extra.h \ + /usr/include/aarch64-linux-gnu/bits/sigstack.h \ + /usr/include/aarch64-linux-gnu/bits/sigstksz.h \ + /usr/include/unistd.h \ + /usr/include/aarch64-linux-gnu/bits/posix_opt.h \ + /usr/include/aarch64-linux-gnu/bits/environments.h \ + /usr/include/aarch64-linux-gnu/bits/confname.h \ + /usr/include/aarch64-linux-gnu/bits/getopt_posix.h \ + /usr/include/aarch64-linux-gnu/bits/getopt_core.h \ + /usr/include/aarch64-linux-gnu/bits/unistd_ext.h \ + /usr/include/linux/close_range.h \ + /usr/include/aarch64-linux-gnu/bits/ss_flags.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/aarch64-linux-gnu/bits/sigthread.h \ + /usr/include/aarch64-linux-gnu/bits/signal_ext.h \ + /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp \ + /usr/include/c++/11/future \ + /usr/include/c++/11/condition_variable \ + /usr/include/c++/11/atomic \ + /usr/include/c++/11/bits/atomic_futex.h \ + /usr/include/c++/11/bits/std_thread.h \ + /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp \ + /usr/include/c++/11/set \ + /usr/include/c++/11/bits/stl_set.h \ + /usr/include/c++/11/bits/stl_multiset.h \ + /usr/include/c++/11/thread \ + /usr/include/c++/11/bits/this_thread_sleep.h \ + /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp \ + /usr/include/c++/11/iostream \ + /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios \ + /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/streambuf \ + /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h \ + /usr/include/c++/11/cwctype \ + /usr/include/wctype.h \ + /usr/include/aarch64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc \ + /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc \ + /usr/include/c++/11/list \ + /usr/include/c++/11/bits/stl_list.h \ + /usr/include/c++/11/bits/list.tcc \ + /opt/ros/humble/include/rcl/rcl/guard_condition.h \ + /opt/ros/humble/include/rcl/rcl/allocator.h \ + /opt/ros/humble/include/rcl/rcl/context.h \ + /opt/ros/humble/include/rmw/rmw/init.h \ + /opt/ros/humble/include/rmw/rmw/init_options.h \ + /opt/ros/humble/include/rmw/rmw/domain_id.h \ + /opt/ros/humble/include/rmw/rmw/localhost.h \ + /opt/ros/humble/include/rmw/rmw/visibility_control.h \ + /opt/ros/humble/include/rmw/rmw/macros.h \ + /opt/ros/humble/include/rmw/rmw/ret_types.h \ + /opt/ros/humble/include/rmw/rmw/security_options.h \ + /opt/ros/humble/include/rcl/rcl/arguments.h \ + /opt/ros/humble/include/rcl/rcl/log_level.h \ + /opt/ros/humble/include/rcl/rcl/macros.h \ + /opt/ros/humble/include/rcl/rcl/types.h \ + /opt/ros/humble/include/rmw/rmw/types.h \ + /opt/ros/humble/include/rcutils/rcutils/logging.h \ + /opt/ros/humble/include/rcutils/rcutils/error_handling.h \ + /usr/include/c++/11/stdlib.h \ + /opt/ros/humble/include/rcutils/rcutils/snprintf.h \ + /opt/ros/humble/include/rcutils/rcutils/time.h \ + /opt/ros/humble/include/rcutils/rcutils/types.h \ + /opt/ros/humble/include/rcutils/rcutils/types/array_list.h \ + /opt/ros/humble/include/rcutils/rcutils/types/char_array.h \ + /opt/ros/humble/include/rcutils/rcutils/types/hash_map.h \ + /opt/ros/humble/include/rcutils/rcutils/types/string_array.h \ + /opt/ros/humble/include/rcutils/rcutils/qsort.h \ + /opt/ros/humble/include/rcutils/rcutils/types/string_map.h \ + /opt/ros/humble/include/rcutils/rcutils/types/uint8_array.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/events_statuses.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/incompatible_qos.h \ + /opt/ros/humble/include/rmw/rmw/qos_policy_kind.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/liveliness_changed.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/liveliness_lost.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/message_lost.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/offered_deadline_missed.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/requested_deadline_missed.h \ + /opt/ros/humble/include/rmw/rmw/serialized_message.h \ + /opt/ros/humble/include/rmw/rmw/subscription_content_filter_options.h \ + /opt/ros/humble/include/rmw/rmw/time.h \ + /opt/ros/humble/include/rcl/rcl/visibility_control.h \ + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/types.h \ + /opt/ros/humble/include/rcl/rcl/init_options.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdalign.h \ + /opt/ros/humble/include/rcl/rcl/wait.h \ + /opt/ros/humble/include/rcl/rcl/client.h \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/service_type_support_struct.h \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/visibility_control.h \ + /opt/ros/humble/include/rosidl_typesupport_interface/rosidl_typesupport_interface/macros.h \ + /opt/ros/humble/include/rcl/rcl/event_callback.h \ + /opt/ros/humble/include/rmw/rmw/event_callback_type.h \ + /opt/ros/humble/include/rcl/rcl/node.h \ + /opt/ros/humble/include/rcl/rcl/node_options.h \ + /opt/ros/humble/include/rcl/rcl/domain_id.h \ + /opt/ros/humble/include/rcl/rcl/service.h \ + /opt/ros/humble/include/rcl/rcl/subscription.h \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/message_type_support_struct.h \ + /opt/ros/humble/include/rmw/rmw/message_sequence.h \ + /opt/ros/humble/include/rcl/rcl/timer.h \ + /opt/ros/humble/include/rcl/rcl/time.h \ + /opt/ros/humble/include/rmw/rmw/rmw.h \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/sequence_bound.h \ + /opt/ros/humble/include/rmw/rmw/event.h \ + /opt/ros/humble/include/rmw/rmw/publisher_options.h \ + /opt/ros/humble/include/rmw/rmw/qos_profiles.h \ + /opt/ros/humble/include/rmw/rmw/subscription_options.h \ + /opt/ros/humble/include/rcl/rcl/event.h \ + /opt/ros/humble/include/rcl/rcl/publisher.h \ + /opt/ros/humble/include/rcpputils/rcpputils/scope_exit.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/context.hpp \ + /usr/include/c++/11/typeindex \ + /usr/include/c++/11/unordered_set \ + /usr/include/c++/11/bits/unordered_set.h \ + /opt/ros/humble/include/rclcpp/rclcpp/init_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/visibility_control.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/macros.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/contexts/default_context.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/guard_condition.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/client.hpp \ + /usr/include/c++/11/optional \ + /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc \ + /usr/include/c++/11/variant \ + /opt/ros/humble/include/rcl/rcl/error_handling.h \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/cpp_callback_trampoline.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/exceptions.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/exceptions/exceptions.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/join.hpp \ + /usr/include/c++/11/iterator \ + /usr/include/c++/11/bits/stream_iterator.h \ + /opt/ros/humble/include/rclcpp/rclcpp/expand_topic_or_service_name.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/function_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/logger.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/filesystem_helper.hpp \ + /opt/ros/humble/include/rcutils/rcutils/logging_macros.h \ + /opt/ros/humble/include/rclcpp/rclcpp/utilities.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_graph_interface.hpp \ + /opt/ros/humble/include/rcl/rcl/graph.h \ + /opt/ros/humble/include/rmw/rmw/names_and_types.h \ + /opt/ros/humble/include/rmw/rmw/get_topic_names_and_types.h \ + /opt/ros/humble/include/rmw/rmw/topic_endpoint_info_array.h \ + /opt/ros/humble/include/rmw/rmw/topic_endpoint_info.h \ + /opt/ros/humble/include/rclcpp/rclcpp/event.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/qos.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/duration.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/duration.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/bounded_vector.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/message_initialization.hpp \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/message_initialization.h \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__builder.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__traits.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/traits.hpp \ + /usr/include/c++/11/codecvt \ + /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/iomanip \ + /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h \ + /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/quoted_string.h \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_typesupport_cpp/message_type_support.hpp \ + /opt/ros/humble/include/rcl/rcl/logging_rosout.h \ + /opt/ros/humble/include/rmw/rmw/incompatible_qos_events_statuses.h \ + /opt/ros/humble/include/rclcpp/rclcpp/type_support_decl.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/message_type_support_decl.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/service_type_support_decl.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_typesupport_cpp/service_type_support.hpp \ + /opt/ros/humble/include/rmw/rmw/error_handling.h \ + /opt/ros/humble/include/rmw/rmw/impl/cpp/demangle.hpp \ + /usr/include/c++/11/cxxabi.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/cxxabi_tweaks.h \ + /opt/ros/humble/include/rmw/rmw/impl/config.h \ + /opt/ros/humble/include/rclcpp/rclcpp/publisher_base.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/network_flow_endpoint.hpp \ + /opt/ros/humble/include/rcl/rcl/network_flow_endpoints.h \ + /opt/ros/humble/include/rmw/rmw/network_flow_endpoint.h \ + /opt/ros/humble/include/rmw/rmw/network_flow_endpoint_array.h \ + /opt/ros/humble/include/rclcpp/rclcpp/qos_event.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/waitable.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/time.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/service.hpp \ + /opt/ros/humble/include/tracetools/tracetools/tracetools.h \ + /opt/ros/humble/include/tracetools/tracetools/config.h \ + /opt/ros/humble/include/tracetools/tracetools/visibility_control.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp \ + /opt/ros/humble/include/tracetools/tracetools/utils.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_base.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/allocator/allocator_common.hpp \ + /usr/include/c++/11/cstring \ + /opt/ros/humble/include/rclcpp/rclcpp/allocator/allocator_deleter.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/subscription_callback_type_helper.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/message_info.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/serialized_message.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/type_adapter.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/intra_process_manager.hpp \ + /usr/include/c++/11/shared_mutex \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/ros_message_intra_process_buffer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process_base.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/intra_process_buffer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/buffer_implementation_base.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process_buffer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/create_intra_process_buffer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/ring_buffer_implementation.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/intra_process_buffer_type.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_content_filter_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/timer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/clock.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/time.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/time.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__builder.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__traits.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/rate.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_base_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_use_intra_process.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/intra_process_setting.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_intra_process_buffer_type.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/message_memory_strategy.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_subscription_payload.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_payload.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/qos_overriding_options.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/set_parameters_result.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/topic_statistics_state.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/topic_statistics/subscription_topic_statistics.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/generate_statistics_message.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/metrics_message.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__struct.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/statistic_data_point__struct.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__builder.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__traits.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/statistic_data_point__traits.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__type_support.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/rosidl_generator_cpp__visibility_control.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/visibility_control.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/types.hpp \ + /usr/include/c++/11/cmath \ + /usr/include/math.h \ + /usr/include/aarch64-linux-gnu/bits/math-vector.h \ + /usr/include/aarch64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/aarch64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/aarch64-linux-gnu/bits/fp-logb.h \ + /usr/include/aarch64-linux-gnu/bits/fp-fast.h \ + /usr/include/aarch64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/aarch64-linux-gnu/bits/mathcalls.h \ + /usr/include/aarch64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/aarch64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/specfun.h \ + /usr/include/c++/11/tr1/gamma.tcc \ + /usr/include/c++/11/tr1/special_function_util.h \ + /usr/include/c++/11/tr1/bessel_function.tcc \ + /usr/include/c++/11/tr1/beta_function.tcc \ + /usr/include/c++/11/tr1/ell_integral.tcc \ + /usr/include/c++/11/tr1/exp_integral.tcc \ + /usr/include/c++/11/tr1/hypergeometric.tcc \ + /usr/include/c++/11/tr1/legendre_function.tcc \ + /usr/include/c++/11/tr1/modified_bessel_func.tcc \ + /usr/include/c++/11/tr1/poly_hermite.tcc \ + /usr/include/c++/11/tr1/poly_laguerre.tcc \ + /usr/include/c++/11/tr1/riemann_zeta.tcc \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/constants.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/received_message_age.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/constants.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/topic_statistics_collector.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/collector.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/moving_average.hpp \ + /usr/include/c++/11/numeric \ + /usr/include/c++/11/bits/stl_numeric.h \ + /usr/include/c++/11/pstl/glue_numeric_defs.h \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/types.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/thread_safety_annotations.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/metric_details_interface.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/received_message_period.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/publisher.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/get_message_type_support_handle.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/is_ros_compatible_type.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/loaned_message.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/publisher_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_publisher_payload.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/future_return_code.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/list_parameters_result.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_descriptor.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_event.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/generic_publisher.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_topics_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_timers_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/publisher_factory.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_factory.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/typesupport_helpers.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/generic_subscription.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_clock_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_logging_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_value.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_type.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_value.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_services_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_time_source_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_waitables_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_client.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_generic_publisher.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_generic_subscription.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_publisher.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_topics_interface.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/pointer_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_topics_interface_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/qos_parameters.hpp \ + /opt/ros/humble/include/rmw/rmw/qos_string_conversions.h \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_parameters_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_enable_topic_statistics.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_timers_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_timers_interface_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_timer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_base_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_base_interface_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/executors/static_single_threaded_executor.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/executors/static_executor_entities_collector.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/executable_list.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_client.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/describe_parameters.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/get_parameter_types.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/get_parameters.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/list_parameters.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/set_parameters.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/set_parameters_atomically.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.hpp \ + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/parser.h \ + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/visibility_control.h \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_map.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_event_handler.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_service.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/dynamic_storage.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_wait_set_mask.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/storage_policy_common.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/sequential_synchronization.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_result.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_result_kind.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/synchronization_policy_common.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/static_storage.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/thread_safe_synchronization.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/write_preferring_read_write_lock.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_template.hpp \ + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory.hpp \ + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_instance_wrapper.hpp \ + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory_template.hpp + + +/opt/ros/humble/include/rclcpp_components/rclcpp_components/node_instance_wrapper.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/thread_safe_synchronization.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/static_storage.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_result.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/subscription_wait_set_mask.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/dynamic_storage.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/parameter_service.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/parameter_event_handler.hpp: + +/opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/visibility_control.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/set_parameters_atomically.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__builder.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__builder.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/get_parameter_types.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__builder.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/parameter_client.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/executors/static_executor_entities_collector.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/executors/static_single_threaded_executor.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_base_interface_traits.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/create_timer.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_timers_interface.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface_traits.hpp: + +/opt/ros/humble/include/rmw/rmw/qos_string_conversions.h: + +/opt/ros/humble/include/rclcpp/rclcpp/create_client.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/create_publisher.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_options.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_waitables_interface.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_time_source_interface.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__builder.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__builder.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_type.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_logging_interface.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_clock_interface.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/generic_subscription.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/subscription_factory.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/publisher_factory.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_timers_interface.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_event.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__builder.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_descriptor.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/list_parameters_result.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/future_return_code.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_publisher_payload.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/publisher_options.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/loaned_message.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/is_ros_compatible_type.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/get_message_type_support_handle.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/publisher.hpp: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/metric_details_interface.hpp: + +/usr/include/c++/11/pstl/glue_numeric_defs.h: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_timers_interface_traits.hpp: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/collector.hpp: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/topic_statistics_collector.hpp: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/received_message_age.hpp: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/constants.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_parameters_interface.hpp: + +/usr/include/c++/11/tr1/poly_laguerre.tcc: + +/opt/ros/humble/include/rclcpp/rclcpp/typesupport_helpers.hpp: + +/usr/include/c++/11/tr1/poly_hermite.tcc: + +/usr/include/c++/11/tr1/modified_bessel_func.tcc: + +/usr/include/c++/11/tr1/legendre_function.tcc: + +/usr/include/c++/11/tr1/hypergeometric.tcc: + +/usr/include/c++/11/tr1/ell_integral.tcc: + +/usr/include/c++/11/tr1/bessel_function.tcc: + +/usr/include/c++/11/tr1/special_function_util.h: + +/usr/include/c++/11/tr1/gamma.tcc: + +/usr/include/aarch64-linux-gnu/bits/iscanonical.h: + +/usr/include/aarch64-linux-gnu/bits/fp-logb.h: + +/usr/include/aarch64-linux-gnu/bits/libm-simd-decl-stubs.h: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/qos_parameters.hpp: + +/usr/include/c++/11/cmath: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.hpp: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/types.hpp: + +/usr/include/aarch64-linux-gnu/asm/sigcontext.h: + +/usr/include/aarch64-linux-gnu/bits/sigcontext.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/stdint.h: + +/usr/include/aarch64-linux-gnu/sys/select.h: + +/opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/bounded_vector.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/__sigval_t.h: + +/usr/include/aarch64-linux-gnu/bits/types/siginfo_t.h: + +/usr/include/aarch64-linux-gnu/bits/signum-generic.h: + +/opt/ros/humble/include/rclcpp/rclcpp/allocator/allocator_deleter.hpp: + +/usr/include/c++/11/csignal: + +/usr/include/c++/11/pstl/glue_memory_defs.h: + +/opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/topic_statistics_state.hpp: + +/opt/ros/humble/include/rcutils/rcutils/visibility_control_macros.h: + +/opt/ros/humble/include/rcutils/rcutils/visibility_control.h: + +/usr/include/c++/11/bits/stl_tree.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/messages_members.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/stdbool.h: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/write_preferring_read_write_lock.hpp: + +/usr/include/c++/11/bits/ostream_insert.h: + +/usr/include/string.h: + +/opt/ros/humble/include/rcutils/rcutils/shared_library.h: + +/usr/include/c++/11/cctype: + +/usr/include/c++/11/iomanip: + +/opt/ros/humble/include/class_loader/class_loader/meta_object.hpp: + +/usr/include/aarch64-linux-gnu/bits/siginfo-arch.h: + +/usr/include/c++/11/bits/hashtable.h: + +/usr/include/aarch64-linux-gnu/bits/types/sigevent_t.h: + +/opt/ros/humble/include/class_loader/class_loader/exceptions.hpp: + +/opt/ros/humble/include/class_loader/class_loader/class_loader_core.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__builder.hpp: + +/usr/include/c++/11/set: + +/usr/include/console_bridge_export.h: + +/usr/include/aarch64-linux-gnu/bits/sigevent-consts.h: + +/usr/include/aarch64-linux-gnu/bits/sigaction.h: + +/usr/include/c++/11/bits/unique_lock.h: + +/usr/include/c++/11/bits/uses_allocator.h: + +/usr/include/c++/11/stdexcept: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/cpp_callback_trampoline.hpp: + +/usr/include/aarch64-linux-gnu/c++/11/bits/error_constants.h: + +/usr/include/c++/11/ctime: + +/usr/include/c++/11/mutex: + +/usr/include/c++/11/bits/unordered_map.h: + +/usr/include/c++/11/bits/node_handle.h: + +/usr/include/c++/11/iostream: + +/usr/include/aarch64-linux-gnu/asm/types.h: + +/usr/include/aarch64-linux-gnu/bits/mathcalls-narrow.h: + +/usr/include/c++/11/bits/enable_special_members.h: + +/usr/include/c++/11/bits/basic_ios.tcc: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_value.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/qos.hpp: + +/usr/include/c++/11/bits/hashtable_policy.h: + +/usr/include/c++/11/bits/stl_heap.h: + +/opt/ros/humble/include/rcpputils/rcpputils/pointer_traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp: + +/usr/include/c++/11/bits/std_abs.h: + +/usr/include/aarch64-linux-gnu/bits/long-double.h: + +/usr/include/c++/11/cassert: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_result_kind.hpp: + +/usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h: + +/usr/include/aarch64-linux-gnu/bits/wordsize.h: + +/usr/include/c++/11/bits/stl_algo.h: + +/usr/include/c++/11/bits/stl_bvector.h: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_topics_interface.hpp: + +/opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__builder.hpp: + +/usr/include/c++/11/bits/basic_string.tcc: + +/usr/include/asm-generic/errno.h: + +/usr/include/aarch64-linux-gnu/bits/types/error_t.h: + +/usr/include/linux/errno.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__traits.hpp: + +/usr/include/c++/11/functional: + +/usr/include/aarch64-linux-gnu/c++/11/bits/ctype_base.h: + +/usr/include/aarch64-linux-gnu/bits/stdio_lim.h: + +/usr/include/c++/11/bits/stl_multiset.h: + +/usr/include/aarch64-linux-gnu/bits/types/struct_FILE.h: + +/opt/ros/humble/include/rcpputils/rcpputils/shared_library.hpp: + +/opt/ros/humble/include/rmw/rmw/macros.h: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/moving_average.hpp: + +/opt/ros/humble/include/rmw/rmw/ret_types.h: + +/usr/include/c++/11/bits/stream_iterator.h: + +/usr/include/aarch64-linux-gnu/bits/types/__fpos64_t.h: + +/opt/ros/humble/include/rclcpp/rclcpp/create_generic_subscription.hpp: + +/usr/include/c++/11/shared_mutex: + +/usr/include/c++/11/pstl/execution_defs.h: + +/usr/include/stdlib.h: + +/usr/include/c++/11/numeric: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__traits.hpp: + +/usr/include/c++/11/bits/basic_string.h: + +/usr/include/aarch64-linux-gnu/bits/siginfo-consts.h: + +/usr/include/c++/11/bits/shared_ptr_base.h: + +/usr/include/c++/11/bits/stl_multimap.h: + +/usr/include/aarch64-linux-gnu/bits/locale.h: + +/usr/include/locale.h: + +/usr/include/aarch64-linux-gnu/bits/types/wint_t.h: + +/usr/include/c++/11/cerrno: + +/usr/include/console_bridge/console.h: + +/usr/include/c++/11/bits/localefwd.h: + +/usr/include/c++/11/cstdint: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/intra_process_buffer.hpp: + +/usr/include/c++/11/string: + +/usr/include/c++/11/bits/parse_numbers.h: + +/usr/include/c++/11/bits/shared_ptr_atomic.h: + +/opt/ros/humble/include/rmw/rmw/init.h: + +/usr/include/c++/11/bits/nested_exception.h: + +/opt/ros/humble/include/rmw/rmw/publisher_options.h: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/storage_policy_common.hpp: + +/opt/ros/humble/include/rmw/rmw/topic_endpoint_info_array.h: + +/usr/include/c++/11/bits/unique_ptr.h: + +/usr/include/c++/11/bits/move.h: + +/usr/include/c++/11/bits/hash_bytes.h: + +/usr/include/c++/11/iosfwd: + +/usr/include/c++/11/initializer_list: + +/usr/include/stdint.h: + +/usr/include/c++/11/bits/ptr_traits.h: + +/usr/include/c++/11/bits/erase_if.h: + +rclcpp_components/node_main_armor_yolo_detector_node.cpp: + +/usr/include/c++/11/future: + +/usr/include/c++/11/ratio: + +/usr/include/c++/11/bits/std_mutex.h: + +/usr/include/aarch64-linux-gnu/bits/libc-header-start.h: + +/usr/include/aarch64-linux-gnu/bits/byteswap.h: + +/usr/include/c++/11/bits/codecvt.h: + +/opt/ros/humble/include/rmw/rmw/events_statuses/liveliness_lost.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/cxxabi_tweaks.h: + +/usr/include/c++/11/bits/concept_check.h: + +/usr/include/asm-generic/types.h: + +/usr/include/asm-generic/bitsperlong.h: + +/usr/include/c++/11/debug/assertions.h: + +/opt/ros/humble/include/tracetools/tracetools/config.h: + +/usr/include/c++/11/ext/string_conversions.h: + +/opt/ros/humble/include/rcl/rcl/graph.h: + +/usr/include/c++/11/vector: + +/opt/ros/humble/include/rclcpp/rclcpp/parameter_value.hpp: + +/usr/include/aarch64-linux-gnu/sys/time.h: + +/usr/include/c++/11/bits/align.h: + +/usr/include/c++/11/bits/stl_tempbuf.h: + +/usr/include/c++/11/bits/std_function.h: + +/usr/include/stdc-predef.h: + +/usr/include/aarch64-linux-gnu/bits/select.h: + +/usr/include/c++/11/tuple: + +/opt/ros/humble/include/rcl/rcl/network_flow_endpoints.h: + +/usr/include/aarch64-linux-gnu/bits/timesize.h: + +/usr/include/c++/11/bits/algorithmfwd.h: + +/usr/include/c++/11/bits/cxxabi_forced.h: + +/usr/include/aarch64-linux-gnu/bits/mathcalls.h: + +/usr/include/aarch64-linux-gnu/bits/floatn.h: + +/usr/include/c++/11/ext/alloc_traits.h: + +/usr/include/c++/11/chrono: + +/usr/include/c++/11/cstdio: + +/opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/visibility_control.h: + +/usr/include/aarch64-linux-gnu/bits/flt-eval-method.h: + +/usr/include/c++/11/backward/auto_ptr.h: + +/usr/include/c++/11/bits/stl_uninitialized.h: + +/usr/include/c++/11/ext/new_allocator.h: + +/usr/include/c++/11/bits/streambuf.tcc: + +/usr/include/c++/11/bits/stl_iterator_base_funcs.h: + +/usr/include/endian.h: + +/usr/include/c++/11/bits/cpp_type_traits.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp: + +/usr/include/c++/11/bits/std_thread.h: + +/opt/ros/humble/include/rclcpp/rclcpp/qos_event.hpp: + +/usr/include/c++/11/bits/exception.h: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/subscription_callback_type_helper.hpp: + +/usr/include/c++/11/bits/locale_facets.h: + +/opt/ros/humble/include/rmw/rmw/get_topic_names_and_types.h: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_services_interface.hpp: + +/opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/statistic_data_point__struct.hpp: + +/usr/include/c++/11/map: + +/usr/include/c++/11/cstddef: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp: + +/usr/include/c++/11/unordered_map: + +/opt/ros/humble/include/rclcpp/rclcpp/subscription.hpp: + +/usr/include/c++/11/bits/range_access.h: + +/usr/include/c++/11/iterator: + +/usr/include/strings.h: + +/usr/include/aarch64-linux-gnu/bits/sched.h: + +/usr/include/c++/11/bits/istream.tcc: + +/usr/include/c++/11/pstl/pstl_config.h: + +/usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h: + +/usr/include/c++/11/utility: + +/usr/include/c++/11/ios: + +/usr/include/c++/11/bits/atomic_base.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.hpp: + +/usr/include/c++/11/ext/numeric_traits.h: + +/usr/include/c++/11/pstl/glue_algorithm_defs.h: + +/usr/include/aarch64-linux-gnu/bits/types/sigval_t.h: + +/usr/include/aarch64-linux-gnu/bits/typesizes.h: + +/usr/include/c++/11/bits/atomic_lockfree_defines.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__traits.hpp: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/received_message_period.hpp: + +/usr/include/c++/11/bits/stl_construct.h: + +/usr/include/c++/11/bits/shared_ptr.h: + +/usr/include/asm-generic/errno-base.h: + +/opt/ros/humble/include/rmw/rmw/subscription_options.h: + +/usr/include/c++/11/condition_variable: + +/usr/include/c++/11/optional: + +/usr/include/aarch64-linux-gnu/sys/single_threaded.h: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_base_interface.hpp: + +/opt/ros/humble/include/rcpputils/rcpputils/visibility_control.hpp: + +/usr/include/aarch64-linux-gnu/bits/stdint-intn.h: + +/opt/ros/humble/include/rcutils/rcutils/testing/fault_injection.h: + +/usr/include/c++/11/typeinfo: + +/opt/ros/humble/include/rclcpp/rclcpp/publisher_base.hpp: + +/usr/include/alloca.h: + +/opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/message_type_support_decl.hpp: + +/usr/include/aarch64-linux-gnu/bits/time64.h: + +/usr/include/aarch64-linux-gnu/bits/mathcalls-helper-functions.h: + +/usr/include/aarch64-linux-gnu/bits/stdlib-float.h: + +/opt/ros/humble/include/rcutils/rcutils/allocator.h: + +/usr/include/c++/11/bits/functexcept.h: + +/usr/include/aarch64-linux-gnu/bits/uintn-identity.h: + +/usr/include/aarch64-linux-gnu/bits/time.h: + +/usr/include/c++/11/bits/stl_list.h: + +/usr/include/c++/11/memory: + +/opt/ros/humble/include/rmw/rmw/serialized_message.h: + +/usr/include/aarch64-linux-gnu/bits/pthreadtypes.h: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.hpp: + +/opt/ros/humble/include/rcutils/rcutils/types/array_list.h: + +/opt/ros/humble/include/rcpputils/rcpputils/filesystem_helper.hpp: + +/usr/include/c++/11/debug/debug.h: + +/opt/ros/humble/include/rcl/rcl/publisher.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__traits.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.hpp: + +/usr/include/c++/11/bits/quoted_string.h: + +/usr/include/c++/11/bits/predefined_ops.h: + +/usr/include/c++/11/limits: + +/usr/include/aarch64-linux-gnu/c++/11/bits/cpu_defines.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h: + +/opt/ros/humble/include/rcutils/rcutils/snprintf.h: + +/usr/include/aarch64-linux-gnu/bits/procfs-extra.h: + +/usr/include/aarch64-linux-gnu/bits/siginfo-consts-arch.h: + +/usr/include/aarch64-linux-gnu/bits/errno.h: + +/opt/ros/humble/include/rmw/rmw/names_and_types.h: + +/usr/include/ctype.h: + +/usr/include/c++/11/locale: + +/opt/ros/humble/include/rmw/rmw/types.h: + +/usr/include/c++/11/bits/stl_function.h: + +/usr/include/c++/11/bits/memoryfwd.h: + +/opt/ros/humble/include/rclcpp/rclcpp/executors.hpp: + +/usr/include/c++/11/bits/stl_pair.h: + +/usr/include/c++/11/bits/vector.tcc: + +/usr/include/aarch64-linux-gnu/bits/types/__mbstate_t.h: + +/opt/ros/humble/include/rcl/rcl/types.h: + +/usr/include/c++/11/cstdlib: + +/usr/include/linux/types.h: + +/opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/traits.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/executor.hpp: + +/opt/ros/humble/include/rcutils/rcutils/macros.h: + +/usr/include/aarch64-linux-gnu/bits/fp-fast.h: + +/usr/include/c++/11/bits/exception_defines.h: + +/opt/ros/humble/include/rclcpp/rclcpp/event.hpp: + +/opt/ros/humble/include/rcpputils/rcpputils/thread_safety_annotations.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/__fpos_t.h: + +/usr/include/pthread.h: + +/usr/include/c++/11/ext/type_traits.h: + +/opt/ros/humble/include/rclcpp/rclcpp/expand_topic_or_service_name.hpp: + +/usr/include/c++/11/tr1/riemann_zeta.tcc: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/time.hpp: + +/opt/ros/humble/include/class_loader/class_loader/visibility_control.hpp: + +/usr/include/c++/11/bits/stl_raw_storage_iter.h: + +/usr/include/aarch64-linux-gnu/bits/types/sig_atomic_t.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h: + +/usr/include/c++/11/array: + +/usr/include/aarch64-linux-gnu/bits/types/struct_sched_param.h: + +/usr/include/c++/11/new: + +/usr/include/aarch64-linux-gnu/bits/thread-shared-types.h: + +/usr/include/aarch64-linux-gnu/bits/endianness.h: + +/usr/include/c++/11/bits/sstream.tcc: + +/usr/include/c++/11/bits/stl_iterator.h: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/sequential_synchronization.hpp: + +/opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/parser.h: + +/usr/include/c++/11/bits/invoke.h: + +/usr/include/c++/11/bits/functional_hash.h: + +/usr/include/features.h: + +/opt/ros/humble/include/rclcpp/rclcpp/topic_statistics/subscription_topic_statistics.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_intra_process_buffer_type.hpp: + +/opt/ros/humble/include/class_loader/class_loader/class_loader.hpp: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/duration.hpp: + +/usr/include/aarch64-linux-gnu/sys/types.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__traits.hpp: + +/opt/ros/humble/include/rcutils/rcutils/types/rcutils_ret.h: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/visibility_control.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/network_flow_endpoint.hpp: + +/usr/include/c++/11/bits/stringfwd.h: + +/usr/include/c++/11/bits/postypes.h: + +/usr/include/c++/11/bits/stl_algobase.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.hpp: + +/usr/include/unistd.h: + +/usr/include/c++/11/cwchar: + +/usr/include/aarch64-linux-gnu/bits/types/struct_tm.h: + +/usr/include/aarch64-linux-gnu/bits/timex.h: + +/usr/include/c++/11/algorithm: + +/usr/include/c++/11/backward/binders.h: + +/usr/include/c++/11/bits/string_view.tcc: + +/usr/include/c++/11/bits/specfun.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/stdarg.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/ctype_inline.h: + +/usr/include/aarch64-linux-gnu/bits/types/__locale_t.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__traits.hpp: + +/usr/include/aarch64-linux-gnu/bits/sigstack.h: + +/usr/include/math.h: + +/usr/include/c++/11/bits/exception_ptr.h: + +/usr/include/c++/11/bits/charconv.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h: + +/opt/ros/humble/include/rcutils/rcutils/logging_macros.h: + +/opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/__FILE.h: + +/usr/include/aarch64-linux-gnu/bits/signal_ext.h: + +/usr/include/c++/11/tr1/beta_function.tcc: + +/usr/include/aarch64-linux-gnu/bits/waitstatus.h: + +/usr/include/aarch64-linux-gnu/bits/types/FILE.h: + +/usr/include/aarch64-linux-gnu/bits/wchar.h: + +/usr/include/aarch64-linux-gnu/bits/floatn-common.h: + +/opt/ros/humble/include/rcl/rcl/log_level.h: + +/usr/include/aarch64-linux-gnu/asm/bitsperlong.h: + +/opt/ros/humble/include/rmw/rmw/incompatible_qos_events_statuses.h: + +/usr/include/c++/11/bits/refwrap.h: + +/usr/include/linux/stddef.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__traits.hpp: + +/usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/set_parameters_result.hpp: + +/usr/include/sched.h: + +/usr/include/aarch64-linux-gnu/bits/types/time_t.h: + +/usr/include/aarch64-linux-gnu/bits/endian.h: + +/usr/include/time.h: + +/usr/include/aarch64-linux-gnu/bits/wctype-wchar.h: + +/opt/ros/humble/include/rcutils/rcutils/types/string_map.h: + +/usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h: + +/usr/include/c++/11/sstream: + +/usr/include/c++/11/bits/allocator.h: + +/usr/include/stdio.h: + +/usr/include/aarch64-linux-gnu/bits/types/clockid_t.h: + +/usr/include/aarch64-linux-gnu/asm/sve_context.h: + +/usr/include/aarch64-linux-gnu/bits/types/timer_t.h: + +/usr/include/aarch64-linux-gnu/bits/types/struct_itimerspec.h: + +/usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.hpp: + +/usr/include/aarch64-linux-gnu/bits/setjmp.h: + +/usr/include/aarch64-linux-gnu/asm/posix_types.h: + +/usr/include/aarch64-linux-gnu/bits/types.h: + +/usr/include/aarch64-linux-gnu/bits/struct_mutex.h: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_topics_interface_traits.hpp: + +/usr/include/aarch64-linux-gnu/bits/environments.h: + +/opt/ros/humble/include/rcl/rcl/guard_condition.h: + +/usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h: + +/opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/struct___jmp_buf_tag.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp: + +/usr/include/aarch64-linux-gnu/c++/11/bits/atomic_word.h: + +/usr/include/c++/11/cwctype: + +/usr/include/c++/11/ext/concurrence.h: + +/usr/include/aarch64-linux-gnu/sys/cdefs.h: + +/opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__traits.hpp: + +/usr/include/c++/11/exception: + +/opt/ros/humble/include/rclcpp/rclcpp/init_options.hpp: + +/usr/include/c++/11/bits/uniform_int_dist.h: + +/usr/include/c++/11/bits/basic_ios.h: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__traits.hpp: + +/usr/include/wchar.h: + +/usr/include/c++/11/bits/cxxabi_init_exception.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/list_parameters.hpp: + +/usr/include/linux/posix_types.h: + +/opt/ros/humble/include/rcl/rcl/wait.h: + +/usr/include/asm-generic/posix_types.h: + +/usr/include/aarch64-linux-gnu/bits/types/stack_t.h: + +/usr/include/aarch64-linux-gnu/sys/ucontext.h: + +/usr/include/aarch64-linux-gnu/sys/user.h: + +/opt/ros/humble/include/rcl/rcl/subscription.h: + +/usr/include/aarch64-linux-gnu/bits/procfs.h: + +/usr/include/c++/11/streambuf: + +/usr/include/c++/11/system_error: + +/usr/include/features-time64.h: + +/usr/include/aarch64-linux-gnu/bits/procfs-prregset.h: + +/usr/include/c++/11/string_view: + +/usr/include/aarch64-linux-gnu/bits/sigstksz.h: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/executable_list.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/mbstate_t.h: + +/usr/include/aarch64-linux-gnu/bits/posix_opt.h: + +/usr/include/c++/11/bits/locale_conv.h: + +/usr/include/aarch64-linux-gnu/bits/confname.h: + +/usr/include/c++/11/bits/stl_relops.h: + +/usr/include/aarch64-linux-gnu/bits/getopt_posix.h: + +/usr/include/aarch64-linux-gnu/bits/getopt_core.h: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/synchronization_policy_common.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/subscription_options.hpp: + +/usr/include/aarch64-linux-gnu/bits/unistd_ext.h: + +/usr/include/c++/11/bits/stl_numeric.h: + +/usr/include/linux/close_range.h: + +/opt/ros/humble/include/rcl/rcl/init_options.h: + +/opt/ros/humble/include/rcpputils/rcpputils/join.hpp: + +/usr/include/aarch64-linux-gnu/bits/ss_flags.h: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_topics_interface.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/struct_sigstack.h: + +/opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory.hpp: + +/usr/include/aarch64-linux-gnu/bits/sigthread.h: + +/usr/include/asm-generic/int-ll64.h: + +/usr/include/c++/11/atomic: + +/usr/include/c++/11/bits/stl_set.h: + +/opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp: + +/usr/include/c++/11/bits/this_thread_sleep.h: + +/usr/include/c++/11/bits/locale_facets.tcc: + +/usr/include/c++/11/ostream: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__builder.hpp: + +/usr/include/c++/11/bits/ios_base.h: + +/opt/ros/humble/include/rmw/rmw/message_sequence.h: + +/usr/include/aarch64-linux-gnu/sys/procfs.h: + +/usr/include/c++/11/bits/locale_classes.h: + +/usr/include/c++/11/ext/aligned_buffer.h: + +/usr/include/c++/11/bits/locale_classes.tcc: + +/usr/include/c++/11/bits/streambuf_iterator.h: + +/usr/include/c++/11/istream: + +/usr/include/aarch64-linux-gnu/bits/cpu-set.h: + +/usr/include/c++/11/list: + +/usr/include/c++/11/bits/stl_map.h: + +/opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/message_initialization.hpp: + +/usr/include/c++/11/bits/alloc_traits.h: + +/usr/include/errno.h: + +/opt/ros/humble/include/rcl/rcl/allocator.h: + +/opt/ros/humble/include/rmw/rmw/init_options.h: + +/opt/ros/humble/include/rmw/rmw/domain_id.h: + +/usr/include/aarch64-linux-gnu/bits/signum-arch.h: + +/opt/ros/humble/include/rmw/rmw/localhost.h: + +/opt/ros/humble/include/rclcpp/rclcpp/create_generic_publisher.hpp: + +/usr/include/c++/11/type_traits: + +/opt/ros/humble/include/rmw/rmw/visibility_control.h: + +/opt/ros/humble/include/rmw/rmw/security_options.h: + +/opt/ros/humble/include/rcl/rcl/macros.h: + +/opt/ros/humble/include/rcutils/rcutils/error_handling.h: + +/usr/include/c++/11/stdlib.h: + +/opt/ros/humble/include/rmw/rmw/impl/cpp/demangle.hpp: + +/opt/ros/humble/include/rcutils/rcutils/time.h: + +/opt/ros/humble/include/rcutils/rcutils/types.h: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_enable_topic_statistics.hpp: + +/opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/rosidl_generator_cpp__visibility_control.hpp: + +/opt/ros/humble/include/rcutils/rcutils/types/char_array.h: + +/usr/include/c++/11/variant: + +/opt/ros/humble/include/rcutils/rcutils/types/hash_map.h: + +/usr/include/c++/11/tr1/exp_integral.tcc: + +/opt/ros/humble/include/rcl/rcl/error_handling.h: + +/opt/ros/humble/include/rcutils/rcutils/types/string_array.h: + +/opt/ros/humble/include/rcutils/rcutils/qsort.h: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_subscription_payload.hpp: + +/opt/ros/humble/include/rmw/rmw/rmw.h: + +/usr/include/c++/11/bits/ostream.tcc: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/ring_buffer_implementation.hpp: + +/usr/include/c++/11/ext/atomicity.h: + +/opt/ros/humble/include/rcutils/rcutils/types/uint8_array.h: + +/usr/include/c++/11/bits/list.tcc: + +/opt/ros/humble/include/rmw/rmw/events_statuses/events_statuses.h: + +/opt/ros/humble/include/rclcpp/rclcpp/timer.hpp: + +/opt/ros/humble/include/rmw/rmw/events_statuses/incompatible_qos.h: + +/opt/ros/humble/include/rmw/rmw/qos_policy_kind.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.hpp: + +/opt/ros/humble/include/rmw/rmw/events_statuses/message_lost.h: + +/opt/ros/humble/include/rmw/rmw/events_statuses/offered_deadline_missed.h: + +/opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp: + +/opt/ros/humble/include/rmw/rmw/events_statuses/requested_deadline_missed.h: + +/opt/ros/humble/include/rmw/rmw/subscription_content_filter_options.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/set_parameters.hpp: + +/opt/ros/humble/include/rcl/rcl/visibility_control.h: + +/opt/ros/humble/include/rclcpp/rclcpp/service.hpp: + +/usr/include/c++/11/codecvt: + +/usr/include/assert.h: + +/usr/include/c++/11/bits/allocated_ptr.h: + +/opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/types.h: + +/usr/lib/gcc/aarch64-linux-gnu/11/include/stdalign.h: + +/opt/ros/humble/include/rcl/rcl/client.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/get_parameters.hpp: + +/opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/service_type_support_struct.h: + +/opt/ros/humble/include/rosidl_typesupport_interface/rosidl_typesupport_interface/macros.h: + +/opt/ros/humble/include/rcl/rcl/context.h: + +/opt/ros/humble/include/rmw/rmw/event_callback_type.h: + +/opt/ros/humble/include/rcl/rcl/node.h: + +/opt/ros/humble/include/rcl/rcl/node_options.h: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process_base.hpp: + +/usr/include/aarch64-linux-gnu/c++/11/bits/time_members.h: + +/opt/ros/humble/include/rcl/rcl/domain_id.h: + +/usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h: + +/opt/ros/humble/include/rcl/rcl/service.h: + +/opt/ros/humble/include/class_loader/class_loader/register_macro.hpp: + +/opt/ros/humble/include/rcl/rcl/timer.h: + +/usr/include/c++/11/bits/locale_facets_nonio.h: + +/usr/include/c++/11/bits/stl_iterator_base_types.h: + +/opt/ros/humble/include/rcl/rcl/time.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp: + +/usr/include/aarch64-linux-gnu/bits/waitflags.h: + +/opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/sequence_bound.h: + +/opt/ros/humble/include/rclcpp/rclcpp/wait_set_template.hpp: + +/opt/ros/humble/include/rmw/rmw/event.h: + +/opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/service_type_support_decl.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/allocator/allocator_common.hpp: + +/usr/include/c++/11/clocale: + +/opt/ros/humble/include/rcl/rcl/event.h: + +/usr/include/aarch64-linux-gnu/asm/errno.h: + +/opt/ros/humble/include/rcpputils/rcpputils/scope_exit.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/context.hpp: + +/usr/include/c++/11/typeindex: + +/usr/include/c++/11/unordered_set: + +/usr/include/c++/11/bits/stl_vector.h: + +/usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h: + +/usr/include/c++/11/bits/unordered_set.h: + +/opt/ros/humble/include/rclcpp/rclcpp/visibility_control.hpp: + +/opt/ros/humble/include/rcl/rcl/event_callback.h: + +/opt/ros/humble/include/tracetools/tracetools/tracetools.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp: + +/usr/include/aarch64-linux-gnu/bits/math-vector.h: + +/opt/ros/humble/include/rclcpp/rclcpp/macros.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/contexts/default_context.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/guard_condition.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_base_interface.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/time.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/client.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/exceptions/exceptions.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h: + +/opt/ros/humble/include/rclcpp/rclcpp/function_traits.hpp: + +/usr/include/aarch64-linux-gnu/bits/stdint-uintn.h: + +/opt/ros/humble/include/rclcpp/rclcpp/type_support_decl.hpp: + +/opt/ros/humble/include/rcl/rcl/arguments.h: + +/opt/ros/humble/include/rclcpp/rclcpp/logger.hpp: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/utilities.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_graph_interface.hpp: + +/usr/include/wctype.h: + +/opt/ros/humble/include/rmw/rmw/topic_endpoint_info.h: + +/usr/include/aarch64-linux-gnu/bits/types/sigset_t.h: + +/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.hpp: + +/opt/ros/humble/include/rcutils/rcutils/logging.h: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/ros_message_intra_process_buffer.hpp: + +/opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/message_initialization.h: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/describe_parameters.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/logging.hpp: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__builder.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/subscription_content_filter_options.hpp: + +/usr/include/c++/11/bits/char_traits.h: + +/usr/include/libintl.h: + +/opt/ros/humble/include/rclcpp/rclcpp/subscription_traits.hpp: + +/usr/include/c++/11/bits/locale_facets_nonio.tcc: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp: + +/opt/ros/humble/include/rosidl_runtime_cpp/rosidl_typesupport_cpp/message_type_support.hpp: + +/opt/ros/humble/include/rcl/rcl/logging_rosout.h: + +/usr/include/aarch64-linux-gnu/gnu/stubs.h: + +/opt/ros/humble/include/rosidl_runtime_cpp/rosidl_typesupport_cpp/service_type_support.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/exceptions.hpp: + +/opt/ros/humble/include/rmw/rmw/error_handling.h: + +/usr/include/aarch64-linux-gnu/bits/types/cookie_io_functions_t.h: + +/usr/include/c++/11/cxxabi.h: + +/usr/include/aarch64-linux-gnu/bits/struct_rwlock.h: + +/opt/ros/humble/include/rmw/rmw/impl/config.h: + +/opt/ros/humble/include/rmw/rmw/network_flow_endpoint.h: + +/opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/message_type_support_struct.h: + +/opt/ros/humble/include/rmw/rmw/network_flow_endpoint_array.h: + +/usr/include/signal.h: + +/opt/ros/humble/include/rclcpp/rclcpp/waitable.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.hpp: + +/usr/include/aarch64-linux-gnu/bits/types/locale_t.h: + +/opt/ros/humble/include/rcpputils/rcpputils/time.hpp: + +/usr/include/c++/11/bit: + +/opt/ros/humble/include/rmw/rmw/events_statuses/liveliness_changed.h: + +/opt/ros/humble/include/tracetools/tracetools/visibility_control.hpp: + +/usr/include/aarch64-linux-gnu/bits/procfs-id.h: + +/opt/ros/humble/include/tracetools/tracetools/utils.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/parameter_map.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/subscription_base.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp: + +/usr/include/c++/11/bits/atomic_futex.h: + +/usr/include/c++/11/cstring: + +/opt/ros/humble/include/rclcpp/rclcpp/message_info.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/serialized_message.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/type_adapter.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/intra_process_manager.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/buffer_implementation_base.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/rate.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/create_intra_process_buffer.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/intra_process_buffer_type.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process_buffer.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/clock.hpp: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/parameter.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_use_intra_process.hpp: + +/opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__builder.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/intra_process_setting.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/generic_publisher.hpp: + +/usr/include/c++/11/thread: + +/opt/ros/humble/include/rclcpp/rclcpp/message_memory_strategy.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_payload.hpp: + +/opt/ros/humble/include/rclcpp/rclcpp/qos_overriding_options.hpp: + +/opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.hpp: + +/opt/ros/humble/include/rmw/rmw/qos_profiles.h: + +/opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/generate_statistics_message.hpp: + +/opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory_template.hpp: + +/opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/metrics_message.hpp: + +/usr/include/aarch64-linux-gnu/c++/11/bits/c++locale.h: + +/usr/include/aarch64-linux-gnu/bits/types/clock_t.h: + +/opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__struct.hpp: + +/opt/ros/humble/include/rmw/rmw/time.h: + +/opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/statistic_data_point__traits.hpp: + +/opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__type_support.hpp: diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.ts b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.ts new file mode 100644 index 0000000..8af3332 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for compiler generated dependencies management for armor_yolo_detector_node. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/depend.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/depend.make new file mode 100644 index 0000000..cc56171 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for armor_yolo_detector_node. +# This may be replaced when dependencies are built. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/flags.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/flags.make new file mode 100644 index 0000000..b0ebcc0 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# compile CXX with /usr/bin/c++ +CXX_DEFINES = -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DRCUTILS_ENABLE_FAULT_INJECTION + +CXX_INCLUDES = -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/composition_interfaces + +CXX_FLAGS = -std=gnu++17 + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/link.txt b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/link.txt new file mode 100644 index 0000000..e10599d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o -o armor_yolo_detector_node -Wl,-rpath,/opt/ros/humble/lib /opt/ros/humble/lib/libcomponent_manager.so /opt/ros/humble/lib/librclcpp.so /opt/ros/humble/lib/liblibstatistics_collector.so /opt/ros/humble/lib/librcl.so /opt/ros/humble/lib/librmw_implementation.so /opt/ros/humble/lib/librcl_logging_spdlog.so /opt/ros/humble/lib/librcl_logging_interface.so /opt/ros/humble/lib/librcl_yaml_param_parser.so /opt/ros/humble/lib/libyaml.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libtracetools.so /opt/ros/humble/lib/libclass_loader.so /usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0 /opt/ros/humble/lib/libament_index_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librmw.so /opt/ros/humble/lib/libfastcdr.so.1.0.24 /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librosidl_typesupport_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/librosidl_typesupport_c.so /opt/ros/humble/lib/librcpputils.so /opt/ros/humble/lib/librosidl_runtime_c.so /opt/ros/humble/lib/librcutils.so -ldl /usr/lib/aarch64-linux-gnu/libpython3.10.so diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/progress.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/progress.make new file mode 100644 index 0000000..8808896 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 6 +CMAKE_PROGRESS_2 = 7 + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o new file mode 100644 index 0000000..a716e9d Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o differ diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o.d b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o.d new file mode 100644 index 0000000..03fbc04 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o.d @@ -0,0 +1,645 @@ +CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o: \ + /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp \ + /usr/include/stdc-predef.h /usr/include/c++/11/memory \ + /usr/include/c++/11/bits/stl_algobase.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++config.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/os_defines.h \ + /usr/include/features.h /usr/include/features-time64.h \ + /usr/include/aarch64-linux-gnu/bits/wordsize.h \ + /usr/include/aarch64-linux-gnu/bits/timesize.h \ + /usr/include/aarch64-linux-gnu/sys/cdefs.h \ + /usr/include/aarch64-linux-gnu/bits/long-double.h \ + /usr/include/aarch64-linux-gnu/gnu/stubs.h \ + /usr/include/aarch64-linux-gnu/gnu/stubs-lp64.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/cpu_defines.h \ + /usr/include/c++/11/pstl/pstl_config.h \ + /usr/include/c++/11/bits/functexcept.h \ + /usr/include/c++/11/bits/exception_defines.h \ + /usr/include/c++/11/bits/cpp_type_traits.h \ + /usr/include/c++/11/ext/type_traits.h \ + /usr/include/c++/11/ext/numeric_traits.h \ + /usr/include/c++/11/bits/stl_pair.h /usr/include/c++/11/bits/move.h \ + /usr/include/c++/11/type_traits \ + /usr/include/c++/11/bits/stl_iterator_base_types.h \ + /usr/include/c++/11/bits/stl_iterator_base_funcs.h \ + /usr/include/c++/11/bits/concept_check.h \ + /usr/include/c++/11/debug/assertions.h \ + /usr/include/c++/11/bits/stl_iterator.h \ + /usr/include/c++/11/bits/ptr_traits.h /usr/include/c++/11/debug/debug.h \ + /usr/include/c++/11/bits/predefined_ops.h \ + /usr/include/c++/11/bits/allocator.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++allocator.h \ + /usr/include/c++/11/ext/new_allocator.h /usr/include/c++/11/new \ + /usr/include/c++/11/bits/exception.h \ + /usr/include/c++/11/bits/memoryfwd.h \ + /usr/include/c++/11/bits/stl_construct.h \ + /usr/include/c++/11/bits/stl_uninitialized.h \ + /usr/include/c++/11/ext/alloc_traits.h \ + /usr/include/c++/11/bits/alloc_traits.h \ + /usr/include/c++/11/bits/stl_tempbuf.h \ + /usr/include/c++/11/bits/stl_raw_storage_iter.h \ + /usr/include/c++/11/bits/align.h /usr/include/c++/11/bit \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdint.h /usr/include/stdint.h \ + /usr/include/aarch64-linux-gnu/bits/libc-header-start.h \ + /usr/include/aarch64-linux-gnu/bits/types.h \ + /usr/include/aarch64-linux-gnu/bits/typesizes.h \ + /usr/include/aarch64-linux-gnu/bits/time64.h \ + /usr/include/aarch64-linux-gnu/bits/wchar.h \ + /usr/include/aarch64-linux-gnu/bits/stdint-intn.h \ + /usr/include/aarch64-linux-gnu/bits/stdint-uintn.h \ + /usr/include/c++/11/bits/uses_allocator.h \ + /usr/include/c++/11/bits/unique_ptr.h /usr/include/c++/11/utility \ + /usr/include/c++/11/bits/stl_relops.h \ + /usr/include/c++/11/initializer_list /usr/include/c++/11/tuple \ + /usr/include/c++/11/array /usr/include/c++/11/bits/range_access.h \ + /usr/include/c++/11/bits/invoke.h \ + /usr/include/c++/11/bits/stl_function.h \ + /usr/include/c++/11/backward/binders.h \ + /usr/include/c++/11/bits/functional_hash.h \ + /usr/include/c++/11/bits/hash_bytes.h \ + /usr/include/c++/11/bits/shared_ptr.h /usr/include/c++/11/iosfwd \ + /usr/include/c++/11/bits/stringfwd.h /usr/include/c++/11/bits/postypes.h \ + /usr/include/c++/11/cwchar /usr/include/wchar.h \ + /usr/include/aarch64-linux-gnu/bits/floatn.h \ + /usr/include/aarch64-linux-gnu/bits/floatn-common.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stddef.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdarg.h \ + /usr/include/aarch64-linux-gnu/bits/types/wint_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/mbstate_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__mbstate_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/locale_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__locale_t.h \ + /usr/include/c++/11/bits/shared_ptr_base.h /usr/include/c++/11/typeinfo \ + /usr/include/c++/11/bits/allocated_ptr.h \ + /usr/include/c++/11/bits/refwrap.h \ + /usr/include/c++/11/ext/aligned_buffer.h \ + /usr/include/c++/11/ext/atomicity.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/gthr-default.h \ + /usr/include/pthread.h /usr/include/sched.h \ + /usr/include/aarch64-linux-gnu/bits/types/time_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_timespec.h \ + /usr/include/aarch64-linux-gnu/bits/endian.h \ + /usr/include/aarch64-linux-gnu/bits/endianness.h \ + /usr/include/aarch64-linux-gnu/bits/sched.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_sched_param.h \ + /usr/include/aarch64-linux-gnu/bits/cpu-set.h /usr/include/time.h \ + /usr/include/aarch64-linux-gnu/bits/time.h \ + /usr/include/aarch64-linux-gnu/bits/timex.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_timeval.h \ + /usr/include/aarch64-linux-gnu/bits/types/clock_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_tm.h \ + /usr/include/aarch64-linux-gnu/bits/types/clockid_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/timer_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_itimerspec.h \ + /usr/include/aarch64-linux-gnu/bits/pthreadtypes.h \ + /usr/include/aarch64-linux-gnu/bits/thread-shared-types.h \ + /usr/include/aarch64-linux-gnu/bits/pthreadtypes-arch.h \ + /usr/include/aarch64-linux-gnu/bits/atomic_wide_counter.h \ + /usr/include/aarch64-linux-gnu/bits/struct_mutex.h \ + /usr/include/aarch64-linux-gnu/bits/struct_rwlock.h \ + /usr/include/aarch64-linux-gnu/bits/setjmp.h \ + /usr/include/aarch64-linux-gnu/bits/types/__sigset_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct___jmp_buf_tag.h \ + /usr/include/aarch64-linux-gnu/bits/pthread_stack_min-dynamic.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/atomic_word.h \ + /usr/include/aarch64-linux-gnu/sys/single_threaded.h \ + /usr/include/c++/11/ext/concurrence.h /usr/include/c++/11/exception \ + /usr/include/c++/11/bits/exception_ptr.h \ + /usr/include/c++/11/bits/cxxabi_init_exception.h \ + /usr/include/c++/11/bits/nested_exception.h \ + /usr/include/c++/11/bits/shared_ptr_atomic.h \ + /usr/include/c++/11/bits/atomic_base.h \ + /usr/include/c++/11/bits/atomic_lockfree_defines.h \ + /usr/include/c++/11/backward/auto_ptr.h \ + /usr/include/c++/11/pstl/glue_memory_defs.h \ + /usr/include/c++/11/pstl/execution_defs.h /usr/include/c++/11/string \ + /usr/include/c++/11/bits/char_traits.h /usr/include/c++/11/cstdint \ + /usr/include/c++/11/bits/localefwd.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/c++locale.h \ + /usr/include/c++/11/clocale /usr/include/locale.h \ + /usr/include/aarch64-linux-gnu/bits/locale.h /usr/include/c++/11/cctype \ + /usr/include/ctype.h /usr/include/c++/11/bits/ostream_insert.h \ + /usr/include/c++/11/bits/cxxabi_forced.h \ + /usr/include/c++/11/bits/basic_string.h /usr/include/c++/11/string_view \ + /usr/include/c++/11/bits/string_view.tcc \ + /usr/include/c++/11/ext/string_conversions.h /usr/include/c++/11/cstdlib \ + /usr/include/stdlib.h /usr/include/aarch64-linux-gnu/bits/waitflags.h \ + /usr/include/aarch64-linux-gnu/bits/waitstatus.h \ + /usr/include/aarch64-linux-gnu/sys/types.h /usr/include/endian.h \ + /usr/include/aarch64-linux-gnu/bits/byteswap.h \ + /usr/include/aarch64-linux-gnu/bits/uintn-identity.h \ + /usr/include/aarch64-linux-gnu/sys/select.h \ + /usr/include/aarch64-linux-gnu/bits/select.h \ + /usr/include/aarch64-linux-gnu/bits/types/sigset_t.h \ + /usr/include/alloca.h /usr/include/aarch64-linux-gnu/bits/stdlib-float.h \ + /usr/include/c++/11/bits/std_abs.h /usr/include/c++/11/cstdio \ + /usr/include/stdio.h \ + /usr/include/aarch64-linux-gnu/bits/types/__fpos_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__fpos64_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_FILE.h \ + /usr/include/aarch64-linux-gnu/bits/types/cookie_io_functions_t.h \ + /usr/include/aarch64-linux-gnu/bits/stdio_lim.h \ + /usr/include/c++/11/cerrno /usr/include/errno.h \ + /usr/include/aarch64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ + /usr/include/aarch64-linux-gnu/asm/errno.h \ + /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ + /usr/include/aarch64-linux-gnu/bits/types/error_t.h \ + /usr/include/c++/11/bits/charconv.h \ + /usr/include/c++/11/bits/basic_string.tcc /usr/include/c++/11/vector \ + /usr/include/c++/11/bits/stl_vector.h \ + /usr/include/c++/11/bits/stl_bvector.h \ + /usr/include/c++/11/bits/vector.tcc \ + /opt/ros/humble/include/class_loader/class_loader/class_loader.hpp \ + /usr/include/c++/11/algorithm /usr/include/c++/11/bits/stl_algo.h \ + /usr/include/c++/11/bits/algorithmfwd.h \ + /usr/include/c++/11/bits/stl_heap.h \ + /usr/include/c++/11/bits/uniform_int_dist.h \ + /usr/include/c++/11/pstl/glue_algorithm_defs.h \ + /usr/include/c++/11/functional /usr/include/c++/11/bits/std_function.h \ + /usr/include/c++/11/unordered_map /usr/include/c++/11/bits/hashtable.h \ + /usr/include/c++/11/bits/hashtable_policy.h \ + /usr/include/c++/11/bits/enable_special_members.h \ + /usr/include/c++/11/bits/node_handle.h \ + /usr/include/c++/11/bits/unordered_map.h \ + /usr/include/c++/11/bits/erase_if.h /usr/include/c++/11/cassert \ + /usr/include/assert.h /usr/include/c++/11/cstddef \ + /usr/include/c++/11/mutex /usr/include/c++/11/chrono \ + /usr/include/c++/11/ratio /usr/include/c++/11/limits \ + /usr/include/c++/11/ctime /usr/include/c++/11/bits/parse_numbers.h \ + /usr/include/c++/11/system_error \ + /usr/include/aarch64-linux-gnu/c++/11/bits/error_constants.h \ + /usr/include/c++/11/stdexcept /usr/include/c++/11/bits/std_mutex.h \ + /usr/include/c++/11/bits/unique_lock.h \ + /usr/include/console_bridge/console.h \ + /usr/include/console_bridge_export.h \ + /opt/ros/humble/include/class_loader/class_loader/class_loader_core.hpp \ + /usr/include/c++/11/map /usr/include/c++/11/bits/stl_tree.h \ + /usr/include/c++/11/bits/stl_map.h \ + /usr/include/c++/11/bits/stl_multimap.h \ + /opt/ros/humble/include/class_loader/class_loader/exceptions.hpp \ + /opt/ros/humble/include/class_loader/class_loader/visibility_control.hpp \ + /opt/ros/humble/include/class_loader/class_loader/meta_object.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/shared_library.hpp \ + /opt/ros/humble/include/rcutils/rcutils/shared_library.h \ + /usr/include/string.h /usr/include/strings.h \ + /opt/ros/humble/include/rcutils/rcutils/allocator.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdbool.h \ + /opt/ros/humble/include/rcutils/rcutils/macros.h \ + /opt/ros/humble/include/rcutils/rcutils/testing/fault_injection.h \ + /opt/ros/humble/include/rcutils/rcutils/visibility_control.h \ + /opt/ros/humble/include/rcutils/rcutils/visibility_control_macros.h \ + /opt/ros/humble/include/rcutils/rcutils/types/rcutils_ret.h \ + /opt/ros/humble/include/rcpputils/rcpputils/visibility_control.hpp \ + /opt/ros/humble/include/class_loader/class_loader/register_macro.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp \ + /usr/include/c++/11/csignal /usr/include/signal.h \ + /usr/include/aarch64-linux-gnu/bits/signum-generic.h \ + /usr/include/aarch64-linux-gnu/bits/signum-arch.h \ + /usr/include/aarch64-linux-gnu/bits/types/sig_atomic_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/siginfo_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/__sigval_t.h \ + /usr/include/aarch64-linux-gnu/bits/siginfo-arch.h \ + /usr/include/aarch64-linux-gnu/bits/siginfo-consts.h \ + /usr/include/aarch64-linux-gnu/bits/siginfo-consts-arch.h \ + /usr/include/aarch64-linux-gnu/bits/types/sigval_t.h \ + /usr/include/aarch64-linux-gnu/bits/types/sigevent_t.h \ + /usr/include/aarch64-linux-gnu/bits/sigevent-consts.h \ + /usr/include/aarch64-linux-gnu/bits/sigaction.h \ + /usr/include/aarch64-linux-gnu/bits/sigcontext.h \ + /usr/include/aarch64-linux-gnu/asm/sigcontext.h \ + /usr/include/linux/types.h /usr/include/aarch64-linux-gnu/asm/types.h \ + /usr/include/asm-generic/types.h /usr/include/asm-generic/int-ll64.h \ + /usr/include/aarch64-linux-gnu/asm/bitsperlong.h \ + /usr/include/asm-generic/bitsperlong.h /usr/include/linux/posix_types.h \ + /usr/include/linux/stddef.h \ + /usr/include/aarch64-linux-gnu/asm/posix_types.h \ + /usr/include/asm-generic/posix_types.h \ + /usr/include/aarch64-linux-gnu/asm/sve_context.h \ + /usr/include/aarch64-linux-gnu/bits/types/stack_t.h \ + /usr/include/aarch64-linux-gnu/sys/ucontext.h \ + /usr/include/aarch64-linux-gnu/sys/procfs.h \ + /usr/include/aarch64-linux-gnu/sys/time.h \ + /usr/include/aarch64-linux-gnu/sys/user.h \ + /usr/include/aarch64-linux-gnu/bits/procfs.h \ + /usr/include/aarch64-linux-gnu/bits/procfs-id.h \ + /usr/include/aarch64-linux-gnu/bits/procfs-prregset.h \ + /usr/include/aarch64-linux-gnu/bits/procfs-extra.h \ + /usr/include/aarch64-linux-gnu/bits/sigstack.h \ + /usr/include/aarch64-linux-gnu/bits/sigstksz.h /usr/include/unistd.h \ + /usr/include/aarch64-linux-gnu/bits/posix_opt.h \ + /usr/include/aarch64-linux-gnu/bits/environments.h \ + /usr/include/aarch64-linux-gnu/bits/confname.h \ + /usr/include/aarch64-linux-gnu/bits/getopt_posix.h \ + /usr/include/aarch64-linux-gnu/bits/getopt_core.h \ + /usr/include/aarch64-linux-gnu/bits/unistd_ext.h \ + /usr/include/linux/close_range.h \ + /usr/include/aarch64-linux-gnu/bits/ss_flags.h \ + /usr/include/aarch64-linux-gnu/bits/types/struct_sigstack.h \ + /usr/include/aarch64-linux-gnu/bits/sigthread.h \ + /usr/include/aarch64-linux-gnu/bits/signal_ext.h \ + /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp \ + /usr/include/c++/11/future /usr/include/c++/11/condition_variable \ + /usr/include/c++/11/atomic /usr/include/c++/11/bits/atomic_futex.h \ + /usr/include/c++/11/bits/std_thread.h \ + /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp \ + /usr/include/c++/11/set /usr/include/c++/11/bits/stl_set.h \ + /usr/include/c++/11/bits/stl_multiset.h /usr/include/c++/11/thread \ + /usr/include/c++/11/bits/this_thread_sleep.h \ + /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp \ + /usr/include/c++/11/iostream /usr/include/c++/11/ostream \ + /usr/include/c++/11/ios /usr/include/c++/11/bits/ios_base.h \ + /usr/include/c++/11/bits/locale_classes.h \ + /usr/include/c++/11/bits/locale_classes.tcc \ + /usr/include/c++/11/streambuf /usr/include/c++/11/bits/streambuf.tcc \ + /usr/include/c++/11/bits/basic_ios.h \ + /usr/include/c++/11/bits/locale_facets.h /usr/include/c++/11/cwctype \ + /usr/include/wctype.h /usr/include/aarch64-linux-gnu/bits/wctype-wchar.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_base.h \ + /usr/include/c++/11/bits/streambuf_iterator.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/ctype_inline.h \ + /usr/include/c++/11/bits/locale_facets.tcc \ + /usr/include/c++/11/bits/basic_ios.tcc \ + /usr/include/c++/11/bits/ostream.tcc /usr/include/c++/11/istream \ + /usr/include/c++/11/bits/istream.tcc /usr/include/c++/11/list \ + /usr/include/c++/11/bits/stl_list.h /usr/include/c++/11/bits/list.tcc \ + /opt/ros/humble/include/rcl/rcl/guard_condition.h \ + /opt/ros/humble/include/rcl/rcl/allocator.h \ + /opt/ros/humble/include/rcl/rcl/context.h \ + /opt/ros/humble/include/rmw/rmw/init.h \ + /opt/ros/humble/include/rmw/rmw/init_options.h \ + /opt/ros/humble/include/rmw/rmw/domain_id.h \ + /opt/ros/humble/include/rmw/rmw/localhost.h \ + /opt/ros/humble/include/rmw/rmw/visibility_control.h \ + /opt/ros/humble/include/rmw/rmw/macros.h \ + /opt/ros/humble/include/rmw/rmw/ret_types.h \ + /opt/ros/humble/include/rmw/rmw/security_options.h \ + /opt/ros/humble/include/rcl/rcl/arguments.h \ + /opt/ros/humble/include/rcl/rcl/log_level.h \ + /opt/ros/humble/include/rcl/rcl/macros.h \ + /opt/ros/humble/include/rcl/rcl/types.h \ + /opt/ros/humble/include/rmw/rmw/types.h \ + /opt/ros/humble/include/rcutils/rcutils/logging.h \ + /opt/ros/humble/include/rcutils/rcutils/error_handling.h \ + /usr/include/c++/11/stdlib.h \ + /opt/ros/humble/include/rcutils/rcutils/snprintf.h \ + /opt/ros/humble/include/rcutils/rcutils/time.h \ + /opt/ros/humble/include/rcutils/rcutils/types.h \ + /opt/ros/humble/include/rcutils/rcutils/types/array_list.h \ + /opt/ros/humble/include/rcutils/rcutils/types/char_array.h \ + /opt/ros/humble/include/rcutils/rcutils/types/hash_map.h \ + /opt/ros/humble/include/rcutils/rcutils/types/string_array.h \ + /opt/ros/humble/include/rcutils/rcutils/qsort.h \ + /opt/ros/humble/include/rcutils/rcutils/types/string_map.h \ + /opt/ros/humble/include/rcutils/rcutils/types/uint8_array.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/events_statuses.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/incompatible_qos.h \ + /opt/ros/humble/include/rmw/rmw/qos_policy_kind.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/liveliness_changed.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/liveliness_lost.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/message_lost.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/offered_deadline_missed.h \ + /opt/ros/humble/include/rmw/rmw/events_statuses/requested_deadline_missed.h \ + /opt/ros/humble/include/rmw/rmw/serialized_message.h \ + /opt/ros/humble/include/rmw/rmw/subscription_content_filter_options.h \ + /opt/ros/humble/include/rmw/rmw/time.h \ + /opt/ros/humble/include/rcl/rcl/visibility_control.h \ + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/types.h \ + /opt/ros/humble/include/rcl/rcl/init_options.h \ + /usr/lib/gcc/aarch64-linux-gnu/11/include/stdalign.h \ + /opt/ros/humble/include/rcl/rcl/wait.h \ + /opt/ros/humble/include/rcl/rcl/client.h \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/service_type_support_struct.h \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/visibility_control.h \ + /opt/ros/humble/include/rosidl_typesupport_interface/rosidl_typesupport_interface/macros.h \ + /opt/ros/humble/include/rcl/rcl/event_callback.h \ + /opt/ros/humble/include/rmw/rmw/event_callback_type.h \ + /opt/ros/humble/include/rcl/rcl/node.h \ + /opt/ros/humble/include/rcl/rcl/node_options.h \ + /opt/ros/humble/include/rcl/rcl/domain_id.h \ + /opt/ros/humble/include/rcl/rcl/service.h \ + /opt/ros/humble/include/rcl/rcl/subscription.h \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/message_type_support_struct.h \ + /opt/ros/humble/include/rmw/rmw/message_sequence.h \ + /opt/ros/humble/include/rcl/rcl/timer.h \ + /opt/ros/humble/include/rcl/rcl/time.h \ + /opt/ros/humble/include/rmw/rmw/rmw.h \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/sequence_bound.h \ + /opt/ros/humble/include/rmw/rmw/event.h \ + /opt/ros/humble/include/rmw/rmw/publisher_options.h \ + /opt/ros/humble/include/rmw/rmw/qos_profiles.h \ + /opt/ros/humble/include/rmw/rmw/subscription_options.h \ + /opt/ros/humble/include/rcl/rcl/event.h \ + /opt/ros/humble/include/rcl/rcl/publisher.h \ + /opt/ros/humble/include/rcpputils/rcpputils/scope_exit.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/context.hpp \ + /usr/include/c++/11/typeindex /usr/include/c++/11/unordered_set \ + /usr/include/c++/11/bits/unordered_set.h \ + /opt/ros/humble/include/rclcpp/rclcpp/init_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/visibility_control.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/macros.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/contexts/default_context.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/guard_condition.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/client.hpp \ + /usr/include/c++/11/optional /usr/include/c++/11/sstream \ + /usr/include/c++/11/bits/sstream.tcc /usr/include/c++/11/variant \ + /opt/ros/humble/include/rcl/rcl/error_handling.h \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/cpp_callback_trampoline.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/exceptions.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/exceptions/exceptions.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/join.hpp \ + /usr/include/c++/11/iterator /usr/include/c++/11/bits/stream_iterator.h \ + /opt/ros/humble/include/rclcpp/rclcpp/expand_topic_or_service_name.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/function_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/logger.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/filesystem_helper.hpp \ + /opt/ros/humble/include/rcutils/rcutils/logging_macros.h \ + /opt/ros/humble/include/rclcpp/rclcpp/utilities.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_graph_interface.hpp \ + /opt/ros/humble/include/rcl/rcl/graph.h \ + /opt/ros/humble/include/rmw/rmw/names_and_types.h \ + /opt/ros/humble/include/rmw/rmw/get_topic_names_and_types.h \ + /opt/ros/humble/include/rmw/rmw/topic_endpoint_info_array.h \ + /opt/ros/humble/include/rmw/rmw/topic_endpoint_info.h \ + /opt/ros/humble/include/rclcpp/rclcpp/event.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/qos.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/duration.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/duration.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__struct.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/bounded_vector.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/message_initialization.hpp \ + /opt/ros/humble/include/rosidl_runtime_c/rosidl_runtime_c/message_initialization.h \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__builder.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__traits.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/traits.hpp \ + /usr/include/c++/11/codecvt /usr/include/c++/11/bits/codecvt.h \ + /usr/include/c++/11/iomanip /usr/include/c++/11/locale \ + /usr/include/c++/11/bits/locale_facets_nonio.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/time_members.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/messages_members.h \ + /usr/include/libintl.h /usr/include/c++/11/bits/locale_facets_nonio.tcc \ + /usr/include/c++/11/bits/locale_conv.h \ + /usr/include/c++/11/bits/quoted_string.h \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/duration__type_support.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_typesupport_cpp/message_type_support.hpp \ + /opt/ros/humble/include/rcl/rcl/logging_rosout.h \ + /opt/ros/humble/include/rmw/rmw/incompatible_qos_events_statuses.h \ + /opt/ros/humble/include/rclcpp/rclcpp/type_support_decl.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/message_type_support_decl.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_runtime_cpp/service_type_support_decl.hpp \ + /opt/ros/humble/include/rosidl_runtime_cpp/rosidl_typesupport_cpp/service_type_support.hpp \ + /opt/ros/humble/include/rmw/rmw/error_handling.h \ + /opt/ros/humble/include/rmw/rmw/impl/cpp/demangle.hpp \ + /usr/include/c++/11/cxxabi.h \ + /usr/include/aarch64-linux-gnu/c++/11/bits/cxxabi_tweaks.h \ + /opt/ros/humble/include/rmw/rmw/impl/config.h \ + /opt/ros/humble/include/rclcpp/rclcpp/publisher_base.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/network_flow_endpoint.hpp \ + /opt/ros/humble/include/rcl/rcl/network_flow_endpoints.h \ + /opt/ros/humble/include/rmw/rmw/network_flow_endpoint.h \ + /opt/ros/humble/include/rmw/rmw/network_flow_endpoint_array.h \ + /opt/ros/humble/include/rclcpp/rclcpp/qos_event.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/waitable.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/time.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/service.hpp \ + /opt/ros/humble/include/tracetools/tracetools/tracetools.h \ + /opt/ros/humble/include/tracetools/tracetools/config.h \ + /opt/ros/humble/include/tracetools/tracetools/visibility_control.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/any_service_callback.hpp \ + /opt/ros/humble/include/tracetools/tracetools/utils.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_base.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/any_subscription_callback.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/allocator/allocator_common.hpp \ + /usr/include/c++/11/cstring \ + /opt/ros/humble/include/rclcpp/rclcpp/allocator/allocator_deleter.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/subscription_callback_type_helper.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/message_info.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/serialized_message.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/type_adapter.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/intra_process_manager.hpp \ + /usr/include/c++/11/shared_mutex \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/ros_message_intra_process_buffer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process_base.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/intra_process_buffer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/buffer_implementation_base.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/subscription_intra_process_buffer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/create_intra_process_buffer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/buffers/ring_buffer_implementation.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/intra_process_buffer_type.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_content_filter_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/timer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/clock.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/time.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/time.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__struct.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__builder.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__traits.hpp \ + /opt/ros/humble/include/builtin_interfaces/builtin_interfaces/msg/detail/time__type_support.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/rate.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_base_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_use_intra_process.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/intra_process_setting.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_intra_process_buffer_type.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/message_memory_strategy.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_subscription_payload.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_payload.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/qos_overriding_options.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/set_parameters_result.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/set_parameters_result__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/rosidl_generator_cpp__visibility_control.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/topic_statistics_state.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/topic_statistics/subscription_topic_statistics.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/generate_statistics_message.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/metrics_message.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__struct.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/statistic_data_point__struct.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__builder.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__traits.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/statistic_data_point__traits.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/detail/metrics_message__type_support.hpp \ + /opt/ros/humble/include/statistics_msgs/statistics_msgs/msg/rosidl_generator_cpp__visibility_control.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/visibility_control.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/types.hpp \ + /usr/include/c++/11/cmath /usr/include/math.h \ + /usr/include/aarch64-linux-gnu/bits/math-vector.h \ + /usr/include/aarch64-linux-gnu/bits/libm-simd-decl-stubs.h \ + /usr/include/aarch64-linux-gnu/bits/flt-eval-method.h \ + /usr/include/aarch64-linux-gnu/bits/fp-logb.h \ + /usr/include/aarch64-linux-gnu/bits/fp-fast.h \ + /usr/include/aarch64-linux-gnu/bits/mathcalls-helper-functions.h \ + /usr/include/aarch64-linux-gnu/bits/mathcalls.h \ + /usr/include/aarch64-linux-gnu/bits/mathcalls-narrow.h \ + /usr/include/aarch64-linux-gnu/bits/iscanonical.h \ + /usr/include/c++/11/bits/specfun.h /usr/include/c++/11/tr1/gamma.tcc \ + /usr/include/c++/11/tr1/special_function_util.h \ + /usr/include/c++/11/tr1/bessel_function.tcc \ + /usr/include/c++/11/tr1/beta_function.tcc \ + /usr/include/c++/11/tr1/ell_integral.tcc \ + /usr/include/c++/11/tr1/exp_integral.tcc \ + /usr/include/c++/11/tr1/hypergeometric.tcc \ + /usr/include/c++/11/tr1/legendre_function.tcc \ + /usr/include/c++/11/tr1/modified_bessel_func.tcc \ + /usr/include/c++/11/tr1/poly_hermite.tcc \ + /usr/include/c++/11/tr1/poly_laguerre.tcc \ + /usr/include/c++/11/tr1/riemann_zeta.tcc \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/constants.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/received_message_age.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/constants.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/topic_statistics_collector.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/collector.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/moving_average.hpp \ + /usr/include/c++/11/numeric /usr/include/c++/11/bits/stl_numeric.h \ + /usr/include/c++/11/pstl/glue_numeric_defs.h \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/moving_average_statistics/types.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/thread_safety_annotations.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/collector/metric_details_interface.hpp \ + /opt/ros/humble/include/libstatistics_collector/libstatistics_collector/topic_statistics_collector/received_message_period.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/publisher.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/get_message_type_support_handle.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/is_ros_compatible_type.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/loaned_message.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/publisher_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/rmw_implementation_specific_publisher_payload.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/future_return_code.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/executors/single_threaded_executor.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/list_parameters_result.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/list_parameters_result__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_descriptor.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/floating_point_range__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/integer_range__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_descriptor__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_event.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_event__type_support.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/generic_publisher.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_topics_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_timers_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/publisher_factory.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_factory.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/typesupport_helpers.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/generic_subscription.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_clock_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_logging_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter__type_support.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_value.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_type.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_type__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/parameter_value.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/msg/detail/parameter_value__type_support.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_services_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_time_source_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_waitables_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_options.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_impl.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_client.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_generic_publisher.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_generic_subscription.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_publisher.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_topics_interface.hpp \ + /opt/ros/humble/include/rcpputils/rcpputils/pointer_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_topics_interface_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/qos_parameters.hpp \ + /opt/ros/humble/include/rmw/rmw/qos_string_conversions.h \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_parameters_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_parameters_interface_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_service.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_subscription.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/detail/resolve_enable_topic_statistics.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_timers_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_timers_interface_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/create_timer.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/get_node_base_interface.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_base_interface_traits.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/executors/static_single_threaded_executor.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/executors/static_executor_entities_collector.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/experimental/executable_list.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_client.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/describe_parameters.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/describe_parameters__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/get_parameter_types.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameter_types__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/get_parameters.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/get_parameters__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/list_parameters.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/list_parameters__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/set_parameters.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters__type_support.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/set_parameters_atomically.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__struct.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__builder.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__traits.hpp \ + /opt/ros/humble/include/rcl_interfaces/rcl_interfaces/srv/detail/set_parameters_atomically__type_support.hpp \ + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/parser.h \ + /opt/ros/humble/include/rcl_yaml_param_parser/rcl_yaml_param_parser/visibility_control.h \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_map.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_event_handler.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/parameter_service.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/dynamic_storage.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/subscription_wait_set_mask.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/storage_policy_common.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/sequential_synchronization.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_result.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_result_kind.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/synchronization_policy_common.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/static_storage.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/thread_safe_synchronization.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_policies/detail/write_preferring_read_write_lock.hpp \ + /opt/ros/humble/include/rclcpp/rclcpp/wait_set_template.hpp \ + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory.hpp \ + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_instance_wrapper.hpp \ + /opt/ros/humble/include/rclcpp_components/rclcpp_components/node_factory_template.hpp diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/cmake.check_cache b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/cmake.check_cache new file mode 100644 index 0000000..3dccd73 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/cmake.check_cache @@ -0,0 +1 @@ +# This file is generated by cmake for dependency checking of the CMakeCache.txt file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/progress.marks b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/progress.marks new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/progress.marks @@ -0,0 +1 @@ +9 diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/DependInfo.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/DependInfo.cmake new file mode 100644 index 0000000..fccf679 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/DependInfo.cmake @@ -0,0 +1,20 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp" "CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o" "gcc" "CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o.d" + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/armor_yolo_detect.dir/DependInfo.cmake" + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/build.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/build.make new file mode 100644 index 0000000..0981c35 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/build.make @@ -0,0 +1,306 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +# Include any dependencies generated for this target. +include CMakeFiles/trt_inference_test.dir/depend.make +# Include any dependencies generated by the compiler for this target. +include CMakeFiles/trt_inference_test.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/trt_inference_test.dir/progress.make + +# Include the compile flags for this target's objects. +include CMakeFiles/trt_inference_test.dir/flags.make + +CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o: CMakeFiles/trt_inference_test.dir/flags.make +CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o: ../../trt_inference/trt_inference_test.cpp +CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o: CMakeFiles/trt_inference_test.dir/compiler_depend.ts + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_1) "Building CXX object CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -MD -MT CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o -MF CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o.d -o CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp + +CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.i: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Preprocessing CXX source to CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.i" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -E /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp > CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.i + +CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.s: cmake_force + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green "Compiling CXX source to assembly CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.s" + /usr/bin/c++ $(CXX_DEFINES) $(CXX_INCLUDES) $(CXX_FLAGS) -S /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp -o CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.s + +# Object files for target trt_inference_test +trt_inference_test_OBJECTS = \ +"CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o" + +# External object files for target trt_inference_test +trt_inference_test_EXTERNAL_OBJECTS = + +trt_inference_test: CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o +trt_inference_test: CMakeFiles/trt_inference_test.dir/build.make +trt_inference_test: libarmor_yolo_detect.so +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_stitching.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_alphamat.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_aruco.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_barcode.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_bgsegm.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_bioinspired.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_ccalib.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_dnn_objdetect.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_dnn_superres.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_dpm.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_face.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_freetype.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_fuzzy.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_hdf.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_hfs.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_img_hash.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_intensity_transform.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_line_descriptor.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_mcc.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_quality.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_rapid.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_reg.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_rgbd.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_saliency.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_shape.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_stereo.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_structured_light.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_superres.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_surface_matching.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_tracking.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_videostab.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_viz.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_wechat_qrcode.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_xobjdetect.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_xphoto.so.4.5.4d +trt_inference_test: /opt/ros/humble/lib/libcomponent_manager.so +trt_inference_test: /opt/ros/humble/lib/libclass_loader.so +trt_inference_test: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstd_srvs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libstd_srvs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libcv_bridge.so +trt_inference_test: /opt/ros/humble/lib/aarch64-linux-gnu/libimage_transport.so +trt_inference_test: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libsensor_msgs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libsensor_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstatic_transform_broadcaster_node.so +trt_inference_test: /opt/ros/humble/lib/libtf2_ros.so +trt_inference_test: /opt/ros/humble/lib/libtf2.so +trt_inference_test: /usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0 +trt_inference_test: /opt/ros/humble/lib/libmessage_filters.so +trt_inference_test: /opt/ros/humble/lib/librclcpp_action.so +trt_inference_test: /opt/ros/humble/lib/librclcpp.so +trt_inference_test: /opt/ros/humble/lib/liblibstatistics_collector.so +trt_inference_test: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/librcl_action.so +trt_inference_test: /opt/ros/humble/lib/librcl.so +trt_inference_test: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/librcl_yaml_param_parser.so +trt_inference_test: /opt/ros/humble/lib/libyaml.so +trt_inference_test: /opt/ros/humble/lib/libtracetools.so +trt_inference_test: /opt/ros/humble/lib/librmw_implementation.so +trt_inference_test: /opt/ros/humble/lib/libament_index_cpp.so +trt_inference_test: /opt/ros/humble/lib/librcl_logging_spdlog.so +trt_inference_test: /opt/ros/humble/lib/librcl_logging_interface.so +trt_inference_test: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so +trt_inference_test: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so +trt_inference_test: /opt/ros/humble/lib/libfastcdr.so.1.0.24 +trt_inference_test: /opt/ros/humble/lib/librmw.so +trt_inference_test: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so +trt_inference_test: /opt/ros/humble/lib/librosidl_typesupport_introspection_c.so +trt_inference_test: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/librosidl_typesupport_cpp.so +trt_inference_test: /opt/ros/humble/lib/libtf2_msgs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libstd_msgs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libtf2_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libstd_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libaction_msgs__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so +trt_inference_test: /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/libaction_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_py.so +trt_inference_test: /usr/lib/aarch64-linux-gnu/libpython3.10.so +trt_inference_test: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/librosidl_typesupport_c.so +trt_inference_test: /opt/ros/humble/lib/librcpputils.so +trt_inference_test: /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_c.so +trt_inference_test: /opt/ros/humble/lib/librosidl_runtime_c.so +trt_inference_test: /opt/ros/humble/lib/librcutils.so +trt_inference_test: /usr/lib/aarch64-linux-gnu/liborocos-kdl.so +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_phase_unwrapping.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_optflow.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_highgui.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_datasets.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_plot.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_text.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_ml.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_videoio.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_ximgproc.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_video.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_objdetect.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_calib3d.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_dnn.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_features2d.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_flann.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_photo.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.4.5.4d +trt_inference_test: /usr/lib/aarch64-linux-gnu/libopencv_core.so.4.5.4d +trt_inference_test: /usr/local/cuda-12.6/lib64/libcudart_static.a +trt_inference_test: /usr/lib/aarch64-linux-gnu/librt.a +trt_inference_test: /usr/lib/aarch64-linux-gnu/libfmt.so.8.1.1 +trt_inference_test: CMakeFiles/trt_inference_test.dir/link.txt + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --green --bold --progress-dir=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles --progress-num=$(CMAKE_PROGRESS_2) "Linking CXX executable trt_inference_test" + $(CMAKE_COMMAND) -E cmake_link_script CMakeFiles/trt_inference_test.dir/link.txt --verbose=$(VERBOSE) + +# Rule to build all files generated by this target. +CMakeFiles/trt_inference_test.dir/build: trt_inference_test +.PHONY : CMakeFiles/trt_inference_test.dir/build + +CMakeFiles/trt_inference_test.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/trt_inference_test.dir/cmake_clean.cmake +.PHONY : CMakeFiles/trt_inference_test.dir/clean + +CMakeFiles/trt_inference_test.dir/depend: + cd /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/trt_inference_test.dir/depend + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/cmake_clean.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/cmake_clean.cmake new file mode 100644 index 0000000..4b83136 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/cmake_clean.cmake @@ -0,0 +1,11 @@ +file(REMOVE_RECURSE + "CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o" + "CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o.d" + "trt_inference_test" + "trt_inference_test.pdb" +) + +# Per-language clean rules from dependency scanning. +foreach(lang CXX) + include(CMakeFiles/trt_inference_test.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/compiler_depend.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/compiler_depend.make new file mode 100644 index 0000000..d20feb1 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty compiler generated dependencies file for trt_inference_test. +# This may be replaced when dependencies are built. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/compiler_depend.ts b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/compiler_depend.ts new file mode 100644 index 0000000..7c31243 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for compiler generated dependencies management for trt_inference_test. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/depend.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/depend.make new file mode 100644 index 0000000..b9d863a --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/depend.make @@ -0,0 +1,2 @@ +# Empty dependencies file for trt_inference_test. +# This may be replaced when dependencies are built. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/flags.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/flags.make new file mode 100644 index 0000000..47de156 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/flags.make @@ -0,0 +1,10 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# compile CXX with /usr/bin/c++ +CXX_DEFINES = -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION + +CXX_INCLUDES = -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs + +CXX_FLAGS = -std=gnu++17 + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/link.txt b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/link.txt new file mode 100644 index 0000000..77b4e03 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/link.txt @@ -0,0 +1 @@ +/usr/bin/c++ CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o -o trt_inference_test -L/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib -Wl,-rpath,/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib:/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect:/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib libarmor_yolo_detect.so /usr/lib/aarch64-linux-gnu/libopencv_stitching.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_alphamat.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_aruco.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_barcode.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_bgsegm.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_bioinspired.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_ccalib.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_dnn_objdetect.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_dnn_superres.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_dpm.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_face.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_freetype.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_fuzzy.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_hdf.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_hfs.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_img_hash.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_intensity_transform.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_line_descriptor.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_mcc.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_quality.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_rapid.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_reg.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_rgbd.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_saliency.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_shape.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_stereo.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_structured_light.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_superres.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_surface_matching.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_tracking.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_videostab.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_viz.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_wechat_qrcode.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_xobjdetect.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_xphoto.so.4.5.4d -lonnxruntime /opt/ros/humble/lib/libcomponent_manager.so /opt/ros/humble/lib/libclass_loader.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/libcomposition_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstd_srvs__rosidl_generator_py.so /opt/ros/humble/lib/libstd_srvs__rosidl_typesupport_c.so /opt/ros/humble/lib/libstd_srvs__rosidl_generator_c.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libvisualization_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libcv_bridge.so /opt/ros/humble/lib/aarch64-linux-gnu/libimage_transport.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libsensor_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libsensor_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstatic_transform_broadcaster_node.so /opt/ros/humble/lib/libtf2_ros.so /opt/ros/humble/lib/libtf2.so /usr/lib/aarch64-linux-gnu/libconsole_bridge.so.1.0 /opt/ros/humble/lib/libmessage_filters.so /opt/ros/humble/lib/librclcpp_action.so /opt/ros/humble/lib/librclcpp.so /opt/ros/humble/lib/liblibstatistics_collector.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_py.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/librosgraph_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libstatistics_msgs__rosidl_generator_c.so /opt/ros/humble/lib/librcl_action.so /opt/ros/humble/lib/librcl.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/librcl_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/librcl_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/librcl_yaml_param_parser.so /opt/ros/humble/lib/libyaml.so /opt/ros/humble/lib/libtracetools.so /opt/ros/humble/lib/librmw_implementation.so /opt/ros/humble/lib/libament_index_cpp.so /opt/ros/humble/lib/librcl_logging_spdlog.so /opt/ros/humble/lib/librcl_logging_interface.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/librosidl_typesupport_fastrtps_c.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/librosidl_typesupport_fastrtps_cpp.so /opt/ros/humble/lib/libfastcdr.so.1.0.24 /opt/ros/humble/lib/librmw.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosidl_typesupport_introspection_cpp.so /opt/ros/humble/lib/librosidl_typesupport_introspection_c.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_cpp.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_cpp.so /opt/ros/humble/lib/librosidl_typesupport_cpp.so /opt/ros/humble/lib/libtf2_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libstd_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libtf2_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libstd_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libtf2_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libgeometry_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libstd_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libaction_msgs__rosidl_generator_py.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_py.so /opt/ros/humble/lib/libaction_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_typesupport_c.so /opt/ros/humble/lib/libaction_msgs__rosidl_generator_c.so /opt/ros/humble/lib/libbuiltin_interfaces__rosidl_generator_c.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_py.so /usr/lib/aarch64-linux-gnu/libpython3.10.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_typesupport_c.so /opt/ros/humble/lib/librosidl_typesupport_c.so /opt/ros/humble/lib/librcpputils.so /opt/ros/humble/lib/libunique_identifier_msgs__rosidl_generator_c.so /opt/ros/humble/lib/librosidl_runtime_c.so /opt/ros/humble/lib/librcutils.so /usr/lib/aarch64-linux-gnu/liborocos-kdl.so /usr/lib/aarch64-linux-gnu/libopencv_phase_unwrapping.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_optflow.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_highgui.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_datasets.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_plot.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_text.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_ml.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_videoio.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_ximgproc.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_video.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_imgcodecs.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_objdetect.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_calib3d.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_dnn.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_features2d.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_flann.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_photo.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.4.5.4d /usr/lib/aarch64-linux-gnu/libopencv_core.so.4.5.4d /usr/local/cuda-12.6/lib64/libcudart_static.a -ldl /usr/lib/aarch64-linux-gnu/librt.a -lnvinfer -lnvinfer_plugin -lnvonnxparser /usr/lib/aarch64-linux-gnu/libfmt.so.8.1.1 -Wl,--as-needed diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/progress.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/progress.make new file mode 100644 index 0000000..895faac --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/trt_inference_test.dir/progress.make @@ -0,0 +1,3 @@ +CMAKE_PROGRESS_1 = 8 +CMAKE_PROGRESS_2 = 9 + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/DependInfo.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/DependInfo.cmake new file mode 100644 index 0000000..dc55e44 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/DependInfo.cmake @@ -0,0 +1,18 @@ + +# Consider dependencies only in project. +set(CMAKE_DEPENDS_IN_PROJECT_ONLY OFF) + +# The set of languages for which implicit dependencies are needed: +set(CMAKE_DEPENDS_LANGUAGES + ) + +# The set of dependency files which are needed: +set(CMAKE_DEPENDS_DEPENDENCY_FILES + ) + +# Targets to which this target links. +set(CMAKE_TARGET_LINKED_INFO_FILES + ) + +# Fortran module output directory. +set(CMAKE_Fortran_TARGET_MODULE_DIR "") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/build.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/build.make new file mode 100644 index 0000000..37170c8 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/build.make @@ -0,0 +1,83 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# Delete rule output on recipe failure. +.DELETE_ON_ERROR: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +# Utility rule file for uninstall. + +# Include any custom commands dependencies for this target. +include CMakeFiles/uninstall.dir/compiler_depend.make + +# Include the progress variables for this target. +include CMakeFiles/uninstall.dir/progress.make + +uninstall: CMakeFiles/uninstall.dir/build.make +.PHONY : uninstall + +# Rule to build all files generated by this target. +CMakeFiles/uninstall.dir/build: uninstall +.PHONY : CMakeFiles/uninstall.dir/build + +CMakeFiles/uninstall.dir/clean: + $(CMAKE_COMMAND) -P CMakeFiles/uninstall.dir/cmake_clean.cmake +.PHONY : CMakeFiles/uninstall.dir/clean + +CMakeFiles/uninstall.dir/depend: + cd /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect && $(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/DependInfo.cmake --color=$(COLOR) +.PHONY : CMakeFiles/uninstall.dir/depend + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/cmake_clean.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/cmake_clean.cmake new file mode 100644 index 0000000..9960e98 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/cmake_clean.cmake @@ -0,0 +1,5 @@ + +# Per-language clean rules from dependency scanning. +foreach(lang ) + include(CMakeFiles/uninstall.dir/cmake_clean_${lang}.cmake OPTIONAL) +endforeach() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/compiler_depend.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/compiler_depend.make new file mode 100644 index 0000000..2d74447 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/compiler_depend.make @@ -0,0 +1,2 @@ +# Empty custom commands generated dependencies file for uninstall. +# This may be replaced when dependencies are built. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/compiler_depend.ts b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/compiler_depend.ts new file mode 100644 index 0000000..ef27dcc --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/compiler_depend.ts @@ -0,0 +1,2 @@ +# CMAKE generated file: DO NOT EDIT! +# Timestamp file for custom commands dependencies management for uninstall. diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/progress.make b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/progress.make new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles/uninstall.dir/progress.make @@ -0,0 +1 @@ + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestConfiguration.ini b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestConfiguration.ini new file mode 100644 index 0000000..80b7cfa --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestConfiguration.ini @@ -0,0 +1,105 @@ +# This file is configured by CMake automatically as DartConfiguration.tcl +# If you choose not to use CMake, this file may be hand configured, by +# filling in the required variables. + + +# Configuration directories and files +SourceDirectory: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect +BuildDirectory: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +# Where to place the cost data store +CostDataFile: + +# Site is something like machine.domain, i.e. pragmatic.crd +Site: nx-02 + +# Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++ +BuildName: + +# Subprojects +LabelsForSubprojects: + +# Submission information +SubmitURL: + +# Dashboard start time +NightlyStartTime: + +# Commands for the build/test/submit cycle +ConfigureCommand: "/usr/bin/cmake" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" +MakeCommand: +DefaultCTestConfigurationType: + +# version control +UpdateVersionOnly: + +# CVS options +# Default is "-d -P -A" +CVSCommand: +CVSUpdateOptions: + +# Subversion options +SVNCommand: +SVNOptions: +SVNUpdateOptions: + +# Git options +GITCommand: +GITInitSubmodules: +GITUpdateOptions: +GITUpdateCustom: + +# Perforce options +P4Command: +P4Client: +P4Options: +P4UpdateOptions: +P4UpdateCustom: + +# Generic update command +UpdateCommand: +UpdateOptions: +UpdateType: + +# Compiler info +Compiler: /usr/bin/c++ +CompilerVersion: 11.4.0 + +# Dynamic analysis (MemCheck) +PurifyCommand: +ValgrindCommand: +ValgrindCommandOptions: +DrMemoryCommand: +DrMemoryCommandOptions: +CudaSanitizerCommand: +CudaSanitizerCommandOptions: +MemoryCheckType: +MemoryCheckSanitizerOptions: +MemoryCheckCommand: +MemoryCheckCommandOptions: +MemoryCheckSuppressionFile: + +# Coverage +CoverageCommand: +CoverageExtraFlags: + +# Testing options +# TimeOut is the amount of time in seconds to wait for processes +# to complete during testing. After TimeOut seconds, the +# process will be summarily terminated. +# Currently set to 25 minutes +TimeOut: + +# During parallel testing CTest will not start a new test if doing +# so would cause the system load to exceed this value. +TestLoad: + +UseLaunchers: +CurlOptions: +# warning, if you add new options here that have to do with submit, +# you have to update cmCTestSubmitCommand.cxx + +# For CTest submissions that timeout, these options +# specify behavior for retrying the submission +CTestSubmitRetryDelay: +CTestSubmitRetryCount: diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestCustom.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestCustom.cmake new file mode 100644 index 0000000..14956f3 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestCustom.cmake @@ -0,0 +1,2 @@ +set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE 0) +set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE 0) diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestTestfile.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestTestfile.cmake new file mode 100644 index 0000000..5818cf0 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CTestTestfile.cmake @@ -0,0 +1,14 @@ +# CMake generated Testfile for +# Source directory: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect +# Build directory: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect +# +# This file includes the relevant testing commands required for +# testing this directory and lists subdirectories to be tested as well. +add_test(cppcheck "/usr/bin/python3" "-u" "/opt/ros/humble/share/ament_cmake_test/cmake/run_test.py" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results/armor_yolo_detect/cppcheck.xunit.xml" "--package-name" "armor_yolo_detect" "--output-file" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cppcheck/cppcheck.txt" "--command" "/opt/ros/humble/bin/ament_cppcheck" "--xunit-file" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results/armor_yolo_detect/cppcheck.xunit.xml" "--include_dirs" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include") +set_tests_properties(cppcheck PROPERTIES LABELS "cppcheck;linter" TIMEOUT "300" WORKING_DIRECTORY "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" _BACKTRACE_TRIPLES "/opt/ros/humble/share/ament_cmake_test/cmake/ament_add_test.cmake;125;add_test;/opt/ros/humble/share/ament_cmake_cppcheck/cmake/ament_cppcheck.cmake;66;ament_add_test;/opt/ros/humble/share/ament_cmake_cppcheck/cmake/ament_cmake_cppcheck_lint_hook.cmake;87;ament_cppcheck;/opt/ros/humble/share/ament_cmake_cppcheck/cmake/ament_cmake_cppcheck_lint_hook.cmake;0;;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake;48;include;/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake;21;ament_execute_extensions;/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake;0;;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake;48;include;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_package.cmake;66;ament_execute_extensions;/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_package.cmake;124;ament_package;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt;105;ament_auto_package;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt;0;") +add_test(flake8 "/usr/bin/python3" "-u" "/opt/ros/humble/share/ament_cmake_test/cmake/run_test.py" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results/armor_yolo_detect/flake8.xunit.xml" "--package-name" "armor_yolo_detect" "--output-file" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_flake8/flake8.txt" "--command" "/opt/ros/humble/bin/ament_flake8" "--xunit-file" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results/armor_yolo_detect/flake8.xunit.xml") +set_tests_properties(flake8 PROPERTIES LABELS "flake8;linter" TIMEOUT "60" WORKING_DIRECTORY "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" _BACKTRACE_TRIPLES "/opt/ros/humble/share/ament_cmake_test/cmake/ament_add_test.cmake;125;add_test;/opt/ros/humble/share/ament_cmake_flake8/cmake/ament_flake8.cmake;63;ament_add_test;/opt/ros/humble/share/ament_cmake_flake8/cmake/ament_cmake_flake8_lint_hook.cmake;18;ament_flake8;/opt/ros/humble/share/ament_cmake_flake8/cmake/ament_cmake_flake8_lint_hook.cmake;0;;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake;48;include;/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake;21;ament_execute_extensions;/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake;0;;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake;48;include;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_package.cmake;66;ament_execute_extensions;/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_package.cmake;124;ament_package;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt;105;ament_auto_package;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt;0;") +add_test(pep257 "/usr/bin/python3" "-u" "/opt/ros/humble/share/ament_cmake_test/cmake/run_test.py" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results/armor_yolo_detect/pep257.xunit.xml" "--package-name" "armor_yolo_detect" "--output-file" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_pep257/pep257.txt" "--command" "/opt/ros/humble/bin/ament_pep257" "--xunit-file" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results/armor_yolo_detect/pep257.xunit.xml") +set_tests_properties(pep257 PROPERTIES LABELS "pep257;linter" TIMEOUT "60" WORKING_DIRECTORY "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" _BACKTRACE_TRIPLES "/opt/ros/humble/share/ament_cmake_test/cmake/ament_add_test.cmake;125;add_test;/opt/ros/humble/share/ament_cmake_pep257/cmake/ament_pep257.cmake;41;ament_add_test;/opt/ros/humble/share/ament_cmake_pep257/cmake/ament_cmake_pep257_lint_hook.cmake;18;ament_pep257;/opt/ros/humble/share/ament_cmake_pep257/cmake/ament_cmake_pep257_lint_hook.cmake;0;;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake;48;include;/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake;21;ament_execute_extensions;/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake;0;;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake;48;include;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_package.cmake;66;ament_execute_extensions;/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_package.cmake;124;ament_package;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt;105;ament_auto_package;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt;0;") +add_test(xmllint "/usr/bin/python3" "-u" "/opt/ros/humble/share/ament_cmake_test/cmake/run_test.py" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results/armor_yolo_detect/xmllint.xunit.xml" "--package-name" "armor_yolo_detect" "--output-file" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_xmllint/xmllint.txt" "--command" "/opt/ros/humble/bin/ament_xmllint" "--xunit-file" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/test_results/armor_yolo_detect/xmllint.xunit.xml") +set_tests_properties(xmllint PROPERTIES LABELS "xmllint;linter" TIMEOUT "60" WORKING_DIRECTORY "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" _BACKTRACE_TRIPLES "/opt/ros/humble/share/ament_cmake_test/cmake/ament_add_test.cmake;125;add_test;/opt/ros/humble/share/ament_cmake_xmllint/cmake/ament_xmllint.cmake;50;ament_add_test;/opt/ros/humble/share/ament_cmake_xmllint/cmake/ament_cmake_xmllint_lint_hook.cmake;18;ament_xmllint;/opt/ros/humble/share/ament_cmake_xmllint/cmake/ament_cmake_xmllint_lint_hook.cmake;0;;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake;48;include;/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake;21;ament_execute_extensions;/opt/ros/humble/share/ament_lint_auto/cmake/ament_lint_auto_package_hook.cmake;0;;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake;48;include;/opt/ros/humble/share/ament_cmake_core/cmake/core/ament_package.cmake;66;ament_execute_extensions;/opt/ros/humble/share/ament_cmake_auto/cmake/ament_auto_package.cmake;124;ament_package;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt;105;ament_auto_package;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/CMakeLists.txt;0;") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/Makefile b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/Makefile new file mode 100644 index 0000000..abeffa1 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/Makefile @@ -0,0 +1,432 @@ +# CMAKE generated file: DO NOT EDIT! +# Generated by "Unix Makefiles" Generator, CMake Version 3.22 + +# Default target executed when no arguments are given to make. +default_target: all +.PHONY : default_target + +# Allow only one "make -f Makefile2" at a time, but pass parallelism. +.NOTPARALLEL: + +#============================================================================= +# Special targets provided by cmake. + +# Disable implicit rules so canonical targets will work. +.SUFFIXES: + +# Disable VCS-based implicit rules. +% : %,v + +# Disable VCS-based implicit rules. +% : RCS/% + +# Disable VCS-based implicit rules. +% : RCS/%,v + +# Disable VCS-based implicit rules. +% : SCCS/s.% + +# Disable VCS-based implicit rules. +% : s.% + +.SUFFIXES: .hpux_make_needs_suffix_list + +# Command-line flag to silence nested $(MAKE). +$(VERBOSE)MAKESILENT = -s + +#Suppress display of executed commands. +$(VERBOSE).SILENT: + +# A target that is always out of date. +cmake_force: +.PHONY : cmake_force + +#============================================================================= +# Set environment variables for the build. + +# The shell in which to execute make rules. +SHELL = /bin/sh + +# The CMake executable. +CMAKE_COMMAND = /usr/bin/cmake + +# The command to remove a file. +RM = /usr/bin/cmake -E rm -f + +# Escaping for special characters. +EQUALS = = + +# The top-level source directory on which CMake was run. +CMAKE_SOURCE_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +# The top-level build directory on which CMake was run. +CMAKE_BINARY_DIR = /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect + +#============================================================================= +# Targets provided globally by CMake. + +# Special rule for the target test +test: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running tests..." + /usr/bin/ctest --force-new-ctest-process $(ARGS) +.PHONY : test + +# Special rule for the target test +test/fast: test +.PHONY : test/fast + +# Special rule for the target edit_cache +edit_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "No interactive CMake dialog available..." + /usr/bin/cmake -E echo No\ interactive\ CMake\ dialog\ available. +.PHONY : edit_cache + +# Special rule for the target edit_cache +edit_cache/fast: edit_cache +.PHONY : edit_cache/fast + +# Special rule for the target rebuild_cache +rebuild_cache: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..." + /usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) +.PHONY : rebuild_cache + +# Special rule for the target rebuild_cache +rebuild_cache/fast: rebuild_cache +.PHONY : rebuild_cache/fast + +# Special rule for the target list_install_components +list_install_components: + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\"" +.PHONY : list_install_components + +# Special rule for the target list_install_components +list_install_components/fast: list_install_components +.PHONY : list_install_components/fast + +# Special rule for the target install +install: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install + +# Special rule for the target install +install/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..." + /usr/bin/cmake -P cmake_install.cmake +.PHONY : install/fast + +# Special rule for the target install/local +install/local: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local + +# Special rule for the target install/local +install/local/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..." + /usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake +.PHONY : install/local/fast + +# Special rule for the target install/strip +install/strip: preinstall + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip + +# Special rule for the target install/strip +install/strip/fast: preinstall/fast + @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..." + /usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake +.PHONY : install/strip/fast + +# The main all target +all: cmake_check_build_system + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect//CMakeFiles/progress.marks + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 all + $(CMAKE_COMMAND) -E cmake_progress_start /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/CMakeFiles 0 +.PHONY : all + +# The main clean target +clean: + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 clean +.PHONY : clean + +# The main clean target +clean/fast: clean +.PHONY : clean/fast + +# Prepare targets for installation. +preinstall: all + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall + +# Prepare targets for installation. +preinstall/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 preinstall +.PHONY : preinstall/fast + +# clear depends +depend: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 +.PHONY : depend + +#============================================================================= +# Target rules for targets named uninstall + +# Build rule for target. +uninstall: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 uninstall +.PHONY : uninstall + +# fast build rule for target. +uninstall/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/uninstall.dir/build.make CMakeFiles/uninstall.dir/build +.PHONY : uninstall/fast + +#============================================================================= +# Target rules for targets named armor_yolo_detect_uninstall + +# Build rule for target. +armor_yolo_detect_uninstall: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 armor_yolo_detect_uninstall +.PHONY : armor_yolo_detect_uninstall + +# fast build rule for target. +armor_yolo_detect_uninstall/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect_uninstall.dir/build.make CMakeFiles/armor_yolo_detect_uninstall.dir/build +.PHONY : armor_yolo_detect_uninstall/fast + +#============================================================================= +# Target rules for targets named armor_yolo_detect + +# Build rule for target. +armor_yolo_detect: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 armor_yolo_detect +.PHONY : armor_yolo_detect + +# fast build rule for target. +armor_yolo_detect/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/build +.PHONY : armor_yolo_detect/fast + +#============================================================================= +# Target rules for targets named trt_inference_test + +# Build rule for target. +trt_inference_test: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 trt_inference_test +.PHONY : trt_inference_test + +# fast build rule for target. +trt_inference_test/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/trt_inference_test.dir/build.make CMakeFiles/trt_inference_test.dir/build +.PHONY : trt_inference_test/fast + +#============================================================================= +# Target rules for targets named armor_yolo_detector_node + +# Build rule for target. +armor_yolo_detector_node: cmake_check_build_system + $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 armor_yolo_detector_node +.PHONY : armor_yolo_detector_node + +# fast build rule for target. +armor_yolo_detector_node/fast: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detector_node.dir/build.make CMakeFiles/armor_yolo_detector_node.dir/build +.PHONY : armor_yolo_detector_node/fast + +rclcpp_components/node_main_armor_yolo_detector_node.o: rclcpp_components/node_main_armor_yolo_detector_node.cpp.o +.PHONY : rclcpp_components/node_main_armor_yolo_detector_node.o + +# target to build an object file +rclcpp_components/node_main_armor_yolo_detector_node.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detector_node.dir/build.make CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o +.PHONY : rclcpp_components/node_main_armor_yolo_detector_node.cpp.o + +rclcpp_components/node_main_armor_yolo_detector_node.i: rclcpp_components/node_main_armor_yolo_detector_node.cpp.i +.PHONY : rclcpp_components/node_main_armor_yolo_detector_node.i + +# target to preprocess a source file +rclcpp_components/node_main_armor_yolo_detector_node.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detector_node.dir/build.make CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.i +.PHONY : rclcpp_components/node_main_armor_yolo_detector_node.cpp.i + +rclcpp_components/node_main_armor_yolo_detector_node.s: rclcpp_components/node_main_armor_yolo_detector_node.cpp.s +.PHONY : rclcpp_components/node_main_armor_yolo_detector_node.s + +# target to generate assembly for a file +rclcpp_components/node_main_armor_yolo_detector_node.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detector_node.dir/build.make CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.s +.PHONY : rclcpp_components/node_main_armor_yolo_detector_node.cpp.s + +src/armor_yolo_detector.o: src/armor_yolo_detector.cpp.o +.PHONY : src/armor_yolo_detector.o + +# target to build an object file +src/armor_yolo_detector.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +.PHONY : src/armor_yolo_detector.cpp.o + +src/armor_yolo_detector.i: src/armor_yolo_detector.cpp.i +.PHONY : src/armor_yolo_detector.i + +# target to preprocess a source file +src/armor_yolo_detector.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.i +.PHONY : src/armor_yolo_detector.cpp.i + +src/armor_yolo_detector.s: src/armor_yolo_detector.cpp.s +.PHONY : src/armor_yolo_detector.s + +# target to generate assembly for a file +src/armor_yolo_detector.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.s +.PHONY : src/armor_yolo_detector.cpp.s + +src/armor_yolo_detector_node.o: src/armor_yolo_detector_node.cpp.o +.PHONY : src/armor_yolo_detector_node.o + +# target to build an object file +src/armor_yolo_detector_node.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +.PHONY : src/armor_yolo_detector_node.cpp.o + +src/armor_yolo_detector_node.i: src/armor_yolo_detector_node.cpp.i +.PHONY : src/armor_yolo_detector_node.i + +# target to preprocess a source file +src/armor_yolo_detector_node.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.i +.PHONY : src/armor_yolo_detector_node.cpp.i + +src/armor_yolo_detector_node.s: src/armor_yolo_detector_node.cpp.s +.PHONY : src/armor_yolo_detector_node.s + +# target to generate assembly for a file +src/armor_yolo_detector_node.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.s +.PHONY : src/armor_yolo_detector_node.cpp.s + +src/trt_logger.o: src/trt_logger.cpp.o +.PHONY : src/trt_logger.o + +# target to build an object file +src/trt_logger.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o +.PHONY : src/trt_logger.cpp.o + +src/trt_logger.i: src/trt_logger.cpp.i +.PHONY : src/trt_logger.i + +# target to preprocess a source file +src/trt_logger.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.i +.PHONY : src/trt_logger.cpp.i + +src/trt_logger.s: src/trt_logger.cpp.s +.PHONY : src/trt_logger.s + +# target to generate assembly for a file +src/trt_logger.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.s +.PHONY : src/trt_logger.cpp.s + +src/yolo_tensorrt.o: src/yolo_tensorrt.cpp.o +.PHONY : src/yolo_tensorrt.o + +# target to build an object file +src/yolo_tensorrt.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +.PHONY : src/yolo_tensorrt.cpp.o + +src/yolo_tensorrt.i: src/yolo_tensorrt.cpp.i +.PHONY : src/yolo_tensorrt.i + +# target to preprocess a source file +src/yolo_tensorrt.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.i +.PHONY : src/yolo_tensorrt.cpp.i + +src/yolo_tensorrt.s: src/yolo_tensorrt.cpp.s +.PHONY : src/yolo_tensorrt.s + +# target to generate assembly for a file +src/yolo_tensorrt.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/armor_yolo_detect.dir/build.make CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.s +.PHONY : src/yolo_tensorrt.cpp.s + +trt_inference/trt_inference_test.o: trt_inference/trt_inference_test.cpp.o +.PHONY : trt_inference/trt_inference_test.o + +# target to build an object file +trt_inference/trt_inference_test.cpp.o: + $(MAKE) $(MAKESILENT) -f CMakeFiles/trt_inference_test.dir/build.make CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o +.PHONY : trt_inference/trt_inference_test.cpp.o + +trt_inference/trt_inference_test.i: trt_inference/trt_inference_test.cpp.i +.PHONY : trt_inference/trt_inference_test.i + +# target to preprocess a source file +trt_inference/trt_inference_test.cpp.i: + $(MAKE) $(MAKESILENT) -f CMakeFiles/trt_inference_test.dir/build.make CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.i +.PHONY : trt_inference/trt_inference_test.cpp.i + +trt_inference/trt_inference_test.s: trt_inference/trt_inference_test.cpp.s +.PHONY : trt_inference/trt_inference_test.s + +# target to generate assembly for a file +trt_inference/trt_inference_test.cpp.s: + $(MAKE) $(MAKESILENT) -f CMakeFiles/trt_inference_test.dir/build.make CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.s +.PHONY : trt_inference/trt_inference_test.cpp.s + +# Help Target +help: + @echo "The following are some of the valid targets for this Makefile:" + @echo "... all (the default if no target is provided)" + @echo "... clean" + @echo "... depend" + @echo "... edit_cache" + @echo "... install" + @echo "... install/local" + @echo "... install/strip" + @echo "... list_install_components" + @echo "... rebuild_cache" + @echo "... test" + @echo "... armor_yolo_detect_uninstall" + @echo "... uninstall" + @echo "... armor_yolo_detect" + @echo "... armor_yolo_detector_node" + @echo "... trt_inference_test" + @echo "... rclcpp_components/node_main_armor_yolo_detector_node.o" + @echo "... rclcpp_components/node_main_armor_yolo_detector_node.i" + @echo "... rclcpp_components/node_main_armor_yolo_detector_node.s" + @echo "... src/armor_yolo_detector.o" + @echo "... src/armor_yolo_detector.i" + @echo "... src/armor_yolo_detector.s" + @echo "... src/armor_yolo_detector_node.o" + @echo "... src/armor_yolo_detector_node.i" + @echo "... src/armor_yolo_detector_node.s" + @echo "... src/trt_logger.o" + @echo "... src/trt_logger.i" + @echo "... src/trt_logger.s" + @echo "... src/yolo_tensorrt.o" + @echo "... src/yolo_tensorrt.i" + @echo "... src/yolo_tensorrt.s" + @echo "... trt_inference/trt_inference_test.o" + @echo "... trt_inference/trt_inference_test.i" + @echo "... trt_inference/trt_inference_test.s" +.PHONY : help + + + +#============================================================================= +# Special targets to cleanup operation of make. + +# Special rule to run CMake to check the build system integrity. +# No rule that depends on this can have commands that come from listfiles +# because they might be regenerated. +cmake_check_build_system: + $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0 +.PHONY : cmake_check_build_system + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig-version.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig-version.cmake new file mode 100644 index 0000000..dfe0730 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig-version.cmake @@ -0,0 +1,14 @@ +# generated from ament/cmake/core/templates/nameConfig-version.cmake.in +set(PACKAGE_VERSION "0.1.0") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig.cmake new file mode 100644 index 0000000..3fb2920 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig.cmake @@ -0,0 +1,42 @@ +# generated from ament/cmake/core/templates/nameConfig.cmake.in + +# prevent multiple inclusion +if(_armor_yolo_detect_CONFIG_INCLUDED) + # ensure to keep the found flag the same + if(NOT DEFINED armor_yolo_detect_FOUND) + # explicitly set it to FALSE, otherwise CMake will set it to TRUE + set(armor_yolo_detect_FOUND FALSE) + elseif(NOT armor_yolo_detect_FOUND) + # use separate condition to avoid uninitialized variable warning + set(armor_yolo_detect_FOUND FALSE) + endif() + return() +endif() +set(_armor_yolo_detect_CONFIG_INCLUDED TRUE) + +# output package information +if(NOT armor_yolo_detect_FIND_QUIETLY) + message(STATUS "Found armor_yolo_detect: 0.1.0 (${armor_yolo_detect_DIR})") +endif() + +# warn when using a deprecated package +if(NOT "" STREQUAL "") + set(_msg "Package 'armor_yolo_detect' is deprecated") + # append custom deprecation text if available + if(NOT "" STREQUAL "TRUE") + set(_msg "${_msg} ()") + endif() + # optionally quiet the deprecation message + if(NOT ${armor_yolo_detect_DEPRECATED_QUIET}) + message(DEPRECATION "${_msg}") + endif() +endif() + +# flag package as ament-based to distinguish it after being find_package()-ed +set(armor_yolo_detect_FOUND_AMENT_PACKAGE TRUE) + +# include all config extra files +set(_extras "ament_cmake_export_dependencies-extras.cmake;ament_cmake_export_include_directories-extras.cmake;ament_cmake_export_libraries-extras.cmake") +foreach(_extra ${_extras}) + include("${armor_yolo_detect_DIR}/${_extra}") +endforeach() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/package.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/package.cmake new file mode 100644 index 0000000..d3fe991 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/package.cmake @@ -0,0 +1,14 @@ +set(_AMENT_PACKAGE_NAME "armor_yolo_detect") +set(armor_yolo_detect_VERSION "0.1.0") +set(armor_yolo_detect_MAINTAINER "chenyy <3289288508@qq.com>") +set(armor_yolo_detect_BUILD_DEPENDS "rclcpp" "rclcpp_components" "sensor_msgs" "geometry_msgs" "std_srvs" "visualization_msgs" "cv_bridge" "image_transport" "rm_interfaces" "vision_opencv" "tf2" "eigen" "fmt" "tf2_ros" "tf2_geometry_msgs" "rm_utils" "armor_detector") +set(armor_yolo_detect_BUILDTOOL_DEPENDS "ament_cmake") +set(armor_yolo_detect_BUILD_EXPORT_DEPENDS "rclcpp" "rclcpp_components" "sensor_msgs" "geometry_msgs" "std_srvs" "visualization_msgs" "cv_bridge" "image_transport" "rm_interfaces" "vision_opencv" "tf2" "eigen" "fmt" "tf2_ros" "tf2_geometry_msgs" "rm_utils" "armor_detector") +set(armor_yolo_detect_BUILDTOOL_EXPORT_DEPENDS ) +set(armor_yolo_detect_EXEC_DEPENDS "rclcpp" "rclcpp_components" "sensor_msgs" "geometry_msgs" "std_srvs" "visualization_msgs" "cv_bridge" "image_transport" "rm_interfaces" "vision_opencv" "tf2" "eigen" "fmt" "tf2_ros" "tf2_geometry_msgs" "rm_utils" "armor_detector") +set(armor_yolo_detect_TEST_DEPENDS "ament_lint_auto" "ament_lint_common" "ament_cmake_gtest") +set(armor_yolo_detect_GROUP_DEPENDS ) +set(armor_yolo_detect_MEMBER_OF_GROUPS ) +set(armor_yolo_detect_DEPRECATED "") +set(armor_yolo_detect_EXPORT_TAGS) +list(APPEND armor_yolo_detect_EXPORT_TAGS "ament_cmake") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_dependencies-extras.cmake.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_dependencies-extras.cmake.stamp new file mode 100644 index 0000000..9f82ecf --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_dependencies-extras.cmake.stamp @@ -0,0 +1,92 @@ +# generated from ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies-extras.cmake.in + +set(_exported_dependencies "rclcpp;rclcpp_components;sensor_msgs;geometry_msgs;std_srvs;visualization_msgs;cv_bridge;image_transport;vision_opencv;tf2;fmt;tf2_ros;tf2_geometry_msgs") + +find_package(ament_cmake_libraries QUIET REQUIRED) + +# find_package() all dependencies +# and append their DEFINITIONS INCLUDE_DIRS, LIBRARIES, and LINK_FLAGS +# variables to armor_yolo_detect_DEFINITIONS, armor_yolo_detect_INCLUDE_DIRS, +# armor_yolo_detect_LIBRARIES, and armor_yolo_detect_LINK_FLAGS. +# Additionally collect the direct dependency names in +# armor_yolo_detect_DEPENDENCIES as well as the recursive dependency names +# in armor_yolo_detect_RECURSIVE_DEPENDENCIES. +if(NOT _exported_dependencies STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + set(armor_yolo_detect_DEPENDENCIES ${_exported_dependencies}) + set(armor_yolo_detect_RECURSIVE_DEPENDENCIES ${_exported_dependencies}) + set(_libraries) + foreach(_dep ${_exported_dependencies}) + if(NOT ${_dep}_FOUND) + find_package("${_dep}" QUIET REQUIRED) + endif() + # if a package provides modern CMake interface targets use them + # exclusively assuming the classic CMake variables only exist for + # backward compatibility + set(use_modern_cmake FALSE) + if(NOT "${${_dep}_TARGETS}" STREQUAL "") + foreach(_target ${${_dep}_TARGETS}) + # only use actual targets + # in case a package uses this variable for other content + if(TARGET "${_target}") + get_target_property(_include_dirs ${_target} INTERFACE_INCLUDE_DIRECTORIES) + if(_include_dirs) + list_append_unique(armor_yolo_detect_INCLUDE_DIRS "${_include_dirs}") + endif() + + get_target_property(_imported_configurations ${_target} IMPORTED_CONFIGURATIONS) + if(_imported_configurations) + string(TOUPPER "${_imported_configurations}" _imported_configurations) + if(DEBUG_CONFIGURATIONS) + string(TOUPPER "${DEBUG_CONFIGURATIONS}" _debug_configurations_uppercase) + else() + set(_debug_configurations_uppercase "DEBUG") + endif() + foreach(_imported_config ${_imported_configurations}) + get_target_property(_imported_implib ${_target} IMPORTED_IMPLIB_${_imported_config}) + if(_imported_implib) + set(_imported_implib_config "optimized") + if(${_imported_config} IN_LIST _debug_configurations_uppercase) + set(_imported_implib_config "debug") + endif() + list(APPEND _libraries ${_imported_implib_config} ${_imported_implib}) + else() + get_target_property(_imported_location ${_target} IMPORTED_LOCATION_${_imported_config}) + if(_imported_location) + list(APPEND _libraries "${_imported_location}") + endif() + endif() + endforeach() + endif() + + get_target_property(_link_libraries ${_target} INTERFACE_LINK_LIBRARIES) + if(_link_libraries) + list(APPEND _libraries "${_link_libraries}") + endif() + set(use_modern_cmake TRUE) + endif() + endforeach() + endif() + if(NOT use_modern_cmake) + if(${_dep}_DEFINITIONS) + list_append_unique(armor_yolo_detect_DEFINITIONS "${${_dep}_DEFINITIONS}") + endif() + if(${_dep}_INCLUDE_DIRS) + list_append_unique(armor_yolo_detect_INCLUDE_DIRS "${${_dep}_INCLUDE_DIRS}") + endif() + if(${_dep}_LIBRARIES) + list(APPEND _libraries "${${_dep}_LIBRARIES}") + endif() + if(${_dep}_LINK_FLAGS) + list_append_unique(armor_yolo_detect_LINK_FLAGS "${${_dep}_LINK_FLAGS}") + endif() + if(${_dep}_RECURSIVE_DEPENDENCIES) + list_append_unique(armor_yolo_detect_RECURSIVE_DEPENDENCIES "${${_dep}_RECURSIVE_DEPENDENCIES}") + endif() + endif() + if(_libraries) + ament_libraries_deduplicate(_libraries "${_libraries}") + list(APPEND armor_yolo_detect_LIBRARIES "${_libraries}") + endif() + endforeach() +endif() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_include_directories-extras.cmake.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_include_directories-extras.cmake.stamp new file mode 100644 index 0000000..103be48 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_include_directories-extras.cmake.stamp @@ -0,0 +1,16 @@ +# generated from ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake.in + +set(_exported_include_dirs "${armor_yolo_detect_DIR}/../../../include/armor_yolo_detect") + +# append include directories to armor_yolo_detect_INCLUDE_DIRS +# warn about not existing paths +if(NOT _exported_include_dirs STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + foreach(_exported_include_dir ${_exported_include_dirs}) + if(NOT IS_DIRECTORY "${_exported_include_dir}") + message(WARNING "Package 'armor_yolo_detect' exports the include directory '${_exported_include_dir}' which doesn't exist") + endif() + normalize_path(_exported_include_dir "${_exported_include_dir}") + list(APPEND armor_yolo_detect_INCLUDE_DIRS "${_exported_include_dir}") + endforeach() +endif() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_libraries-extras.cmake.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_libraries-extras.cmake.stamp new file mode 100644 index 0000000..042943a --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_cmake_export_libraries-extras.cmake.stamp @@ -0,0 +1,141 @@ +# generated from ament_cmake_export_libraries/cmake/template/ament_cmake_export_libraries.cmake.in + +set(_exported_libraries "armor_yolo_detect") +set(_exported_library_names "") + +# populate armor_yolo_detect_LIBRARIES +if(NOT _exported_libraries STREQUAL "") + # loop over libraries, either target names or absolute paths + list(LENGTH _exported_libraries _length) + set(_i 0) + while(_i LESS _length) + list(GET _exported_libraries ${_i} _arg) + + # pass linker flags along + if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]") + list(APPEND armor_yolo_detect_LIBRARIES "${_arg}") + math(EXPR _i "${_i} + 1") + continue() + endif() + + if("${_arg}" MATCHES "^(debug|optimized|general)$") + # remember build configuration keyword + # and get following library + set(_cfg "${_arg}") + math(EXPR _i "${_i} + 1") + if(_i EQUAL _length) + message(FATAL_ERROR "Package 'armor_yolo_detect' passes the build configuration keyword '${_cfg}' as the last exported library") + endif() + list(GET _exported_libraries ${_i} _library) + else() + # the value is a library without a build configuration keyword + set(_cfg "") + set(_library "${_arg}") + endif() + math(EXPR _i "${_i} + 1") + + if(NOT IS_ABSOLUTE "${_library}") + # search for library target relative to this CMake file + set(_lib "NOTFOUND") + find_library( + _lib NAMES "${_library}" + PATHS "${armor_yolo_detect_DIR}/../../../lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + if(NOT _lib) + # warn about not existing library and ignore it + message(FATAL_ERROR "Package 'armor_yolo_detect' exports the library '${_library}' which couldn't be found") + elseif(NOT IS_ABSOLUTE "${_lib}") + # the found library must be an absolute path + message(FATAL_ERROR "Package 'armor_yolo_detect' found the library '${_library}' at '${_lib}' which is not an absolute path") + elseif(NOT EXISTS "${_lib}") + # the found library must exist + message(FATAL_ERROR "Package 'armor_yolo_detect' found the library '${_lib}' which doesn't exist") + else() + list(APPEND armor_yolo_detect_LIBRARIES ${_cfg} "${_lib}") + endif() + + else() + if(NOT EXISTS "${_library}") + # the found library must exist + message(WARNING "Package 'armor_yolo_detect' exports the library '${_library}' which doesn't exist") + else() + list(APPEND armor_yolo_detect_LIBRARIES ${_cfg} "${_library}") + endif() + endif() + endwhile() +endif() + +# find_library() library names with optional LIBRARY_DIRS +# and add the libraries to armor_yolo_detect_LIBRARIES +if(NOT _exported_library_names STREQUAL "") + # loop over library names + # but remember related build configuration keyword if available + list(LENGTH _exported_library_names _length) + set(_i 0) + while(_i LESS _length) + list(GET _exported_library_names ${_i} _arg) + # pass linker flags along + if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]") + list(APPEND armor_yolo_detect_LIBRARIES "${_arg}") + math(EXPR _i "${_i} + 1") + continue() + endif() + + if("${_arg}" MATCHES "^(debug|optimized|general)$") + # remember build configuration keyword + # and get following library name + set(_cfg "${_arg}") + math(EXPR _i "${_i} + 1") + if(_i EQUAL _length) + message(FATAL_ERROR "Package 'armor_yolo_detect' passes the build configuration keyword '${_cfg}' as the last exported target") + endif() + list(GET _exported_library_names ${_i} _library) + else() + # the value is a library target without a build configuration keyword + set(_cfg "") + set(_library "${_arg}") + endif() + math(EXPR _i "${_i} + 1") + + # extract optional LIBRARY_DIRS from library name + string(REPLACE ":" ";" _library_dirs "${_library}") + list(GET _library_dirs 0 _library_name) + list(REMOVE_AT _library_dirs 0) + + set(_lib "NOTFOUND") + if(NOT _library_dirs) + # search for library in the common locations + find_library( + _lib + NAMES "${_library_name}" + ) + if(NOT _lib) + # warn about not existing library and later ignore it + message(WARNING "Package 'armor_yolo_detect' exports library '${_library_name}' which couldn't be found") + endif() + else() + # search for library in the specified directories + find_library( + _lib + NAMES "${_library_name}" + PATHS ${_library_dirs} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + if(NOT _lib) + # warn about not existing library and later ignore it + message(WARNING + "Package 'armor_yolo_detect' exports library '${_library_name}' with LIBRARY_DIRS '${_library_dirs}' which couldn't be found") + endif() + endif() + if(_lib) + list(APPEND armor_yolo_detect_LIBRARIES ${_cfg} "${_lib}") + endif() + endwhile() +endif() + +# TODO(dirk-thomas) deduplicate armor_yolo_detect_LIBRARIES +# while maintaining library order +# as well as build configuration keywords +# as well as linker flags diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_prefix_path.sh.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_prefix_path.sh.stamp new file mode 100644 index 0000000..02e441b --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/ament_prefix_path.sh.stamp @@ -0,0 +1,4 @@ +# copied from +# ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh + +ament_prepend_unique_value AMENT_PREFIX_PATH "$AMENT_CURRENT_PREFIX" diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/library_path.sh.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/library_path.sh.stamp new file mode 100644 index 0000000..292e518 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/library_path.sh.stamp @@ -0,0 +1,16 @@ +# copied from ament_package/template/environment_hook/library_path.sh + +# detect if running on Darwin platform +_UNAME=`uname -s` +_IS_DARWIN=0 +if [ "$_UNAME" = "Darwin" ]; then + _IS_DARWIN=1 +fi +unset _UNAME + +if [ $_IS_DARWIN -eq 0 ]; then + ament_prepend_unique_value LD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +else + ament_prepend_unique_value DYLD_LIBRARY_PATH "$AMENT_CURRENT_PREFIX/lib" +fi +unset _IS_DARWIN diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/nameConfig-version.cmake.in.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/nameConfig-version.cmake.in.stamp new file mode 100644 index 0000000..ee49c9f --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/nameConfig-version.cmake.in.stamp @@ -0,0 +1,14 @@ +# generated from ament/cmake/core/templates/nameConfig-version.cmake.in +set(PACKAGE_VERSION "@PACKAGE_VERSION@") + +set(PACKAGE_VERSION_EXACT False) +set(PACKAGE_VERSION_COMPATIBLE False) + +if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT True) + set(PACKAGE_VERSION_COMPATIBLE True) +endif() + +if("${PACKAGE_FIND_VERSION}" VERSION_LESS "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_COMPATIBLE True) +endif() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/nameConfig.cmake.in.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/nameConfig.cmake.in.stamp new file mode 100644 index 0000000..6fb3fe7 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/nameConfig.cmake.in.stamp @@ -0,0 +1,42 @@ +# generated from ament/cmake/core/templates/nameConfig.cmake.in + +# prevent multiple inclusion +if(_@PROJECT_NAME@_CONFIG_INCLUDED) + # ensure to keep the found flag the same + if(NOT DEFINED @PROJECT_NAME@_FOUND) + # explicitly set it to FALSE, otherwise CMake will set it to TRUE + set(@PROJECT_NAME@_FOUND FALSE) + elseif(NOT @PROJECT_NAME@_FOUND) + # use separate condition to avoid uninitialized variable warning + set(@PROJECT_NAME@_FOUND FALSE) + endif() + return() +endif() +set(_@PROJECT_NAME@_CONFIG_INCLUDED TRUE) + +# output package information +if(NOT @PROJECT_NAME@_FIND_QUIETLY) + message(STATUS "Found @PROJECT_NAME@: @PACKAGE_VERSION@ (${@PROJECT_NAME@_DIR})") +endif() + +# warn when using a deprecated package +if(NOT "@PACKAGE_DEPRECATED@" STREQUAL "") + set(_msg "Package '@PROJECT_NAME@' is deprecated") + # append custom deprecation text if available + if(NOT "@PACKAGE_DEPRECATED@" STREQUAL "TRUE") + set(_msg "${_msg} (@PACKAGE_DEPRECATED@)") + endif() + # optionally quiet the deprecation message + if(NOT ${@PROJECT_NAME@_DEPRECATED_QUIET}) + message(DEPRECATION "${_msg}") + endif() +endif() + +# flag package as ament-based to distinguish it after being find_package()-ed +set(@PROJECT_NAME@_FOUND_AMENT_PACKAGE TRUE) + +# include all config extra files +set(_extras "@PACKAGE_CONFIG_EXTRA_FILES@") +foreach(_extra ${_extras}) + include("${@PROJECT_NAME@_DIR}/${_extra}") +endforeach() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/package.xml.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/package.xml.stamp new file mode 100644 index 0000000..4b9602d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/package.xml.stamp @@ -0,0 +1,42 @@ + + + + armor_yolo_detect + 0.1.0 + YOLOv5-based armor detector using TensorRT inference + chenyy + BSD + https://github.com/chenjunnn/rm_auto_aim + https://github.com/chenjunnn/rm_auto_aim/issues + chenyy + + ament_cmake + + rclcpp + rclcpp_components + sensor_msgs + geometry_msgs + std_srvs + visualization_msgs + cv_bridge + image_transport + rm_interfaces + vision_opencv + tf2 + eigen + fmt + tf2_ros + tf2_geometry_msgs + rm_utils + armor_detector + + ament_lint_auto + ament_lint_common + ament_cmake_gtest + + + ament_cmake + + diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/package_xml_2_cmake.py.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/package_xml_2_cmake.py.stamp new file mode 100644 index 0000000..8be9894 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/package_xml_2_cmake.py.stamp @@ -0,0 +1,150 @@ +#!/usr/bin/env python3 + +# Copyright 2014-2015 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import argparse +from collections import OrderedDict +import os +import sys + +from catkin_pkg.package import parse_package_string + + +def main(argv=sys.argv[1:]): + """ + Extract the information from package.xml and make them accessible to CMake. + + Parse the given package.xml file and + print CMake code defining several variables containing the content. + """ + parser = argparse.ArgumentParser( + description='Parse package.xml file and print CMake code defining ' + 'several variables', + ) + parser.add_argument( + 'package_xml', + type=argparse.FileType('r', encoding='utf-8'), + help='The path to a package.xml file', + ) + parser.add_argument( + 'outfile', + nargs='?', + help='The filename where the output should be written to', + ) + args = parser.parse_args(argv) + + try: + package = parse_package_string( + args.package_xml.read(), filename=args.package_xml.name) + except Exception as e: + print("Error parsing '%s':" % args.package_xml.name, file=sys.stderr) + raise e + finally: + args.package_xml.close() + + lines = generate_cmake_code(package) + if args.outfile: + with open(args.outfile, 'w', encoding='utf-8') as f: + for line in lines: + f.write('%s\n' % line) + else: + for line in lines: + print(line) + + +def get_dependency_values(key, depends): + dependencies = [] + + # Filter the dependencies, checking for any condition attributes + dependencies.append((key, ' '.join([ + '"%s"' % str(d) for d in depends + if d.condition is None or d.evaluate_condition(os.environ) + ]))) + + for d in depends: + comparisons = [ + 'version_lt', + 'version_lte', + 'version_eq', + 'version_gte', + 'version_gt'] + for comp in comparisons: + value = getattr(d, comp, None) + if value is not None: + dependencies.append(('%s_%s_%s' % (key, str(d), comp.upper()), + '"%s"' % value)) + return dependencies + + +def generate_cmake_code(package): + """ + Return a list of CMake set() commands containing the manifest information. + + :param package: catkin_pkg.package.Package + :returns: list of str + """ + variables = [] + variables.append(('VERSION', '"%s"' % package.version)) + + variables.append(( + 'MAINTAINER', + '"%s"' % (', '.join([str(m) for m in package.maintainers])))) + + variables.extend(get_dependency_values('BUILD_DEPENDS', + package.build_depends)) + variables.extend(get_dependency_values('BUILDTOOL_DEPENDS', + package.buildtool_depends)) + variables.extend(get_dependency_values('BUILD_EXPORT_DEPENDS', + package.build_export_depends)) + variables.extend(get_dependency_values('BUILDTOOL_EXPORT_DEPENDS', + package.buildtool_export_depends)) + variables.extend(get_dependency_values('EXEC_DEPENDS', + package.exec_depends)) + variables.extend(get_dependency_values('TEST_DEPENDS', + package.test_depends)) + variables.extend(get_dependency_values('GROUP_DEPENDS', + package.group_depends)) + variables.extend(get_dependency_values('MEMBER_OF_GROUPS', + package.member_of_groups)) + + deprecated = [e.content for e in package.exports + if e.tagname == 'deprecated'] + variables.append(('DEPRECATED', + '"%s"' % ((deprecated[0] if deprecated[0] else 'TRUE') + if deprecated + else ''))) + + lines = [] + lines.append('set(_AMENT_PACKAGE_NAME "%s")' % package.name) + for (k, v) in variables: + lines.append('set(%s_%s %s)' % (package.name, k, v)) + + lines.append('set(%s_EXPORT_TAGS)' % package.name) + replaces = OrderedDict() + replaces['${prefix}/'] = '' + replaces['\\'] = '\\\\' # escape backslashes + replaces['"'] = '\\"' # prevent double quotes to end the CMake string + replaces[';'] = '\\;' # prevent semicolons to be interpreted as list separators + for export in package.exports: + export = str(export) + for k, v in replaces.items(): + export = export.replace(k, v) + lines.append('list(APPEND %s_EXPORT_TAGS "%s")' % (package.name, export)) + + return lines + + +if __name__ == '__main__': + main() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/path.sh.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/path.sh.stamp new file mode 100644 index 0000000..e59b749 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/path.sh.stamp @@ -0,0 +1,5 @@ +# copied from ament_cmake_core/cmake/environment_hooks/environment/path.sh + +if [ -d "$AMENT_CURRENT_PREFIX/bin" ]; then + ament_prepend_unique_value PATH "$AMENT_CURRENT_PREFIX/bin" +fi diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/templates_2_cmake.py.stamp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/templates_2_cmake.py.stamp new file mode 100644 index 0000000..fb2fb47 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/stamps/templates_2_cmake.py.stamp @@ -0,0 +1,112 @@ +#!/usr/bin/env python3 + +# Copyright 2014-2015 Open Source Robotics Foundation, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import argparse +import os +import sys + +from ament_package.templates import get_environment_hook_template_path +from ament_package.templates import get_package_level_template_names +from ament_package.templates import get_package_level_template_path +from ament_package.templates import get_prefix_level_template_names +from ament_package.templates import get_prefix_level_template_path + +IS_WINDOWS = os.name == 'nt' + + +def main(argv=sys.argv[1:]): + """ + Extract the information about templates provided by ament_package. + + Call the API provided by ament_package and + print CMake code defining several variables containing information about + the available templates. + """ + parser = argparse.ArgumentParser( + description='Extract information about templates provided by ' + 'ament_package and print CMake code defining several ' + 'variables', + ) + parser.add_argument( + 'outfile', + nargs='?', + help='The filename where the output should be written to', + ) + args = parser.parse_args(argv) + + lines = generate_cmake_code() + if args.outfile: + basepath = os.path.dirname(args.outfile) + if not os.path.exists(basepath): + os.makedirs(basepath) + with open(args.outfile, 'w') as f: + for line in lines: + f.write('%s\n' % line) + else: + for line in lines: + print(line) + + +def generate_cmake_code(): + """ + Return a list of CMake set() commands containing the template information. + + :returns: list of str + """ + variables = [] + + if not IS_WINDOWS: + variables.append(( + 'ENVIRONMENT_HOOK_LIBRARY_PATH', + '"%s"' % get_environment_hook_template_path('library_path.sh'))) + else: + variables.append(('ENVIRONMENT_HOOK_LIBRARY_PATH', '')) + + ext = '.bat.in' if IS_WINDOWS else '.sh.in' + variables.append(( + 'ENVIRONMENT_HOOK_PYTHONPATH', + '"%s"' % get_environment_hook_template_path('pythonpath' + ext))) + + templates = [] + for name in get_package_level_template_names(): + templates.append('"%s"' % get_package_level_template_path(name)) + variables.append(( + 'PACKAGE_LEVEL', + templates)) + + templates = [] + for name in get_prefix_level_template_names(): + templates.append('"%s"' % get_prefix_level_template_path(name)) + variables.append(( + 'PREFIX_LEVEL', + templates)) + + lines = [] + for (k, v) in variables: + if isinstance(v, list): + lines.append('set(ament_cmake_package_templates_%s "")' % k) + for vv in v: + lines.append('list(APPEND ament_cmake_package_templates_%s %s)' + % (k, vv)) + else: + lines.append('set(ament_cmake_package_templates_%s %s)' % (k, v)) + # Ensure backslashes are replaced with forward slashes because CMake cannot + # parse files with backslashes in it. + return [line.replace('\\', '/') for line in lines] + + +if __name__ == '__main__': + main() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/ament_prefix_path.dsv b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/ament_prefix_path.dsv new file mode 100644 index 0000000..79d4c95 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/ament_prefix_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;AMENT_PREFIX_PATH; diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/library_path.dsv b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/library_path.dsv new file mode 100644 index 0000000..89bec93 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/library_path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate;LD_LIBRARY_PATH;lib diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.bash b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.bash new file mode 100644 index 0000000..49782f2 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.bash @@ -0,0 +1,46 @@ +# generated from ament_package/template/package_level/local_setup.bash.in + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.dsv b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.dsv new file mode 100644 index 0000000..c05f244 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.dsv @@ -0,0 +1,3 @@ +source;share/armor_yolo_detect/environment/ament_prefix_path.sh +source;share/armor_yolo_detect/environment/library_path.sh +source;share/armor_yolo_detect/environment/path.sh diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.sh b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.sh new file mode 100644 index 0000000..a22cea4 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.sh @@ -0,0 +1,185 @@ +# generated from ament_package/template/package_level/local_setup.sh.in + +# since this file is sourced use either the provided AMENT_CURRENT_PREFIX +# or fall back to the destination set at configure time +: ${AMENT_CURRENT_PREFIX:="/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect"} +if [ ! -d "$AMENT_CURRENT_PREFIX" ]; then + if [ -z "$COLCON_CURRENT_PREFIX" ]; then + echo "The compile time prefix path '$AMENT_CURRENT_PREFIX' doesn't " \ + "exist. Consider sourcing a different extension than '.sh'." 1>&2 + else + AMENT_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" + fi +fi + +# function to append values to environment variables +# using colons as separators and avoiding leading separators +ament_append_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # avoid leading separator + eval _values=\"\$$_listname\" + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + _ament_append_value_IFS=$IFS + unset IFS + eval export $_listname=\"\$$_listname:$_value\" + #eval echo "append list \$$_listname" + IFS=$_ament_append_value_IFS + unset _ament_append_value_IFS + fi + unset _values + + unset _value + unset _listname +} + +# function to append non-duplicate values to environment variables +# using colons as separators and avoiding leading separators +ament_append_unique_value() { + # arguments + _listname=$1 + _value=$2 + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # check if the list contains the value + eval _values=\$$_listname + _duplicate= + _ament_append_unique_value_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array _values + fi + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + if [ $_item = $_value ]; then + _duplicate=1 + fi + done + unset _item + + # append only non-duplicates + if [ -z "$_duplicate" ]; then + # avoid leading separator + if [ -z "$_values" ]; then + eval $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + unset IFS + eval $_listname=\"\$$_listname:$_value\" + #eval echo "append list \$$_listname" + fi + fi + IFS=$_ament_append_unique_value_IFS + unset _ament_append_unique_value_IFS + unset _duplicate + unset _values + + unset _value + unset _listname +} + +# function to prepend non-duplicate values to environment variables +# using colons as separators and avoiding trailing separators +ament_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + #echo "listname $_listname" + #eval echo "list value \$$_listname" + #echo "value $_value" + + # check if the list contains the value + eval _values=\"\$$_listname\" + _duplicate= + _ament_prepend_unique_value_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array _values + fi + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + if [ "$_item" = "$_value" ]; then + _duplicate=1 + fi + done + unset _item + + # prepend only non-duplicates + if [ -z "$_duplicate" ]; then + # avoid trailing separator + if [ -z "$_values" ]; then + eval export $_listname=\"$_value\" + #eval echo "set list \$$_listname" + else + # field separator must not be a colon + unset IFS + eval export $_listname=\"$_value:\$$_listname\" + #eval echo "prepend list \$$_listname" + fi + fi + IFS=$_ament_prepend_unique_value_IFS + unset _ament_prepend_unique_value_IFS + unset _duplicate + unset _values + + unset _value + unset _listname +} + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# list all environment hooks of this package +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/armor_yolo_detect/environment/ament_prefix_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/armor_yolo_detect/environment/library_path.sh" +ament_append_value AMENT_ENVIRONMENT_HOOKS "$AMENT_CURRENT_PREFIX/share/armor_yolo_detect/environment/path.sh" + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + if [ "$AMENT_SHELL" = "zsh" ]; then + ament_zsh_to_array AMENT_ENVIRONMENT_HOOKS + fi + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + if [ -f "$_hook" ]; then + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + # trace output + if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_hook\"" + fi + . "$_hook" + fi + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +# reset AMENT_CURRENT_PREFIX after each package +# allowing to source multiple package-level setup files +unset AMENT_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.zsh b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.zsh new file mode 100644 index 0000000..fe161be --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.zsh @@ -0,0 +1,59 @@ +# generated from ament_package/template/package_level/local_setup.zsh.in + +AMENT_SHELL=zsh + +# source local_setup.sh from same directory as this file +_this_path=$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd) +# provide AMENT_CURRENT_PREFIX to shell script +AMENT_CURRENT_PREFIX=$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd) +# store AMENT_CURRENT_PREFIX to restore it before each environment hook +_package_local_setup_AMENT_CURRENT_PREFIX=$AMENT_CURRENT_PREFIX + +# function to convert array-like strings into arrays +# to wordaround SH_WORD_SPLIT not being set +ament_zsh_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# trace output +if [ -n "$AMENT_TRACE_SETUP_FILES" ]; then + echo "# . \"$_this_path/local_setup.sh\"" +fi +# the package-level local_setup file unsets AMENT_CURRENT_PREFIX +. "$_this_path/local_setup.sh" +unset _this_path + +# unset AMENT_ENVIRONMENT_HOOKS +# if not appending to them for return +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + unset AMENT_ENVIRONMENT_HOOKS +fi + +# restore AMENT_CURRENT_PREFIX before evaluating the environment hooks +AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX +# list all environment hooks of this package + +# source all shell-specific environment hooks of this package +# if not returning them +if [ -z "$AMENT_RETURN_ENVIRONMENT_HOOKS" ]; then + _package_local_setup_IFS=$IFS + IFS=":" + for _hook in $AMENT_ENVIRONMENT_HOOKS; do + # restore AMENT_CURRENT_PREFIX for each environment hook + AMENT_CURRENT_PREFIX=$_package_local_setup_AMENT_CURRENT_PREFIX + # restore IFS before sourcing other files + IFS=$_package_local_setup_IFS + . "$_hook" + done + unset _hook + IFS=$_package_local_setup_IFS + unset _package_local_setup_IFS + unset AMENT_ENVIRONMENT_HOOKS +fi + +unset _package_local_setup_AMENT_CURRENT_PREFIX +unset AMENT_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/package.dsv b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/package.dsv new file mode 100644 index 0000000..bbd3a10 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/package.dsv @@ -0,0 +1,4 @@ +source;share/armor_yolo_detect/local_setup.bash +source;share/armor_yolo_detect/local_setup.dsv +source;share/armor_yolo_detect/local_setup.sh +source;share/armor_yolo_detect/local_setup.zsh diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/path.dsv b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/path.dsv new file mode 100644 index 0000000..b94426a --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/path.dsv @@ -0,0 +1 @@ +prepend-non-duplicate-if-exists;PATH;bin diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_dependencies/ament_cmake_export_dependencies-extras.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_dependencies/ament_cmake_export_dependencies-extras.cmake new file mode 100644 index 0000000..9f82ecf --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_dependencies/ament_cmake_export_dependencies-extras.cmake @@ -0,0 +1,92 @@ +# generated from ament_cmake_export_dependencies/cmake/ament_cmake_export_dependencies-extras.cmake.in + +set(_exported_dependencies "rclcpp;rclcpp_components;sensor_msgs;geometry_msgs;std_srvs;visualization_msgs;cv_bridge;image_transport;vision_opencv;tf2;fmt;tf2_ros;tf2_geometry_msgs") + +find_package(ament_cmake_libraries QUIET REQUIRED) + +# find_package() all dependencies +# and append their DEFINITIONS INCLUDE_DIRS, LIBRARIES, and LINK_FLAGS +# variables to armor_yolo_detect_DEFINITIONS, armor_yolo_detect_INCLUDE_DIRS, +# armor_yolo_detect_LIBRARIES, and armor_yolo_detect_LINK_FLAGS. +# Additionally collect the direct dependency names in +# armor_yolo_detect_DEPENDENCIES as well as the recursive dependency names +# in armor_yolo_detect_RECURSIVE_DEPENDENCIES. +if(NOT _exported_dependencies STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + set(armor_yolo_detect_DEPENDENCIES ${_exported_dependencies}) + set(armor_yolo_detect_RECURSIVE_DEPENDENCIES ${_exported_dependencies}) + set(_libraries) + foreach(_dep ${_exported_dependencies}) + if(NOT ${_dep}_FOUND) + find_package("${_dep}" QUIET REQUIRED) + endif() + # if a package provides modern CMake interface targets use them + # exclusively assuming the classic CMake variables only exist for + # backward compatibility + set(use_modern_cmake FALSE) + if(NOT "${${_dep}_TARGETS}" STREQUAL "") + foreach(_target ${${_dep}_TARGETS}) + # only use actual targets + # in case a package uses this variable for other content + if(TARGET "${_target}") + get_target_property(_include_dirs ${_target} INTERFACE_INCLUDE_DIRECTORIES) + if(_include_dirs) + list_append_unique(armor_yolo_detect_INCLUDE_DIRS "${_include_dirs}") + endif() + + get_target_property(_imported_configurations ${_target} IMPORTED_CONFIGURATIONS) + if(_imported_configurations) + string(TOUPPER "${_imported_configurations}" _imported_configurations) + if(DEBUG_CONFIGURATIONS) + string(TOUPPER "${DEBUG_CONFIGURATIONS}" _debug_configurations_uppercase) + else() + set(_debug_configurations_uppercase "DEBUG") + endif() + foreach(_imported_config ${_imported_configurations}) + get_target_property(_imported_implib ${_target} IMPORTED_IMPLIB_${_imported_config}) + if(_imported_implib) + set(_imported_implib_config "optimized") + if(${_imported_config} IN_LIST _debug_configurations_uppercase) + set(_imported_implib_config "debug") + endif() + list(APPEND _libraries ${_imported_implib_config} ${_imported_implib}) + else() + get_target_property(_imported_location ${_target} IMPORTED_LOCATION_${_imported_config}) + if(_imported_location) + list(APPEND _libraries "${_imported_location}") + endif() + endif() + endforeach() + endif() + + get_target_property(_link_libraries ${_target} INTERFACE_LINK_LIBRARIES) + if(_link_libraries) + list(APPEND _libraries "${_link_libraries}") + endif() + set(use_modern_cmake TRUE) + endif() + endforeach() + endif() + if(NOT use_modern_cmake) + if(${_dep}_DEFINITIONS) + list_append_unique(armor_yolo_detect_DEFINITIONS "${${_dep}_DEFINITIONS}") + endif() + if(${_dep}_INCLUDE_DIRS) + list_append_unique(armor_yolo_detect_INCLUDE_DIRS "${${_dep}_INCLUDE_DIRS}") + endif() + if(${_dep}_LIBRARIES) + list(APPEND _libraries "${${_dep}_LIBRARIES}") + endif() + if(${_dep}_LINK_FLAGS) + list_append_unique(armor_yolo_detect_LINK_FLAGS "${${_dep}_LINK_FLAGS}") + endif() + if(${_dep}_RECURSIVE_DEPENDENCIES) + list_append_unique(armor_yolo_detect_RECURSIVE_DEPENDENCIES "${${_dep}_RECURSIVE_DEPENDENCIES}") + endif() + endif() + if(_libraries) + ament_libraries_deduplicate(_libraries "${_libraries}") + list(APPEND armor_yolo_detect_LIBRARIES "${_libraries}") + endif() + endforeach() +endif() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_include_directories/ament_cmake_export_include_directories-extras.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_include_directories/ament_cmake_export_include_directories-extras.cmake new file mode 100644 index 0000000..103be48 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_include_directories/ament_cmake_export_include_directories-extras.cmake @@ -0,0 +1,16 @@ +# generated from ament_cmake_export_include_directories/cmake/ament_cmake_export_include_directories-extras.cmake.in + +set(_exported_include_dirs "${armor_yolo_detect_DIR}/../../../include/armor_yolo_detect") + +# append include directories to armor_yolo_detect_INCLUDE_DIRS +# warn about not existing paths +if(NOT _exported_include_dirs STREQUAL "") + find_package(ament_cmake_core QUIET REQUIRED) + foreach(_exported_include_dir ${_exported_include_dirs}) + if(NOT IS_DIRECTORY "${_exported_include_dir}") + message(WARNING "Package 'armor_yolo_detect' exports the include directory '${_exported_include_dir}' which doesn't exist") + endif() + normalize_path(_exported_include_dir "${_exported_include_dir}") + list(APPEND armor_yolo_detect_INCLUDE_DIRS "${_exported_include_dir}") + endforeach() +endif() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake new file mode 100644 index 0000000..042943a --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake @@ -0,0 +1,141 @@ +# generated from ament_cmake_export_libraries/cmake/template/ament_cmake_export_libraries.cmake.in + +set(_exported_libraries "armor_yolo_detect") +set(_exported_library_names "") + +# populate armor_yolo_detect_LIBRARIES +if(NOT _exported_libraries STREQUAL "") + # loop over libraries, either target names or absolute paths + list(LENGTH _exported_libraries _length) + set(_i 0) + while(_i LESS _length) + list(GET _exported_libraries ${_i} _arg) + + # pass linker flags along + if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]") + list(APPEND armor_yolo_detect_LIBRARIES "${_arg}") + math(EXPR _i "${_i} + 1") + continue() + endif() + + if("${_arg}" MATCHES "^(debug|optimized|general)$") + # remember build configuration keyword + # and get following library + set(_cfg "${_arg}") + math(EXPR _i "${_i} + 1") + if(_i EQUAL _length) + message(FATAL_ERROR "Package 'armor_yolo_detect' passes the build configuration keyword '${_cfg}' as the last exported library") + endif() + list(GET _exported_libraries ${_i} _library) + else() + # the value is a library without a build configuration keyword + set(_cfg "") + set(_library "${_arg}") + endif() + math(EXPR _i "${_i} + 1") + + if(NOT IS_ABSOLUTE "${_library}") + # search for library target relative to this CMake file + set(_lib "NOTFOUND") + find_library( + _lib NAMES "${_library}" + PATHS "${armor_yolo_detect_DIR}/../../../lib" + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + + if(NOT _lib) + # warn about not existing library and ignore it + message(FATAL_ERROR "Package 'armor_yolo_detect' exports the library '${_library}' which couldn't be found") + elseif(NOT IS_ABSOLUTE "${_lib}") + # the found library must be an absolute path + message(FATAL_ERROR "Package 'armor_yolo_detect' found the library '${_library}' at '${_lib}' which is not an absolute path") + elseif(NOT EXISTS "${_lib}") + # the found library must exist + message(FATAL_ERROR "Package 'armor_yolo_detect' found the library '${_lib}' which doesn't exist") + else() + list(APPEND armor_yolo_detect_LIBRARIES ${_cfg} "${_lib}") + endif() + + else() + if(NOT EXISTS "${_library}") + # the found library must exist + message(WARNING "Package 'armor_yolo_detect' exports the library '${_library}' which doesn't exist") + else() + list(APPEND armor_yolo_detect_LIBRARIES ${_cfg} "${_library}") + endif() + endif() + endwhile() +endif() + +# find_library() library names with optional LIBRARY_DIRS +# and add the libraries to armor_yolo_detect_LIBRARIES +if(NOT _exported_library_names STREQUAL "") + # loop over library names + # but remember related build configuration keyword if available + list(LENGTH _exported_library_names _length) + set(_i 0) + while(_i LESS _length) + list(GET _exported_library_names ${_i} _arg) + # pass linker flags along + if("${_arg}" MATCHES "^-" AND NOT "${_arg}" MATCHES "^-[l|framework]") + list(APPEND armor_yolo_detect_LIBRARIES "${_arg}") + math(EXPR _i "${_i} + 1") + continue() + endif() + + if("${_arg}" MATCHES "^(debug|optimized|general)$") + # remember build configuration keyword + # and get following library name + set(_cfg "${_arg}") + math(EXPR _i "${_i} + 1") + if(_i EQUAL _length) + message(FATAL_ERROR "Package 'armor_yolo_detect' passes the build configuration keyword '${_cfg}' as the last exported target") + endif() + list(GET _exported_library_names ${_i} _library) + else() + # the value is a library target without a build configuration keyword + set(_cfg "") + set(_library "${_arg}") + endif() + math(EXPR _i "${_i} + 1") + + # extract optional LIBRARY_DIRS from library name + string(REPLACE ":" ";" _library_dirs "${_library}") + list(GET _library_dirs 0 _library_name) + list(REMOVE_AT _library_dirs 0) + + set(_lib "NOTFOUND") + if(NOT _library_dirs) + # search for library in the common locations + find_library( + _lib + NAMES "${_library_name}" + ) + if(NOT _lib) + # warn about not existing library and later ignore it + message(WARNING "Package 'armor_yolo_detect' exports library '${_library_name}' which couldn't be found") + endif() + else() + # search for library in the specified directories + find_library( + _lib + NAMES "${_library_name}" + PATHS ${_library_dirs} + NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH + ) + if(NOT _lib) + # warn about not existing library and later ignore it + message(WARNING + "Package 'armor_yolo_detect' exports library '${_library_name}' with LIBRARY_DIRS '${_library_dirs}' which couldn't be found") + endif() + endif() + if(_lib) + list(APPEND armor_yolo_detect_LIBRARIES ${_cfg} "${_lib}") + endif() + endwhile() +endif() + +# TODO(dirk-thomas) deduplicate armor_yolo_detect_LIBRARIES +# while maintaining library order +# as well as build configuration keywords +# as well as linker flags diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/package_run_dependencies/armor_yolo_detect b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/package_run_dependencies/armor_yolo_detect new file mode 100644 index 0000000..aa46d79 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/package_run_dependencies/armor_yolo_detect @@ -0,0 +1 @@ +rclcpp;rclcpp_components;sensor_msgs;geometry_msgs;std_srvs;visualization_msgs;cv_bridge;image_transport;rm_interfaces;vision_opencv;tf2;eigen;fmt;tf2_ros;tf2_geometry_msgs;rm_utils;armor_detector;ament_lint_auto;ament_lint_common;ament_cmake_gtest \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/packages/armor_yolo_detect b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/packages/armor_yolo_detect new file mode 100644 index 0000000..e69de29 diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/parent_prefix_path/armor_yolo_detect b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/parent_prefix_path/armor_yolo_detect new file mode 100644 index 0000000..6350bc1 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/parent_prefix_path/armor_yolo_detect @@ -0,0 +1 @@ +/opt/ros/humble \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/rclcpp_components/armor_yolo_detect b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/rclcpp_components/armor_yolo_detect new file mode 100644 index 0000000..86a5de7 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/rclcpp_components/armor_yolo_detect @@ -0,0 +1 @@ +armor_yolo_detect::ArmorYoloDetectorNode;lib/libarmor_yolo_detect.so diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_package_templates/templates.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_package_templates/templates.cmake new file mode 100644 index 0000000..42a5a03 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_package_templates/templates.cmake @@ -0,0 +1,14 @@ +set(ament_cmake_package_templates_ENVIRONMENT_HOOK_LIBRARY_PATH "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/environment_hook/library_path.sh") +set(ament_cmake_package_templates_ENVIRONMENT_HOOK_PYTHONPATH "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/environment_hook/pythonpath.sh.in") +set(ament_cmake_package_templates_PACKAGE_LEVEL "") +list(APPEND ament_cmake_package_templates_PACKAGE_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.bash.in") +list(APPEND ament_cmake_package_templates_PACKAGE_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.sh.in") +list(APPEND ament_cmake_package_templates_PACKAGE_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/package_level/local_setup.zsh.in") +set(ament_cmake_package_templates_PREFIX_LEVEL "") +list(APPEND ament_cmake_package_templates_PREFIX_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/prefix_level/local_setup.bash") +list(APPEND ament_cmake_package_templates_PREFIX_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/prefix_level/local_setup.sh.in") +list(APPEND ament_cmake_package_templates_PREFIX_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/prefix_level/local_setup.zsh") +list(APPEND ament_cmake_package_templates_PREFIX_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/prefix_level/setup.bash") +list(APPEND ament_cmake_package_templates_PREFIX_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/prefix_level/setup.sh.in") +list(APPEND ament_cmake_package_templates_PREFIX_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/prefix_level/setup.zsh") +list(APPEND ament_cmake_package_templates_PREFIX_LEVEL "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/prefix_level/_local_setup_util.py") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install.cmake new file mode 100644 index 0000000..b39a510 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install.cmake @@ -0,0 +1,395 @@ +# generated from +# ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install.cmake.in + +# create empty symlink install manifest before starting install step +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/symlink_install_manifest.txt") + +# +# Reimplement CMake install(DIRECTORY) command to use symlinks instead of +# copying resources. +# +# :param cmake_current_source_dir: The CMAKE_CURRENT_SOURCE_DIR when install +# was invoked +# :type cmake_current_source_dir: string +# :param ARGN: the same arguments as the CMake install command. +# :type ARGN: various +# +function(ament_cmake_symlink_install_directory cmake_current_source_dir) + cmake_parse_arguments(ARG "OPTIONAL" "DESTINATION" "DIRECTORY;PATTERN;PATTERN_EXCLUDE" ${ARGN}) + if(ARG_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "ament_cmake_symlink_install_directory() called with " + "unused/unsupported arguments: ${ARG_UNPARSED_ARGUMENTS}") + endif() + + # make destination absolute path and ensure that it exists + if(NOT IS_ABSOLUTE "${ARG_DESTINATION}") + set(ARG_DESTINATION "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/${ARG_DESTINATION}") + endif() + if(NOT EXISTS "${ARG_DESTINATION}") + file(MAKE_DIRECTORY "${ARG_DESTINATION}") + endif() + + # default pattern to include + if(NOT ARG_PATTERN) + set(ARG_PATTERN "*") + endif() + + # iterate over directories + foreach(dir ${ARG_DIRECTORY}) + # make dir an absolute path + if(NOT IS_ABSOLUTE "${dir}") + set(dir "${cmake_current_source_dir}/${dir}") + endif() + + if(EXISTS "${dir}") + # if directory has no trailing slash + # append folder name to destination + set(destination "${ARG_DESTINATION}") + string(LENGTH "${dir}" length) + math(EXPR offset "${length} - 1") + string(SUBSTRING "${dir}" ${offset} 1 dir_last_char) + if(NOT dir_last_char STREQUAL "/") + get_filename_component(destination_name "${dir}" NAME) + set(destination "${destination}/${destination_name}") + else() + # remove trailing slash + string(SUBSTRING "${dir}" 0 ${offset} dir) + endif() + + # glob recursive files + set(relative_files "") + foreach(pattern ${ARG_PATTERN}) + file( + GLOB_RECURSE + include_files + RELATIVE "${dir}" + "${dir}/${pattern}" + ) + if(NOT include_files STREQUAL "") + list(APPEND relative_files ${include_files}) + endif() + endforeach() + foreach(pattern ${ARG_PATTERN_EXCLUDE}) + file( + GLOB_RECURSE + exclude_files + RELATIVE "${dir}" + "${dir}/${pattern}" + ) + if(NOT exclude_files STREQUAL "") + list(REMOVE_ITEM relative_files ${exclude_files}) + endif() + endforeach() + list(SORT relative_files) + + foreach(relative_file ${relative_files}) + set(absolute_file "${dir}/${relative_file}") + # determine link name for file including destination path + set(symlink "${destination}/${relative_file}") + + # ensure that destination exists + get_filename_component(symlink_dir "${symlink}" PATH) + if(NOT EXISTS "${symlink_dir}") + file(MAKE_DIRECTORY "${symlink_dir}") + endif() + + _ament_cmake_symlink_install_create_symlink("${absolute_file}" "${symlink}") + endforeach() + else() + if(NOT ARG_OPTIONAL) + message(FATAL_ERROR + "ament_cmake_symlink_install_directory() can't find '${dir}'") + endif() + endif() + endforeach() +endfunction() + +# +# Reimplement CMake install(FILES) command to use symlinks instead of copying +# resources. +# +# :param cmake_current_source_dir: The CMAKE_CURRENT_SOURCE_DIR when install +# was invoked +# :type cmake_current_source_dir: string +# :param ARGN: the same arguments as the CMake install command. +# :type ARGN: various +# +function(ament_cmake_symlink_install_files cmake_current_source_dir) + cmake_parse_arguments(ARG "OPTIONAL" "DESTINATION;RENAME" "FILES" ${ARGN}) + if(ARG_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "ament_cmake_symlink_install_files() called with " + "unused/unsupported arguments: ${ARG_UNPARSED_ARGUMENTS}") + endif() + + # make destination an absolute path and ensure that it exists + if(NOT IS_ABSOLUTE "${ARG_DESTINATION}") + set(ARG_DESTINATION "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/${ARG_DESTINATION}") + endif() + if(NOT EXISTS "${ARG_DESTINATION}") + file(MAKE_DIRECTORY "${ARG_DESTINATION}") + endif() + + if(ARG_RENAME) + list(LENGTH ARG_FILES file_count) + if(NOT file_count EQUAL 1) + message(FATAL_ERROR "ament_cmake_symlink_install_files() called with " + "RENAME argument but not with a single file") + endif() + endif() + + # iterate over files + foreach(file ${ARG_FILES}) + # make file an absolute path + if(NOT IS_ABSOLUTE "${file}") + set(file "${cmake_current_source_dir}/${file}") + endif() + + if(EXISTS "${file}") + # determine link name for file including destination path + get_filename_component(filename "${file}" NAME) + if(NOT ARG_RENAME) + set(symlink "${ARG_DESTINATION}/${filename}") + else() + set(symlink "${ARG_DESTINATION}/${ARG_RENAME}") + endif() + _ament_cmake_symlink_install_create_symlink("${file}" "${symlink}") + else() + if(NOT ARG_OPTIONAL) + message(FATAL_ERROR + "ament_cmake_symlink_install_files() can't find '${file}'") + endif() + endif() + endforeach() +endfunction() + +# +# Reimplement CMake install(PROGRAMS) command to use symlinks instead of copying +# resources. +# +# :param cmake_current_source_dir: The CMAKE_CURRENT_SOURCE_DIR when install +# was invoked +# :type cmake_current_source_dir: string +# :param ARGN: the same arguments as the CMake install command. +# :type ARGN: various +# +function(ament_cmake_symlink_install_programs cmake_current_source_dir) + cmake_parse_arguments(ARG "OPTIONAL" "DESTINATION" "PROGRAMS" ${ARGN}) + if(ARG_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "ament_cmake_symlink_install_programs() called with " + "unused/unsupported arguments: ${ARG_UNPARSED_ARGUMENTS}") + endif() + + # make destination an absolute path and ensure that it exists + if(NOT IS_ABSOLUTE "${ARG_DESTINATION}") + set(ARG_DESTINATION "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/${ARG_DESTINATION}") + endif() + if(NOT EXISTS "${ARG_DESTINATION}") + file(MAKE_DIRECTORY "${ARG_DESTINATION}") + endif() + + # iterate over programs + foreach(file ${ARG_PROGRAMS}) + # make file an absolute path + if(NOT IS_ABSOLUTE "${file}") + set(file "${cmake_current_source_dir}/${file}") + endif() + + if(EXISTS "${file}") + # determine link name for file including destination path + get_filename_component(filename "${file}" NAME) + set(symlink "${ARG_DESTINATION}/${filename}") + _ament_cmake_symlink_install_create_symlink("${file}" "${symlink}") + else() + if(NOT ARG_OPTIONAL) + message(FATAL_ERROR + "ament_cmake_symlink_install_programs() can't find '${file}'") + endif() + endif() + endforeach() +endfunction() + +# +# Reimplement CMake install(TARGETS) command to use symlinks instead of copying +# resources. +# +# :param TARGET_FILES: the absolute files, replacing the name of targets passed +# in as TARGETS +# :type TARGET_FILES: list of files +# :param ARGN: the same arguments as the CMake install command except that +# keywords identifying the kind of type and the DESTINATION keyword must be +# joined with an underscore, e.g. ARCHIVE_DESTINATION. +# :type ARGN: various +# +function(ament_cmake_symlink_install_targets) + cmake_parse_arguments(ARG "OPTIONAL" "ARCHIVE_DESTINATION;DESTINATION;LIBRARY_DESTINATION;RUNTIME_DESTINATION" + "TARGETS;TARGET_FILES" ${ARGN}) + if(ARG_UNPARSED_ARGUMENTS) + message(FATAL_ERROR "ament_cmake_symlink_install_targets() called with " + "unused/unsupported arguments: ${ARG_UNPARSED_ARGUMENTS}") + endif() + + # iterate over target files + foreach(file ${ARG_TARGET_FILES}) + if(NOT IS_ABSOLUTE "${file}") + message(FATAL_ERROR "ament_cmake_symlink_install_targets() target file " + "'${file}' must be an absolute path") + endif() + + # determine destination of file based on extension + set(destination "") + get_filename_component(fileext "${file}" EXT) + if(fileext STREQUAL ".a" OR fileext STREQUAL ".lib") + set(destination "${ARG_ARCHIVE_DESTINATION}") + elseif(fileext STREQUAL ".dylib" OR fileext MATCHES "\\.so(\\.[0-9]+)?(\\.[0-9]+)?(\\.[0-9]+)?$") + set(destination "${ARG_LIBRARY_DESTINATION}") + elseif(fileext STREQUAL "" OR fileext STREQUAL ".dll" OR fileext STREQUAL ".exe") + set(destination "${ARG_RUNTIME_DESTINATION}") + endif() + if(destination STREQUAL "") + set(destination "${ARG_DESTINATION}") + endif() + + # make destination an absolute path and ensure that it exists + if(NOT IS_ABSOLUTE "${destination}") + set(destination "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/${destination}") + endif() + if(NOT EXISTS "${destination}") + file(MAKE_DIRECTORY "${destination}") + endif() + + if(EXISTS "${file}") + # determine link name for file including destination path + get_filename_component(filename "${file}" NAME) + set(symlink "${destination}/${filename}") + _ament_cmake_symlink_install_create_symlink("${file}" "${symlink}") + else() + if(NOT ARG_OPTIONAL) + message(FATAL_ERROR + "ament_cmake_symlink_install_targets() can't find '${file}'") + endif() + endif() + endforeach() +endfunction() + +function(_ament_cmake_symlink_install_create_symlink absolute_file symlink) + # register symlink for being removed during install step + file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/symlink_install_manifest.txt" + "${symlink}\n") + + # avoid any work if correct symlink is already in place + if(EXISTS "${symlink}" AND IS_SYMLINK "${symlink}") + get_filename_component(destination "${symlink}" REALPATH) + get_filename_component(real_absolute_file "${absolute_file}" REALPATH) + if(destination STREQUAL real_absolute_file) + message(STATUS "Up-to-date symlink: ${symlink}") + return() + endif() + endif() + + message(STATUS "Symlinking: ${symlink}") + if(EXISTS "${symlink}" OR IS_SYMLINK "${symlink}") + file(REMOVE "${symlink}") + endif() + + execute_process( + COMMAND "/usr/bin/cmake" "-E" "create_symlink" + "${absolute_file}" + "${symlink}" + ) + # the CMake command does not provide a return code so check manually + if(NOT EXISTS "${symlink}" OR NOT IS_SYMLINK "${symlink}") + get_filename_component(destination "${symlink}" REALPATH) + message(FATAL_ERROR + "Could not create symlink '${symlink}' pointing to '${absolute_file}'") + endif() +endfunction() + +# end of template + +message(STATUS "Execute custom install script") + +# begin of custom install code + +# install("TARGETS" "armor_yolo_detector_node" "DESTINATION" "lib/armor_yolo_detect") +include("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_0_${CMAKE_INSTALL_CONFIG_NAME}.cmake") + +# install(DIRECTORY "include/" "DESTINATION" "include/armor_yolo_detect") +ament_cmake_symlink_install_directory("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" DIRECTORY "include/" "DESTINATION" "include/armor_yolo_detect") + +# install(FILES "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/environment_hook/library_path.sh" "DESTINATION" "share/armor_yolo_detect/environment") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/opt/ros/humble/lib/python3.10/site-packages/ament_package/template/environment_hook/library_path.sh" "DESTINATION" "share/armor_yolo_detect/environment") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/library_path.dsv" "DESTINATION" "share/armor_yolo_detect/environment") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/library_path.dsv" "DESTINATION" "share/armor_yolo_detect/environment") + +# install("TARGETS" "armor_yolo_detect" "ARCHIVE_DESTINATION" "lib" "LIBRARY_DESTINATION" "lib" "RUNTIME_DESTINATION" "bin") +include("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_1_${CMAKE_INSTALL_CONFIG_NAME}.cmake") + +# install("TARGETS" "trt_inference_test" "DESTINATION" "lib/armor_yolo_detect") +include("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_2_${CMAKE_INSTALL_CONFIG_NAME}.cmake") + +# install(DIRECTORY "config" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_directory("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" DIRECTORY "config" "DESTINATION" "share/armor_yolo_detect") + +# install(DIRECTORY "model" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_directory("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" DIRECTORY "model" "DESTINATION" "share/armor_yolo_detect") + +# install(DIRECTORY "launch" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_directory("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" DIRECTORY "launch" "DESTINATION" "share/armor_yolo_detect") + +# install(DIRECTORY "third_party" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_directory("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" DIRECTORY "third_party" "DESTINATION" "share/armor_yolo_detect") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/package_run_dependencies/armor_yolo_detect" "DESTINATION" "share/ament_index/resource_index/package_run_dependencies") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/package_run_dependencies/armor_yolo_detect" "DESTINATION" "share/ament_index/resource_index/package_run_dependencies") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/parent_prefix_path/armor_yolo_detect" "DESTINATION" "share/ament_index/resource_index/parent_prefix_path") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/parent_prefix_path/armor_yolo_detect" "DESTINATION" "share/ament_index/resource_index/parent_prefix_path") + +# install(FILES "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh" "DESTINATION" "share/armor_yolo_detect/environment") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/environment/ament_prefix_path.sh" "DESTINATION" "share/armor_yolo_detect/environment") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/ament_prefix_path.dsv" "DESTINATION" "share/armor_yolo_detect/environment") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/ament_prefix_path.dsv" "DESTINATION" "share/armor_yolo_detect/environment") + +# install(FILES "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/environment/path.sh" "DESTINATION" "share/armor_yolo_detect/environment") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/opt/ros/humble/share/ament_cmake_core/cmake/environment_hooks/environment/path.sh" "DESTINATION" "share/armor_yolo_detect/environment") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/path.dsv" "DESTINATION" "share/armor_yolo_detect/environment") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/path.dsv" "DESTINATION" "share/armor_yolo_detect/environment") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.bash" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.bash" "DESTINATION" "share/armor_yolo_detect") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.sh" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.sh" "DESTINATION" "share/armor_yolo_detect") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.zsh" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.zsh" "DESTINATION" "share/armor_yolo_detect") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.dsv" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/local_setup.dsv" "DESTINATION" "share/armor_yolo_detect") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/package.dsv" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_environment_hooks/package.dsv" "DESTINATION" "share/armor_yolo_detect") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/packages/armor_yolo_detect" "DESTINATION" "share/ament_index/resource_index/packages") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/packages/armor_yolo_detect" "DESTINATION" "share/ament_index/resource_index/packages") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/rclcpp_components/armor_yolo_detect" "DESTINATION" "share/ament_index/resource_index/rclcpp_components") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_index/share/ament_index/resource_index/rclcpp_components/armor_yolo_detect" "DESTINATION" "share/ament_index/resource_index/rclcpp_components") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_dependencies/ament_cmake_export_dependencies-extras.cmake" "DESTINATION" "share/armor_yolo_detect/cmake") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_dependencies/ament_cmake_export_dependencies-extras.cmake" "DESTINATION" "share/armor_yolo_detect/cmake") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_include_directories/ament_cmake_export_include_directories-extras.cmake" "DESTINATION" "share/armor_yolo_detect/cmake") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_include_directories/ament_cmake_export_include_directories-extras.cmake" "DESTINATION" "share/armor_yolo_detect/cmake") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake" "DESTINATION" "share/armor_yolo_detect/cmake") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_export_libraries/ament_cmake_export_libraries-extras.cmake" "DESTINATION" "share/armor_yolo_detect/cmake") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig.cmake" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig-version.cmake" "DESTINATION" "share/armor_yolo_detect/cmake") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig.cmake" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_core/armor_yolo_detectConfig-version.cmake" "DESTINATION" "share/armor_yolo_detect/cmake") + +# install(FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/package.xml" "DESTINATION" "share/armor_yolo_detect") +ament_cmake_symlink_install_files("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect" FILES "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/package.xml" "DESTINATION" "share/armor_yolo_detect") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install_uninstall_script.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install_uninstall_script.cmake new file mode 100644 index 0000000..6282973 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install_uninstall_script.cmake @@ -0,0 +1,23 @@ +# generated from +# ament_cmake_core/cmake/symlink_install/ament_cmake_symlink_install_uninstall_script.cmake.in + +set(install_manifest "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/symlink_install_manifest.txt") +if(NOT EXISTS "${install_manifest}") + message(FATAL_ERROR "Cannot find symlink install manifest: ${install_manifest}") +endif() + +file(READ "${install_manifest}" installed_files) +string(REGEX REPLACE "\n" ";" installed_files "${installed_files}") +foreach(installed_file ${installed_files}) + if(EXISTS "${installed_file}" OR IS_SYMLINK "${installed_file}") + message(STATUS "Uninstalling: ${installed_file}") + file(REMOVE "${installed_file}") + if(EXISTS "${installed_file}" OR IS_SYMLINK "${installed_file}") + message(FATAL_ERROR "Failed to remove '${installed_file}'") + endif() + + # remove empty parent folders + get_filename_component(parent_path "${installed_file}" PATH) + ament_cmake_uninstall_target_remove_empty_directories("${parent_path}") + endif() +endforeach() diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_0_.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_0_.cmake new file mode 100644 index 0000000..1e48802 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_0_.cmake @@ -0,0 +1 @@ +ament_cmake_symlink_install_targets("TARGET_FILES" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/armor_yolo_detector_node" "TARGETS" "armor_yolo_detector_node" "DESTINATION" "lib/armor_yolo_detect") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_1_.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_1_.cmake new file mode 100644 index 0000000..1766592 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_1_.cmake @@ -0,0 +1 @@ +ament_cmake_symlink_install_targets("TARGET_FILES" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/libarmor_yolo_detect.so" "TARGETS" "armor_yolo_detect" "ARCHIVE_DESTINATION" "lib" "LIBRARY_DESTINATION" "lib" "RUNTIME_DESTINATION" "bin") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_2_.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_2_.cmake new file mode 100644 index 0000000..525c3c5 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install_targets_2_.cmake @@ -0,0 +1 @@ +ament_cmake_symlink_install_targets("TARGET_FILES" "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/trt_inference_test" "TARGETS" "trt_inference_test" "DESTINATION" "lib/armor_yolo_detect") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_uninstall_target/ament_cmake_uninstall_target.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_uninstall_target/ament_cmake_uninstall_target.cmake new file mode 100644 index 0000000..a7bbbff --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_uninstall_target/ament_cmake_uninstall_target.cmake @@ -0,0 +1,60 @@ +# generated from +# ament_cmake_core/cmake/uninstall_target/ament_cmake_uninstall_target.cmake.in + +function(ament_cmake_uninstall_target_remove_empty_directories path) + set(install_space "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect") + if(install_space STREQUAL "") + message(FATAL_ERROR "The CMAKE_INSTALL_PREFIX variable must not be empty") + endif() + + string(LENGTH "${install_space}" length) + string(SUBSTRING "${path}" 0 ${length} path_prefix) + if(NOT path_prefix STREQUAL install_space) + message(FATAL_ERROR "The path '${path}' must be within the install space '${install_space}'") + endif() + if(path STREQUAL install_space) + return() + endif() + + # check if directory is empty + file(GLOB files "${path}/*") + list(LENGTH files length) + if(length EQUAL 0) + message(STATUS "Uninstalling: ${path}/") + execute_process(COMMAND "/usr/bin/cmake" "-E" "remove_directory" "${path}") + # recursively try to remove parent directories + get_filename_component(parent_path "${path}" PATH) + ament_cmake_uninstall_target_remove_empty_directories("${parent_path}") + endif() +endfunction() + +# uninstall files installed using the standard install() function +set(install_manifest "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/install_manifest.txt") +if(NOT EXISTS "${install_manifest}") + message(FATAL_ERROR "Cannot find install manifest: ${install_manifest}") +endif() + +file(READ "${install_manifest}" installed_files) +string(REGEX REPLACE "\n" ";" installed_files "${installed_files}") +foreach(installed_file ${installed_files}) + if(EXISTS "${installed_file}" OR IS_SYMLINK "${installed_file}") + message(STATUS "Uninstalling: ${installed_file}") + file(REMOVE "${installed_file}") + if(EXISTS "${installed_file}" OR IS_SYMLINK "${installed_file}") + message(FATAL_ERROR "Failed to remove '${installed_file}'") + endif() + + # remove empty parent folders + get_filename_component(parent_path "${installed_file}" PATH) + ament_cmake_uninstall_target_remove_empty_directories("${parent_path}") + endif() +endforeach() + +# end of template + +message(STATUS "Execute custom uninstall script") + +# begin of custom uninstall code + +# uninstall files installed using the symlink install functions +include("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install_uninstall_script.cmake") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/armor_yolo_detector_node b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/armor_yolo_detector_node new file mode 100755 index 0000000..2c594b5 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/armor_yolo_detector_node differ diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/cmake_args.last b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/cmake_args.last new file mode 100644 index 0000000..7aacf90 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/cmake_args.last @@ -0,0 +1 @@ +['-DAMENT_CMAKE_SYMLINK_INSTALL=1'] \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/cmake_install.cmake b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/cmake_install.cmake new file mode 100644 index 0000000..642cba3 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/cmake_install.cmake @@ -0,0 +1,58 @@ +# Install script for directory: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect + +# Set the install prefix +if(NOT DEFINED CMAKE_INSTALL_PREFIX) + set(CMAKE_INSTALL_PREFIX "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect") +endif() +string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}") + +# Set the install configuration name. +if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME) + if(BUILD_TYPE) + string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" + CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}") + else() + set(CMAKE_INSTALL_CONFIG_NAME "") + endif() + message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"") +endif() + +# Set the component getting installed. +if(NOT CMAKE_INSTALL_COMPONENT) + if(COMPONENT) + message(STATUS "Install component: \"${COMPONENT}\"") + set(CMAKE_INSTALL_COMPONENT "${COMPONENT}") + else() + set(CMAKE_INSTALL_COMPONENT) + endif() +endif() + +# Install shared libraries without execute permission? +if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE) + set(CMAKE_INSTALL_SO_NO_EXE "1") +endif() + +# Is this installation the result of a crosscompile? +if(NOT DEFINED CMAKE_CROSSCOMPILING) + set(CMAKE_CROSSCOMPILING "FALSE") +endif() + +# Set default install directory permissions. +if(NOT DEFINED CMAKE_OBJDUMP) + set(CMAKE_OBJDUMP "/usr/bin/objdump") +endif() + +if("x${CMAKE_INSTALL_COMPONENT}x" STREQUAL "xUnspecifiedx" OR NOT CMAKE_INSTALL_COMPONENT) + include("/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/ament_cmake_symlink_install/ament_cmake_symlink_install.cmake") +endif() + +if(CMAKE_INSTALL_COMPONENT) + set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt") +else() + set(CMAKE_INSTALL_MANIFEST "install_manifest.txt") +endif() + +string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT + "${CMAKE_INSTALL_MANIFEST_FILES}") +file(WRITE "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/${CMAKE_INSTALL_MANIFEST}" + "${CMAKE_INSTALL_MANIFEST_CONTENT}") diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_build.rc b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_build.rc new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_build.rc @@ -0,0 +1 @@ +2 diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_command_prefix_build.sh b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_command_prefix_build.sh new file mode 100644 index 0000000..f9867d5 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_command_prefix_build.sh @@ -0,0 +1 @@ +# generated from colcon_core/shell/template/command_prefix.sh.em diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_command_prefix_build.sh.env b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_command_prefix_build.sh.env new file mode 100644 index 0000000..68d7c35 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/colcon_command_prefix_build.sh.env @@ -0,0 +1,64 @@ +ALLUSERSPROFILE=/opt/MVS/MVFG +AMENT_PREFIX_PATH=/opt/ros/humble +BROWSER=/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/helpers/browser.sh +BUNDLED_DEBUGPY_PATH=/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy +CLAUDE_CODE_SSE_PORT=11605 +COLCON=1 +COLORTERM=truecolor +DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus +GIT_ASKPASS=/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass.sh +GIT_PAGER=cat +HISTCONTROL=ignorespace +HOME=/home/jetson +HOST_IP=192.168.137.1 +JETSON_CUDA_ARCH_BIN=8.7 +JETSON_JETPACK=6.2 +JETSON_L4T=36.4.3 +JETSON_MODEL=NVIDIA Jetson Orin NX Engineering Reference Developer Kit +JETSON_MODULE=NVIDIA Jetson Orin NX (16GB ram) +JETSON_P_NUMBER=p3767-0000 +JETSON_SERIAL_NUMBER=1424124405174 +JETSON_SOC=tegra234 +LANG=en_US.UTF-8 +LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/usr/lib/aarch64-linux-gnu:/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64: +LESSCLOSE=/usr/bin/lesspipe %s %s +LESSOPEN=| /usr/bin/lesspipe %s +LOGNAME=jetson +LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: +MOTD_SHOWN=pam +MVCAM_COMMON_RUNENV=/opt/MVS/lib +MVCAM_GENICAM_CLPROTOCOL=/opt/MVS/lib/CLProtocol +MVCAM_SDK_PATH=/opt/MVS +OLDPWD=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect +PATH=/usr/local/cuda-12.6/bin:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommand:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/copilotCli:/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/remote-cli:/home/jetson/.local/bin:/opt/ros/humble/bin:/usr/local/cuda-12.6/bin:/home/jetson/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts +PROXY_PORT=7897 +PWD=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect +PYDEVD_DISABLE_FILE_VALIDATION=1 +PYTHONPATH=/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages +PYTHONSTARTUP=/home/jetson/.vscode-server/data/User/workspaceStorage/edf2b0fe7eee56be60d1cc0e08e02635/ms-python.python/pythonrc.py +PYTHON_BASIC_REPL=1 +ROS_DISTRO=humble +ROS_LOCALHOST_ONLY=0 +ROS_PYTHON_VERSION=3 +ROS_VERSION=2 +SHELL=/bin/bash +SHLVL=2 +SSH_CLIENT=192.168.55.100 53335 22 +SSH_CONNECTION=192.168.55.100 53335 192.168.55.1 22 +TERM=xterm-256color +TERM_PROGRAM=vscode +TERM_PROGRAM_VERSION=1.109.5 +USER=jetson +VSCODE_DEBUGPY_ADAPTER_ENDPOINTS=/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/.noConfigDebugAdapterEndpoints/endpoint-d806d2c66a18b771.txt +VSCODE_GIT_ASKPASS_EXTRA_ARGS= +VSCODE_GIT_ASKPASS_MAIN=/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass-main.js +VSCODE_GIT_ASKPASS_NODE=/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/node +VSCODE_GIT_IPC_HANDLE=/run/user/1000/vscode-git-61503dfdd6.sock +VSCODE_IPC_HOOK_CLI=/run/user/1000/vscode-ipc-9ca582ca-bec3-4d27-acb3-1cf948467768.sock +VSCODE_PYTHON_AUTOACTIVATE_GUARD=1 +XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop +XDG_RUNTIME_DIR=/run/user/1000 +XDG_SESSION_CLASS=user +XDG_SESSION_ID=3 +XDG_SESSION_TYPE=tty +_=/usr/bin/colcon diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/compile_commands.json b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/compile_commands.json new file mode 100644 index 0000000..6468626 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/compile_commands.json @@ -0,0 +1,32 @@ +[ +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -fPIC -std=gnu++17 -o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -fPIC -std=gnu++17 -o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -fPIC -std=gnu++17 -o CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -fPIC -std=gnu++17 -o CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -std=gnu++17 -o CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DRCUTILS_ENABLE_FAULT_INJECTION -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/composition_interfaces -std=gnu++17 -o CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp" +} +] \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp new file mode 100644 index 0000000..8cea3fa --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp @@ -0,0 +1,74 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include + +#include "class_loader/class_loader.hpp" +#include "rclcpp/rclcpp.hpp" +#include "rclcpp_components/node_factory.hpp" +#include "rclcpp_components/node_factory_template.hpp" + +#define NODE_MAIN_LOGGER_NAME "armor_yolo_detector_node" + +int main(int argc, char * argv[]) +{ + auto args = rclcpp::init_and_remove_ros_arguments(argc, argv); + rclcpp::Logger logger = rclcpp::get_logger(NODE_MAIN_LOGGER_NAME); + rclcpp::executors::SingleThreadedExecutor exec; + rclcpp::NodeOptions options; + options.arguments(args); + std::vector loaders; + std::vector node_wrappers; + + std::string library_name = "libarmor_yolo_detect.so"; + std::string class_name = "rclcpp_components::NodeFactoryTemplate"; + + RCLCPP_DEBUG(logger, "Load library %s", library_name.c_str()); + auto loader = new class_loader::ClassLoader(library_name); + auto classes = loader->getAvailableClasses(); + for (const auto & clazz : classes) { + if (clazz.compare(class_name) == 0) { + RCLCPP_DEBUG(logger, "Instantiate class %s", clazz.c_str()); + std::shared_ptr node_factory = nullptr; + try { + node_factory = loader->createInstance(clazz); + } catch (const std::exception & ex) { + RCLCPP_ERROR(logger, "Failed to load library %s", ex.what()); + return 1; + } catch (...) { + RCLCPP_ERROR(logger, "Failed to load library"); + return 1; + } + auto wrapper = node_factory->create_node_instance(options); + auto node = wrapper.get_node_base_interface(); + node_wrappers.push_back(wrapper); + exec.add_node(node); + } + } + loaders.push_back(loader); + + + exec.spin(); + + for (auto wrapper : node_wrappers) { + exec.remove_node(wrapper.get_node_base_interface()); + } + node_wrappers.clear(); + + rclcpp::shutdown(); + + return 0; +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_configured_armor_yolo_detector_node.cpp.in b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_configured_armor_yolo_detector_node.cpp.in new file mode 100644 index 0000000..01ad10b --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_configured_armor_yolo_detector_node.cpp.in @@ -0,0 +1,74 @@ +// Copyright 2019 Open Source Robotics Foundation, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include + +#include "class_loader/class_loader.hpp" +#include "rclcpp/rclcpp.hpp" +#include "rclcpp_components/node_factory.hpp" +#include "rclcpp_components/node_factory_template.hpp" + +#define NODE_MAIN_LOGGER_NAME "armor_yolo_detector_node" + +int main(int argc, char * argv[]) +{ + auto args = rclcpp::init_and_remove_ros_arguments(argc, argv); + rclcpp::Logger logger = rclcpp::get_logger(NODE_MAIN_LOGGER_NAME); + rclcpp::executors::SingleThreadedExecutor exec; + rclcpp::NodeOptions options; + options.arguments(args); + std::vector loaders; + std::vector node_wrappers; + + std::string library_name = "$"; + std::string class_name = "rclcpp_components::NodeFactoryTemplate"; + + RCLCPP_DEBUG(logger, "Load library %s", library_name.c_str()); + auto loader = new class_loader::ClassLoader(library_name); + auto classes = loader->getAvailableClasses(); + for (const auto & clazz : classes) { + if (clazz.compare(class_name) == 0) { + RCLCPP_DEBUG(logger, "Instantiate class %s", clazz.c_str()); + std::shared_ptr node_factory = nullptr; + try { + node_factory = loader->createInstance(clazz); + } catch (const std::exception & ex) { + RCLCPP_ERROR(logger, "Failed to load library %s", ex.what()); + return 1; + } catch (...) { + RCLCPP_ERROR(logger, "Failed to load library"); + return 1; + } + auto wrapper = node_factory->create_node_instance(options); + auto node = wrapper.get_node_base_interface(); + node_wrappers.push_back(wrapper); + exec.add_node(node); + } + } + loaders.push_back(loader); + + + exec.spin(); + + for (auto wrapper : node_wrappers) { + exec.remove_node(wrapper.get_node_base_interface()); + } + node_wrappers.clear(); + + rclcpp::shutdown(); + + return 0; +} diff --git a/src/rm_auto_aim/armor_yolo_detect/build/compile_commands.json b/src/rm_auto_aim/armor_yolo_detect/build/compile_commands.json new file mode 100644 index 0000000..c055595 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/build/compile_commands.json @@ -0,0 +1,32 @@ +[ +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -fPIC -std=gnu++17 -o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -fPIC -std=gnu++17 -o CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -fPIC -std=gnu++17 -o CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -Darmor_yolo_detect_EXPORTS -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -fPIC -std=gnu++17 -o CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DFMT_LOCALE -DFMT_SHARED -DRCUTILS_ENABLE_FAULT_INJECTION -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include -I/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include -I/usr/local/cuda-12.6/include -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/sensor_msgs -isystem /opt/ros/humble/include/geometry_msgs -isystem /opt/ros/humble/include/std_srvs -isystem /opt/ros/humble/include/visualization_msgs -isystem /opt/ros/humble/include/cv_bridge -isystem /opt/ros/humble/include/image_transport -isystem /opt/ros/humble/include/tf2 -isystem /opt/ros/humble/include/tf2_ros -isystem /opt/ros/humble/include/tf2_geometry_msgs -isystem /usr/include/opencv4 -isystem /usr/include/eigen3 -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/composition_interfaces -isystem /opt/ros/humble/include/std_msgs -isystem /opt/ros/humble/include/message_filters -isystem /opt/ros/humble/include/rclcpp_action -isystem /opt/ros/humble/include/action_msgs -isystem /opt/ros/humble/include/unique_identifier_msgs -isystem /opt/ros/humble/include/rcl_action -isystem /opt/ros/humble/include/tf2_msgs -std=gnu++17 -o CMakeFiles/trt_inference_test.dir/trt_inference/trt_inference_test.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp" +}, +{ + "directory": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect", + "command": "/usr/bin/c++ -DDEFAULT_RMW_IMPLEMENTATION=rmw_fastrtps_cpp -DRCUTILS_ENABLE_FAULT_INJECTION -isystem /opt/ros/humble/include/rclcpp -isystem /opt/ros/humble/include/class_loader -isystem /opt/ros/humble/include/rclcpp_components -isystem /opt/ros/humble/include/ament_index_cpp -isystem /opt/ros/humble/include/libstatistics_collector -isystem /opt/ros/humble/include/builtin_interfaces -isystem /opt/ros/humble/include/rosidl_runtime_c -isystem /opt/ros/humble/include/rcutils -isystem /opt/ros/humble/include/rosidl_typesupport_interface -isystem /opt/ros/humble/include/fastcdr -isystem /opt/ros/humble/include/rosidl_runtime_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_cpp -isystem /opt/ros/humble/include/rmw -isystem /opt/ros/humble/include/rosidl_typesupport_fastrtps_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_c -isystem /opt/ros/humble/include/rosidl_typesupport_introspection_cpp -isystem /opt/ros/humble/include/rcl -isystem /opt/ros/humble/include/rcl_interfaces -isystem /opt/ros/humble/include/rcl_logging_interface -isystem /opt/ros/humble/include/rcl_yaml_param_parser -isystem /opt/ros/humble/include/libyaml_vendor -isystem /opt/ros/humble/include/tracetools -isystem /opt/ros/humble/include/rcpputils -isystem /opt/ros/humble/include/statistics_msgs -isystem /opt/ros/humble/include/rosgraph_msgs -isystem /opt/ros/humble/include/rosidl_typesupport_cpp -isystem /opt/ros/humble/include/rosidl_typesupport_c -isystem /opt/ros/humble/include/composition_interfaces -std=gnu++17 -o CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o -c /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp", + "file": "/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect/rclcpp_components/node_main_armor_yolo_detector_node.cpp" +} +] diff --git a/src/rm_auto_aim/armor_yolo_detect/config/params.yaml b/src/rm_auto_aim/armor_yolo_detect/config/params.yaml new file mode 100644 index 0000000..cde2e85 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/config/params.yaml @@ -0,0 +1,29 @@ +# ROS2 parameters for armor_yolo_detect +# YOLOv5-based armor detector using TensorRT + +/**: + ros__parameters: + # Detection parameters + conf_threshold: 0.65 + nms_threshold: 0.50 + + # Color mode: 0=RED, 1=BLUE + detect_color: 1 + + # Processing + max_queue_size: 3 + process_every_n_frames: 1 + + # Enable BA for pose estimation + use_ba: true + + # Target frame for TF + target_frame: "odom" + + # Debug settings + debug: false + debug: + enable_terminal_log: true + enable_markers: true + enable_result_img: true + debug_log_interval_frames: 30 diff --git a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp new file mode 100644 index 0000000..2babdb6 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp @@ -0,0 +1,165 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// YOLOv5-based armor detector with traditional vision refinement +// +// Uses YOLO to provide ROI regions, then applies traditional binary + light detection +// for precise corner localization. Input/output compatible with armor_detector. +// +// Supports multiple detection modes: +// - HYBRID_SYNC: YOLO runs every frame (original) +// - HYBRID_ROI_CACHE: YOLO runs every N frames, detection runs every frame +// - HYBRID_ASYNC: Async queue with ROI cache +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_YOLO_DETECT_ARMOR_YOLO_DETECTOR_HPP_ +#define ARMOR_YOLO_DETECT_ARMOR_YOLO_DETECTOR_HPP_ + +#include +#include +#include +#include +#include +#include +#include + +#include +// project +#include "armor_yolo_detect/types.hpp" +#include "armor_yolo_detect/yolo_tensorrt.hpp" +#include "armor_yolo_detect/detector_mode.hpp" +#include "armor_detector/types.hpp" +#include "armor_detector/light_corner_corrector.hpp" +#include "armor_detector/number_classifier.hpp" +#include "rm_utils/common.hpp" + +namespace armor_yolo_detect { + +class Detector { +public: + struct Params { + float conf_threshold = 0.65f; + float nms_threshold = 0.45f; + int detect_color = 0; // 0=red, 1=blue + // ROI expansion pixels + int roi_expand_pixel = 75; + }; + + // Light detection params (from armor_detector) + struct LightParams { + double min_ratio = 0.08; + double max_ratio = 0.4; + double max_angle = 40.0; + bool use_fit_line = true; + int color_diff_thresh = 25; + }; + + // Armor matching params (from armor_detector) + struct ArmorParams { + double min_light_ratio = 0.6; + double min_small_center_distance = 0.8; + double max_small_center_distance = 3.2; + double min_large_center_distance = 3.2; + double max_large_center_distance = 5.0; + double max_angle = 35.0; + }; + + Detector() = default; + ~Detector() = default; + + /** + * @brief Initialize detector with TensorRT engine and traditional vision params + * @param engine_path Path to TensorRT engine file + * @param params Detection parameters + */ + bool init(const std::string& engine_path, const Params& params); + + /** + * @brief Detect armors using YOLO for ROI + traditional vision for refinement + * @param input Input image (BGR) + * @return Vector of detected Armors (fyt::auto_aim::Armor type for compatibility) + */ + std::vector detect(const cv::Mat& input); + + /** + * @brief Detect armors and return raw YOLO objects + * @param input Input image (RGB) + * @return Vector of detected YoloObjects + */ + std::vector detectRaw(const cv::Mat& input); + + // Set detection mode + void setMode(DetectorMode mode); + + // Get current mode + DetectorMode getMode() const { return mode_; } + + // Set ROI update interval (frames between YOLO updates) + void setRoiUpdateInterval(int interval); + + // Parameters + Params params; + LightParams light_params; + ArmorParams armor_params; + int binary_thres = 160; + + // Number Classifier from armor_detector + std::unique_ptr classifier; + + // Debug + bool enable_debug = false; + cv::Mat debug_img; + + // Store ROI rectangles for debug drawing + std::vector debug_rois_; + + // Draw detection results for debug visualization + void drawResults(cv::Mat& img) noexcept; + +private: + // Traditional vision methods + std::vector findLightsInROI( + const cv::Mat& rgb_img, const cv::Mat& gray_img, const cv::Mat& binary_img, + const cv::Rect& roi); + bool isLight(const fyt::auto_aim::Light& light); + bool containLight(const int i, const int j, const std::vector& lights); + fyt::auto_aim::ArmorType isArmor(const fyt::auto_aim::Light& light_1, const fyt::auto_aim::Light& light_2); + std::vector matchLightsInROI(const std::vector& lights); + void correctCorners(fyt::auto_aim::Armor& armor, const cv::Mat& gray_img); + + // Expand YOLO bbox to ROI + cv::Rect expandBBox(const cv::Rect& bbox, const cv::Size& img_size, int pixel_expand); + + // Process ROIs to detect armors (common logic for all modes) + std::vector processROIs( + const cv::Mat& input, + const cv::Mat& gray_img, + const cv::Mat& binary_img); + + std::unique_ptr tensorrt_; + std::vector yolo_objects_; + std::vector armors_; + std::unique_ptr corner_corrector_; + + // Detection mode + DetectorMode mode_ = DetectorMode::HYBRID_SYNC; + + // ROI cache for HYBRID_ROI_CACHE and HYBRID_ASYNC modes + std::vector cached_yolo_objects_; + int roi_update_interval_ = 5; + std::atomic frame_counter_{0}; +}; + +} // namespace armor_yolo_detect +#endif // ARMOR_YOLO_DETECT_ARMOR_YOLO_DETECTOR_HPP_ diff --git a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp new file mode 100644 index 0000000..ffc1f4d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp @@ -0,0 +1,162 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// ROS2 node for YOLOv5 armor detection +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_YOLO_DETECT_ARMOR_YOLO_DETECTOR_NODE_HPP_ +#define ARMOR_YOLO_DETECT_ARMOR_YOLO_DETECTOR_NODE_HPP_ + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "armor_yolo_detect/armor_yolo_detector.hpp" +#include "armor_yolo_detect/types.hpp" +#include "armor_yolo_detect/detector_mode.hpp" +#include "armor_detector/armor_pose_estimator.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/heartbeat.hpp" + +namespace armor_yolo_detect { + +struct PendingFrame { + sensor_msgs::msg::Image::ConstSharedPtr img_msg; + std::chrono::steady_clock::time_point frame_start; +}; + +class ArmorYoloDetectorNode : public rclcpp::Node { +public: + explicit ArmorYoloDetectorNode(const rclcpp::NodeOptions& options); + ~ArmorYoloDetectorNode(); + +private: + // Initialization + std::unique_ptr initDetector(); + + // Image processing + void imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr img_msg); + void processImageLoop(); + void processFrame(PendingFrame frame); + std::vector detectArmors( + const sensor_msgs::msg::Image::ConstSharedPtr& img_msg, + double* detect_ms, + double* debug_publish_ms); + + // Mode switching + void setModeCallback( + const std::shared_ptr request, + const std::shared_ptr response); + + // Debug publishers + void createDebugPublishers(); + void destroyDebugPublishers(); + void refreshDebugPublishersIfNeeded(); + void publishMarkers(); + + // Parameter callbacks + rcl_interfaces::msg::SetParametersResult onSetParameters( + std::vector parameters); + + // Convert YOLO armor to auto_aim armor for pose estimation + fyt::auto_aim::Armor convertToAutoAimArmor(const Armor& yolo_armor); + + // ROS interfaces + rclcpp::Subscription::SharedPtr img_sub_; + rclcpp::Subscription::SharedPtr cam_info_sub_; + rclcpp::Publisher::SharedPtr armors_pub_; + rclcpp::Publisher::SharedPtr marker_pub_; + rclcpp::Service::SharedPtr set_mode_srv_; + + // Image transport for debug + image_transport::Publisher result_img_pub_; + + // TF + std::shared_ptr tf2_buffer_; + std::shared_ptr tf2_listener_; + std::string odom_frame_; + + // Detector + std::unique_ptr detector_; + cv::Point2f cam_center_; + + // Detection mode + DetectorMode detector_mode_ = DetectorMode::HYBRID_SYNC; + + // Camera info for pose estimation + sensor_msgs::msg::CameraInfo::SharedPtr cam_info_; + std::unique_ptr armor_pose_estimator_; + + // Processing thread + std::thread image_processing_thread_; + std::deque frame_queue_; + std::mutex queue_mutex_; + std::condition_variable queue_cv_; + bool stop_processing_ = false; + size_t max_queue_size_; + int process_every_n_frames_ = 1; + std::atomic input_frame_counter_{0}; + + // Debug + bool debug_ = false; + bool debug_markers_ = true; + bool debug_result_img_ = true; + bool debug_terminal_log_ = true; + int debug_log_interval_frames_ = 30; + std::atomic debug_log_counter_{0}; + rcl_interfaces::msg::SetParametersResult::SharedPtr result_; + rclcpp::node_interfaces::OnSetParametersCallbackHandle::SharedPtr + on_set_parameters_callback_handle_; + std::shared_ptr debug_param_sub_; + rclcpp::ParameterCallbackHandle::SharedPtr debug_cb_handle_; + rclcpp::TimerBase::SharedPtr debug_publishers_refresh_timer_; + std::atomic debug_publishers_refresh_requested_{false}; + rclcpp::TimerBase::SharedPtr stage_timer_; + + // BA + bool use_ba_ = true; + + // Message + rm_interfaces::msg::Armors armors_msg_; + visualization_msgs::msg::MarkerArray marker_array_; + visualization_msgs::msg::Marker armor_marker_; + visualization_msgs::msg::Marker text_marker_; + + // Processing mutex for detector and pose estimator + std::mutex processing_mutex_; + + // Heartbeat + fyt::HeartBeatPublisher::SharedPtr heartbeat_; +}; + +} // namespace armor_yolo_detect +#endif // ARMOR_YOLO_DETECT_ARMOR_YOLO_DETECTOR_NODE_HPP_ diff --git a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/async_detector.hpp b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/async_detector.hpp new file mode 100644 index 0000000..aa23251 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/async_detector.hpp @@ -0,0 +1,100 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// Async detector for armor_yolo_detect +// +// Uses a separate processing thread with an async queue to reduce data blocking. +// Combined with ROI cache to reduce YOLO inference frequency. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_YOLO_DETECT_ASYNC_DETECTOR_HPP_ +#define ARMOR_YOLO_DETECT_ASYNC_DETECTOR_HPP_ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +// project +#include "armor_yolo_detect/armor_yolo_detector.hpp" +#include "armor_detector/types.hpp" + +namespace armor_yolo_detect { + +struct AsyncFrame { + cv::Mat img; + uint64_t frame_id; + std::chrono::steady_clock::time_point timestamp; +}; + +class AsyncDetector { +public: + AsyncDetector(); + ~AsyncDetector(); + + // Initialize with a existing detector + void init(std::shared_ptr detector, int queue_size = 3); + + // Start async processing thread + void start(); + + // Stop async processing thread + void stop(); + + // Enqueue a frame for async processing + void enqueue(const cv::Mat& img); + + // Get latest detection result (non-blocking) + std::vector getLatestResult(); + + // Check if processing is running + bool isRunning() const { return running_; } + + // Get queue size + size_t queueSize() const { + std::lock_guard lock(queue_mutex_); + return frame_queue_.size(); + } + +private: + void processingLoop(); + + // Shared detector pointer + std::shared_ptr detector_; + + // Frame queue + std::deque frame_queue_; + size_t max_queue_size_ = 3; + + // Processing thread + std::thread processing_thread_; + std::atomic running_{false}; + + // Synchronization + mutable std::mutex queue_mutex_; + std::condition_variable queue_cv_; + + // Latest result + std::vector latest_result_; + std::mutex result_mutex_; +}; + +} // namespace armor_yolo_detect + +#endif // ARMOR_YOLO_DETECT_ASYNC_DETECTOR_HPP_ diff --git a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/detector_mode.hpp b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/detector_mode.hpp new file mode 100644 index 0000000..5b74077 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/detector_mode.hpp @@ -0,0 +1,49 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// +// Detection modes for armor_yolo_detect +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_YOLO_DETECT_DETECTOR_MODE_HPP_ +#define ARMOR_YOLO_DETECT_DETECTOR_MODE_HPP_ + +namespace armor_yolo_detect { + +// Detection modes +enum class DetectorMode { + // Original hybrid detection: YOLO runs every frame + HYBRID_SYNC = 0, + // ROI cache mode: YOLO runs every N frames, detection runs every frame + HYBRID_ROI_CACHE = 1, + // Async mode: async queue with ROI cache + HYBRID_ASYNC = 2 +}; + +inline std::string detectorModeToString(DetectorMode mode) { + switch (mode) { + case DetectorMode::HYBRID_SYNC: + return "hybrid_sync"; + case DetectorMode::HYBRID_ROI_CACHE: + return "hybrid_roi_cache"; + case DetectorMode::HYBRID_ASYNC: + return "hybrid_async"; + default: + return "unknown"; + } +} + +} // namespace armor_yolo_detect + +#endif // ARMOR_YOLO_DETECT_DETECTOR_MODE_HPP_ diff --git a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/trt_logger.hpp b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/trt_logger.hpp new file mode 100644 index 0000000..8628727 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/trt_logger.hpp @@ -0,0 +1,42 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// TensorRT logger header +// +// Licensed under the Apache License, Version 2.0 (the "License"); + +#ifndef ARMOR_YOLO_DETECT_TRT_LOGGER_HPP_ +#define ARMOR_YOLO_DETECT_TRT_LOGGER_HPP_ + +#include +#include +#include + +class Logger : public nvinfer1::ILogger { +public: + void log(Severity severity, const char* msg) noexcept override { + std::lock_guard lock(mutex_); + switch (severity) { + case Severity::kINTERNAL_ERROR: + std::cerr << "[TensorRT] INTERNAL_ERROR: " << msg << std::endl; + break; + case Severity::kERROR: + std::cerr << "[TensorRT] ERROR: " << msg << std::endl; + break; + case Severity::kWARNING: + std::cerr << "[TensorRT] WARNING: " << msg << std::endl; + break; + case Severity::kINFO: + std::cout << "[TensorRT] INFO: " << msg << std::endl; + break; + case Severity::kVERBOSE: + std::cout << "[TensorRT] VERBOSE: " << msg << std::endl; + break; + } + } + +private: + std::mutex mutex_; +}; + +extern Logger gLogger; + +#endif // ARMOR_YOLO_DETECT_TRT_LOGGER_HPP_ diff --git a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp new file mode 100644 index 0000000..c093539 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp @@ -0,0 +1,209 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// Modified for YOLOv5-based detection +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_YOLO_DETECT_TYPES_HPP_ +#define ARMOR_YOLO_DETECT_TYPES_HPP_ + +// std +#include +#include +#include +#include +#include +// 3rd party +#include +#include +#include +#include +// project +#include "armor_detector/types.hpp" +#include "rm_utils/assert.hpp" +#include "rm_utils/common.hpp" + +namespace armor_yolo_detect { + +// Armor size, Unit: m +constexpr double SMALL_ARMOR_WIDTH = 133.0 / 1000.0; +constexpr double SMALL_ARMOR_HEIGHT = 50.0 / 1000.0; +constexpr double LARGE_ARMOR_WIDTH = 225.0 / 1000.0; +constexpr double LARGE_ARMOR_HEIGHT = 50.0 / 1000.0; + +// Armor type +enum class ArmorType { SMALL, LARGE, INVALID }; + +inline std::string armorTypeToString(const ArmorType& type) { + switch (type) { + case ArmorType::SMALL: + return "small"; + case ArmorType::LARGE: + return "large"; + default: + return "invalid"; + } +} + +// Class labels for number classification +enum class NumberClass { + GUARD = 0, + ONE = 1, + TWO = 2, + THREE = 3, + FOUR = 4, + FIVE = 5, + OUTPOST = 6, + BASE_SMALL = 7, + BASE_LARGE = 8, + NEGATIVE = 9 +}; + +inline std::string numberClassToString(NumberClass cls) { + switch (cls) { + case NumberClass::GUARD: + return "G"; + case NumberClass::ONE: + return "1"; + case NumberClass::TWO: + return "2"; + case NumberClass::THREE: + return "3"; + case NumberClass::FOUR: + return "4"; + case NumberClass::FIVE: + return "5"; + case NumberClass::OUTPOST: + return "O"; + case NumberClass::BASE_SMALL: + return "Bs"; + case NumberClass::BASE_LARGE: + return "Bb"; + default: + return "negative"; + } +} + +// Color classes from model output +enum class ModelColor { + RED = 0, + BLUE = 1, + GRAY = 2, + PURPLE = 3 +}; + +// YOLO detection object structure +struct YoloObject { + cv::Rect_ rect; + float landmarks[8]; + int label; + float prob; + ModelColor color; +}; + +// Struct to store detected armor with 6 landmarks (for PnP) +struct Armor { + static constexpr const int N_LANDMARKS = 6; + static constexpr const int N_LANDMARKS_2 = N_LANDMARKS * 2; + + Armor() = default; + + Armor(const YoloObject& obj, const cv::Point2f& center) + : center(center), type(ArmorType::SMALL), confidence(obj.prob) { + const cv::Point2f top_left(obj.landmarks[0], obj.landmarks[1]); + const cv::Point2f bottom_left(obj.landmarks[2], obj.landmarks[3]); + const cv::Point2f bottom_right(obj.landmarks[4], obj.landmarks[5]); + const cv::Point2f top_right(obj.landmarks[6], obj.landmarks[7]); + + landmark_points = { + bottom_left, + (bottom_left + top_left) * 0.5f, + top_left, + top_right, + (top_right + bottom_right) * 0.5f, + bottom_right + }; + + float width = cv::norm(landmark_points[2] - landmark_points[3]); + float height = cv::norm(landmark_points[1] - landmark_points[4]); + if (height > 0) { + float ratio = width / height; + type = (ratio > 3.5) ? ArmorType::LARGE : ArmorType::SMALL; + } + } + + template + static inline std::vector buildObjectPoints(const double& w, const double& h) noexcept { + return {PointType(0, w / 2, -h / 2), PointType(0, w / 2, 0), + PointType(0, w / 2, h / 2), PointType(0, -w / 2, h / 2), + PointType(0, -w / 2, 0), PointType(0, -w / 2, -h / 2)}; + } + + std::vector landmarks() const { + return {landmark_points[0], landmark_points[1], landmark_points[2], + landmark_points[3], landmark_points[4], landmark_points[5]}; + } + + fyt::auto_aim::Light toLeftLight() const { + fyt::auto_aim::Light light; + light.center = (landmark_points[0] + landmark_points[2]) / 2; + light.top = landmark_points[2]; + light.bottom = landmark_points[0]; + light.length = cv::norm(landmark_points[2] - landmark_points[0]); + light.width = + cv::norm(landmark_points[1] - (landmark_points[0] + landmark_points[2]) / 2) * 2; + return light; + } + + fyt::auto_aim::Light toRightLight() const { + fyt::auto_aim::Light light; + light.center = (landmark_points[3] + landmark_points[5]) / 2; + light.top = landmark_points[3]; + light.bottom = landmark_points[5]; + light.length = cv::norm(landmark_points[3] - landmark_points[5]); + light.width = + cv::norm(landmark_points[4] - (landmark_points[3] + landmark_points[5]) / 2) * 2; + return light; + } + + fyt::auto_aim::Armor toAutoAimArmor() const { + fyt::auto_aim::Armor armor; + switch (type) { + case ArmorType::SMALL: + armor.type = fyt::auto_aim::ArmorType::SMALL; + break; + case ArmorType::LARGE: + armor.type = fyt::auto_aim::ArmorType::LARGE; + break; + default: + armor.type = fyt::auto_aim::ArmorType::INVALID; + break; + } + armor.center = center; + armor.confidence = confidence; + armor.classfication_result = numberClassToString(number_class); + armor.left_light = toLeftLight(); + armor.right_light = toRightLight(); + return armor; + } + + std::array landmark_points; + cv::Point2f center; + ArmorType type; + NumberClass number_class = NumberClass::NEGATIVE; + float confidence = 0.0f; +}; + +} // namespace armor_yolo_detect +#endif // ARMOR_YOLO_DETECT_TYPES_HPP_ diff --git a/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp new file mode 100644 index 0000000..a7e4976 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp @@ -0,0 +1,125 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// TensorRT inference engine for YOLOv5 armor detection +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef ARMOR_YOLO_DETECT_YOLO_TENSORRT_HPP_ +#define ARMOR_YOLO_DETECT_YOLO_TENSORRT_HPP_ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "armor_yolo_detect/types.hpp" + +namespace armor_yolo_detect { + +class YoloTensorRT { +public: + static constexpr int INPUT_WIDTH = 640; + static constexpr int INPUT_HEIGHT = 640; + static constexpr int INPUT_C = 3; + static constexpr int OUTPUT_ROWS = 25200; + static constexpr int OUTPUT_COLS = 23; + + static constexpr float CONF_THRESHOLD = 0.65f; + static constexpr float NMS_THRESHOLD = 0.45f; + + YoloTensorRT() = default; + ~YoloTensorRT(); + + bool initFromEngine(const std::string& engine_path); + + bool buildFromOnnx( + const std::string& onnx_path, + const std::string& engine_path, + int max_batch_size = 1); + + std::vector infer(const cv::Mat& img, int detect_color); + + void setPostprocessOptions(float conf_threshold, float nms_threshold, int max_detections) { + conf_threshold_ = std::max(0.0f, conf_threshold); + nms_threshold_ = std::max(0.0f, nms_threshold); + max_detections_ = std::max(1, max_detections); + } + + void setDebugOptions(bool dump_model_output, bool dump_all_rows, int dump_topk, int dump_interval) { + dump_model_output_ = dump_model_output; + dump_all_rows_ = dump_all_rows; + dump_topk_ = std::max(1, dump_topk); + dump_interval_ = std::max(1, dump_interval); + } + + bool isInitialized() const { return engine_ != nullptr && context_ != nullptr; } + +private: + cv::Mat preprocess(const cv::Mat& img); + + bool inferInternal(const float* input, float* output, int batch_size); + + std::vector postprocess(const float* output, int detect_color, bool dump_this_frame); + + std::vector applyNMS( + const std::vector& boxes, + const std::vector& scores, + float nms_threshold); + + float sigmoid(float x) const { + if (x > 0) { + return 1.0f / (1.0f + std::exp(-x)); + } else { + return std::exp(x) / (1.0f + std::exp(x)); + } + } + + nvinfer1::IRuntime* runtime_ = nullptr; + nvinfer1::ICudaEngine* engine_ = nullptr; + nvinfer1::IExecutionContext* context_ = nullptr; + + void* device_buffer_[2] = {nullptr, nullptr}; + int input_index_ = 0; + int output_index_ = 0; + int io_tensor_count_ = 0; + int output_rows_ = OUTPUT_ROWS; + int output_cols_ = OUTPUT_COLS; + std::string input_tensor_name_; + std::string output_tensor_name_; + + bool is_input_half_ = false; + std::vector half_input_buffer_; + std::vector input_buffer_; + std::vector output_buffer_; + + cudaStream_t cuda_stream_ = nullptr; + + bool dump_model_output_ = false; + bool dump_all_rows_ = false; + int dump_topk_ = 5; + int dump_interval_ = 30; + uint64_t infer_counter_ = 0; + + float conf_threshold_ = CONF_THRESHOLD; + float nms_threshold_ = NMS_THRESHOLD; + int max_detections_ = 20; +}; + +} // namespace armor_yolo_detect +#endif // ARMOR_YOLO_DETECT_YOLO_TENSORRT_HPP_ diff --git a/src/rm_auto_aim/armor_yolo_detect/install/.colcon_install_layout b/src/rm_auto_aim/armor_yolo_detect/install/.colcon_install_layout new file mode 100644 index 0000000..3aad533 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/.colcon_install_layout @@ -0,0 +1 @@ +isolated diff --git a/src/rm_auto_aim/armor_yolo_detect/install/COLCON_IGNORE b/src/rm_auto_aim/armor_yolo_detect/install/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_ps1.py b/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_ps1.py new file mode 100644 index 0000000..3c6d9e8 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_ps1.py @@ -0,0 +1,407 @@ +# Copyright 2016-2019 Dirk Thomas +# Licensed under the Apache License, Version 2.0 + +import argparse +from collections import OrderedDict +import os +from pathlib import Path +import sys + + +FORMAT_STR_COMMENT_LINE = '# {comment}' +FORMAT_STR_SET_ENV_VAR = 'Set-Item -Path "Env:{name}" -Value "{value}"' +FORMAT_STR_USE_ENV_VAR = '$env:{name}' +FORMAT_STR_INVOKE_SCRIPT = '_colcon_prefix_powershell_source_script "{script_path}"' # noqa: E501 +FORMAT_STR_REMOVE_LEADING_SEPARATOR = '' # noqa: E501 +FORMAT_STR_REMOVE_TRAILING_SEPARATOR = '' # noqa: E501 + +DSV_TYPE_APPEND_NON_DUPLICATE = 'append-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE = 'prepend-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS = 'prepend-non-duplicate-if-exists' +DSV_TYPE_SET = 'set' +DSV_TYPE_SET_IF_UNSET = 'set-if-unset' +DSV_TYPE_SOURCE = 'source' + + +def main(argv=sys.argv[1:]): # noqa: D103 + parser = argparse.ArgumentParser( + description='Output shell commands for the packages in topological ' + 'order') + parser.add_argument( + 'primary_extension', + help='The file extension of the primary shell') + parser.add_argument( + 'additional_extension', nargs='?', + help='The additional file extension to be considered') + parser.add_argument( + '--merged-install', action='store_true', + help='All install prefixes are merged into a single location') + args = parser.parse_args(argv) + + packages = get_packages(Path(__file__).parent, args.merged_install) + + ordered_packages = order_packages(packages) + for pkg_name in ordered_packages: + if _include_comments(): + print( + FORMAT_STR_COMMENT_LINE.format_map( + {'comment': 'Package: ' + pkg_name})) + prefix = os.path.abspath(os.path.dirname(__file__)) + if not args.merged_install: + prefix = os.path.join(prefix, pkg_name) + for line in get_commands( + pkg_name, prefix, args.primary_extension, + args.additional_extension + ): + print(line) + + for line in _remove_ending_separators(): + print(line) + + +def get_packages(prefix_path, merged_install): + """ + Find packages based on colcon-specific files created during installation. + + :param Path prefix_path: The install prefix path of all packages + :param bool merged_install: The flag if the packages are all installed + directly in the prefix or if each package is installed in a subdirectory + named after the package + :returns: A mapping from the package name to the set of runtime + dependencies + :rtype: dict + """ + packages = {} + # since importing colcon_core isn't feasible here the following constant + # must match colcon_core.location.get_relative_package_index_path() + subdirectory = 'share/colcon-core/packages' + if merged_install: + # return if workspace is empty + if not (prefix_path / subdirectory).is_dir(): + return packages + # find all files in the subdirectory + for p in (prefix_path / subdirectory).iterdir(): + if not p.is_file(): + continue + if p.name.startswith('.'): + continue + add_package_runtime_dependencies(p, packages) + else: + # for each subdirectory look for the package specific file + for p in prefix_path.iterdir(): + if not p.is_dir(): + continue + if p.name.startswith('.'): + continue + p = p / subdirectory / p.name + if p.is_file(): + add_package_runtime_dependencies(p, packages) + + # remove unknown dependencies + pkg_names = set(packages.keys()) + for k in packages.keys(): + packages[k] = {d for d in packages[k] if d in pkg_names} + + return packages + + +def add_package_runtime_dependencies(path, packages): + """ + Check the path and if it exists extract the packages runtime dependencies. + + :param Path path: The resource file containing the runtime dependencies + :param dict packages: A mapping from package names to the sets of runtime + dependencies to add to + """ + content = path.read_text() + dependencies = set(content.split(os.pathsep) if content else []) + packages[path.name] = dependencies + + +def order_packages(packages): + """ + Order packages topologically. + + :param dict packages: A mapping from package name to the set of runtime + dependencies + :returns: The package names + :rtype: list + """ + # select packages with no dependencies in alphabetical order + to_be_ordered = list(packages.keys()) + ordered = [] + while to_be_ordered: + pkg_names_without_deps = [ + name for name in to_be_ordered if not packages[name]] + if not pkg_names_without_deps: + reduce_cycle_set(packages) + raise RuntimeError( + 'Circular dependency between: ' + ', '.join(sorted(packages))) + pkg_names_without_deps.sort() + pkg_name = pkg_names_without_deps[0] + to_be_ordered.remove(pkg_name) + ordered.append(pkg_name) + # remove item from dependency lists + for k in list(packages.keys()): + if pkg_name in packages[k]: + packages[k].remove(pkg_name) + return ordered + + +def reduce_cycle_set(packages): + """ + Reduce the set of packages to the ones part of the circular dependency. + + :param dict packages: A mapping from package name to the set of runtime + dependencies which is modified in place + """ + last_depended = None + while len(packages) > 0: + # get all remaining dependencies + depended = set() + for pkg_name, dependencies in packages.items(): + depended = depended.union(dependencies) + # remove all packages which are not dependent on + for name in list(packages.keys()): + if name not in depended: + del packages[name] + if last_depended: + # if remaining packages haven't changed return them + if last_depended == depended: + return packages.keys() + # otherwise reduce again + last_depended = depended + + +def _include_comments(): + # skipping comment lines when COLCON_TRACE is not set speeds up the + # processing especially on Windows + return bool(os.environ.get('COLCON_TRACE')) + + +def get_commands(pkg_name, prefix, primary_extension, additional_extension): + commands = [] + package_dsv_path = os.path.join(prefix, 'share', pkg_name, 'package.dsv') + if os.path.exists(package_dsv_path): + commands += process_dsv_file( + package_dsv_path, prefix, primary_extension, additional_extension) + return commands + + +def process_dsv_file( + dsv_path, prefix, primary_extension=None, additional_extension=None +): + commands = [] + if _include_comments(): + commands.append(FORMAT_STR_COMMENT_LINE.format_map({'comment': dsv_path})) + with open(dsv_path, 'r') as h: + content = h.read() + lines = content.splitlines() + + basenames = OrderedDict() + for i, line in enumerate(lines): + # skip over empty or whitespace-only lines + if not line.strip(): + continue + # skip over comments + if line.startswith('#'): + continue + try: + type_, remainder = line.split(';', 1) + except ValueError: + raise RuntimeError( + "Line %d in '%s' doesn't contain a semicolon separating the " + 'type from the arguments' % (i + 1, dsv_path)) + if type_ != DSV_TYPE_SOURCE: + # handle non-source lines + try: + commands += handle_dsv_types_except_source( + type_, remainder, prefix) + except RuntimeError as e: + raise RuntimeError( + "Line %d in '%s' %s" % (i + 1, dsv_path, e)) from e + else: + # group remaining source lines by basename + path_without_ext, ext = os.path.splitext(remainder) + if path_without_ext not in basenames: + basenames[path_without_ext] = set() + assert ext.startswith('.') + ext = ext[1:] + if ext in (primary_extension, additional_extension): + basenames[path_without_ext].add(ext) + + # add the dsv extension to each basename if the file exists + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if os.path.exists(basename + '.dsv'): + extensions.add('dsv') + + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if 'dsv' in extensions: + # process dsv files recursively + commands += process_dsv_file( + basename + '.dsv', prefix, primary_extension=primary_extension, + additional_extension=additional_extension) + elif primary_extension in extensions and len(extensions) == 1: + # source primary-only files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + primary_extension})] + elif additional_extension in extensions: + # source non-primary files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + additional_extension})] + + return commands + + +def handle_dsv_types_except_source(type_, remainder, prefix): + commands = [] + if type_ in (DSV_TYPE_SET, DSV_TYPE_SET_IF_UNSET): + try: + env_name, value = remainder.split(';', 1) + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the value') + try_prefixed_value = os.path.join(prefix, value) if value else prefix + if os.path.exists(try_prefixed_value): + value = try_prefixed_value + if type_ == DSV_TYPE_SET: + commands += _set(env_name, value) + elif type_ == DSV_TYPE_SET_IF_UNSET: + commands += _set_if_unset(env_name, value) + else: + assert False + elif type_ in ( + DSV_TYPE_APPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS + ): + try: + env_name_and_values = remainder.split(';') + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the values') + env_name = env_name_and_values[0] + values = env_name_and_values[1:] + for value in values: + if not value: + value = prefix + elif not os.path.isabs(value): + value = os.path.join(prefix, value) + if ( + type_ == DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS and + not os.path.exists(value) + ): + comment = f'skip extending {env_name} with not existing ' \ + f'path: {value}' + if _include_comments(): + commands.append( + FORMAT_STR_COMMENT_LINE.format_map({'comment': comment})) + elif type_ == DSV_TYPE_APPEND_NON_DUPLICATE: + commands += _append_unique_value(env_name, value) + else: + commands += _prepend_unique_value(env_name, value) + else: + raise RuntimeError( + 'contains an unknown environment hook type: ' + type_) + return commands + + +env_state = {} + + +def _append_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # append even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional leading separator + extend = FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + os.pathsep + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': extend + value}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +def _prepend_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # prepend even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional trailing separator + extend = os.pathsep + FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value + extend}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +# generate commands for removing prepended underscores +def _remove_ending_separators(): + # do nothing if the shell extension does not implement the logic + if FORMAT_STR_REMOVE_TRAILING_SEPARATOR is None: + return [] + + global env_state + commands = [] + for name in env_state: + # skip variables that already had values before this script started prepending + if name in os.environ: + continue + commands += [ + FORMAT_STR_REMOVE_LEADING_SEPARATOR.format_map({'name': name}), + FORMAT_STR_REMOVE_TRAILING_SEPARATOR.format_map({'name': name})] + return commands + + +def _set(name, value): + global env_state + env_state[name] = value + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + return [line] + + +def _set_if_unset(name, value): + global env_state + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + if env_state.get(name, os.environ.get(name)): + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +if __name__ == '__main__': # pragma: no cover + try: + rc = main() + except RuntimeError as e: + print(str(e), file=sys.stderr) + rc = 1 + sys.exit(rc) diff --git a/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_sh.py b/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_sh.py new file mode 100644 index 0000000..f67eaa9 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_sh.py @@ -0,0 +1,407 @@ +# Copyright 2016-2019 Dirk Thomas +# Licensed under the Apache License, Version 2.0 + +import argparse +from collections import OrderedDict +import os +from pathlib import Path +import sys + + +FORMAT_STR_COMMENT_LINE = '# {comment}' +FORMAT_STR_SET_ENV_VAR = 'export {name}="{value}"' +FORMAT_STR_USE_ENV_VAR = '${name}' +FORMAT_STR_INVOKE_SCRIPT = 'COLCON_CURRENT_PREFIX="{prefix}" _colcon_prefix_sh_source_script "{script_path}"' # noqa: E501 +FORMAT_STR_REMOVE_LEADING_SEPARATOR = 'if [ "$(echo -n ${name} | head -c 1)" = ":" ]; then export {name}=${{{name}#?}} ; fi' # noqa: E501 +FORMAT_STR_REMOVE_TRAILING_SEPARATOR = 'if [ "$(echo -n ${name} | tail -c 1)" = ":" ]; then export {name}=${{{name}%?}} ; fi' # noqa: E501 + +DSV_TYPE_APPEND_NON_DUPLICATE = 'append-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE = 'prepend-non-duplicate' +DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS = 'prepend-non-duplicate-if-exists' +DSV_TYPE_SET = 'set' +DSV_TYPE_SET_IF_UNSET = 'set-if-unset' +DSV_TYPE_SOURCE = 'source' + + +def main(argv=sys.argv[1:]): # noqa: D103 + parser = argparse.ArgumentParser( + description='Output shell commands for the packages in topological ' + 'order') + parser.add_argument( + 'primary_extension', + help='The file extension of the primary shell') + parser.add_argument( + 'additional_extension', nargs='?', + help='The additional file extension to be considered') + parser.add_argument( + '--merged-install', action='store_true', + help='All install prefixes are merged into a single location') + args = parser.parse_args(argv) + + packages = get_packages(Path(__file__).parent, args.merged_install) + + ordered_packages = order_packages(packages) + for pkg_name in ordered_packages: + if _include_comments(): + print( + FORMAT_STR_COMMENT_LINE.format_map( + {'comment': 'Package: ' + pkg_name})) + prefix = os.path.abspath(os.path.dirname(__file__)) + if not args.merged_install: + prefix = os.path.join(prefix, pkg_name) + for line in get_commands( + pkg_name, prefix, args.primary_extension, + args.additional_extension + ): + print(line) + + for line in _remove_ending_separators(): + print(line) + + +def get_packages(prefix_path, merged_install): + """ + Find packages based on colcon-specific files created during installation. + + :param Path prefix_path: The install prefix path of all packages + :param bool merged_install: The flag if the packages are all installed + directly in the prefix or if each package is installed in a subdirectory + named after the package + :returns: A mapping from the package name to the set of runtime + dependencies + :rtype: dict + """ + packages = {} + # since importing colcon_core isn't feasible here the following constant + # must match colcon_core.location.get_relative_package_index_path() + subdirectory = 'share/colcon-core/packages' + if merged_install: + # return if workspace is empty + if not (prefix_path / subdirectory).is_dir(): + return packages + # find all files in the subdirectory + for p in (prefix_path / subdirectory).iterdir(): + if not p.is_file(): + continue + if p.name.startswith('.'): + continue + add_package_runtime_dependencies(p, packages) + else: + # for each subdirectory look for the package specific file + for p in prefix_path.iterdir(): + if not p.is_dir(): + continue + if p.name.startswith('.'): + continue + p = p / subdirectory / p.name + if p.is_file(): + add_package_runtime_dependencies(p, packages) + + # remove unknown dependencies + pkg_names = set(packages.keys()) + for k in packages.keys(): + packages[k] = {d for d in packages[k] if d in pkg_names} + + return packages + + +def add_package_runtime_dependencies(path, packages): + """ + Check the path and if it exists extract the packages runtime dependencies. + + :param Path path: The resource file containing the runtime dependencies + :param dict packages: A mapping from package names to the sets of runtime + dependencies to add to + """ + content = path.read_text() + dependencies = set(content.split(os.pathsep) if content else []) + packages[path.name] = dependencies + + +def order_packages(packages): + """ + Order packages topologically. + + :param dict packages: A mapping from package name to the set of runtime + dependencies + :returns: The package names + :rtype: list + """ + # select packages with no dependencies in alphabetical order + to_be_ordered = list(packages.keys()) + ordered = [] + while to_be_ordered: + pkg_names_without_deps = [ + name for name in to_be_ordered if not packages[name]] + if not pkg_names_without_deps: + reduce_cycle_set(packages) + raise RuntimeError( + 'Circular dependency between: ' + ', '.join(sorted(packages))) + pkg_names_without_deps.sort() + pkg_name = pkg_names_without_deps[0] + to_be_ordered.remove(pkg_name) + ordered.append(pkg_name) + # remove item from dependency lists + for k in list(packages.keys()): + if pkg_name in packages[k]: + packages[k].remove(pkg_name) + return ordered + + +def reduce_cycle_set(packages): + """ + Reduce the set of packages to the ones part of the circular dependency. + + :param dict packages: A mapping from package name to the set of runtime + dependencies which is modified in place + """ + last_depended = None + while len(packages) > 0: + # get all remaining dependencies + depended = set() + for pkg_name, dependencies in packages.items(): + depended = depended.union(dependencies) + # remove all packages which are not dependent on + for name in list(packages.keys()): + if name not in depended: + del packages[name] + if last_depended: + # if remaining packages haven't changed return them + if last_depended == depended: + return packages.keys() + # otherwise reduce again + last_depended = depended + + +def _include_comments(): + # skipping comment lines when COLCON_TRACE is not set speeds up the + # processing especially on Windows + return bool(os.environ.get('COLCON_TRACE')) + + +def get_commands(pkg_name, prefix, primary_extension, additional_extension): + commands = [] + package_dsv_path = os.path.join(prefix, 'share', pkg_name, 'package.dsv') + if os.path.exists(package_dsv_path): + commands += process_dsv_file( + package_dsv_path, prefix, primary_extension, additional_extension) + return commands + + +def process_dsv_file( + dsv_path, prefix, primary_extension=None, additional_extension=None +): + commands = [] + if _include_comments(): + commands.append(FORMAT_STR_COMMENT_LINE.format_map({'comment': dsv_path})) + with open(dsv_path, 'r') as h: + content = h.read() + lines = content.splitlines() + + basenames = OrderedDict() + for i, line in enumerate(lines): + # skip over empty or whitespace-only lines + if not line.strip(): + continue + # skip over comments + if line.startswith('#'): + continue + try: + type_, remainder = line.split(';', 1) + except ValueError: + raise RuntimeError( + "Line %d in '%s' doesn't contain a semicolon separating the " + 'type from the arguments' % (i + 1, dsv_path)) + if type_ != DSV_TYPE_SOURCE: + # handle non-source lines + try: + commands += handle_dsv_types_except_source( + type_, remainder, prefix) + except RuntimeError as e: + raise RuntimeError( + "Line %d in '%s' %s" % (i + 1, dsv_path, e)) from e + else: + # group remaining source lines by basename + path_without_ext, ext = os.path.splitext(remainder) + if path_without_ext not in basenames: + basenames[path_without_ext] = set() + assert ext.startswith('.') + ext = ext[1:] + if ext in (primary_extension, additional_extension): + basenames[path_without_ext].add(ext) + + # add the dsv extension to each basename if the file exists + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if os.path.exists(basename + '.dsv'): + extensions.add('dsv') + + for basename, extensions in basenames.items(): + if not os.path.isabs(basename): + basename = os.path.join(prefix, basename) + if 'dsv' in extensions: + # process dsv files recursively + commands += process_dsv_file( + basename + '.dsv', prefix, primary_extension=primary_extension, + additional_extension=additional_extension) + elif primary_extension in extensions and len(extensions) == 1: + # source primary-only files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + primary_extension})] + elif additional_extension in extensions: + # source non-primary files + commands += [ + FORMAT_STR_INVOKE_SCRIPT.format_map({ + 'prefix': prefix, + 'script_path': basename + '.' + additional_extension})] + + return commands + + +def handle_dsv_types_except_source(type_, remainder, prefix): + commands = [] + if type_ in (DSV_TYPE_SET, DSV_TYPE_SET_IF_UNSET): + try: + env_name, value = remainder.split(';', 1) + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the value') + try_prefixed_value = os.path.join(prefix, value) if value else prefix + if os.path.exists(try_prefixed_value): + value = try_prefixed_value + if type_ == DSV_TYPE_SET: + commands += _set(env_name, value) + elif type_ == DSV_TYPE_SET_IF_UNSET: + commands += _set_if_unset(env_name, value) + else: + assert False + elif type_ in ( + DSV_TYPE_APPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE, + DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS + ): + try: + env_name_and_values = remainder.split(';') + except ValueError: + raise RuntimeError( + "doesn't contain a semicolon separating the environment name " + 'from the values') + env_name = env_name_and_values[0] + values = env_name_and_values[1:] + for value in values: + if not value: + value = prefix + elif not os.path.isabs(value): + value = os.path.join(prefix, value) + if ( + type_ == DSV_TYPE_PREPEND_NON_DUPLICATE_IF_EXISTS and + not os.path.exists(value) + ): + comment = f'skip extending {env_name} with not existing ' \ + f'path: {value}' + if _include_comments(): + commands.append( + FORMAT_STR_COMMENT_LINE.format_map({'comment': comment})) + elif type_ == DSV_TYPE_APPEND_NON_DUPLICATE: + commands += _append_unique_value(env_name, value) + else: + commands += _prepend_unique_value(env_name, value) + else: + raise RuntimeError( + 'contains an unknown environment hook type: ' + type_) + return commands + + +env_state = {} + + +def _append_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # append even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional leading separator + extend = FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + os.pathsep + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': extend + value}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +def _prepend_unique_value(name, value): + global env_state + if name not in env_state: + if os.environ.get(name): + env_state[name] = set(os.environ[name].split(os.pathsep)) + else: + env_state[name] = set() + # prepend even if the variable has not been set yet, in case a shell script sets the + # same variable without the knowledge of this Python script. + # later _remove_ending_separators() will cleanup any unintentional trailing separator + extend = os.pathsep + FORMAT_STR_USE_ENV_VAR.format_map({'name': name}) + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value + extend}) + if value not in env_state[name]: + env_state[name].add(value) + else: + if not _include_comments(): + return [] + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +# generate commands for removing prepended underscores +def _remove_ending_separators(): + # do nothing if the shell extension does not implement the logic + if FORMAT_STR_REMOVE_TRAILING_SEPARATOR is None: + return [] + + global env_state + commands = [] + for name in env_state: + # skip variables that already had values before this script started prepending + if name in os.environ: + continue + commands += [ + FORMAT_STR_REMOVE_LEADING_SEPARATOR.format_map({'name': name}), + FORMAT_STR_REMOVE_TRAILING_SEPARATOR.format_map({'name': name})] + return commands + + +def _set(name, value): + global env_state + env_state[name] = value + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + return [line] + + +def _set_if_unset(name, value): + global env_state + line = FORMAT_STR_SET_ENV_VAR.format_map( + {'name': name, 'value': value}) + if env_state.get(name, os.environ.get(name)): + line = FORMAT_STR_COMMENT_LINE.format_map({'comment': line}) + return [line] + + +if __name__ == '__main__': # pragma: no cover + try: + rc = main() + except RuntimeError as e: + print(str(e), file=sys.stderr) + rc = 1 + sys.exit(rc) diff --git a/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.bash b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.bash new file mode 100644 index 0000000..c524f45 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.bash @@ -0,0 +1,39 @@ +# generated from colcon_bash/shell/template/package.bash.em + +# This script extends the environment for this package. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`/../.." > /dev/null && pwd)" +else + _colcon_package_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh script of this package +_colcon_package_bash_source_script "$_colcon_package_bash_COLCON_CURRENT_PREFIX/share/armor_yolo_detect/package.sh" + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_bash_COLCON_CURRENT_PREFIX" + +# source bash hooks +_colcon_package_bash_source_script "$COLCON_CURRENT_PREFIX/share/armor_yolo_detect/local_setup.bash" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_bash_source_script +unset _colcon_package_bash_COLCON_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.dsv b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.dsv new file mode 100644 index 0000000..b141f8c --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.dsv @@ -0,0 +1,5 @@ +source;share/armor_yolo_detect/local_setup.bash +source;share/armor_yolo_detect/local_setup.dsv +source;share/armor_yolo_detect/local_setup.ps1 +source;share/armor_yolo_detect/local_setup.sh +source;share/armor_yolo_detect/local_setup.zsh diff --git a/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.ps1 b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.ps1 new file mode 100644 index 0000000..65e207e --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.ps1 @@ -0,0 +1,115 @@ +# generated from colcon_powershell/shell/template/package.ps1.em + +# function to append a value to a variable +# which uses colons as separators +# duplicates as well as leading separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_append_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + $_duplicate="" + # start with no values + $_all_values="" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -eq $_value) { + $_duplicate="1" + } + if ($_all_values) { + $_all_values="${_all_values};$_" + } else { + $_all_values="$_" + } + } + } + } + # append only non-duplicates + if (!$_duplicate) { + # avoid leading separator + if ($_all_values) { + $_all_values="${_all_values};${_value}" + } else { + $_all_values="${_value}" + } + } + + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +function colcon_prepend_unique_value { + param ( + $_listname, + $_value + ) + + # get values from variable + if (Test-Path Env:$_listname) { + $_values=(Get-Item env:$_listname).Value + } else { + $_values="" + } + # start with the new value + $_all_values="$_value" + # iterate over existing values in the variable + if ($_values) { + $_values.Split(";") | ForEach { + # not an empty string + if ($_) { + # not a duplicate of _value + if ($_ -ne $_value) { + # keep non-duplicate values + $_all_values="${_all_values};$_" + } + } + } + } + # export the updated variable + Set-Item env:\$_listname -Value "$_all_values" +} + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +function colcon_package_source_powershell_script { + param ( + $_colcon_package_source_powershell_script + ) + # source script with conditional trace output + if (Test-Path $_colcon_package_source_powershell_script) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_package_source_powershell_script'" + } + . "$_colcon_package_source_powershell_script" + } else { + Write-Error "not found: '$_colcon_package_source_powershell_script'" + } +} + + +# a powershell script is able to determine its own path +# the prefix is two levels up from the package specific share directory +$env:COLCON_CURRENT_PREFIX=(Get-Item $PSCommandPath).Directory.Parent.Parent.FullName + +colcon_package_source_powershell_script "$env:COLCON_CURRENT_PREFIX\share/armor_yolo_detect/local_setup.ps1" + +Remove-Item Env:\COLCON_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.sh b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.sh new file mode 100644 index 0000000..6a54caf --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.sh @@ -0,0 +1,86 @@ +# generated from colcon_core/shell/template/package.sh.em + +# This script extends the environment for this package. + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prepend_unique_value_IFS=$IFS + IFS=":" + # start with the new value + _all_values="$_value" + # workaround SH_WORD_SPLIT not being set in zsh + if [ "$(command -v colcon_zsh_convert_to_array)" ]; then + colcon_zsh_convert_to_array _values + fi + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + # restore the field separator + IFS=$_colcon_prepend_unique_value_IFS + unset _colcon_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_package_sh_COLCON_CURRENT_PREFIX="/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_package_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_package_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_package_sh_COLCON_CURRENT_PREFIX + return 1 + fi + COLCON_CURRENT_PREFIX="$_colcon_package_sh_COLCON_CURRENT_PREFIX" +fi +unset _colcon_package_sh_COLCON_CURRENT_PREFIX + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source sh hooks +_colcon_package_sh_source_script "$COLCON_CURRENT_PREFIX/share/armor_yolo_detect/local_setup.sh" + +unset _colcon_package_sh_source_script +unset COLCON_CURRENT_PREFIX + +# do not unset _colcon_prepend_unique_value since it might be used by non-primary shell hooks diff --git a/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.zsh b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.zsh new file mode 100644 index 0000000..e0cc54e --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.zsh @@ -0,0 +1,50 @@ +# generated from colcon_zsh/shell/template/package.zsh.em + +# This script extends the environment for this package. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + # the prefix is two levels up from the package specific share directory + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`/../.." > /dev/null && pwd)" +else + _colcon_package_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +# additional arguments: arguments to the script +_colcon_package_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$@" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +colcon_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# source sh script of this package +_colcon_package_zsh_source_script "$_colcon_package_zsh_COLCON_CURRENT_PREFIX/share/armor_yolo_detect/package.sh" +unset convert_zsh_to_array + +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced scripts +COLCON_CURRENT_PREFIX="$_colcon_package_zsh_COLCON_CURRENT_PREFIX" + +# source zsh hooks +_colcon_package_zsh_source_script "$COLCON_CURRENT_PREFIX/share/armor_yolo_detect/local_setup.zsh" + +unset COLCON_CURRENT_PREFIX + +unset _colcon_package_zsh_source_script +unset _colcon_package_zsh_COLCON_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/colcon-core/packages/armor_yolo_detect b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/colcon-core/packages/armor_yolo_detect new file mode 100644 index 0000000..bd2f51d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/colcon-core/packages/armor_yolo_detect @@ -0,0 +1 @@ +armor_detector:cv_bridge:eigen:fmt:geometry_msgs:image_transport:rclcpp:rclcpp_components:rm_interfaces:rm_utils:sensor_msgs:std_srvs:tf2:tf2_geometry_msgs:tf2_ros:vision_opencv:visualization_msgs \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/install/local_setup.bash b/src/rm_auto_aim/armor_yolo_detect/install/local_setup.bash new file mode 100644 index 0000000..03f0025 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/local_setup.bash @@ -0,0 +1,121 @@ +# generated from colcon_bash/shell/template/prefix.bash.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# a bash script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_bash_COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)" +else + _colcon_prefix_bash_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_bash_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_bash_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + _contained_value="" + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + _contained_value=1 + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + if [ -z "$_contained_value" ]; then + if [ -n "$COLCON_TRACE" ]; then + if [ "$_all_values" = "$_value" ]; then + echo "export $_listname=$_value" + else + echo "export $_listname=$_value:\$$_listname" + fi + fi + fi + unset _contained_value + # restore the field separator + IFS="$_colcon_prefix_bash_prepend_unique_value_IFS" + unset _colcon_prefix_bash_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_bash_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_bash_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_bash_prepend_unique_value + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_bash_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh bash)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "$(declare -f _colcon_prefix_sh_source_script)" + echo "# Execute generated script:" + echo "# <<<" + echo "${_colcon_ordered_commands}" + echo "# >>>" + echo "unset _colcon_prefix_sh_source_script" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_bash_COLCON_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/install/local_setup.ps1 b/src/rm_auto_aim/armor_yolo_detect/install/local_setup.ps1 new file mode 100644 index 0000000..6f68c8d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/local_setup.ps1 @@ -0,0 +1,55 @@ +# generated from colcon_powershell/shell/template/prefix.ps1.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# check environment variable for custom Python executable +if ($env:COLCON_PYTHON_EXECUTABLE) { + if (!(Test-Path "$env:COLCON_PYTHON_EXECUTABLE" -PathType Leaf)) { + echo "error: COLCON_PYTHON_EXECUTABLE '$env:COLCON_PYTHON_EXECUTABLE' doesn't exist" + exit 1 + } + $_colcon_python_executable="$env:COLCON_PYTHON_EXECUTABLE" +} else { + # use the Python executable known at configure time + $_colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if (!(Test-Path "$_colcon_python_executable" -PathType Leaf)) { + if (!(Get-Command "python3" -ErrorAction SilentlyContinue)) { + echo "error: unable to find python3 executable" + exit 1 + } + $_colcon_python_executable="python3" + } +} + +# function to source another script with conditional trace output +# first argument: the path of the script +function _colcon_prefix_powershell_source_script { + param ( + $_colcon_prefix_powershell_source_script_param + ) + # source script with conditional trace output + if (Test-Path $_colcon_prefix_powershell_source_script_param) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_prefix_powershell_source_script_param'" + } + . "$_colcon_prefix_powershell_source_script_param" + } else { + Write-Error "not found: '$_colcon_prefix_powershell_source_script_param'" + } +} + +# get all commands in topological order +$_colcon_ordered_commands = & "$_colcon_python_executable" "$(Split-Path $PSCommandPath -Parent)/_local_setup_util_ps1.py" ps1 + +# execute all commands in topological order +if ($env:COLCON_TRACE) { + echo "Execute generated script:" + echo "<<<" + $_colcon_ordered_commands.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | Write-Output + echo ">>>" +} +if ($_colcon_ordered_commands) { + $_colcon_ordered_commands.Split([Environment]::NewLine, [StringSplitOptions]::RemoveEmptyEntries) | Invoke-Expression +} diff --git a/src/rm_auto_aim/armor_yolo_detect/install/local_setup.sh b/src/rm_auto_aim/armor_yolo_detect/install/local_setup.sh new file mode 100644 index 0000000..002929f --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/local_setup.sh @@ -0,0 +1,137 @@ +# generated from colcon_core/shell/template/prefix.sh.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_prefix_sh_COLCON_CURRENT_PREFIX="/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install" +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + if [ ! -d "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_prefix_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_prefix_sh_COLCON_CURRENT_PREFIX + return 1 + fi +else + _colcon_prefix_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_sh_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_sh_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + _contained_value="" + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + _contained_value=1 + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + if [ -z "$_contained_value" ]; then + if [ -n "$COLCON_TRACE" ]; then + if [ "$_all_values" = "$_value" ]; then + echo "export $_listname=$_value" + else + echo "export $_listname=$_value:\$$_listname" + fi + fi + fi + unset _contained_value + # restore the field separator + IFS="$_colcon_prefix_sh_prepend_unique_value_IFS" + unset _colcon_prefix_sh_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_sh_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_sh_prepend_unique_value + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_sh_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "_colcon_prefix_sh_source_script() { + if [ -f \"\$1\" ]; then + if [ -n \"\$COLCON_TRACE\" ]; then + echo \"# . \\\"\$1\\\"\" + fi + . \"\$1\" + else + echo \"not found: \\\"\$1\\\"\" 1>&2 + fi + }" + echo "# Execute generated script:" + echo "# <<<" + echo "${_colcon_ordered_commands}" + echo "# >>>" + echo "unset _colcon_prefix_sh_source_script" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_sh_COLCON_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/install/local_setup.zsh b/src/rm_auto_aim/armor_yolo_detect/install/local_setup.zsh new file mode 100644 index 0000000..b648710 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/local_setup.zsh @@ -0,0 +1,134 @@ +# generated from colcon_zsh/shell/template/prefix.zsh.em + +# This script extends the environment with all packages contained in this +# prefix path. + +# a zsh script is able to determine its own path if necessary +if [ -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_zsh_COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)" +else + _colcon_prefix_zsh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +fi + +# function to convert array-like strings into arrays +# to workaround SH_WORD_SPLIT not being set +_colcon_prefix_zsh_convert_to_array() { + local _listname=$1 + local _dollar="$" + local _split="{=" + local _to_array="(\"$_dollar$_split$_listname}\")" + eval $_listname=$_to_array +} + +# function to prepend a value to a variable +# which uses colons as separators +# duplicates as well as trailing separators are avoided +# first argument: the name of the result variable +# second argument: the value to be prepended +_colcon_prefix_zsh_prepend_unique_value() { + # arguments + _listname="$1" + _value="$2" + + # get values from variable + eval _values=\"\$$_listname\" + # backup the field separator + _colcon_prefix_zsh_prepend_unique_value_IFS="$IFS" + IFS=":" + # start with the new value + _all_values="$_value" + _contained_value="" + # workaround SH_WORD_SPLIT not being set + _colcon_prefix_zsh_convert_to_array _values + # iterate over existing values in the variable + for _item in $_values; do + # ignore empty strings + if [ -z "$_item" ]; then + continue + fi + # ignore duplicates of _value + if [ "$_item" = "$_value" ]; then + _contained_value=1 + continue + fi + # keep non-duplicate values + _all_values="$_all_values:$_item" + done + unset _item + if [ -z "$_contained_value" ]; then + if [ -n "$COLCON_TRACE" ]; then + if [ "$_all_values" = "$_value" ]; then + echo "export $_listname=$_value" + else + echo "export $_listname=$_value:\$$_listname" + fi + fi + fi + unset _contained_value + # restore the field separator + IFS="$_colcon_prefix_zsh_prepend_unique_value_IFS" + unset _colcon_prefix_zsh_prepend_unique_value_IFS + # export the updated variable + eval export $_listname=\"$_all_values\" + unset _all_values + unset _values + + unset _value + unset _listname +} + +# add this prefix to the COLCON_PREFIX_PATH +_colcon_prefix_zsh_prepend_unique_value COLCON_PREFIX_PATH "$_colcon_prefix_zsh_COLCON_CURRENT_PREFIX" +unset _colcon_prefix_zsh_prepend_unique_value +unset _colcon_prefix_zsh_convert_to_array + +# check environment variable for custom Python executable +if [ -n "$COLCON_PYTHON_EXECUTABLE" ]; then + if [ ! -f "$COLCON_PYTHON_EXECUTABLE" ]; then + echo "error: COLCON_PYTHON_EXECUTABLE '$COLCON_PYTHON_EXECUTABLE' doesn't exist" + return 1 + fi + _colcon_python_executable="$COLCON_PYTHON_EXECUTABLE" +else + # try the Python executable known at configure time + _colcon_python_executable="/usr/bin/python3" + # if it doesn't exist try a fall back + if [ ! -f "$_colcon_python_executable" ]; then + if ! /usr/bin/env python3 --version > /dev/null 2> /dev/null; then + echo "error: unable to find python3 executable" + return 1 + fi + _colcon_python_executable=`/usr/bin/env python3 -c "import sys; print(sys.executable)"` + fi +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# get all commands in topological order +_colcon_ordered_commands="$($_colcon_python_executable "$_colcon_prefix_zsh_COLCON_CURRENT_PREFIX/_local_setup_util_sh.py" sh zsh)" +unset _colcon_python_executable +if [ -n "$COLCON_TRACE" ]; then + echo "$(declare -f _colcon_prefix_sh_source_script)" + echo "# Execute generated script:" + echo "# <<<" + echo "${_colcon_ordered_commands}" + echo "# >>>" + echo "unset _colcon_prefix_sh_source_script" +fi +eval "${_colcon_ordered_commands}" +unset _colcon_ordered_commands + +unset _colcon_prefix_sh_source_script + +unset _colcon_prefix_zsh_COLCON_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/install/setup.bash b/src/rm_auto_aim/armor_yolo_detect/install/setup.bash new file mode 100644 index 0000000..10ea0f7 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/setup.bash @@ -0,0 +1,31 @@ +# generated from colcon_bash/shell/template/prefix_chain.bash.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_bash_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/humble" +_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${BASH_SOURCE[0]}"`" > /dev/null && pwd)" +_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash" + +unset COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_bash_source_script diff --git a/src/rm_auto_aim/armor_yolo_detect/install/setup.ps1 b/src/rm_auto_aim/armor_yolo_detect/install/setup.ps1 new file mode 100644 index 0000000..558e9b9 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/setup.ps1 @@ -0,0 +1,29 @@ +# generated from colcon_powershell/shell/template/prefix_chain.ps1.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +function _colcon_prefix_chain_powershell_source_script { + param ( + $_colcon_prefix_chain_powershell_source_script_param + ) + # source script with conditional trace output + if (Test-Path $_colcon_prefix_chain_powershell_source_script_param) { + if ($env:COLCON_TRACE) { + echo ". '$_colcon_prefix_chain_powershell_source_script_param'" + } + . "$_colcon_prefix_chain_powershell_source_script_param" + } else { + Write-Error "not found: '$_colcon_prefix_chain_powershell_source_script_param'" + } +} + +# source chained prefixes +_colcon_prefix_chain_powershell_source_script "/opt/ros/humble\local_setup.ps1" + +# source this prefix +$env:COLCON_CURRENT_PREFIX=(Split-Path $PSCommandPath -Parent) +_colcon_prefix_chain_powershell_source_script "$env:COLCON_CURRENT_PREFIX\local_setup.ps1" diff --git a/src/rm_auto_aim/armor_yolo_detect/install/setup.sh b/src/rm_auto_aim/armor_yolo_detect/install/setup.sh new file mode 100644 index 0000000..d356593 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/setup.sh @@ -0,0 +1,45 @@ +# generated from colcon_core/shell/template/prefix_chain.sh.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# since a plain shell script can't determine its own path when being sourced +# either use the provided COLCON_CURRENT_PREFIX +# or fall back to the build time prefix (if it exists) +_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install +if [ ! -z "$COLCON_CURRENT_PREFIX" ]; then + _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX="$COLCON_CURRENT_PREFIX" +elif [ ! -d "$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" ]; then + echo "The build time path \"$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX\" doesn't exist. Either source a script for a different shell or set the environment variable \"COLCON_CURRENT_PREFIX\" explicitly." 1>&2 + unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX + return 1 +fi + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_sh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/humble" +_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" + + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids relying on the build time prefix of the sourced script +COLCON_CURRENT_PREFIX="$_colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX" +_colcon_prefix_chain_sh_source_script "$COLCON_CURRENT_PREFIX/local_setup.sh" + +unset _colcon_prefix_chain_sh_COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_sh_source_script +unset COLCON_CURRENT_PREFIX diff --git a/src/rm_auto_aim/armor_yolo_detect/install/setup.zsh b/src/rm_auto_aim/armor_yolo_detect/install/setup.zsh new file mode 100644 index 0000000..54799fd --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/install/setup.zsh @@ -0,0 +1,31 @@ +# generated from colcon_zsh/shell/template/prefix_chain.zsh.em + +# This script extends the environment with the environment of other prefix +# paths which were sourced when this file was generated as well as all packages +# contained in this prefix path. + +# function to source another script with conditional trace output +# first argument: the path of the script +_colcon_prefix_chain_zsh_source_script() { + if [ -f "$1" ]; then + if [ -n "$COLCON_TRACE" ]; then + echo "# . \"$1\"" + fi + . "$1" + else + echo "not found: \"$1\"" 1>&2 + fi +} + +# source chained prefixes +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="/opt/ros/humble" +_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" + +# source this prefix +# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script +COLCON_CURRENT_PREFIX="$(builtin cd -q "`dirname "${(%):-%N}"`" > /dev/null && pwd)" +_colcon_prefix_chain_zsh_source_script "$COLCON_CURRENT_PREFIX/local_setup.zsh" + +unset COLCON_CURRENT_PREFIX +unset _colcon_prefix_chain_zsh_source_script diff --git a/src/rm_auto_aim/armor_yolo_detect/launch/armor_yolo_detector.launch.py b/src/rm_auto_aim/armor_yolo_detect/launch/armor_yolo_detector.launch.py new file mode 100644 index 0000000..eb1f33f --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/launch/armor_yolo_detector.launch.py @@ -0,0 +1,52 @@ +# Copyright chenyy 2026. Licensed under the MIT License. +# Launch file for armor_yolo_detect node +# +# Copyright (C) FYT Vision Group. All rights reserved. + +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument +from launch.substitutions import LaunchConfiguration +from launch_ros.actions import Node + + +def generate_launch_description(): + return LaunchDescription([ + # Parameters + DeclareLaunchArgument( + 'conf_threshold', + default_value='0.65', + description='Confidence threshold for detection'), + + DeclareLaunchArgument( + 'nms_threshold', + default_value='0.45', + description='NMS threshold for detection'), + + DeclareLaunchArgument( + 'detect_color', + default_value='0', + description='Detection color: 0=RED, 1=BLUE'), + + DeclareLaunchArgument( + 'debug', + default_value='false', + description='Enable debug mode'), + + # Armor YOLO Detector Node + Node( + package='armor_yolo_detect', + executable='armor_yolo_detector_node', + name='armor_yolo_detector', + output='screen', + parameters=[{ + 'conf_threshold': LaunchConfiguration('conf_threshold'), + 'nms_threshold': LaunchConfiguration('nms_threshold'), + 'detect_color': LaunchConfiguration('detect_color'), + 'debug': LaunchConfiguration('debug'), + }], + remappings=[ + ('image_raw', '/hik_camera/image_raw'), + ('camera_info', '/hik_camera/camera_info'), + ], + ), + ]) diff --git a/src/rm_auto_aim/armor_yolo_detect/log/COLCON_IGNORE b/src/rm_auto_aim/armor_yolo_detect/log/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/command.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/command.log new file mode 100644 index 0000000..8d15667 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/command.log @@ -0,0 +1,4 @@ +Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect -DAMENT_CMAKE_SYMLINK_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect +Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '0': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect -DAMENT_CMAKE_SYMLINK_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect +Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stderr.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stderr.log new file mode 100644 index 0000000..1e5618d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stderr.log @@ -0,0 +1,24 @@ +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +gmake[2]: *** Waiting for unfinished jobs.... +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory + 35 | #include  + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +gmake[1]: *** Waiting for unfinished jobs.... +gmake: *** [Makefile:146: all] Error 2 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stdout.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stdout.log new file mode 100644 index 0000000..aa2b813 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stdout.log @@ -0,0 +1,52 @@ +-- The C compiler identification is GNU 11.4.0 +-- The CXX compiler identification is GNU 11.4.0 +-- Detecting C compiler ABI info +-- Detecting C compiler ABI info - done +-- Check for working C compiler: /usr/bin/cc - skipped +-- Detecting C compile features +-- Detecting C compile features - done +-- Detecting CXX compiler ABI info +-- Detecting CXX compiler ABI info - done +-- Check for working CXX compiler: /usr/bin/c++ - skipped +-- Detecting CXX compile features +-- Detecting CXX compile features - done +-- Found ament_cmake_auto: 1.3.12 (/opt/ros/humble/share/ament_cmake_auto/cmake) +-- Found Python3: /usr/bin/python3 (found version "3.10.12") found components: Interpreter +-- Override CMake install command with custom implementation using symlinks instead of copying resources +-- Found OpenCV: /usr (found version "4.5.4") +-- Found rosidl_generator_c: 3.1.7 (/opt/ros/humble/share/rosidl_generator_c/cmake) +-- Found rosidl_adapter: 3.1.7 (/opt/ros/humble/share/rosidl_adapter/cmake) +-- Found rosidl_generator_cpp: 3.1.7 (/opt/ros/humble/share/rosidl_generator_cpp/cmake) +-- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c +-- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp +-- Found rmw_implementation_cmake: 6.1.2 (/opt/ros/humble/share/rmw_implementation_cmake/cmake) +-- Found rmw_fastrtps_cpp: 6.2.9 (/opt/ros/humble/share/rmw_fastrtps_cpp/cmake) +-- Found OpenSSL: /usr/lib/aarch64-linux-gnu/libcrypto.so (found version "3.0.2") +-- Found FastRTPS: /opt/ros/humble/include +-- Using RMW implementation 'rmw_fastrtps_cpp' as default +-- Looking for pthread.h +-- Looking for pthread.h - found +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success +-- Found Threads: TRUE +-- Found eigen3_cmake_module: 0.1.1 (/opt/ros/humble/share/eigen3_cmake_module/cmake) +-- Found Eigen3: TRUE (found version "3.4.0") +-- Ensuring Eigen3 include directory is part of orocos-kdl CMake target +-- Found CUDA: /usr/local/cuda-12.6 (found version "12.6") +-- Found ament_lint_auto: 0.12.14 (/opt/ros/humble/share/ament_lint_auto/cmake) +-- Added test 'cppcheck' to perform static code analysis on C / C++ code +-- Configured cppcheck include dirs: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include +-- Configured cppcheck exclude dirs and/or files: +-- Added test 'flake8' to check Python code syntax and style conventions +-- Added test 'pep257' to check Python code against some of the docstring style conventions in PEP 257 +-- Added test 'xmllint' to check XML markup files +-- Configuring done +-- Generating done +-- Build files have been written to: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect +[ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o +[ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[ 55%] Building CXX object CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o +[ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +[ 66%] Linking CXX executable armor_yolo_detector_node +[ 66%] Built target armor_yolo_detector_node diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stdout_stderr.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stdout_stderr.log new file mode 100644 index 0000000..ec90440 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/stdout_stderr.log @@ -0,0 +1,76 @@ +-- The C compiler identification is GNU 11.4.0 +-- The CXX compiler identification is GNU 11.4.0 +-- Detecting C compiler ABI info +-- Detecting C compiler ABI info - done +-- Check for working C compiler: /usr/bin/cc - skipped +-- Detecting C compile features +-- Detecting C compile features - done +-- Detecting CXX compiler ABI info +-- Detecting CXX compiler ABI info - done +-- Check for working CXX compiler: /usr/bin/c++ - skipped +-- Detecting CXX compile features +-- Detecting CXX compile features - done +-- Found ament_cmake_auto: 1.3.12 (/opt/ros/humble/share/ament_cmake_auto/cmake) +-- Found Python3: /usr/bin/python3 (found version "3.10.12") found components: Interpreter +-- Override CMake install command with custom implementation using symlinks instead of copying resources +-- Found OpenCV: /usr (found version "4.5.4") +-- Found rosidl_generator_c: 3.1.7 (/opt/ros/humble/share/rosidl_generator_c/cmake) +-- Found rosidl_adapter: 3.1.7 (/opt/ros/humble/share/rosidl_adapter/cmake) +-- Found rosidl_generator_cpp: 3.1.7 (/opt/ros/humble/share/rosidl_generator_cpp/cmake) +-- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c +-- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp +-- Found rmw_implementation_cmake: 6.1.2 (/opt/ros/humble/share/rmw_implementation_cmake/cmake) +-- Found rmw_fastrtps_cpp: 6.2.9 (/opt/ros/humble/share/rmw_fastrtps_cpp/cmake) +-- Found OpenSSL: /usr/lib/aarch64-linux-gnu/libcrypto.so (found version "3.0.2") +-- Found FastRTPS: /opt/ros/humble/include +-- Using RMW implementation 'rmw_fastrtps_cpp' as default +-- Looking for pthread.h +-- Looking for pthread.h - found +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD +-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success +-- Found Threads: TRUE +-- Found eigen3_cmake_module: 0.1.1 (/opt/ros/humble/share/eigen3_cmake_module/cmake) +-- Found Eigen3: TRUE (found version "3.4.0") +-- Ensuring Eigen3 include directory is part of orocos-kdl CMake target +-- Found CUDA: /usr/local/cuda-12.6 (found version "12.6") +-- Found ament_lint_auto: 0.12.14 (/opt/ros/humble/share/ament_lint_auto/cmake) +-- Added test 'cppcheck' to perform static code analysis on C / C++ code +-- Configured cppcheck include dirs: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include +-- Configured cppcheck exclude dirs and/or files: +-- Added test 'flake8' to check Python code syntax and style conventions +-- Added test 'pep257' to check Python code against some of the docstring style conventions in PEP 257 +-- Added test 'xmllint' to check XML markup files +-- Configuring done +-- Generating done +-- Build files have been written to: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect +[ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o +[ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[ 55%] Building CXX object CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o +[ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +gmake[2]: *** Waiting for unfinished jobs.... +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory + 35 | #include  + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +gmake[1]: *** Waiting for unfinished jobs.... +[ 66%] Linking CXX executable armor_yolo_detector_node +[ 66%] Built target armor_yolo_detector_node +gmake: *** [Makefile:146: all] Error 2 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/streams.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/streams.log new file mode 100644 index 0000000..2ee1d08 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/armor_yolo_detect/streams.log @@ -0,0 +1,80 @@ +[0.016s] Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect -DAMENT_CMAKE_SYMLINK_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect +[0.191s] -- The C compiler identification is GNU 11.4.0 +[0.356s] -- The CXX compiler identification is GNU 11.4.0 +[0.385s] -- Detecting C compiler ABI info +[0.514s] -- Detecting C compiler ABI info - done +[0.539s] -- Check for working C compiler: /usr/bin/cc - skipped +[0.540s] -- Detecting C compile features +[0.542s] -- Detecting C compile features - done +[0.554s] -- Detecting CXX compiler ABI info +[0.704s] -- Detecting CXX compiler ABI info - done +[0.730s] -- Check for working CXX compiler: /usr/bin/c++ - skipped +[0.731s] -- Detecting CXX compile features +[0.732s] -- Detecting CXX compile features - done +[0.747s] -- Found ament_cmake_auto: 1.3.12 (/opt/ros/humble/share/ament_cmake_auto/cmake) +[1.051s] -- Found Python3: /usr/bin/python3 (found version "3.10.12") found components: Interpreter +[1.183s] -- Override CMake install command with custom implementation using symlinks instead of copying resources +[1.301s] -- Found OpenCV: /usr (found version "4.5.4") +[1.608s] -- Found rosidl_generator_c: 3.1.7 (/opt/ros/humble/share/rosidl_generator_c/cmake) +[1.619s] -- Found rosidl_adapter: 3.1.7 (/opt/ros/humble/share/rosidl_adapter/cmake) +[1.639s] -- Found rosidl_generator_cpp: 3.1.7 (/opt/ros/humble/share/rosidl_generator_cpp/cmake) +[1.681s] -- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c +[1.733s] -- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp +[1.845s] -- Found rmw_implementation_cmake: 6.1.2 (/opt/ros/humble/share/rmw_implementation_cmake/cmake) +[1.851s] -- Found rmw_fastrtps_cpp: 6.2.9 (/opt/ros/humble/share/rmw_fastrtps_cpp/cmake) +[2.038s] -- Found OpenSSL: /usr/lib/aarch64-linux-gnu/libcrypto.so (found version "3.0.2") +[2.103s] -- Found FastRTPS: /opt/ros/humble/include +[2.180s] -- Using RMW implementation 'rmw_fastrtps_cpp' as default +[2.200s] -- Looking for pthread.h +[2.340s] -- Looking for pthread.h - found +[2.341s] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD +[2.485s] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success +[2.489s] -- Found Threads: TRUE +[3.095s] -- Found eigen3_cmake_module: 0.1.1 (/opt/ros/humble/share/eigen3_cmake_module/cmake) +[3.098s] -- Found Eigen3: TRUE (found version "3.4.0") +[3.098s] -- Ensuring Eigen3 include directory is part of orocos-kdl CMake target +[3.181s] -- Found CUDA: /usr/local/cuda-12.6 (found version "12.6") +[3.198s] -- Found ament_lint_auto: 0.12.14 (/opt/ros/humble/share/ament_lint_auto/cmake) +[3.269s] -- Added test 'cppcheck' to perform static code analysis on C / C++ code +[3.269s] -- Configured cppcheck include dirs: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include +[3.270s] -- Configured cppcheck exclude dirs and/or files: +[3.273s] -- Added test 'flake8' to check Python code syntax and style conventions +[3.275s] -- Added test 'pep257' to check Python code against some of the docstring style conventions in PEP 257 +[3.278s] -- Added test 'xmllint' to check XML markup files +[3.285s] -- Configuring done +[3.337s] -- Generating done +[3.353s] -- Build files have been written to: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect +[3.380s] Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '0': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect -DAMENT_CMAKE_SYMLINK_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect +[3.385s] Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[3.482s] [ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[3.482s] [ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o +[3.482s] [ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[3.482s] [ 55%] Building CXX object CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o +[3.482s] [ 55%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +[4.014s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, +[4.014s] from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +[4.014s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory +[4.015s] 33 | #include "armor_detector/types.hpp" +[4.015s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[4.015s] compilation terminated. +[4.018s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +[4.018s] gmake[2]: *** Waiting for unfinished jobs.... +[4.035s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +[4.035s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory +[4.035s] 35 | #include  +[4.036s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[4.036s] compilation terminated. +[4.039s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +[4.054s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, +[4.054s] from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +[4.054s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory +[4.054s] 33 | #include "armor_detector/types.hpp" +[4.054s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[4.054s] compilation terminated. +[4.058s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +[4.260s] gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +[4.261s] gmake[1]: *** Waiting for unfinished jobs.... +[9.325s] [ 66%] Linking CXX executable armor_yolo_detector_node +[9.561s] [ 66%] Built target armor_yolo_detector_node +[9.563s] gmake: *** [Makefile:146: all] Error 2 +[9.568s] Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/events.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/events.log new file mode 100644 index 0000000..bce04b2 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/events.log @@ -0,0 +1,182 @@ +[0.000000] (-) TimerEvent: {} +[0.001176] (armor_yolo_detect) JobQueued: {'identifier': 'armor_yolo_detect', 'dependencies': OrderedDict()} +[0.001326] (armor_yolo_detect) JobStarted: {'identifier': 'armor_yolo_detect'} +[0.012215] (armor_yolo_detect) JobProgress: {'identifier': 'armor_yolo_detect', 'progress': 'cmake'} +[0.013063] (armor_yolo_detect) Command: {'cmd': ['/usr/bin/cmake', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect', '-DAMENT_CMAKE_SYMLINK_INSTALL=1', '-DCMAKE_INSTALL_PREFIX=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect'], 'cwd': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', 'env': OrderedDict([('PYTHON_BASIC_REPL', '1'), ('LESSOPEN', '| /usr/bin/lesspipe %s'), ('USER', 'jetson'), ('SSH_CLIENT', '192.168.55.100 53335 22'), ('HOST_IP', '192.168.137.1'), ('XDG_SESSION_TYPE', 'tty'), ('ALLUSERSPROFILE', '/opt/MVS/MVFG'), ('GIT_ASKPASS', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass.sh'), ('SHLVL', '2'), ('LD_LIBRARY_PATH', '/usr/lib/aarch64-linux-gnu:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/usr/lib/aarch64-linux-gnu:/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:'), ('BROWSER', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/helpers/browser.sh'), ('MOTD_SHOWN', 'pam'), ('HOME', '/home/jetson'), ('OLDPWD', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect'), ('TERM_PROGRAM_VERSION', '1.109.5'), ('VSCODE_IPC_HOOK_CLI', '/run/user/1000/vscode-ipc-9ca582ca-bec3-4d27-acb3-1cf948467768.sock'), ('JETSON_L4T', '36.4.3'), ('ROS_PYTHON_VERSION', '3'), ('JETSON_MODEL', 'NVIDIA Jetson Orin NX Engineering Reference Developer Kit'), ('VSCODE_GIT_ASKPASS_MAIN', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass-main.js'), ('VSCODE_GIT_ASKPASS_NODE', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/node'), ('PYDEVD_DISABLE_FILE_VALIDATION', '1'), ('BUNDLED_DEBUGPY_PATH', '/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy'), ('VSCODE_PYTHON_AUTOACTIVATE_GUARD', '1'), ('DBUS_SESSION_BUS_ADDRESS', 'unix:path=/run/user/1000/bus'), ('COLORTERM', 'truecolor'), ('PROXY_PORT', '7897'), ('ROS_DISTRO', 'humble'), ('LOGNAME', 'jetson'), ('JETSON_MODULE', 'NVIDIA Jetson Orin NX (16GB ram)'), ('JETSON_SERIAL_NUMBER', '1424124405174'), ('_', '/usr/bin/colcon'), ('ROS_VERSION', '2'), ('CLAUDE_CODE_SSE_PORT', '11605'), ('XDG_SESSION_CLASS', 'user'), ('TERM', 'xterm-256color'), ('XDG_SESSION_ID', '3'), ('ROS_LOCALHOST_ONLY', '0'), ('HISTCONTROL', 'ignorespace'), ('MVCAM_SDK_PATH', '/opt/MVS'), ('PATH', '/usr/local/cuda-12.6/bin:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommand:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/copilotCli:/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/remote-cli:/home/jetson/.local/bin:/opt/ros/humble/bin:/usr/local/cuda-12.6/bin:/home/jetson/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts'), ('MVCAM_GENICAM_CLPROTOCOL', '/opt/MVS/lib/CLProtocol'), ('XDG_RUNTIME_DIR', '/run/user/1000'), ('VSCODE_DEBUGPY_ADAPTER_ENDPOINTS', '/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/.noConfigDebugAdapterEndpoints/endpoint-d806d2c66a18b771.txt'), ('LANG', 'en_US.UTF-8'), ('PYTHONSTARTUP', '/home/jetson/.vscode-server/data/User/workspaceStorage/edf2b0fe7eee56be60d1cc0e08e02635/ms-python.python/pythonrc.py'), ('LS_COLORS', 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'), ('JETSON_SOC', 'tegra234'), ('VSCODE_GIT_IPC_HANDLE', '/run/user/1000/vscode-git-61503dfdd6.sock'), ('TERM_PROGRAM', 'vscode'), ('AMENT_PREFIX_PATH', '/opt/ros/humble'), ('SHELL', '/bin/bash'), ('LESSCLOSE', '/usr/bin/lesspipe %s %s'), ('VSCODE_GIT_ASKPASS_EXTRA_ARGS', ''), ('GIT_PAGER', 'cat'), ('JETSON_CUDA_ARCH_BIN', '8.7'), ('PWD', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect'), ('SSH_CONNECTION', '192.168.55.100 53335 192.168.55.1 22'), ('XDG_DATA_DIRS', '/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop'), ('PYTHONPATH', '/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages'), ('COLCON', '1'), ('JETSON_JETPACK', '6.2'), ('MVCAM_COMMON_RUNENV', '/opt/MVS/lib'), ('JETSON_P_NUMBER', 'p3767-0000'), ('CMAKE_PREFIX_PATH', '/opt/ros/humble')]), 'shell': False} +[0.099301] (-) TimerEvent: {} +[0.191816] (armor_yolo_detect) StdoutLine: {'line': b'-- The C compiler identification is GNU 11.4.0\n'} +[0.199432] (-) TimerEvent: {} +[0.300099] (-) TimerEvent: {} +[0.356507] (armor_yolo_detect) StdoutLine: {'line': b'-- The CXX compiler identification is GNU 11.4.0\n'} +[0.385628] (armor_yolo_detect) StdoutLine: {'line': b'-- Detecting C compiler ABI info\n'} +[0.400219] (-) TimerEvent: {} +[0.501023] (-) TimerEvent: {} +[0.515421] (armor_yolo_detect) StdoutLine: {'line': b'-- Detecting C compiler ABI info - done\n'} +[0.540205] (armor_yolo_detect) StdoutLine: {'line': b'-- Check for working C compiler: /usr/bin/cc - skipped\n'} +[0.541655] (armor_yolo_detect) StdoutLine: {'line': b'-- Detecting C compile features\n'} +[0.543409] (armor_yolo_detect) StdoutLine: {'line': b'-- Detecting C compile features - done\n'} +[0.555445] (armor_yolo_detect) StdoutLine: {'line': b'-- Detecting CXX compiler ABI info\n'} +[0.601211] (-) TimerEvent: {} +[0.702224] (-) TimerEvent: {} +[0.704837] (armor_yolo_detect) StdoutLine: {'line': b'-- Detecting CXX compiler ABI info - done\n'} +[0.730822] (armor_yolo_detect) StdoutLine: {'line': b'-- Check for working CXX compiler: /usr/bin/c++ - skipped\n'} +[0.731779] (armor_yolo_detect) StdoutLine: {'line': b'-- Detecting CXX compile features\n'} +[0.733334] (armor_yolo_detect) StdoutLine: {'line': b'-- Detecting CXX compile features - done\n'} +[0.748058] (armor_yolo_detect) StdoutLine: {'line': b'-- Found ament_cmake_auto: 1.3.12 (/opt/ros/humble/share/ament_cmake_auto/cmake)\n'} +[0.802339] (-) TimerEvent: {} +[0.902889] (-) TimerEvent: {} +[1.003479] (-) TimerEvent: {} +[1.052260] (armor_yolo_detect) StdoutLine: {'line': b'-- Found Python3: /usr/bin/python3 (found version "3.10.12") found components: Interpreter \n'} +[1.103619] (-) TimerEvent: {} +[1.184013] (armor_yolo_detect) StdoutLine: {'line': b'-- Override CMake install command with custom implementation using symlinks instead of copying resources\n'} +[1.203781] (-) TimerEvent: {} +[1.302137] (armor_yolo_detect) StdoutLine: {'line': b'-- Found OpenCV: /usr (found version "4.5.4") \n'} +[1.303880] (-) TimerEvent: {} +[1.404394] (-) TimerEvent: {} +[1.505015] (-) TimerEvent: {} +[1.605823] (-) TimerEvent: {} +[1.608849] (armor_yolo_detect) StdoutLine: {'line': b'-- Found rosidl_generator_c: 3.1.7 (/opt/ros/humble/share/rosidl_generator_c/cmake)\n'} +[1.620141] (armor_yolo_detect) StdoutLine: {'line': b'-- Found rosidl_adapter: 3.1.7 (/opt/ros/humble/share/rosidl_adapter/cmake)\n'} +[1.640514] (armor_yolo_detect) StdoutLine: {'line': b'-- Found rosidl_generator_cpp: 3.1.7 (/opt/ros/humble/share/rosidl_generator_cpp/cmake)\n'} +[1.681943] (armor_yolo_detect) StdoutLine: {'line': b'-- Using all available rosidl_typesupport_c: rosidl_typesupport_fastrtps_c;rosidl_typesupport_introspection_c\n'} +[1.705971] (-) TimerEvent: {} +[1.733710] (armor_yolo_detect) StdoutLine: {'line': b'-- Using all available rosidl_typesupport_cpp: rosidl_typesupport_fastrtps_cpp;rosidl_typesupport_introspection_cpp\n'} +[1.806111] (-) TimerEvent: {} +[1.845616] (armor_yolo_detect) StdoutLine: {'line': b'-- Found rmw_implementation_cmake: 6.1.2 (/opt/ros/humble/share/rmw_implementation_cmake/cmake)\n'} +[1.852414] (armor_yolo_detect) StdoutLine: {'line': b'-- Found rmw_fastrtps_cpp: 6.2.9 (/opt/ros/humble/share/rmw_fastrtps_cpp/cmake)\n'} +[1.906298] (-) TimerEvent: {} +[2.006996] (-) TimerEvent: {} +[2.039380] (armor_yolo_detect) StdoutLine: {'line': b'-- Found OpenSSL: /usr/lib/aarch64-linux-gnu/libcrypto.so (found version "3.0.2") \n'} +[2.104554] (armor_yolo_detect) StdoutLine: {'line': b'-- Found FastRTPS: /opt/ros/humble/include \n'} +[2.107065] (-) TimerEvent: {} +[2.180983] (armor_yolo_detect) StdoutLine: {'line': b"-- Using RMW implementation 'rmw_fastrtps_cpp' as default\n"} +[2.201638] (armor_yolo_detect) StdoutLine: {'line': b'-- Looking for pthread.h\n'} +[2.207154] (-) TimerEvent: {} +[2.307611] (-) TimerEvent: {} +[2.341258] (armor_yolo_detect) StdoutLine: {'line': b'-- Looking for pthread.h - found\n'} +[2.341913] (armor_yolo_detect) StdoutLine: {'line': b'-- Performing Test CMAKE_HAVE_LIBC_PTHREAD\n'} +[2.407802] (-) TimerEvent: {} +[2.486275] (armor_yolo_detect) StdoutLine: {'line': b'-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success\n'} +[2.490191] (armor_yolo_detect) StdoutLine: {'line': b'-- Found Threads: TRUE \n'} +[2.507903] (-) TimerEvent: {} +[2.608499] (-) TimerEvent: {} +[2.709044] (-) TimerEvent: {} +[2.809722] (-) TimerEvent: {} +[2.910451] (-) TimerEvent: {} +[3.011073] (-) TimerEvent: {} +[3.096525] (armor_yolo_detect) StdoutLine: {'line': b'-- Found eigen3_cmake_module: 0.1.1 (/opt/ros/humble/share/eigen3_cmake_module/cmake)\n'} +[3.098908] (armor_yolo_detect) StdoutLine: {'line': b'-- Found Eigen3: TRUE (found version "3.4.0") \n'} +[3.099135] (armor_yolo_detect) StdoutLine: {'line': b'-- Ensuring Eigen3 include directory is part of orocos-kdl CMake target\n'} +[3.111155] (-) TimerEvent: {} +[3.182477] (armor_yolo_detect) StdoutLine: {'line': b'-- Found CUDA: /usr/local/cuda-12.6 (found version "12.6") \n'} +[3.198805] (armor_yolo_detect) StdoutLine: {'line': b'-- Found ament_lint_auto: 0.12.14 (/opt/ros/humble/share/ament_lint_auto/cmake)\n'} +[3.211267] (-) TimerEvent: {} +[3.270200] (armor_yolo_detect) StdoutLine: {'line': b"-- Added test 'cppcheck' to perform static code analysis on C / C++ code\n"} +[3.270668] (armor_yolo_detect) StdoutLine: {'line': b'-- Configured cppcheck include dirs: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include;/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include\n'} +[3.270829] (armor_yolo_detect) StdoutLine: {'line': b'-- Configured cppcheck exclude dirs and/or files: \n'} +[3.273794] (armor_yolo_detect) StdoutLine: {'line': b"-- Added test 'flake8' to check Python code syntax and style conventions\n"} +[3.276228] (armor_yolo_detect) StdoutLine: {'line': b"-- Added test 'pep257' to check Python code against some of the docstring style conventions in PEP 257\n"} +[3.278794] (armor_yolo_detect) StdoutLine: {'line': b"-- Added test 'xmllint' to check XML markup files\n"} +[3.285832] (armor_yolo_detect) StdoutLine: {'line': b'-- Configuring done\n'} +[3.311373] (-) TimerEvent: {} +[3.338596] (armor_yolo_detect) StdoutLine: {'line': b'-- Generating done\n'} +[3.353900] (armor_yolo_detect) StdoutLine: {'line': b'-- Build files have been written to: /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect\n'} +[3.380990] (armor_yolo_detect) CommandEnded: {'returncode': 0} +[3.382357] (armor_yolo_detect) JobProgress: {'identifier': 'armor_yolo_detect', 'progress': 'build'} +[3.383861] (armor_yolo_detect) Command: {'cmd': ['/usr/bin/cmake', '--build', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', '--', '-j8', '-l8'], 'cwd': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', 'env': OrderedDict([('PYTHON_BASIC_REPL', '1'), ('LESSOPEN', '| /usr/bin/lesspipe %s'), ('USER', 'jetson'), ('SSH_CLIENT', '192.168.55.100 53335 22'), ('HOST_IP', '192.168.137.1'), ('XDG_SESSION_TYPE', 'tty'), ('ALLUSERSPROFILE', '/opt/MVS/MVFG'), ('GIT_ASKPASS', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass.sh'), ('SHLVL', '2'), ('LD_LIBRARY_PATH', '/usr/lib/aarch64-linux-gnu:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/usr/lib/aarch64-linux-gnu:/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:'), ('BROWSER', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/helpers/browser.sh'), ('MOTD_SHOWN', 'pam'), ('HOME', '/home/jetson'), ('OLDPWD', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect'), ('TERM_PROGRAM_VERSION', '1.109.5'), ('VSCODE_IPC_HOOK_CLI', '/run/user/1000/vscode-ipc-9ca582ca-bec3-4d27-acb3-1cf948467768.sock'), ('JETSON_L4T', '36.4.3'), ('ROS_PYTHON_VERSION', '3'), ('JETSON_MODEL', 'NVIDIA Jetson Orin NX Engineering Reference Developer Kit'), ('VSCODE_GIT_ASKPASS_MAIN', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass-main.js'), ('VSCODE_GIT_ASKPASS_NODE', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/node'), ('PYDEVD_DISABLE_FILE_VALIDATION', '1'), ('BUNDLED_DEBUGPY_PATH', '/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy'), ('VSCODE_PYTHON_AUTOACTIVATE_GUARD', '1'), ('DBUS_SESSION_BUS_ADDRESS', 'unix:path=/run/user/1000/bus'), ('COLORTERM', 'truecolor'), ('PROXY_PORT', '7897'), ('ROS_DISTRO', 'humble'), ('LOGNAME', 'jetson'), ('JETSON_MODULE', 'NVIDIA Jetson Orin NX (16GB ram)'), ('JETSON_SERIAL_NUMBER', '1424124405174'), ('_', '/usr/bin/colcon'), ('ROS_VERSION', '2'), ('CLAUDE_CODE_SSE_PORT', '11605'), ('XDG_SESSION_CLASS', 'user'), ('TERM', 'xterm-256color'), ('XDG_SESSION_ID', '3'), ('ROS_LOCALHOST_ONLY', '0'), ('HISTCONTROL', 'ignorespace'), ('MVCAM_SDK_PATH', '/opt/MVS'), ('PATH', '/usr/local/cuda-12.6/bin:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommand:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/copilotCli:/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/remote-cli:/home/jetson/.local/bin:/opt/ros/humble/bin:/usr/local/cuda-12.6/bin:/home/jetson/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts'), ('MVCAM_GENICAM_CLPROTOCOL', '/opt/MVS/lib/CLProtocol'), ('XDG_RUNTIME_DIR', '/run/user/1000'), ('VSCODE_DEBUGPY_ADAPTER_ENDPOINTS', '/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/.noConfigDebugAdapterEndpoints/endpoint-d806d2c66a18b771.txt'), ('LANG', 'en_US.UTF-8'), ('PYTHONSTARTUP', '/home/jetson/.vscode-server/data/User/workspaceStorage/edf2b0fe7eee56be60d1cc0e08e02635/ms-python.python/pythonrc.py'), ('LS_COLORS', 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'), ('JETSON_SOC', 'tegra234'), ('VSCODE_GIT_IPC_HANDLE', '/run/user/1000/vscode-git-61503dfdd6.sock'), ('TERM_PROGRAM', 'vscode'), ('AMENT_PREFIX_PATH', '/opt/ros/humble'), ('SHELL', '/bin/bash'), ('LESSCLOSE', '/usr/bin/lesspipe %s %s'), ('VSCODE_GIT_ASKPASS_EXTRA_ARGS', ''), ('GIT_PAGER', 'cat'), ('JETSON_CUDA_ARCH_BIN', '8.7'), ('PWD', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect'), ('SSH_CONNECTION', '192.168.55.100 53335 192.168.55.1 22'), ('XDG_DATA_DIRS', '/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop'), ('PYTHONPATH', '/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages'), ('COLCON', '1'), ('JETSON_JETPACK', '6.2'), ('MVCAM_COMMON_RUNENV', '/opt/MVS/lib'), ('JETSON_P_NUMBER', 'p3767-0000'), ('CMAKE_PREFIX_PATH', '/opt/ros/humble')]), 'shell': False} +[3.411536] (-) TimerEvent: {} +[3.482636] (armor_yolo_detect) StdoutLine: {'line': b'[ 55%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o\x1b[0m\n'} +[3.483196] (armor_yolo_detect) StdoutLine: {'line': b'[ 55%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/trt_logger.cpp.o\x1b[0m\n'} +[3.483334] (armor_yolo_detect) StdoutLine: {'line': b'[ 55%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o\x1b[0m\n'} +[3.483454] (armor_yolo_detect) StdoutLine: {'line': b'[ 55%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detector_node.dir/rclcpp_components/node_main_armor_yolo_detector_node.cpp.o\x1b[0m\n'} +[3.483565] (armor_yolo_detect) StdoutLine: {'line': b'[ 55%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o\x1b[0m\n'} +[3.511730] (-) TimerEvent: {} +[3.612418] (-) TimerEvent: {} +[3.713031] (-) TimerEvent: {} +[3.813672] (-) TimerEvent: {} +[3.914331] (-) TimerEvent: {} +[4.014898] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27\x1b[m\x1b[K,\n'} +[4.015369] (-) TimerEvent: {} +[4.015622] (armor_yolo_detect) StderrLine: {'line': b' from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18\x1b[m\x1b[K:\n'} +[4.015781] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Karmor_detector/types.hpp: No such file or directory\n'} +[4.015913] (armor_yolo_detect) StderrLine: {'line': b' 33 | #include \x1b[01;31m\x1b[K"armor_detector/types.hpp"\x1b[m\x1b[K\n'} +[4.016011] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[4.016101] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[4.019468] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1\n'} +[4.019741] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** Waiting for unfinished jobs....\n'} +[4.036319] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18\x1b[m\x1b[K:\n'} +[4.036695] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Krm_interfaces/msg/armors.hpp: No such file or directory\n'} +[4.036813] (armor_yolo_detect) StderrLine: {'line': b' 35 | #include \x1b[01;31m\x1b[K\x1b[m\x1b[K\n'} +[4.036908] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[4.036995] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[4.039914] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1\n'} +[4.054939] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31\x1b[m\x1b[K,\n'} +[4.055294] (armor_yolo_detect) StderrLine: {'line': b' from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4\x1b[m\x1b[K:\n'} +[4.055409] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Karmor_detector/types.hpp: No such file or directory\n'} +[4.055510] (armor_yolo_detect) StderrLine: {'line': b' 33 | #include \x1b[01;31m\x1b[K"armor_detector/types.hpp"\x1b[m\x1b[K\n'} +[4.055601] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[4.055687] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[4.059682] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1\n'} +[4.115544] (-) TimerEvent: {} +[4.216165] (-) TimerEvent: {} +[4.261365] (armor_yolo_detect) StderrLine: {'line': b'gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2\n'} +[4.261904] (armor_yolo_detect) StderrLine: {'line': b'gmake[1]: *** Waiting for unfinished jobs....\n'} +[4.316332] (-) TimerEvent: {} +[4.417063] (-) TimerEvent: {} +[4.517858] (-) TimerEvent: {} +[4.618630] (-) TimerEvent: {} +[4.719415] (-) TimerEvent: {} +[4.820203] (-) TimerEvent: {} +[4.920997] (-) TimerEvent: {} +[5.021855] (-) TimerEvent: {} +[5.122648] (-) TimerEvent: {} +[5.223297] (-) TimerEvent: {} +[5.324055] (-) TimerEvent: {} +[5.424741] (-) TimerEvent: {} +[5.525739] (-) TimerEvent: {} +[5.626548] (-) TimerEvent: {} +[5.727547] (-) TimerEvent: {} +[5.828346] (-) TimerEvent: {} +[5.929093] (-) TimerEvent: {} +[6.030156] (-) TimerEvent: {} +[6.130955] (-) TimerEvent: {} +[6.231756] (-) TimerEvent: {} +[6.332795] (-) TimerEvent: {} +[6.433588] (-) TimerEvent: {} +[6.534405] (-) TimerEvent: {} +[6.635202] (-) TimerEvent: {} +[6.735974] (-) TimerEvent: {} +[6.836736] (-) TimerEvent: {} +[6.937529] (-) TimerEvent: {} +[7.038350] (-) TimerEvent: {} +[7.139117] (-) TimerEvent: {} +[7.239889] (-) TimerEvent: {} +[7.340669] (-) TimerEvent: {} +[7.441487] (-) TimerEvent: {} +[7.542252] (-) TimerEvent: {} +[7.643015] (-) TimerEvent: {} +[7.743797] (-) TimerEvent: {} +[7.844566] (-) TimerEvent: {} +[7.945341] (-) TimerEvent: {} +[8.046143] (-) TimerEvent: {} +[8.146937] (-) TimerEvent: {} +[8.247703] (-) TimerEvent: {} +[8.348333] (-) TimerEvent: {} +[8.448969] (-) TimerEvent: {} +[8.549864] (-) TimerEvent: {} +[8.650521] (-) TimerEvent: {} +[8.751176] (-) TimerEvent: {} +[8.851820] (-) TimerEvent: {} +[8.952446] (-) TimerEvent: {} +[9.053056] (-) TimerEvent: {} +[9.153687] (-) TimerEvent: {} +[9.254289] (-) TimerEvent: {} +[9.325916] (armor_yolo_detect) StdoutLine: {'line': b'[ 66%] \x1b[32m\x1b[1mLinking CXX executable armor_yolo_detector_node\x1b[0m\n'} +[9.354444] (-) TimerEvent: {} +[9.455045] (-) TimerEvent: {} +[9.555728] (-) TimerEvent: {} +[9.561939] (armor_yolo_detect) StdoutLine: {'line': b'[ 66%] Built target armor_yolo_detector_node\n'} +[9.564435] (armor_yolo_detect) StderrLine: {'line': b'gmake: *** [Makefile:146: all] Error 2\n'} +[9.568721] (armor_yolo_detect) CommandEnded: {'returncode': 2} +[9.584110] (armor_yolo_detect) JobEnded: {'identifier': 'armor_yolo_detect', 'rc': 2} +[9.595016] (-) EventReactorShutdown: {} diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/logger_all.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/logger_all.log new file mode 100644 index 0000000..de5fdaf --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-01-33/logger_all.log @@ -0,0 +1,80 @@ +[0.170s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'build', '--symlink-install', '--packages-select', 'armor_yolo_detect'] +[0.171s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='build', build_base='build', install_base='install', merge_install=False, symlink_install=True, test_result_base=None, continue_on_error=False, executor='parallel', parallel_workers=8, event_handlers=None, ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=None, packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=['armor_yolo_detect'], packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, allow_overriding=[], cmake_args=None, cmake_target=None, cmake_target_skip_unavailable=False, cmake_clean_cache=False, cmake_clean_first=False, cmake_force_configure=False, ament_cmake_args=None, catkin_cmake_args=None, catkin_skip_building_tests=False, verb_parser=, verb_extension=, main=>) +[0.441s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters +[0.441s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters +[0.441s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters +[0.441s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters +[0.441s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover +[0.441s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover +[0.441s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.442s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install'] +[0.442s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore' +[0.442s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install' +[0.442s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg'] +[0.442s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg' +[0.442s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta'] +[0.442s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta' +[0.443s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros'] +[0.443s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros' +[0.466s] DEBUG:colcon.colcon_core.package_identification:Package '.' with type 'ros.ament_cmake' and name 'armor_yolo_detect' +[0.466s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults +[0.466s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover +[0.466s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults +[0.466s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover +[0.466s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults +[0.524s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) check parameters +[0.524s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) discover +[0.528s] DEBUG:colcon.colcon_installed_package_information.package_discovery:Found 290 installed packages in /opt/ros/humble +[0.530s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) using defaults +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_args' from command line to 'None' +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_target' from command line to 'None' +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_target_skip_unavailable' from command line to 'False' +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_clean_cache' from command line to 'False' +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_clean_first' from command line to 'False' +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_force_configure' from command line to 'False' +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'ament_cmake_args' from command line to 'None' +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'catkin_cmake_args' from command line to 'None' +[0.590s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'catkin_skip_building_tests' from command line to 'False' +[0.590s] DEBUG:colcon.colcon_core.verb:Building package 'armor_yolo_detect' with the following arguments: {'ament_cmake_args': None, 'build_base': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', 'catkin_cmake_args': None, 'catkin_skip_building_tests': False, 'cmake_args': None, 'cmake_clean_cache': False, 'cmake_clean_first': False, 'cmake_force_configure': False, 'cmake_target': None, 'cmake_target_skip_unavailable': False, 'install_base': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect', 'merge_install': False, 'path': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect', 'symlink_install': True, 'test_result_base': None} +[0.590s] INFO:colcon.colcon_core.executor:Executing jobs using 'parallel' executor +[0.593s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete +[0.593s] INFO:colcon.colcon_ros.task.ament_cmake.build:Building ROS package in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' with build type 'ament_cmake' +[0.593s] INFO:colcon.colcon_cmake.task.cmake.build:Building CMake package in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.597s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_core.shell.bat': Not used on non-Windows systems +[0.597s] INFO:colcon.colcon_core.shell:Skip shell extension 'powershell' for command environment: Not usable outside of PowerShell +[0.597s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'dsv' for command environment +[0.611s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect -DAMENT_CMAKE_SYMLINK_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect +[3.974s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '0': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect -DAMENT_CMAKE_SYMLINK_INSTALL=1 -DCMAKE_INSTALL_PREFIX=/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect +[3.979s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[10.162s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[10.163s] Level 1:colcon.colcon_core.environment:create_environment_scripts_only(armor_yolo_detect) +[10.167s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect' for CMake module files +[10.167s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect' for CMake config files +[10.168s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/bin' +[10.168s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/lib/pkgconfig/armor_yolo_detect.pc' +[10.169s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/lib/python3.10/site-packages' +[10.169s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/bin' +[10.170s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.ps1' +[10.171s] INFO:colcon.colcon_core.shell:Creating package descriptor '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.dsv' +[10.172s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.sh' +[10.173s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.bash' +[10.175s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.zsh' +[10.176s] Level 1:colcon.colcon_core.environment:create_file_with_runtime_dependencies(/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/colcon-core/packages/armor_yolo_detect) +[10.187s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:closing loop +[10.187s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:loop closed +[10.187s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete finished with '2' +[10.187s] DEBUG:colcon.colcon_core.event_reactor:joining thread +[10.196s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.terminal_notifier': Not used on non-Darwin systems +[10.197s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.win32': Not used on non-Windows systems +[10.197s] INFO:colcon.colcon_notification.desktop_notification:Sending desktop notification using 'notify2' +[10.222s] DEBUG:colcon.colcon_core.event_reactor:joined thread +[10.222s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.ps1' +[10.224s] INFO:colcon.colcon_core.shell:Creating prefix util module '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_ps1.py' +[10.226s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.ps1' +[10.228s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.sh' +[10.229s] INFO:colcon.colcon_core.shell:Creating prefix util module '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_sh.py' +[10.230s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.sh' +[10.231s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.bash' +[10.232s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.bash' +[10.233s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.zsh' +[10.234s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.zsh' diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/command.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/command.log new file mode 100644 index 0000000..6a4076d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/command.log @@ -0,0 +1,2 @@ +Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stderr.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stderr.log new file mode 100644 index 0000000..043fd00 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stderr.log @@ -0,0 +1,23 @@ +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +gmake[2]: *** Waiting for unfinished jobs.... +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory + 35 | #include  + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +gmake: *** [Makefile:146: all] Error 2 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stdout.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stdout.log new file mode 100644 index 0000000..584fa94 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stdout.log @@ -0,0 +1,6 @@ +Consolidate compiler generated dependencies of target armor_yolo_detect +Consolidate compiler generated dependencies of target armor_yolo_detector_node +[ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +[ 33%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[ 55%] Built target armor_yolo_detector_node diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stdout_stderr.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stdout_stderr.log new file mode 100644 index 0000000..7946aad --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/stdout_stderr.log @@ -0,0 +1,29 @@ +Consolidate compiler generated dependencies of target armor_yolo_detect +Consolidate compiler generated dependencies of target armor_yolo_detector_node +[ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +[ 33%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[ 55%] Built target armor_yolo_detector_node +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +gmake[2]: *** Waiting for unfinished jobs.... +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory + 35 | #include  + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +gmake: *** [Makefile:146: all] Error 2 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/streams.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/streams.log new file mode 100644 index 0000000..54f27c9 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/armor_yolo_detect/streams.log @@ -0,0 +1,31 @@ +[0.019s] Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[0.091s] Consolidate compiler generated dependencies of target armor_yolo_detect +[0.092s] Consolidate compiler generated dependencies of target armor_yolo_detector_node +[0.111s] [ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[0.111s] [ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +[0.111s] [ 33%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[0.121s] [ 55%] Built target armor_yolo_detector_node +[0.540s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, +[0.540s] from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +[0.540s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory +[0.541s] 33 | #include "armor_detector/types.hpp" +[0.541s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[0.541s] compilation terminated. +[0.551s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +[0.551s] gmake[2]: *** Waiting for unfinished jobs.... +[0.569s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +[0.569s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory +[0.569s] 35 | #include  +[0.569s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[0.569s] compilation terminated. +[0.573s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +[0.623s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, +[0.624s] from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +[0.624s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory +[0.624s] 33 | #include "armor_detector/types.hpp" +[0.624s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[0.625s] compilation terminated. +[0.628s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +[0.628s] gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +[0.629s] gmake: *** [Makefile:146: all] Error 2 +[0.636s] Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/events.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/events.log new file mode 100644 index 0000000..d6218a4 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/events.log @@ -0,0 +1,44 @@ +[0.000000] (-) TimerEvent: {} +[0.000652] (armor_yolo_detect) JobQueued: {'identifier': 'armor_yolo_detect', 'dependencies': OrderedDict()} +[0.000787] (armor_yolo_detect) JobStarted: {'identifier': 'armor_yolo_detect'} +[0.012081] (armor_yolo_detect) JobProgress: {'identifier': 'armor_yolo_detect', 'progress': 'cmake'} +[0.014374] (armor_yolo_detect) JobProgress: {'identifier': 'armor_yolo_detect', 'progress': 'build'} +[0.014547] (armor_yolo_detect) Command: {'cmd': ['/usr/bin/cmake', '--build', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', '--', '-j8', '-l8'], 'cwd': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', 'env': OrderedDict([('PYTHON_BASIC_REPL', '1'), ('LESSOPEN', '| /usr/bin/lesspipe %s'), ('USER', 'jetson'), ('SSH_CLIENT', '192.168.55.100 53335 22'), ('HOST_IP', '192.168.137.1'), ('XDG_SESSION_TYPE', 'tty'), ('ALLUSERSPROFILE', '/opt/MVS/MVFG'), ('GIT_ASKPASS', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass.sh'), ('SHLVL', '2'), ('LD_LIBRARY_PATH', '/usr/lib/aarch64-linux-gnu:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/usr/lib/aarch64-linux-gnu:/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:'), ('BROWSER', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/helpers/browser.sh'), ('MOTD_SHOWN', 'pam'), ('HOME', '/home/jetson'), ('OLDPWD', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect'), ('TERM_PROGRAM_VERSION', '1.109.5'), ('VSCODE_IPC_HOOK_CLI', '/run/user/1000/vscode-ipc-9ca582ca-bec3-4d27-acb3-1cf948467768.sock'), ('JETSON_L4T', '36.4.3'), ('ROS_PYTHON_VERSION', '3'), ('JETSON_MODEL', 'NVIDIA Jetson Orin NX Engineering Reference Developer Kit'), ('VSCODE_GIT_ASKPASS_MAIN', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass-main.js'), ('VSCODE_GIT_ASKPASS_NODE', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/node'), ('PYDEVD_DISABLE_FILE_VALIDATION', '1'), ('BUNDLED_DEBUGPY_PATH', '/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy'), ('VSCODE_PYTHON_AUTOACTIVATE_GUARD', '1'), ('DBUS_SESSION_BUS_ADDRESS', 'unix:path=/run/user/1000/bus'), ('COLORTERM', 'truecolor'), ('PROXY_PORT', '7897'), ('ROS_DISTRO', 'humble'), ('LOGNAME', 'jetson'), ('JETSON_MODULE', 'NVIDIA Jetson Orin NX (16GB ram)'), ('JETSON_SERIAL_NUMBER', '1424124405174'), ('_', '/usr/bin/colcon'), ('ROS_VERSION', '2'), ('CLAUDE_CODE_SSE_PORT', '11605'), ('XDG_SESSION_CLASS', 'user'), ('TERM', 'xterm-256color'), ('XDG_SESSION_ID', '3'), ('ROS_LOCALHOST_ONLY', '0'), ('HISTCONTROL', 'ignorespace'), ('MVCAM_SDK_PATH', '/opt/MVS'), ('PATH', '/usr/local/cuda-12.6/bin:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommand:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/copilotCli:/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/remote-cli:/home/jetson/.local/bin:/opt/ros/humble/bin:/usr/local/cuda-12.6/bin:/home/jetson/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts'), ('MVCAM_GENICAM_CLPROTOCOL', '/opt/MVS/lib/CLProtocol'), ('XDG_RUNTIME_DIR', '/run/user/1000'), ('VSCODE_DEBUGPY_ADAPTER_ENDPOINTS', '/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/.noConfigDebugAdapterEndpoints/endpoint-d806d2c66a18b771.txt'), ('LANG', 'en_US.UTF-8'), ('PYTHONSTARTUP', '/home/jetson/.vscode-server/data/User/workspaceStorage/edf2b0fe7eee56be60d1cc0e08e02635/ms-python.python/pythonrc.py'), ('LS_COLORS', 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'), ('JETSON_SOC', 'tegra234'), ('VSCODE_GIT_IPC_HANDLE', '/run/user/1000/vscode-git-61503dfdd6.sock'), ('TERM_PROGRAM', 'vscode'), ('AMENT_PREFIX_PATH', '/opt/ros/humble'), ('SHELL', '/bin/bash'), ('LESSCLOSE', '/usr/bin/lesspipe %s %s'), ('VSCODE_GIT_ASKPASS_EXTRA_ARGS', ''), ('GIT_PAGER', 'cat'), ('JETSON_CUDA_ARCH_BIN', '8.7'), ('PWD', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect'), ('SSH_CONNECTION', '192.168.55.100 53335 192.168.55.1 22'), ('XDG_DATA_DIRS', '/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop'), ('PYTHONPATH', '/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages'), ('COLCON', '1'), ('JETSON_JETPACK', '6.2'), ('MVCAM_COMMON_RUNENV', '/opt/MVS/lib'), ('JETSON_P_NUMBER', 'p3767-0000'), ('CMAKE_PREFIX_PATH', '/opt/ros/humble')]), 'shell': False} +[0.091874] (armor_yolo_detect) StdoutLine: {'line': b'\x1b[35m\x1b[1mConsolidate compiler generated dependencies of target armor_yolo_detect\x1b[0m\n'} +[0.092455] (armor_yolo_detect) StdoutLine: {'line': b'\x1b[35m\x1b[1mConsolidate compiler generated dependencies of target armor_yolo_detector_node\x1b[0m\n'} +[0.098657] (-) TimerEvent: {} +[0.111269] (armor_yolo_detect) StdoutLine: {'line': b'[ 22%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o\x1b[0m\n'} +[0.111740] (armor_yolo_detect) StdoutLine: {'line': b'[ 22%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o\x1b[0m\n'} +[0.111956] (armor_yolo_detect) StdoutLine: {'line': b'[ 33%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o\x1b[0m\n'} +[0.121550] (armor_yolo_detect) StdoutLine: {'line': b'[ 55%] Built target armor_yolo_detector_node\n'} +[0.198864] (-) TimerEvent: {} +[0.299509] (-) TimerEvent: {} +[0.400153] (-) TimerEvent: {} +[0.500778] (-) TimerEvent: {} +[0.540641] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27\x1b[m\x1b[K,\n'} +[0.541120] (armor_yolo_detect) StderrLine: {'line': b' from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18\x1b[m\x1b[K:\n'} +[0.541240] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Karmor_detector/types.hpp: No such file or directory\n'} +[0.541347] (armor_yolo_detect) StderrLine: {'line': b' 33 | #include \x1b[01;31m\x1b[K"armor_detector/types.hpp"\x1b[m\x1b[K\n'} +[0.541442] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[0.541547] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[0.551649] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1\n'} +[0.551995] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** Waiting for unfinished jobs....\n'} +[0.569383] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18\x1b[m\x1b[K:\n'} +[0.569787] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Krm_interfaces/msg/armors.hpp: No such file or directory\n'} +[0.569901] (armor_yolo_detect) StderrLine: {'line': b' 35 | #include \x1b[01;31m\x1b[K\x1b[m\x1b[K\n'} +[0.569997] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[0.570086] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[0.573685] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1\n'} +[0.600856] (-) TimerEvent: {} +[0.623857] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31\x1b[m\x1b[K,\n'} +[0.624387] (armor_yolo_detect) StderrLine: {'line': b' from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4\x1b[m\x1b[K:\n'} +[0.624643] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Karmor_detector/types.hpp: No such file or directory\n'} +[0.624883] (armor_yolo_detect) StderrLine: {'line': b' 33 | #include \x1b[01;31m\x1b[K"armor_detector/types.hpp"\x1b[m\x1b[K\n'} +[0.625104] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[0.625315] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[0.628372] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1\n'} +[0.629021] (armor_yolo_detect) StderrLine: {'line': b'gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2\n'} +[0.629764] (armor_yolo_detect) StderrLine: {'line': b'gmake: *** [Makefile:146: all] Error 2\n'} +[0.636428] (armor_yolo_detect) CommandEnded: {'returncode': 2} +[0.666924] (armor_yolo_detect) JobEnded: {'identifier': 'armor_yolo_detect', 'rc': 2} +[0.678146] (-) EventReactorShutdown: {} diff --git a/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/logger_all.log b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/logger_all.log new file mode 100644 index 0000000..4ca820e --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/build_2026-03-23_01-02-08/logger_all.log @@ -0,0 +1,78 @@ +[0.177s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'build', '--symlink-install', '--packages-up-to', 'armor_yolo_detect'] +[0.177s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='build', build_base='build', install_base='install', merge_install=False, symlink_install=True, test_result_base=None, continue_on_error=False, executor='parallel', parallel_workers=8, event_handlers=None, ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=['armor_yolo_detect'], packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=None, packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, allow_overriding=[], cmake_args=None, cmake_target=None, cmake_target_skip_unavailable=False, cmake_clean_cache=False, cmake_clean_first=False, cmake_force_configure=False, ament_cmake_args=None, catkin_cmake_args=None, catkin_skip_building_tests=False, verb_parser=, verb_extension=, main=>) +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover +[0.447s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover +[0.447s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.447s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install'] +[0.447s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore' +[0.447s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install' +[0.447s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg'] +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg' +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta'] +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta' +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros'] +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros' +[0.471s] DEBUG:colcon.colcon_core.package_identification:Package '.' with type 'ros.ament_cmake' and name 'armor_yolo_detect' +[0.471s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults +[0.472s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover +[0.472s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults +[0.472s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover +[0.472s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults +[0.529s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) check parameters +[0.529s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) discover +[0.533s] DEBUG:colcon.colcon_installed_package_information.package_discovery:Found 290 installed packages in /opt/ros/humble +[0.535s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) using defaults +[0.594s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_args' from command line to 'None' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_target' from command line to 'None' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_target_skip_unavailable' from command line to 'False' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_clean_cache' from command line to 'False' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_clean_first' from command line to 'False' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_force_configure' from command line to 'False' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'ament_cmake_args' from command line to 'None' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'catkin_cmake_args' from command line to 'None' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'catkin_skip_building_tests' from command line to 'False' +[0.595s] DEBUG:colcon.colcon_core.verb:Building package 'armor_yolo_detect' with the following arguments: {'ament_cmake_args': None, 'build_base': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', 'catkin_cmake_args': None, 'catkin_skip_building_tests': False, 'cmake_args': None, 'cmake_clean_cache': False, 'cmake_clean_first': False, 'cmake_force_configure': False, 'cmake_target': None, 'cmake_target_skip_unavailable': False, 'install_base': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect', 'merge_install': False, 'path': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect', 'symlink_install': True, 'test_result_base': None} +[0.595s] INFO:colcon.colcon_core.executor:Executing jobs using 'parallel' executor +[0.597s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete +[0.597s] INFO:colcon.colcon_ros.task.ament_cmake.build:Building ROS package in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' with build type 'ament_cmake' +[0.598s] INFO:colcon.colcon_cmake.task.cmake.build:Building CMake package in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.601s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_core.shell.bat': Not used on non-Windows systems +[0.602s] INFO:colcon.colcon_core.shell:Skip shell extension 'powershell' for command environment: Not usable outside of PowerShell +[0.602s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'dsv' for command environment +[0.617s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[1.235s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[1.237s] Level 1:colcon.colcon_core.environment:create_environment_scripts_only(armor_yolo_detect) +[1.245s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect' for CMake module files +[1.246s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect' for CMake config files +[1.248s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/bin' +[1.248s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/lib/pkgconfig/armor_yolo_detect.pc' +[1.249s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/lib/python3.10/site-packages' +[1.250s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/bin' +[1.251s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.ps1' +[1.254s] INFO:colcon.colcon_core.shell:Creating package descriptor '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.dsv' +[1.256s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.sh' +[1.258s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.bash' +[1.261s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.zsh' +[1.263s] Level 1:colcon.colcon_core.environment:create_file_with_runtime_dependencies(/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/colcon-core/packages/armor_yolo_detect) +[1.275s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:closing loop +[1.275s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:loop closed +[1.275s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete finished with '2' +[1.276s] DEBUG:colcon.colcon_core.event_reactor:joining thread +[1.293s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.terminal_notifier': Not used on non-Darwin systems +[1.294s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.win32': Not used on non-Windows systems +[1.294s] INFO:colcon.colcon_notification.desktop_notification:Sending desktop notification using 'notify2' +[1.327s] DEBUG:colcon.colcon_core.event_reactor:joined thread +[1.328s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.ps1' +[1.332s] INFO:colcon.colcon_core.shell:Creating prefix util module '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_ps1.py' +[1.338s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.ps1' +[1.341s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.sh' +[1.343s] INFO:colcon.colcon_core.shell:Creating prefix util module '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_sh.py' +[1.345s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.sh' +[1.349s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.bash' +[1.350s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.bash' +[1.354s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.zsh' +[1.356s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.zsh' diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest/logger_all.log b/src/rm_auto_aim/armor_yolo_detect/log/latest/logger_all.log new file mode 100644 index 0000000..3eb699b --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest/logger_all.log @@ -0,0 +1,24 @@ +[0.149s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'list'] +[0.149s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='list', build_base='build', ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=None, packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=None, packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, allow_overriding=[], topological_order=False, names_only=False, paths_only=False, topological_graph=False, topological_graph_dot=False, topological_graph_density=False, topological_graph_legend=False, topological_graph_dot_cluster=False, topological_graph_dot_include_skipped=False, verb_parser=, verb_extension=, main=>) +[0.419s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters +[0.419s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover +[0.420s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.420s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install'] +[0.420s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros' +[0.445s] DEBUG:colcon.colcon_core.package_identification:Package '.' with type 'ros.ament_cmake' and name 'armor_yolo_detect' +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/command.log b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/command.log new file mode 100644 index 0000000..6a4076d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/command.log @@ -0,0 +1,2 @@ +Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stderr.log b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stderr.log new file mode 100644 index 0000000..043fd00 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stderr.log @@ -0,0 +1,23 @@ +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +gmake[2]: *** Waiting for unfinished jobs.... +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory + 35 | #include  + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +gmake: *** [Makefile:146: all] Error 2 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stdout.log b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stdout.log new file mode 100644 index 0000000..584fa94 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stdout.log @@ -0,0 +1,6 @@ +Consolidate compiler generated dependencies of target armor_yolo_detect +Consolidate compiler generated dependencies of target armor_yolo_detector_node +[ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +[ 33%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[ 55%] Built target armor_yolo_detector_node diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stdout_stderr.log b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stdout_stderr.log new file mode 100644 index 0000000..7946aad --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/stdout_stderr.log @@ -0,0 +1,29 @@ +Consolidate compiler generated dependencies of target armor_yolo_detect +Consolidate compiler generated dependencies of target armor_yolo_detector_node +[ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +[ 33%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[ 55%] Built target armor_yolo_detector_node +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +gmake[2]: *** Waiting for unfinished jobs.... +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory + 35 | #include  + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, + from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory + 33 | #include "armor_detector/types.hpp" + | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. +gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +gmake: *** [Makefile:146: all] Error 2 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/streams.log b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/streams.log new file mode 100644 index 0000000..54f27c9 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/armor_yolo_detect/streams.log @@ -0,0 +1,31 @@ +[0.019s] Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[0.091s] Consolidate compiler generated dependencies of target armor_yolo_detect +[0.092s] Consolidate compiler generated dependencies of target armor_yolo_detector_node +[0.111s] [ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o +[0.111s] [ 22%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o +[0.111s] [ 33%] Building CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o +[0.121s] [ 55%] Built target armor_yolo_detector_node +[0.540s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27, +[0.540s] from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18: +[0.540s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory +[0.541s] 33 | #include "armor_detector/types.hpp" +[0.541s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[0.541s] compilation terminated. +[0.551s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1 +[0.551s] gmake[2]: *** Waiting for unfinished jobs.... +[0.569s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18: +[0.569s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10: fatal error: rm_interfaces/msg/armors.hpp: No such file or directory +[0.569s] 35 | #include  +[0.569s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[0.569s] compilation terminated. +[0.573s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1 +[0.623s] In file included from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31, +[0.624s] from /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4: +[0.624s] /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10: fatal error: armor_detector/types.hpp: No such file or directory +[0.624s] 33 | #include "armor_detector/types.hpp" +[0.624s] | ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[0.625s] compilation terminated. +[0.628s] gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1 +[0.628s] gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2 +[0.629s] gmake: *** [Makefile:146: all] Error 2 +[0.636s] Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest_build/events.log b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/events.log new file mode 100644 index 0000000..d6218a4 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/events.log @@ -0,0 +1,44 @@ +[0.000000] (-) TimerEvent: {} +[0.000652] (armor_yolo_detect) JobQueued: {'identifier': 'armor_yolo_detect', 'dependencies': OrderedDict()} +[0.000787] (armor_yolo_detect) JobStarted: {'identifier': 'armor_yolo_detect'} +[0.012081] (armor_yolo_detect) JobProgress: {'identifier': 'armor_yolo_detect', 'progress': 'cmake'} +[0.014374] (armor_yolo_detect) JobProgress: {'identifier': 'armor_yolo_detect', 'progress': 'build'} +[0.014547] (armor_yolo_detect) Command: {'cmd': ['/usr/bin/cmake', '--build', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', '--', '-j8', '-l8'], 'cwd': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', 'env': OrderedDict([('PYTHON_BASIC_REPL', '1'), ('LESSOPEN', '| /usr/bin/lesspipe %s'), ('USER', 'jetson'), ('SSH_CLIENT', '192.168.55.100 53335 22'), ('HOST_IP', '192.168.137.1'), ('XDG_SESSION_TYPE', 'tty'), ('ALLUSERSPROFILE', '/opt/MVS/MVFG'), ('GIT_ASKPASS', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass.sh'), ('SHLVL', '2'), ('LD_LIBRARY_PATH', '/usr/lib/aarch64-linux-gnu:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/usr/lib/aarch64-linux-gnu:/opt/ros/humble/opt/rviz_ogre_vendor/lib:/opt/ros/humble/lib/aarch64-linux-gnu:/opt/ros/humble/lib:/opt/MVS/lib/aarch64:/usr/local/cuda-12.6/lib64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:/opt/MVS/lib/aarch64:'), ('BROWSER', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/helpers/browser.sh'), ('MOTD_SHOWN', 'pam'), ('HOME', '/home/jetson'), ('OLDPWD', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect'), ('TERM_PROGRAM_VERSION', '1.109.5'), ('VSCODE_IPC_HOOK_CLI', '/run/user/1000/vscode-ipc-9ca582ca-bec3-4d27-acb3-1cf948467768.sock'), ('JETSON_L4T', '36.4.3'), ('ROS_PYTHON_VERSION', '3'), ('JETSON_MODEL', 'NVIDIA Jetson Orin NX Engineering Reference Developer Kit'), ('VSCODE_GIT_ASKPASS_MAIN', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/extensions/git/dist/askpass-main.js'), ('VSCODE_GIT_ASKPASS_NODE', '/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/node'), ('PYDEVD_DISABLE_FILE_VALIDATION', '1'), ('BUNDLED_DEBUGPY_PATH', '/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/libs/debugpy'), ('VSCODE_PYTHON_AUTOACTIVATE_GUARD', '1'), ('DBUS_SESSION_BUS_ADDRESS', 'unix:path=/run/user/1000/bus'), ('COLORTERM', 'truecolor'), ('PROXY_PORT', '7897'), ('ROS_DISTRO', 'humble'), ('LOGNAME', 'jetson'), ('JETSON_MODULE', 'NVIDIA Jetson Orin NX (16GB ram)'), ('JETSON_SERIAL_NUMBER', '1424124405174'), ('_', '/usr/bin/colcon'), ('ROS_VERSION', '2'), ('CLAUDE_CODE_SSE_PORT', '11605'), ('XDG_SESSION_CLASS', 'user'), ('TERM', 'xterm-256color'), ('XDG_SESSION_ID', '3'), ('ROS_LOCALHOST_ONLY', '0'), ('HISTCONTROL', 'ignorespace'), ('MVCAM_SDK_PATH', '/opt/MVS'), ('PATH', '/usr/local/cuda-12.6/bin:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/debugCommand:/home/jetson/.vscode-server/data/User/globalStorage/github.copilot-chat/copilotCli:/home/jetson/.vscode-server/bin/072586267e68ece9a47aa43f8c108e0dcbf44622/bin/remote-cli:/home/jetson/.local/bin:/opt/ros/humble/bin:/usr/local/cuda-12.6/bin:/home/jetson/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/bundled/scripts/noConfigScripts'), ('MVCAM_GENICAM_CLPROTOCOL', '/opt/MVS/lib/CLProtocol'), ('XDG_RUNTIME_DIR', '/run/user/1000'), ('VSCODE_DEBUGPY_ADAPTER_ENDPOINTS', '/home/jetson/.vscode-server/extensions/ms-python.debugpy-2025.18.0/.noConfigDebugAdapterEndpoints/endpoint-d806d2c66a18b771.txt'), ('LANG', 'en_US.UTF-8'), ('PYTHONSTARTUP', '/home/jetson/.vscode-server/data/User/workspaceStorage/edf2b0fe7eee56be60d1cc0e08e02635/ms-python.python/pythonrc.py'), ('LS_COLORS', 'rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:'), ('JETSON_SOC', 'tegra234'), ('VSCODE_GIT_IPC_HANDLE', '/run/user/1000/vscode-git-61503dfdd6.sock'), ('TERM_PROGRAM', 'vscode'), ('AMENT_PREFIX_PATH', '/opt/ros/humble'), ('SHELL', '/bin/bash'), ('LESSCLOSE', '/usr/bin/lesspipe %s %s'), ('VSCODE_GIT_ASKPASS_EXTRA_ARGS', ''), ('GIT_PAGER', 'cat'), ('JETSON_CUDA_ARCH_BIN', '8.7'), ('PWD', '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect'), ('SSH_CONNECTION', '192.168.55.100 53335 192.168.55.1 22'), ('XDG_DATA_DIRS', '/usr/share/gnome:/usr/local/share:/usr/share:/var/lib/snapd/desktop'), ('PYTHONPATH', '/opt/ros/humble/lib/python3.10/site-packages:/opt/ros/humble/local/lib/python3.10/dist-packages'), ('COLCON', '1'), ('JETSON_JETPACK', '6.2'), ('MVCAM_COMMON_RUNENV', '/opt/MVS/lib'), ('JETSON_P_NUMBER', 'p3767-0000'), ('CMAKE_PREFIX_PATH', '/opt/ros/humble')]), 'shell': False} +[0.091874] (armor_yolo_detect) StdoutLine: {'line': b'\x1b[35m\x1b[1mConsolidate compiler generated dependencies of target armor_yolo_detect\x1b[0m\n'} +[0.092455] (armor_yolo_detect) StdoutLine: {'line': b'\x1b[35m\x1b[1mConsolidate compiler generated dependencies of target armor_yolo_detector_node\x1b[0m\n'} +[0.098657] (-) TimerEvent: {} +[0.111269] (armor_yolo_detect) StdoutLine: {'line': b'[ 22%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o\x1b[0m\n'} +[0.111740] (armor_yolo_detect) StdoutLine: {'line': b'[ 22%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o\x1b[0m\n'} +[0.111956] (armor_yolo_detect) StdoutLine: {'line': b'[ 33%] \x1b[32mBuilding CXX object CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o\x1b[0m\n'} +[0.121550] (armor_yolo_detect) StdoutLine: {'line': b'[ 55%] Built target armor_yolo_detector_node\n'} +[0.198864] (-) TimerEvent: {} +[0.299509] (-) TimerEvent: {} +[0.400153] (-) TimerEvent: {} +[0.500778] (-) TimerEvent: {} +[0.540641] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector.hpp:27\x1b[m\x1b[K,\n'} +[0.541120] (armor_yolo_detect) StderrLine: {'line': b' from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp:18\x1b[m\x1b[K:\n'} +[0.541240] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Karmor_detector/types.hpp: No such file or directory\n'} +[0.541347] (armor_yolo_detect) StderrLine: {'line': b' 33 | #include \x1b[01;31m\x1b[K"armor_detector/types.hpp"\x1b[m\x1b[K\n'} +[0.541442] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[0.541547] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[0.551649] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:76: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector.cpp.o] Error 1\n'} +[0.551995] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** Waiting for unfinished jobs....\n'} +[0.569383] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp:18\x1b[m\x1b[K:\n'} +[0.569787] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/armor_yolo_detector_node.hpp:35:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Krm_interfaces/msg/armors.hpp: No such file or directory\n'} +[0.569901] (armor_yolo_detect) StderrLine: {'line': b' 35 | #include \x1b[01;31m\x1b[K\x1b[m\x1b[K\n'} +[0.569997] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[0.570086] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[0.573685] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:90: CMakeFiles/armor_yolo_detect.dir/src/armor_yolo_detector_node.cpp.o] Error 1\n'} +[0.600856] (-) TimerEvent: {} +[0.623857] (armor_yolo_detect) StderrLine: {'line': b'In file included from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/yolo_tensorrt.hpp:31\x1b[m\x1b[K,\n'} +[0.624387] (armor_yolo_detect) StderrLine: {'line': b' from \x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp:4\x1b[m\x1b[K:\n'} +[0.624643] (armor_yolo_detect) StderrLine: {'line': b'\x1b[01m\x1b[K/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/include/armor_yolo_detect/types.hpp:33:10:\x1b[m\x1b[K \x1b[01;31m\x1b[Kfatal error: \x1b[m\x1b[Karmor_detector/types.hpp: No such file or directory\n'} +[0.624883] (armor_yolo_detect) StderrLine: {'line': b' 33 | #include \x1b[01;31m\x1b[K"armor_detector/types.hpp"\x1b[m\x1b[K\n'} +[0.625104] (armor_yolo_detect) StderrLine: {'line': b' | \x1b[01;31m\x1b[K^~~~~~~~~~~~~~~~~~~~~~~~~~\x1b[m\x1b[K\n'} +[0.625315] (armor_yolo_detect) StderrLine: {'line': b'compilation terminated.\n'} +[0.628372] (armor_yolo_detect) StderrLine: {'line': b'gmake[2]: *** [CMakeFiles/armor_yolo_detect.dir/build.make:118: CMakeFiles/armor_yolo_detect.dir/src/yolo_tensorrt.cpp.o] Error 1\n'} +[0.629021] (armor_yolo_detect) StderrLine: {'line': b'gmake[1]: *** [CMakeFiles/Makefile2:141: CMakeFiles/armor_yolo_detect.dir/all] Error 2\n'} +[0.629764] (armor_yolo_detect) StderrLine: {'line': b'gmake: *** [Makefile:146: all] Error 2\n'} +[0.636428] (armor_yolo_detect) CommandEnded: {'returncode': 2} +[0.666924] (armor_yolo_detect) JobEnded: {'identifier': 'armor_yolo_detect', 'rc': 2} +[0.678146] (-) EventReactorShutdown: {} diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest_build/logger_all.log b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/logger_all.log new file mode 100644 index 0000000..4ca820e --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest_build/logger_all.log @@ -0,0 +1,78 @@ +[0.177s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'build', '--symlink-install', '--packages-up-to', 'armor_yolo_detect'] +[0.177s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='build', build_base='build', install_base='install', merge_install=False, symlink_install=True, test_result_base=None, continue_on_error=False, executor='parallel', parallel_workers=8, event_handlers=None, ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=['armor_yolo_detect'], packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=None, packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, allow_overriding=[], cmake_args=None, cmake_target=None, cmake_target_skip_unavailable=False, cmake_clean_cache=False, cmake_clean_first=False, cmake_force_configure=False, ament_cmake_args=None, catkin_cmake_args=None, catkin_skip_building_tests=False, verb_parser=, verb_extension=, main=>) +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters +[0.446s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover +[0.447s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover +[0.447s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.447s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install'] +[0.447s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore' +[0.447s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install' +[0.447s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg'] +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg' +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta'] +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta' +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros'] +[0.448s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros' +[0.471s] DEBUG:colcon.colcon_core.package_identification:Package '.' with type 'ros.ament_cmake' and name 'armor_yolo_detect' +[0.471s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults +[0.472s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover +[0.472s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults +[0.472s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover +[0.472s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults +[0.529s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) check parameters +[0.529s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) discover +[0.533s] DEBUG:colcon.colcon_installed_package_information.package_discovery:Found 290 installed packages in /opt/ros/humble +[0.535s] Level 1:colcon.colcon_core.package_discovery:discover_packages(prefix_path) using defaults +[0.594s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_args' from command line to 'None' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_target' from command line to 'None' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_target_skip_unavailable' from command line to 'False' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_clean_cache' from command line to 'False' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_clean_first' from command line to 'False' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'cmake_force_configure' from command line to 'False' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'ament_cmake_args' from command line to 'None' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'catkin_cmake_args' from command line to 'None' +[0.595s] Level 5:colcon.colcon_core.verb:set package 'armor_yolo_detect' build argument 'catkin_skip_building_tests' from command line to 'False' +[0.595s] DEBUG:colcon.colcon_core.verb:Building package 'armor_yolo_detect' with the following arguments: {'ament_cmake_args': None, 'build_base': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect', 'catkin_cmake_args': None, 'catkin_skip_building_tests': False, 'cmake_args': None, 'cmake_clean_cache': False, 'cmake_clean_first': False, 'cmake_force_configure': False, 'cmake_target': None, 'cmake_target_skip_unavailable': False, 'install_base': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect', 'merge_install': False, 'path': '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect', 'symlink_install': True, 'test_result_base': None} +[0.595s] INFO:colcon.colcon_core.executor:Executing jobs using 'parallel' executor +[0.597s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete +[0.597s] INFO:colcon.colcon_ros.task.ament_cmake.build:Building ROS package in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' with build type 'ament_cmake' +[0.598s] INFO:colcon.colcon_cmake.task.cmake.build:Building CMake package in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.601s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_core.shell.bat': Not used on non-Windows systems +[0.602s] INFO:colcon.colcon_core.shell:Skip shell extension 'powershell' for command environment: Not usable outside of PowerShell +[0.602s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'dsv' for command environment +[0.617s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoking command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[1.235s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoked command in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect' returned '2': CMAKE_PREFIX_PATH=/opt/ros/humble /usr/bin/cmake --build /home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/build/armor_yolo_detect -- -j8 -l8 +[1.237s] Level 1:colcon.colcon_core.environment:create_environment_scripts_only(armor_yolo_detect) +[1.245s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect' for CMake module files +[1.246s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect' for CMake config files +[1.248s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/bin' +[1.248s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/lib/pkgconfig/armor_yolo_detect.pc' +[1.249s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/lib/python3.10/site-packages' +[1.250s] Level 1:colcon.colcon_core.environment:checking '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/bin' +[1.251s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.ps1' +[1.254s] INFO:colcon.colcon_core.shell:Creating package descriptor '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.dsv' +[1.256s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.sh' +[1.258s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.bash' +[1.261s] INFO:colcon.colcon_core.shell:Creating package script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/armor_yolo_detect/package.zsh' +[1.263s] Level 1:colcon.colcon_core.environment:create_file_with_runtime_dependencies(/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/armor_yolo_detect/share/colcon-core/packages/armor_yolo_detect) +[1.275s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:closing loop +[1.275s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:loop closed +[1.275s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete finished with '2' +[1.276s] DEBUG:colcon.colcon_core.event_reactor:joining thread +[1.293s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.terminal_notifier': Not used on non-Darwin systems +[1.294s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.win32': Not used on non-Windows systems +[1.294s] INFO:colcon.colcon_notification.desktop_notification:Sending desktop notification using 'notify2' +[1.327s] DEBUG:colcon.colcon_core.event_reactor:joined thread +[1.328s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.ps1' +[1.332s] INFO:colcon.colcon_core.shell:Creating prefix util module '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_ps1.py' +[1.338s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.ps1' +[1.341s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.sh' +[1.343s] INFO:colcon.colcon_core.shell:Creating prefix util module '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/_local_setup_util_sh.py' +[1.345s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.sh' +[1.349s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.bash' +[1.350s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.bash' +[1.354s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/local_setup.zsh' +[1.356s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect/install/setup.zsh' diff --git a/src/rm_auto_aim/armor_yolo_detect/log/latest_list/logger_all.log b/src/rm_auto_aim/armor_yolo_detect/log/latest_list/logger_all.log new file mode 100644 index 0000000..3eb699b --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/latest_list/logger_all.log @@ -0,0 +1,24 @@ +[0.149s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'list'] +[0.149s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='list', build_base='build', ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=None, packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=None, packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, allow_overriding=[], topological_order=False, names_only=False, paths_only=False, topological_graph=False, topological_graph_dot=False, topological_graph_density=False, topological_graph_legend=False, topological_graph_dot_cluster=False, topological_graph_dot_include_skipped=False, verb_parser=, verb_extension=, main=>) +[0.419s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters +[0.419s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover +[0.420s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.420s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install'] +[0.420s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros' +[0.445s] DEBUG:colcon.colcon_core.package_identification:Package '.' with type 'ros.ament_cmake' and name 'armor_yolo_detect' +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults diff --git a/src/rm_auto_aim/armor_yolo_detect/log/list_2026-03-23_01-02-18/logger_all.log b/src/rm_auto_aim/armor_yolo_detect/log/list_2026-03-23_01-02-18/logger_all.log new file mode 100644 index 0000000..fb2390e --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/list_2026-03-23_01-02-18/logger_all.log @@ -0,0 +1,24 @@ +[0.155s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'list'] +[0.155s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='list', build_base='build', ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=None, packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=None, packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, allow_overriding=[], topological_order=False, names_only=False, paths_only=False, topological_graph=False, topological_graph_dot=False, topological_graph_density=False, topological_graph_legend=False, topological_graph_dot_cluster=False, topological_graph_dot_include_skipped=False, verb_parser=, verb_extension=, main=>) +[0.431s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters +[0.431s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters +[0.431s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters +[0.431s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters +[0.431s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover +[0.432s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover +[0.432s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.432s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install'] +[0.432s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore' +[0.432s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install' +[0.432s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg'] +[0.433s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg' +[0.433s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta'] +[0.433s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta' +[0.433s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros'] +[0.433s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros' +[0.456s] DEBUG:colcon.colcon_core.package_identification:Package '.' with type 'ros.ament_cmake' and name 'armor_yolo_detect' +[0.457s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults +[0.457s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover +[0.457s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults +[0.457s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover +[0.457s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults diff --git a/src/rm_auto_aim/armor_yolo_detect/log/list_2026-03-23_01-02-32/logger_all.log b/src/rm_auto_aim/armor_yolo_detect/log/list_2026-03-23_01-02-32/logger_all.log new file mode 100644 index 0000000..3eb699b --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/log/list_2026-03-23_01-02-32/logger_all.log @@ -0,0 +1,24 @@ +[0.149s] DEBUG:colcon:Command line arguments: ['/usr/bin/colcon', 'list'] +[0.149s] DEBUG:colcon:Parsed command line arguments: Namespace(log_base=None, log_level=None, verb_name='list', build_base='build', ignore_user_meta=False, metas=['./colcon.meta'], base_paths=['.'], packages_ignore=None, packages_ignore_regex=None, paths=None, packages_up_to=None, packages_up_to_regex=None, packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_select_by_dep=None, packages_skip_by_dep=None, packages_skip_up_to=None, packages_select_build_failed=False, packages_skip_build_finished=False, packages_select_test_failures=False, packages_skip_test_passed=False, packages_select=None, packages_skip=None, packages_select_regex=None, packages_skip_regex=None, packages_start=None, packages_end=None, allow_overriding=[], topological_order=False, names_only=False, paths_only=False, topological_graph=False, topological_graph_dot=False, topological_graph_density=False, topological_graph_legend=False, topological_graph_dot_cluster=False, topological_graph_dot_include_skipped=False, verb_parser=, verb_extension=, main=>) +[0.419s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) check parameters +[0.419s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) check parameters +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(colcon_meta) discover +[0.420s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) discover +[0.420s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/home/jetson/yq_2026/src/rm_auto_aim/armor_yolo_detect' +[0.420s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ignore', 'ignore_ament_install'] +[0.420s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ignore_ament_install' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_pkg'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_pkg' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['colcon_meta'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'colcon_meta' +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extensions ['ros'] +[0.421s] Level 1:colcon.colcon_core.package_identification:_identify(.) by extension 'ros' +[0.445s] DEBUG:colcon.colcon_core.package_identification:Package '.' with type 'ros.ament_cmake' and name 'armor_yolo_detect' +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(recursive) using defaults +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) discover +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(ignore) using defaults +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) discover +[0.445s] Level 1:colcon.colcon_core.package_discovery:discover_packages(path) using defaults diff --git a/src/rm_auto_aim/armor_yolo_detect/mac_inference/.DS_Store b/src/rm_auto_aim/armor_yolo_detect/mac_inference/.DS_Store new file mode 100644 index 0000000..bd50178 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/mac_inference/.DS_Store differ diff --git a/src/rm_auto_aim/armor_yolo_detect/mac_inference/README.md b/src/rm_auto_aim/armor_yolo_detect/mac_inference/README.md new file mode 100644 index 0000000..2e6d914 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/mac_inference/README.md @@ -0,0 +1,79 @@ +# Mac YOLO Inference Tool + +独立于 ROS2 的 YOLO 装甲板检测推理工具,运行在 Mac 上使用 ONNX Runtime + CoreML 加速。 + +## 模型信息 + +- **网络**: 魔改 YOLOv5 + MobileNetV3 backbone +- **输入**: 640x640x3 RGB +- **输出**: [25200, 23] + - 0-7: 4个关键点 (x1,y1,x2,y2,x3,y3,x4,y4) - 左上角逆时针 + - 8: 置信度 + - 9-12: 颜色分类 (红/蓝/灰/紫) + - 13-22: 数字分类 (G/1/2/3/4/5/O/Bs/Bb/negative) + +## 安装依赖 + +```bash +cd mac_inference +pip install -r requirements.txt +``` + +## 使用方法 + +### 单张图片推理 + +```bash +python yolo_inference.py --image /path/to/image.jpg --model /path/to/model.onnx +``` + +参数说明: +- `--model`: ONNX 模型路径 (默认: `RobotDetectionModel/Model/0526.onnx`) +- `--image`: 输入图片路径 (必填) +- `--output`: 输出图片路径 (默认: `output.jpg`) +- `--conf`: 置信度阈值 (默认: 0.65) +- `--nms`: NMS 阈值 (默认: 0.45) +- `--color`: 检测颜色 0=RED, 1=BLUE (默认: 0) +- `--no-coreml`: 禁用 CoreML 加速 + +### 视频推理 + +```bash +python yolo_inference.py --video /path/to/video.mp4 --model /path/to/model.onnx +``` + +### 调试模式 - 打印原始输出 + +```bash +python yolo_inference.py --image test.jpg --print-raw +``` + +## 输出示例 + +``` +Loading model from: /path/to/model.onnx +Using providers: [('CoreMLExecutionProvider', {...}), 'CPUExecutionProvider'] +Model loaded successfully! + +Inference time: 15.23 ms +Detected 2 objects + +[0] 1 (BLUE) + Confidence: 0.8923 + Raw landmarks (4 keypoints, 左上逆时针): + P0(top_left): (120.50, 85.23) + P1(top_right): (180.45, 87.10) + P2(bottom_right): (178.32, 130.55) + P3(bottom_left): (122.10, 128.40) + Center (mean): (150.34, 107.82) +``` + +## 关键点坐标说明 + +模型输出的 4 个关键点是**绝对图像坐标**(在 640x640 输入尺寸下): +- P0 (top_left): 左上角 +- P1 (top_right): 右上角 +- P2 (bottom_right): 右下角 +- P3 (bottom_left): 左下角 + +注意:如果输入图片尺寸不是 640x640,需要按比例转换。 diff --git a/src/rm_auto_aim/armor_yolo_detect/mac_inference/__pycache__/yolo_inference.cpython-310.pyc b/src/rm_auto_aim/armor_yolo_detect/mac_inference/__pycache__/yolo_inference.cpython-310.pyc new file mode 100644 index 0000000..c401d53 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/mac_inference/__pycache__/yolo_inference.cpython-310.pyc differ diff --git a/src/rm_auto_aim/armor_yolo_detect/mac_inference/output.jpg b/src/rm_auto_aim/armor_yolo_detect/mac_inference/output.jpg new file mode 100644 index 0000000..e085e9a Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/mac_inference/output.jpg differ diff --git a/src/rm_auto_aim/armor_yolo_detect/mac_inference/requirements.txt b/src/rm_auto_aim/armor_yolo_detect/mac_inference/requirements.txt new file mode 100644 index 0000000..97934a8 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/mac_inference/requirements.txt @@ -0,0 +1,4 @@ +# Mac YOLO Inference Dependencies +numpy>=1.21.0 +opencv-python>=4.5.0 +onnxruntime>=1.20.0 diff --git a/src/rm_auto_aim/armor_yolo_detect/mac_inference/run_inference.sh b/src/rm_auto_aim/armor_yolo_detect/mac_inference/run_inference.sh new file mode 100644 index 0000000..b3ec2ea --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/mac_inference/run_inference.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# 快速运行脚本 + +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +MODEL_PATH="/Users/chenyouyuan/cyy_ws/jetson_nx_yolo/RobotDetectionModel/Model/0526.onnx" + +# 默认参数 +IMAGE="" +COLOR=0 + +# 解析参数 +while [[ $# -gt 0 ]]; do + case $1 in + --image) + IMAGE="$2" + shift 2 + ;; + --color) + COLOR="$2" + shift 2 + ;; + --video) + VIDEO="$2" + shift 2 + ;; + *) + echo "Unknown option: $1" + exit 1 + ;; + esac +done + +cd "$SCRIPT_DIR" + +if [ -n "$VIDEO" ]; then + echo "Running video inference: $VIDEO" + python yolo_inference.py --video "$VIDEO" --model "$MODEL_PATH" --color "$COLOR" +elif [ -n "$IMAGE" ]; then + echo "Running image inference: $IMAGE" + python yolo_inference.py --image "$IMAGE" --model "$MODEL_PATH" --color "$COLOR" +else + echo "Usage: ./run_inference.sh --image [--color 0|1]" + echo " ./run_inference.sh --video [--color 0|1]" + exit 1 +fi diff --git a/src/rm_auto_aim/armor_yolo_detect/mac_inference/test.png b/src/rm_auto_aim/armor_yolo_detect/mac_inference/test.png new file mode 100644 index 0000000..5a04b68 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/mac_inference/test.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/mac_inference/yolo_inference.py b/src/rm_auto_aim/armor_yolo_detect/mac_inference/yolo_inference.py new file mode 100644 index 0000000..2856cc2 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/mac_inference/yolo_inference.py @@ -0,0 +1,437 @@ +#!/usr/bin/env python3 +""" +Mac YOLO Inference Tool for armor detection +Independent of ROS2, uses ONNX Runtime with CoreML acceleration +""" + +import argparse +import os +import sys +import time +from dataclasses import dataclass +from enum import Enum +from typing import List, Tuple, Optional + +import cv2 +import numpy as np +import onnxruntime as ort + + +class NumberClass(Enum): + GUARD = 0 # G (哨兵) + ONE = 1 # 1 (一号) + TWO = 2 # 2 (二号) + THREE = 3 # 3 (三号) + FOUR = 4 # 4 (四号) + FIVE = 5 # 5 (五号) + OUTPOST = 6 # O (前哨站) + BASE_SMALL = 7 # Bs (基地小装甲) + BASE_LARGE = 8 # Bb (基地大装甲) + NEGATIVE = 9 # negative + + +NUMBER_LABELS = { + NumberClass.GUARD: "G", + NumberClass.ONE: "1", + NumberClass.TWO: "2", + NumberClass.THREE: "3", + NumberClass.FOUR: "4", + NumberClass.FIVE: "5", + NumberClass.OUTPOST: "O", + NumberClass.BASE_SMALL: "Bs", + NumberClass.BASE_LARGE: "Bb", + NumberClass.NEGATIVE: "negative", +} + + +class ModelColor(Enum): + RED = 0 + BLUE = 1 + GRAY = 2 + PURPLE = 3 + + +COLOR_LABELS = { + ModelColor.RED: "RED", + ModelColor.BLUE: "BLUE", + ModelColor.GRAY: "GRAY", + ModelColor.PURPLE: "PURPLE", +} + + +@dataclass +class YoloObject: + """YOLO detection result""" + landmarks: np.ndarray # 4 keypoints: [x1,y1,x2,y2,x3,y3,x4,y4] 左上逆时针 + label: int # Number class (0-9) + prob: float # Confidence + color_id: int # Color class (0-3) + + +@dataclass +class Armor: + """Armor with 6 landmarks for PnP""" + landmarks_6: np.ndarray # 6 points: [bottom_left, left_center, top_left, top_right, right_center, bottom_right] + center: Tuple[float, float] + armor_type: str # "SMALL" or "LARGE" + number_class: NumberClass + confidence: float + + +def sigmoid(x: np.ndarray) -> np.ndarray: + return 1.0 / (1.0 + np.exp(-x)) + + +def apply_nms(boxes: List[np.ndarray], scores: List[float], iou_threshold: float = 0.45) -> List[int]: + """Apply Non-Maximum Suppression""" + if not boxes: + return [] + + # Sort by score + indices = sorted(range(len(scores)), key=lambda i: scores[i], reverse=True) + + keep = [] + while indices: + current = indices[0] + keep.append(current) + + if len(indices) == 1: + break + + # Calculate IoU with remaining boxes + current_box = boxes[current] + ious = [] + remaining = [] + for idx in indices[1:]: + box = boxes[idx] + # Calculate intersection + x1 = max(current_box[0], box[0]) + y1 = max(current_box[1], box[1]) + x2 = min(current_box[2], box[2]) + y2 = min(current_box[3], box[3]) + + if x2 < x1 or y2 < y1: + ious.append(0.0) + else: + inter_area = (x2 - x1) * (y2 - y1) + current_area = (current_box[2] - current_box[0]) * (current_box[3] - current_box[1]) + box_area = (box[2] - box[0]) * (box[3] - box[1]) + union_area = current_area + box_area - inter_area + ious.append(inter_area / union_area if union_area > 0 else 0.0) + + # Keep boxes with IoU below threshold + indices = [indices[i + 1] for i in range(len(indices) - 1) if ious[i] <= iou_threshold] + + return keep + + +class YoloDetector: + def __init__( + self, + model_path: str, + conf_threshold: float = 0.65, + nms_threshold: float = 0.45, + detect_color: int = 0, # 0=RED, 1=BLUE + use_coreml: bool = True, + ): + """ + Initialize YOLO detector + + Args: + model_path: Path to ONNX model + conf_threshold: Confidence threshold + nms_threshold: NMS threshold + detect_color: 0=RED, 1=BLUE + use_coreml: Use CoreML for acceleration on Mac + """ + self.conf_threshold = conf_threshold + self.nms_threshold = nms_threshold + self.detect_color = detect_color # 0=red, 1=blue + + # Model parameters + self.input_size = (640, 640) + self.num_keypoints = 4 + self.num_color_classes = 4 + self.num_number_classes = 10 # G, 1, 2, 3, 4, 5, O, Bs, Bb, negative + + # Output shape: [25200, 23] - 4 kps + 1 conf + 4 color + 10 number + self.output_rows = 25200 + self.output_cols = 23 + + # Initialize ONNX Runtime + sess_options = ort.SessionOptions() + + if use_coreml and sys.platform == 'darwin': + # Use CoreML for Mac GPU acceleration (disable to avoid float16 type issues) + providers = ['CPUExecutionProvider'] + else: + providers = ['CPUExecutionProvider'] + + print(f"Loading model from: {model_path}") + print(f"Using providers: {providers}") + + self.session = ort.InferenceSession(model_path, sess_options, providers=providers) + + # Get input name + self.input_name = self.session.get_inputs()[0].name + self.output_name = self.session.get_outputs()[0].name + + print(f"Input: {self.input_name}, Output: {self.output_name}") + print("Model loaded successfully!") + + def preprocess(self, img: np.ndarray) -> np.ndarray: + """Preprocess image for model input""" + # Resize + resized = cv2.resize(img, self.input_size) + + # BGR to RGB + rgb = cv2.cvtColor(resized, cv2.COLOR_BGR2RGB) + + # Normalize to [0, 1] + normalized = rgb.astype(np.float32) / 255.0 + + # HWC to CHW + transposed = np.transpose(normalized, (2, 0, 1)) + + # Add batch dimension + batched = np.expand_dims(transposed, axis=0) + + # Convert to float16 for model input + batched = batched.astype(np.float16) + + return batched + + def postprocess(self, output: np.ndarray) -> List[YoloObject]: + """Postprocess model output""" + objects = [] + + # output shape: [1, 25200, 23] or [25200, 23] + if output.ndim == 3: + output = output[0] # Remove batch dimension + + for i in range(self.output_rows): + row = output[i] + + # Get confidence (index 8) + conf = float(sigmoid(row[8])) + if conf < self.conf_threshold: + continue + + # Get color scores (indices 9-12) + color_scores = sigmoid(row[9:13]) + color_id = int(np.argmax(color_scores)) + max_color_score = float(color_scores[color_id]) + + # Filter by detect_color + # 0=RED in detect_color means detect RED, model RED=0, BLUE=1 + if color_id in [2, 3]: # GRAY or PURPLE - skip + continue + if self.detect_color == 0 and color_id == 1: # Want RED but found BLUE + continue + if self.detect_color == 1 and color_id == 0: # Want BLUE but found RED + continue + + # Get number scores (indices 13-22, 10 classes) + num_scores = sigmoid(row[13:23]) + num_id = int(np.argmax(num_scores)) + max_num_score = float(num_scores[num_id]) + + # Create YoloObject + obj = YoloObject( + landmarks=row[0:8].astype(np.float32), + label=num_id, + prob=conf * max_color_score, + color_id=color_id, + ) + objects.append(obj) + + return objects + + def detect(self, img: np.ndarray) -> List[YoloObject]: + """Detect armors in image""" + # Preprocess + input_data = self.preprocess(img) + + # Run inference + outputs = self.session.run([self.output_name], {self.input_name: input_data}) + output = outputs[0] + + # Postprocess + return self.postprocess(output) + + def draw_detection(self, img: np.ndarray, objects: List[YoloObject], draw_landmarks: bool = True) -> np.ndarray: + """Draw detection results on image""" + result = img.copy() + + # Calculate scale factors to map from 640x640 to original image size + orig_h, orig_w = result.shape[:2] + scale_x = orig_w / self.input_size[0] # 640 + scale_y = orig_h / self.input_size[1] # 640 + + for obj in objects: + # Scale landmarks from 640x640 to original image size + landmarks = obj.landmarks.reshape(-1, 2) # 4 points + landmarks_scaled = landmarks * np.array([scale_x, scale_y]) + + # Determine color for drawing + if obj.color_id == 0: # RED + color = (0, 0, 255) + elif obj.color_id == 1: # BLUE + color = (255, 0, 0) + elif obj.color_id == 2: # GRAY + color = (128, 128, 128) + else: # PURPLE + color = (255, 0, 255) + + if draw_landmarks: + # Draw polygon from 4 keypoints + pts = landmarks_scaled.astype(np.int32).reshape((-1, 1, 2)) + cv2.polylines(result, [pts], isClosed=True, color=color, thickness=2) + + # Draw center point + center = np.mean(landmarks_scaled, axis=0).astype(np.int32) + cv2.circle(result, tuple(center), 5, color, -1) + + # Draw label + label = NUMBER_LABELS[NumberClass(obj.label)] + text_color = (0, 255, 0) + cv2.putText(result, f"{label}", tuple(center + np.array([10, -10])), + cv2.FONT_HERSHEY_SIMPLEX, 0.7, text_color, 2) + + # Print keypoint coordinates for debugging + for j, pt in enumerate(landmarks_scaled): + pt_int = tuple(pt.astype(np.int32)) + cv2.putText(result, f"P{j}({pt[0]:.0f},{pt[1]:.0f})", + (pt_int[0], pt_int[1] - 10 - j*15), + cv2.FONT_HERSHEY_SIMPLEX, 0.4, (0, 255, 255), 1) + else: + # Draw bounding box + x_coords = landmarks_scaled[:, 0] + y_coords = landmarks_scaled[:, 1] + x1, y1 = int(x_coords.min()), int(y_coords.min()) + x2, y2 = int(x_coords.max()), int(y_coords.max()) + cv2.rectangle(result, (x1, y1), (x2, y2), color, 2) + + label = NUMBER_LABELS[NumberClass(obj.label)] + cv2.putText(result, f"{label}", (x1, y1 - 10), + cv2.FONT_HERSHEY_SIMPLEX, 0.7, (0, 255, 0), 2) + + return result + + +def main(): + parser = argparse.ArgumentParser(description='YOLO Armor Detection on Mac') + parser.add_argument('--model', type=str, + default='/Users/chenyouyuan/cyy_ws/jetson_nx_yolo/RobotDetectionModel/Model/0526.onnx', + help='Path to ONNX model') + parser.add_argument('--image', type=str, required=True, + help='Path to input image') + parser.add_argument('--output', type=str, default='output.jpg', + help='Path to output image') + parser.add_argument('--conf', type=float, default=0.65, + help='Confidence threshold') + parser.add_argument('--nms', type=float, default=0.45, + help='NMS threshold') + parser.add_argument('--color', type=int, default=0, choices=[0, 1], + help='Detection color: 0=RED, 1=BLUE') + parser.add_argument('--no-coreml', action='store_true', + help='Disable CoreML acceleration') + parser.add_argument('--print-raw', action='store_true', + help='Print raw model output for first detection') + parser.add_argument('--video', type=str, + help='Use video instead of image') + args = parser.parse_args() + + # Initialize detector + detector = YoloDetector( + model_path=args.model, + conf_threshold=args.conf, + nms_threshold=args.nms, + detect_color=args.color, + use_coreml=not args.no_coreml, + ) + + if args.video: + # Video mode + cap = cv2.VideoCapture(args.video) + if not cap.isOpened(): + print(f"Error: Cannot open video {args.video}") + return + + window_name = "YOLO Detection" + cv2.namedWindow(window_name, cv2.WINDOW_NORMAL) + + while True: + ret, frame = cap.read() + if not ret: + break + + # Detect + objects = detector.detect(frame) + + # Draw and display + result = detector.draw_detection(frame, objects) + cv2.imshow(window_name, result) + + # Print detection info + print(f"Detected {len(objects)} objects") + for i, obj in enumerate(objects): + print(f" [{i}] label={NUMBER_LABELS[NumberClass(obj.label)]}, " + f"color={COLOR_LABELS[ModelColor(obj.color_id)]}, " + f"conf={obj.prob:.3f}") + print(f" landmarks: {obj.landmarks}") + + key = cv2.waitKey(1) & 0xFF + if key == ord('q') or key == 27: + break + + cap.release() + cv2.destroyAllWindows() + + else: + # Image mode + img = cv2.imread(args.image) + if img is None: + print(f"Error: Cannot read image {args.image}") + return + + # Detect + start_time = time.time() + objects = detector.detect(img) + elapsed = time.time() - start_time + + # Draw + result = detector.draw_detection(img, objects) + + # Save output + cv2.imwrite(args.output, result) + print(f"\nSaved result to {args.output}") + + # Print detection info + print(f"\nInference time: {elapsed*1000:.2f} ms") + print(f"Detected {len(objects)} objects") + + for i, obj in enumerate(objects): + print(f"\n[{i}] {NUMBER_LABELS[NumberClass(obj.label)]} ({COLOR_LABELS[ModelColor(obj.color_id)]})") + print(f" Confidence: {obj.prob:.4f}") + print(f" Raw landmarks (4 keypoints, 左上逆时针):") + print(f" P0(top_left): ({obj.landmarks[0]:.2f}, {obj.landmarks[1]:.2f})") + print(f" P1(top_right): ({obj.landmarks[2]:.2f}, {obj.landmarks[3]:.2f})") + print(f" P2(bottom_right): ({obj.landmarks[4]:.2f}, {obj.landmarks[5]:.2f})") + print(f" P3(bottom_left): ({obj.landmarks[6]:.2f}, {obj.landmarks[7]:.2f})") + + # Calculate center and bounding box + pts = obj.landmarks.reshape(-1, 2) + center = np.mean(pts, axis=0) + print(f" Center (mean): ({center[0]:.2f}, {center[1]:.2f})") + print(f" BBox: x=[{pts[:,0].min():.0f}, {pts[:,0].max():.0f}], y=[{pts[:,1].min():.0f}, {pts[:,1].max():.0f}]") + + # Display + cv2.imshow("Detection Result", result) + print("\nPress any key to exit...") + cv2.waitKey(0) + cv2.destroyAllWindows() + + +if __name__ == '__main__': + main() diff --git a/src/rm_auto_aim/armor_yolo_detect/model/0526.onnx b/src/rm_auto_aim/armor_yolo_detect/model/0526.onnx new file mode 100644 index 0000000..c6fc0dc Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/model/0526.onnx differ diff --git a/src/rm_auto_aim/armor_yolo_detect/model/label.yaml b/src/rm_auto_aim/armor_yolo_detect/model/label.yaml new file mode 100644 index 0000000..d99b5e1 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/model/label.yaml @@ -0,0 +1,20 @@ +# Armor YOLO Detection Labels +# Number classes (index 13-21 in model output) +number_classes: + 0: "G" # 哨兵 Guard + 1: "1" # 一号 + 2: "2" # 二号 + 3: "3" # 三号 + 4: "4" # 四号 + 5: "5" # 五号 + 6: "O" # 前哨站 Outpost + 7: "Bs" # 基地小装甲 + 8: "Bb" # 基地大装甲 + 9: "negative" # 负样本 + +# Color classes (index 9-12 in model output) +color_classes: + 0: "RED" + 1: "BLUE" + 2: "GRAY" + 3: "PURPLE" diff --git a/src/rm_auto_aim/armor_yolo_detect/model/yolov5_0526.trt b/src/rm_auto_aim/armor_yolo_detect/model/yolov5_0526.trt new file mode 100644 index 0000000..71aa8de Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/model/yolov5_0526.trt differ diff --git a/src/rm_auto_aim/armor_yolo_detect/package.xml b/src/rm_auto_aim/armor_yolo_detect/package.xml new file mode 100644 index 0000000..4b9602d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/package.xml @@ -0,0 +1,42 @@ + + + + armor_yolo_detect + 0.1.0 + YOLOv5-based armor detector using TensorRT inference + chenyy + BSD + https://github.com/chenjunnn/rm_auto_aim + https://github.com/chenjunnn/rm_auto_aim/issues + chenyy + + ament_cmake + + rclcpp + rclcpp_components + sensor_msgs + geometry_msgs + std_srvs + visualization_msgs + cv_bridge + image_transport + rm_interfaces + vision_opencv + tf2 + eigen + fmt + tf2_ros + tf2_geometry_msgs + rm_utils + armor_detector + + ament_lint_auto + ament_lint_common + ament_cmake_gtest + + + ament_cmake + + diff --git a/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp b/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp new file mode 100644 index 0000000..c009e14 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector.cpp @@ -0,0 +1,409 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// YOLOv5-based armor detector with traditional vision refinement +// +// Uses YOLO to provide ROI regions, then applies traditional binary + light detection +// for precise corner localization. Input/output compatible with armor_detector. +// +// Supports multiple detection modes: +// - HYBRID_SYNC: YOLO runs every frame (original) +// - HYBRID_ROI_CACHE: YOLO runs every N frames, detection runs every frame +// - HYBRID_ASYNC: Async queue with ROI cache +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_yolo_detect/armor_yolo_detector.hpp" + +#include +#include + +namespace armor_yolo_detect { + +bool Detector::init(const std::string& engine_path, const Params& params) { + this->params = params; + tensorrt_ = std::make_unique(); + + if (!tensorrt_->initFromEngine(engine_path)) { + std::cerr << "Failed to initialize TensorRT engine from: " << engine_path << std::endl; + return false; + } + + tensorrt_->setPostprocessOptions(params.conf_threshold, params.nms_threshold, 300); + + // Initialize corner corrector for precise corner refinement + corner_corrector_ = std::make_unique(); + + return true; +} + +void Detector::setMode(DetectorMode mode) { + mode_ = mode; + if (mode_ != DetectorMode::HYBRID_SYNC) { + // Clear cache when switching to cached modes + cached_yolo_objects_.clear(); + frame_counter_.store(0, std::memory_order_relaxed); + } +} + +void Detector::setRoiUpdateInterval(int interval) { + roi_update_interval_ = std::max(1, interval); +} + +std::vector Detector::detect(const cv::Mat& input) { + armors_.clear(); + debug_rois_.clear(); + + // Preprocess image once + cv::Mat gray_img; + cv::cvtColor(input, gray_img, cv::COLOR_BGR2GRAY); + + cv::Mat full_binary_img; + cv::threshold(gray_img, full_binary_img, binary_thres, 255, cv::THRESH_BINARY); + + uint64_t current_frame = frame_counter_.fetch_add(1, std::memory_order_relaxed); + + // Update YOLO objects based on mode + switch (mode_) { + case DetectorMode::HYBRID_SYNC: + // YOLO runs every frame + yolo_objects_ = tensorrt_->infer(input, params.detect_color); + break; + + case DetectorMode::HYBRID_ROI_CACHE: + case DetectorMode::HYBRID_ASYNC: + // YOLO runs every roi_update_interval_ frames + if (current_frame % roi_update_interval_ == 0) { + yolo_objects_ = tensorrt_->infer(input, params.detect_color); + cached_yolo_objects_ = yolo_objects_; + } else { + // Use cached ROIs + yolo_objects_ = cached_yolo_objects_; + } + break; + } + + if (yolo_objects_.empty()) { + return armors_; + } + + // Process ROIs to detect armors + armors_ = processROIs(input, gray_img, full_binary_img); + + return armors_; +} + +std::vector Detector::processROIs( + const cv::Mat& input, + const cv::Mat& gray_img, + const cv::Mat& binary_img) { + std::vector result_armors; + + // 1. Calculate all YOLO ROIs for filtering + std::vector rois; + for (const auto& yolo_obj : yolo_objects_) { + cv::Rect roi = expandBBox(yolo_obj.rect, input.size(), params.roi_expand_pixel); + if (roi.area() > 0) { + rois.push_back(roi); + debug_rois_.push_back(roi); + } + } + + // 2. Find lights on the FULL image natively (exact armor_detector logic) + cv::Rect full_roi(0, 0, input.cols, input.rows); + auto all_lights = findLightsInROI(input, gray_img, binary_img, full_roi); + + // 3. Filter lights: only keep those inside YOLO ROIs + std::vector filtered_lights; + for (const auto& light : all_lights) { + bool in_roi = false; + for (const auto& roi : rois) { + if (roi.contains(light.center)) { + in_roi = true; + break; + } + } + if (in_roi) { + filtered_lights.push_back(light); + } + } + + if (filtered_lights.empty()) { + return result_armors; + } + + // 4. Match lights to form armors natively in global coordinates + auto armors = matchLightsInROI(filtered_lights); + + // 5. Extract numbers, classify and refine corners + if (classifier != nullptr) { + for (auto& armor : armors) { + armor.number_img = classifier->extractNumber(input, armor); + classifier->classify(input, armor); + + // Correct corners using traditional method on full gray image (handles global coords perfectly) + correctCorners(armor, gray_img); + + result_armors.push_back(armor); + } + + // 6. Filter armors exactly like the traditional detector node + classifier->eraseIgnoreClasses(result_armors); + } else { + for (auto& armor : armors) { + correctCorners(armor, gray_img); + result_armors.push_back(armor); + } + } + + return result_armors; +} + +std::vector Detector::detectRaw(const cv::Mat& input) { + return tensorrt_->infer(input, params.detect_color); +} + +cv::Rect Detector::expandBBox(const cv::Rect& bbox, const cv::Size& img_size, int pixel_expand) { + int x = static_cast(bbox.x - pixel_expand); + int y = static_cast(bbox.y - pixel_expand); + int w = static_cast(bbox.width + 2 * pixel_expand); + int h = static_cast(bbox.height + 2 * pixel_expand); + + cv::Rect roi(x, y, w, h); + roi &= cv::Rect(0, 0, img_size.width, img_size.height); + return roi; +} + +std::vector Detector::findLightsInROI( + const cv::Mat& rgb_img, + const cv::Mat& gray_img, + const cv::Mat& binary_img, + const cv::Rect& roi) { + std::vector lights; + + using std::vector; + vector> contours; + vector hierarchy; + cv::findContours(binary_img, contours, hierarchy, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE); + + lights.reserve(contours.size()); + + for (const auto& contour : contours) { + if (contour.size() < 6) continue; + + fyt::auto_aim::Light light; + std::vector points; + + if (light_params.use_fit_line) { + auto b_rect = cv::boundingRect(contour); + auto r_rect = cv::minAreaRect(contour); + cv::Mat mask = cv::Mat::zeros(b_rect.size(), CV_8UC1); + vector mask_contour; + mask_contour.reserve(contour.size()); + for (const auto& p : contour) { + mask_contour.emplace_back(p - cv::Point(b_rect.x, b_rect.y)); + } + cv::fillPoly(mask, {mask_contour}, 255); + cv::findNonZero(mask, points); + + if (points.empty()) continue; + + cv::Vec4f return_param; + cv::fitLine(points, return_param, cv::DIST_L2, 0, 0.01, 0.01); + cv::Point2f top, bottom; + if (int(return_param[0] * 100) == 100 || int(return_param[1] * 100) == 0) { + top = cv::Point2f(b_rect.x + b_rect.width / 2, b_rect.y); + bottom = cv::Point2f(b_rect.x + b_rect.width / 2, b_rect.y + b_rect.height); + } else { + auto k = return_param[1] / return_param[0]; + auto b = (return_param[3] + b_rect.y) - k * (return_param[2] + b_rect.x); + top = cv::Point2f((b_rect.y - b) / k, b_rect.y); + bottom = cv::Point2f((b_rect.y + b_rect.height - b) / k, b_rect.y + b_rect.height); + } + + double width = std::min(r_rect.size.width, r_rect.size.height); + double length = cv::norm(top - bottom); + light = fyt::auto_aim::Light(r_rect, top, bottom, length, width); + } else { + light = fyt::auto_aim::Light(contour); + } + + if (isLight(light)) { + // Color detection within ROI + int sum_r = 0; + int sum_b = 0; + int sample_count = 0; + + if (light_params.use_fit_line && !points.empty()) { + auto b_rect = cv::boundingRect(contour); + for (const auto& point : points) { + const int x = point.x + b_rect.x; + const int y = point.y + b_rect.y; + const auto& pixel = rgb_img.at(y, x); + sum_b += pixel[0]; + sum_r += pixel[2]; + ++sample_count; + } + } else { + for (const auto& point : contour) { + const auto& pixel = rgb_img.at(point.y, point.x); + sum_b += pixel[0]; + sum_r += pixel[2]; + ++sample_count; + } + } + + if (sample_count > 0 && + std::abs(sum_r - sum_b) / sample_count > light_params.color_diff_thresh) { + light.color = sum_r > sum_b ? fyt::EnemyColor::RED : fyt::EnemyColor::BLUE; + } + lights.emplace_back(light); + } + } + + std::sort(lights.begin(), lights.end(), [](const fyt::auto_aim::Light& l1, const fyt::auto_aim::Light& l2) { + return l1.center.x < l2.center.x; + }); + + return lights; +} + +bool Detector::isLight(const fyt::auto_aim::Light& light) { + float ratio = light.width / light.length; + bool ratio_ok = light_params.min_ratio < ratio && ratio < light_params.max_ratio; + bool angle_ok = light.tilt_angle < light_params.max_angle; + return ratio_ok && angle_ok; +} + +bool Detector::containLight(const int i, const int j, const std::vector& lights) { + const fyt::auto_aim::Light& light_1 = lights.at(i); + const fyt::auto_aim::Light& light_2 = lights.at(j); + auto points = std::vector{light_1.top, light_1.bottom, light_2.top, light_2.bottom}; + auto bounding_rect = cv::boundingRect(points); + double avg_length = (light_1.length + light_2.length) / 2.0; + double avg_width = (light_1.width + light_2.width) / 2.0; + + for (int k = i + 1; k < j; k++) { + const fyt::auto_aim::Light& test_light = lights.at(k); + + if (test_light.width > 2 * avg_width) { + continue; + } + if (test_light.length < 0.5 * avg_length) { + continue; + } + + if (bounding_rect.contains(test_light.top) || bounding_rect.contains(test_light.bottom) || + bounding_rect.contains(test_light.center)) { + return true; + } + } + return false; +} + +fyt::auto_aim::ArmorType Detector::isArmor( + const fyt::auto_aim::Light& light_1, + const fyt::auto_aim::Light& light_2) { + float light_length_ratio = light_1.length < light_2.length + ? light_1.length / light_2.length + : light_2.length / light_1.length; + bool light_ratio_ok = light_length_ratio > armor_params.min_light_ratio; + + float avg_light_length = (light_1.length + light_2.length) / 2; + float center_distance = cv::norm(light_1.center - light_2.center) / avg_light_length; + bool center_distance_ok = + (armor_params.min_small_center_distance <= center_distance && + center_distance < armor_params.max_small_center_distance) || + (armor_params.min_large_center_distance <= center_distance && + center_distance < armor_params.max_large_center_distance); + + cv::Point2f diff = light_1.center - light_2.center; + float angle = std::abs(std::atan(diff.y / diff.x)) / CV_PI * 180; + bool angle_ok = angle < armor_params.max_angle; + + bool is_armor = light_ratio_ok && center_distance_ok && angle_ok; + + if (is_armor) { + return center_distance > 3.5 ? fyt::auto_aim::ArmorType::LARGE : fyt::auto_aim::ArmorType::SMALL; + } + return fyt::auto_aim::ArmorType::INVALID; +} + +std::vector Detector::matchLightsInROI(const std::vector& lights) { + std::vector armors; + + fyt::EnemyColor detect_color = params.detect_color == 0 ? fyt::EnemyColor::RED : fyt::EnemyColor::BLUE; + + for (auto light_1 = lights.begin(); light_1 != lights.end(); light_1++) { + // Skip lights not matching target color (or accept if color not determined) + if (light_1->color != fyt::EnemyColor::WHITE && light_1->color != detect_color) { + continue; + } + + double max_iter_width = light_1->length * armor_params.max_large_center_distance; + + for (auto light_2 = light_1 + 1; light_2 != lights.end(); light_2++) { + if (light_2->color != fyt::EnemyColor::WHITE && light_2->color != detect_color) { + continue; + } + if (containLight(light_1 - lights.begin(), light_2 - lights.begin(), lights)) { + continue; + } + if (light_2->center.x - light_1->center.x > max_iter_width) { + break; + } + + auto type = isArmor(*light_1, *light_2); + if (type != fyt::auto_aim::ArmorType::INVALID) { + auto armor = fyt::auto_aim::Armor(*light_1, *light_2); + armor.type = type; + armors.emplace_back(armor); + } + } + } + + return armors; +} + +void Detector::correctCorners(fyt::auto_aim::Armor& armor, const cv::Mat& gray_img) { + if (corner_corrector_ != nullptr) { + corner_corrector_->correctCorners(armor, gray_img); + } +} + +void Detector::drawResults(cv::Mat& img) noexcept { + // Draw ROI rectangles (expanded YOLO bboxes) in blue + for (const auto& roi : debug_rois_) { + cv::rectangle(img, roi, cv::Scalar(255, 0, 0), 2); + } + + // Draw armor outlines + for (const auto& armor : armors_) { + // Draw armor outline + cv::line( + img, armor.left_light.top, armor.left_light.bottom, cv::Scalar(0, 255, 0), 1, cv::LINE_AA); + cv::line( + img, armor.right_light.bottom, armor.right_light.top, cv::Scalar(0, 255, 0), 1, cv::LINE_AA); + cv::line( + img, armor.left_light.top, armor.right_light.top, cv::Scalar(0, 255, 0), 1, cv::LINE_AA); + cv::line( + img, armor.right_light.bottom, armor.left_light.bottom, cv::Scalar(0, 255, 0), 1, cv::LINE_AA); + + // Draw number and confidence + std::string text = fyt::auto_aim::armorTypeToString(armor.type) + " " + armor.classfication_result; + cv::putText( + img, text, armor.left_light.top, cv::FONT_HERSHEY_SIMPLEX, 0.8, cv::Scalar(0, 255, 255), 2); + } +} + +} // namespace armor_yolo_detect diff --git a/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp b/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp new file mode 100644 index 0000000..e3689a3 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/src/armor_yolo_detector_node.cpp @@ -0,0 +1,586 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// ROS2 node implementation for YOLOv5 armor detection +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_yolo_detect/armor_yolo_detector_node.hpp" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include "armor_yolo_detect/types.hpp" +#include "armor_yolo_detect/detector_mode.hpp" +#include "armor_yolo_detect/async_detector.hpp" +#include "armor_detector/ba_solver.hpp" +#include "rm_utils/assert.hpp" +#include "rm_utils/common.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/pnp_solver.hpp" +#include "rm_utils/math/utils.hpp" +#include "rm_utils/url_resolver.hpp" + +namespace armor_yolo_detect { +namespace { + +double durationMs(const std::chrono::steady_clock::duration& duration) { + return std::chrono::duration(duration).count(); +} + +} // namespace + +ArmorYoloDetectorNode::ArmorYoloDetectorNode(const rclcpp::NodeOptions& options) + : Node("armor_yolo_detector", options) { + + FYT_REGISTER_LOGGER("armor_yolo_detect", "~/fyt2024-log", INFO); + FYT_INFO("armor_yolo_detect", "Starting ArmorYoloDetectorNode!"); + + // Initialize detector + detector_ = initDetector(); + + const int max_queue_size_param = static_cast(this->declare_parameter("max_queue_size", 3)); + max_queue_size_ = static_cast(std::max(1, max_queue_size_param)); + process_every_n_frames_ = + std::max(1, static_cast(this->declare_parameter("process_every_n_frames", 1))); + + // BA setting + use_ba_ = this->declare_parameter("use_ba", true); + + // Publishers + armors_pub_ = this->create_publisher( + "armor_detector/armors", rclcpp::SensorDataQoS()); + + // Transform + odom_frame_ = this->declare_parameter("target_frame", "odom"); + + // Visualization markers + armor_marker_.ns = "armors"; + armor_marker_.action = visualization_msgs::msg::Marker::ADD; + armor_marker_.type = visualization_msgs::msg::Marker::CUBE; + armor_marker_.scale.x = 0.03; + armor_marker_.scale.y = 0.15; + armor_marker_.scale.z = 0.12; + armor_marker_.color.a = 1.0; + armor_marker_.color.r = 1.0; + armor_marker_.lifetime = rclcpp::Duration::from_seconds(0.1); + + text_marker_.ns = "classification"; + text_marker_.action = visualization_msgs::msg::Marker::ADD; + text_marker_.type = visualization_msgs::msg::Marker::TEXT_VIEW_FACING; + text_marker_.scale.z = 0.1; + text_marker_.color.a = 1.0; + text_marker_.color.r = 1.0; + text_marker_.color.g = 1.0; + text_marker_.color.b = 1.0; + text_marker_.lifetime = rclcpp::Duration::from_seconds(0.1); + + marker_pub_ = + this->create_publisher("armor_detector/marker", 10); + + // Debug + debug_ = this->declare_parameter("debug", false); + debug_log_interval_frames_ = + std::max(1, static_cast(this->declare_parameter("debug_log_interval_frames", 30))); + debug_terminal_log_ = this->declare_parameter("debug.enable_terminal_log", true); + debug_markers_ = this->declare_parameter("debug.enable_markers", true); + debug_result_img_ = this->declare_parameter("debug.enable_result_img", true); + + if (debug_) { + createDebugPublishers(); + } + + debug_publishers_refresh_timer_ = this->create_wall_timer( + std::chrono::milliseconds(100), + [this]() { refreshDebugPublishersIfNeeded(); }); + + debug_param_sub_ = std::make_shared(this); + debug_cb_handle_ = + debug_param_sub_->add_parameter_callback("debug", [this](const rclcpp::Parameter& p) { + std::lock_guard lock(processing_mutex_); + debug_ = p.as_bool(); + debug_ ? createDebugPublishers() : destroyDebugPublishers(); + }); + + // Camera info + cam_info_sub_ = this->create_subscription( + "camera_info", rclcpp::SensorDataQoS(), + [this](sensor_msgs::msg::CameraInfo::SharedPtr camera_info) { + std::lock_guard lock(processing_mutex_); + cam_center_ = cv::Point2f(camera_info->k[2], camera_info->k[5]); + cam_info_ = std::make_shared(*camera_info); + armor_pose_estimator_ = std::make_unique(cam_info_); + armor_pose_estimator_->enableBA(use_ba_); + cam_info_sub_.reset(); + }); + + // Image subscription + img_sub_ = this->create_subscription( + "image_raw", rclcpp::SensorDataQoS(), + std::bind(&ArmorYoloDetectorNode::imageCallback, this, std::placeholders::_1)); + + // TF + tf2_buffer_ = std::make_shared(this->get_clock()); + auto timer_interface = std::make_shared( + this->get_node_base_interface(), this->get_node_timers_interface()); + tf2_buffer_->setCreateTimerInterface(timer_interface); + tf2_listener_ = std::make_shared(*tf2_buffer_); + + // Mode service + set_mode_srv_ = this->create_service( + "armor_detector/set_mode", + std::bind(&ArmorYoloDetectorNode::setModeCallback, this, + std::placeholders::_1, std::placeholders::_2)); + + // Image processing thread + image_processing_thread_ = std::thread(&ArmorYoloDetectorNode::processImageLoop, this); + FYT_INFO("armor_yolo_detect", "Image worker started: threads=1, max_queue_size={}", max_queue_size_); + + heartbeat_ = fyt::HeartBeatPublisher::create(this); +} + +ArmorYoloDetectorNode::~ArmorYoloDetectorNode() { + { + std::lock_guard lock(queue_mutex_); + stop_processing_ = true; + } + queue_cv_.notify_one(); + if (image_processing_thread_.joinable()) { + image_processing_thread_.join(); + } +} + +void ArmorYoloDetectorNode::imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr img_msg) { + if ((input_frame_counter_.fetch_add(1, std::memory_order_relaxed) + 1) % + static_cast(process_every_n_frames_) != + 0) { + return; + } + + auto frame_start = std::chrono::steady_clock::now(); + { + std::lock_guard lock(queue_mutex_); + if (frame_queue_.size() >= max_queue_size_) { + frame_queue_.pop_front(); + } + frame_queue_.push_back(PendingFrame{.img_msg = img_msg, .frame_start = frame_start}); + } + queue_cv_.notify_one(); +} + +void ArmorYoloDetectorNode::processImageLoop() { + while (true) { + PendingFrame frame; + { + std::unique_lock lock(queue_mutex_); + queue_cv_.wait(lock, [this]() { return stop_processing_ || !frame_queue_.empty(); }); + if (stop_processing_ && frame_queue_.empty()) { + return; + } + frame = std::move(frame_queue_.front()); + frame_queue_.pop_front(); + } + processFrame(std::move(frame)); + } +} + +void ArmorYoloDetectorNode::processFrame(PendingFrame frame) { + bool debug_enabled = false; + bool debug_terminal_log_enabled = false; + bool debug_marker_enabled = false; + { + std::lock_guard lock(processing_mutex_); + debug_enabled = debug_; + debug_terminal_log_enabled = debug_terminal_log_; + debug_marker_enabled = debug_markers_; + } + + auto stage_start = std::chrono::steady_clock::now(); + Eigen::Matrix3d imu_to_camera = Eigen::Matrix3d::Identity(); + + // Get TF transform + try { + rclcpp::Time target_time = frame.img_msg->header.stamp; + auto odom_to_gimbal = tf2_buffer_->lookupTransform( + odom_frame_, frame.img_msg->header.frame_id, target_time, + rclcpp::Duration::from_seconds(0.01)); + auto msg_q = odom_to_gimbal.transform.rotation; + tf2::Quaternion tf_q; + tf2::fromMsg(msg_q, tf_q); + tf2::Matrix3x3 tf2_matrix = tf2::Matrix3x3(tf_q); + imu_to_camera << tf2_matrix.getRow(0)[0], tf2_matrix.getRow(0)[1], tf2_matrix.getRow(0)[2], + tf2_matrix.getRow(1)[0], tf2_matrix.getRow(1)[1], tf2_matrix.getRow(1)[2], + tf2_matrix.getRow(2)[0], tf2_matrix.getRow(2)[1], tf2_matrix.getRow(2)[2]; + } catch (const tf2::TransformException& ex) { + FYT_ERROR("armor_yolo_detect", "lookUpTransform failed: {}", ex.what()); + return; + } + + // Detect armors + double detect_ms = 0.0; + double debug_image_ms = 0.0; + stage_start = std::chrono::steady_clock::now(); + auto armors = detectArmors(frame.img_msg, &detect_ms, &debug_image_ms); + const double detect_total_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + // Init message + rm_interfaces::msg::Armors armors_msg; + armors_msg.header = frame.img_msg->header; + armors_msg.armors.clear(); + + // Extract armor poses + stage_start = std::chrono::steady_clock::now(); + { + std::lock_guard lock(processing_mutex_); + if (armor_pose_estimator_ != nullptr) { + armors_msg.armors = armor_pose_estimator_->extractArmorPoses(armors, imu_to_camera); + } else { + FYT_WARN("armor_yolo_detect", "PnP Failed!"); + } + } + const double pose_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + // Publish markers + stage_start = std::chrono::steady_clock::now(); + { + std::lock_guard lock(processing_mutex_); + if (debug_enabled && debug_marker_enabled) { + armors_msg_ = armors_msg; + marker_array_.markers.clear(); + armor_marker_.id = 0; + text_marker_.id = 0; + armor_marker_.header = text_marker_.header = armors_msg_.header; + + for (const auto& armor : armors_msg_.armors) { + armor_marker_.pose = armor.pose; + armor_marker_.id++; + text_marker_.pose.position = armor.pose.position; + text_marker_.id++; + text_marker_.pose.position.y -= 0.1; + text_marker_.text = armor.number; + marker_array_.markers.emplace_back(armor_marker_); + marker_array_.markers.emplace_back(text_marker_); + } + publishMarkers(); + } + } + const double marker_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + // Publish detected armors + stage_start = std::chrono::steady_clock::now(); + armors_pub_->publish(armors_msg); + const double publish_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + + if (debug_enabled && debug_terminal_log_enabled && + (debug_log_counter_.fetch_add(1, std::memory_order_relaxed) + 1) % + static_cast(debug_log_interval_frames_) == + 0) { + const double total_ms = durationMs(std::chrono::steady_clock::now() - frame.frame_start); + FYT_INFO("armor_yolo_detect", + "Detector Latency: total={:.3f}ms detect={:.3f}ms pose={:.3f}ms " + "marker={:.3f}ms publish={:.3f}ms", + total_ms, detect_total_ms, pose_ms, marker_ms, publish_ms); + } +} + +std::unique_ptr ArmorYoloDetectorNode::initDetector() { + Detector::Params params; + + // Load engine path (0526 model, TensorRT .trt format) + namespace fs = std::filesystem; + const std::string engine_url = + this->declare_parameter("engine_path", "package://armor_yolo_detect/model/yolov5_0526.trt"); + fs::path engine_path = fyt::utils::URLResolver::getResolvedPath(engine_url); + + if (!fs::exists(engine_path)) { + FYT_ERROR("armor_yolo_detect", "Engine file not found: {}", engine_path.string()); + return nullptr; + } + + params.conf_threshold = this->declare_parameter("conf_threshold", 0.65); + params.nms_threshold = this->declare_parameter("nms_threshold", 0.50); + params.detect_color = this->declare_parameter("detect_color", -1); + params.roi_expand_pixel = this->declare_parameter("roi_expand_pixel", 75); + + auto detector = std::make_unique(); + if (!detector->init(engine_path.string(), params)) { + FYT_ERROR("armor_yolo_detect", "Failed to initialize detector!"); + return nullptr; + } + + // Binary threshold for light detection + detector->binary_thres = this->declare_parameter("binary_thres", 160); + + // Light detection params + detector->light_params.min_ratio = this->declare_parameter("light.min_ratio", 0.08); + detector->light_params.max_ratio = this->declare_parameter("light.max_ratio", 0.4); + detector->light_params.max_angle = this->declare_parameter("light.max_angle", 40.0); + detector->light_params.use_fit_line = this->declare_parameter("light.use_fit_line", true); + detector->light_params.color_diff_thresh = + static_cast(this->declare_parameter("light.color_diff_thresh", 25)); + + // Armor matching params + detector->armor_params.min_light_ratio = + this->declare_parameter("armor.min_light_ratio", 0.6); + detector->armor_params.min_small_center_distance = + this->declare_parameter("armor.min_small_center_distance", 0.8); + detector->armor_params.max_small_center_distance = + this->declare_parameter("armor.max_small_center_distance", 3.2); + detector->armor_params.min_large_center_distance = + this->declare_parameter("armor.min_large_center_distance", 3.2); + detector->armor_params.max_large_center_distance = + this->declare_parameter("armor.max_large_center_distance", 5.0); + detector->armor_params.max_angle = this->declare_parameter("armor.max_angle", 35.0); + + // Detection mode + int mode_int = this->declare_parameter("detector_mode", 0); + detector_mode_ = static_cast(mode_int); + detector->setMode(detector_mode_); + + // ROI update interval (for roi_cache and async modes) + int roi_update_interval = this->declare_parameter("roi_update_interval", 5); + detector->setRoiUpdateInterval(roi_update_interval); + + // Init classifier + fs::path model_path = + fyt::utils::URLResolver::getResolvedPath("package://armor_detector/model/lenet.onnx"); + fs::path label_path = + fyt::utils::URLResolver::getResolvedPath("package://armor_detector/model/label.txt"); + FYT_ASSERT_MSG(fs::exists(model_path) && fs::exists(label_path), + model_path.string() + " Not Found!"); + + double threshold = this->declare_parameter("classifier_threshold", 0.7); + std::vector ignore_classes = + this->declare_parameter("ignore_classes", std::vector{"negative"}); + detector->classifier = + std::make_unique(model_path.string(), label_path.string(), threshold, ignore_classes); + + FYT_INFO("armor_yolo_detect", "Inference backend: TensorRT ({})", engine_path.string()); + FYT_INFO("armor_yolo_detect", "Detector mode: {} (roi_update_interval={})", + detectorModeToString(detector_mode_), roi_update_interval); + + // Set dynamic parameter callback + on_set_parameters_callback_handle_ = this->add_on_set_parameters_callback( + std::bind(&ArmorYoloDetectorNode::onSetParameters, this, std::placeholders::_1)); + + return detector; +} + +std::vector ArmorYoloDetectorNode::detectArmors( + const sensor_msgs::msg::Image::ConstSharedPtr& img_msg, double* detect_ms, + double* debug_publish_ms) { + std::lock_guard lock(processing_mutex_); + + auto stage_start = std::chrono::steady_clock::now(); + + // Convert ROS img to cv::Mat + auto img = cv_bridge::toCvShare(img_msg, "bgr8")->image; + + // Run detection: YOLO for ROI + traditional vision for refinement + auto armors = detector_->detect(img); + + if (detect_ms != nullptr) { + *detect_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + } + + // Debug image publishing + stage_start = std::chrono::steady_clock::now(); + if (debug_ && debug_result_img_) { + detector_->debug_img = img.clone(); + + cv::putText(detector_->debug_img, + "det=" + std::to_string(armors.size()), + cv::Point(20, 40), cv::FONT_HERSHEY_SIMPLEX, 1.0, + cv::Scalar(255, 255, 0), 2); + + // Draw detection results using armor_detector's drawResults style + detector_->drawResults(detector_->debug_img); + + // Publish result image + result_img_pub_.publish( + cv_bridge::CvImage(img_msg->header, "bgr8", detector_->debug_img).toImageMsg()); + } + + if (debug_publish_ms != nullptr) { + *debug_publish_ms = durationMs(std::chrono::steady_clock::now() - stage_start); + } + + return armors; +} + +fyt::auto_aim::Armor ArmorYoloDetectorNode::convertToAutoAimArmor(const Armor& yolo_armor) { + return yolo_armor.toAutoAimArmor(); +} + +rcl_interfaces::msg::SetParametersResult ArmorYoloDetectorNode::onSetParameters( + std::vector parameters) { + rcl_interfaces::msg::SetParametersResult result; + result.successful = true; + + std::lock_guard lock(processing_mutex_); + + for (const auto& param : parameters) { + if (param.get_name() == "conf_threshold") { + detector_->params.conf_threshold = param.as_double(); + } else if (param.get_name() == "nms_threshold") { + detector_->params.nms_threshold = param.as_double(); + } else if (param.get_name() == "detect_color") { + detector_->params.detect_color = param.as_int(); + } else if (param.get_name() == "roi_expand_pixel") { + detector_->params.roi_expand_pixel = param.as_int(); + } else if (param.get_name() == "binary_thres") { + detector_->binary_thres = param.as_int(); + } else if (param.get_name() == "light.min_ratio") { + detector_->light_params.min_ratio = param.as_double(); + } else if (param.get_name() == "light.max_ratio") { + detector_->light_params.max_ratio = param.as_double(); + } else if (param.get_name() == "light.max_angle") { + detector_->light_params.max_angle = param.as_double(); + } else if (param.get_name() == "light.use_fit_line") { + detector_->light_params.use_fit_line = param.as_bool(); + } else if (param.get_name() == "light.color_diff_thresh") { + detector_->light_params.color_diff_thresh = param.as_int(); + } else if (param.get_name() == "armor.min_light_ratio") { + detector_->armor_params.min_light_ratio = param.as_double(); + } else if (param.get_name() == "armor.min_small_center_distance") { + detector_->armor_params.min_small_center_distance = param.as_double(); + } else if (param.get_name() == "armor.max_small_center_distance") { + detector_->armor_params.max_small_center_distance = param.as_double(); + } else if (param.get_name() == "armor.min_large_center_distance") { + detector_->armor_params.min_large_center_distance = param.as_double(); + } else if (param.get_name() == "armor.max_large_center_distance") { + detector_->armor_params.max_large_center_distance = param.as_double(); + } else if (param.get_name() == "armor.max_angle") { + detector_->armor_params.max_angle = param.as_double(); + } else if (param.get_name() == "detector_mode") { + detector_mode_ = static_cast(param.as_int()); + detector_->setMode(detector_mode_); + FYT_INFO("armor_yolo_detect", "Detector mode changed to: {}", + detectorModeToString(detector_mode_)); + } else if (param.get_name() == "roi_update_interval") { + detector_->setRoiUpdateInterval(param.as_int()); + } else if (param.get_name() == "debug.enable_terminal_log") { + debug_terminal_log_ = param.as_bool(); + } else if (param.get_name() == "debug.enable_markers") { + debug_markers_ = param.as_bool(); + } else if (param.get_name() == "debug.enable_result_img") { + debug_result_img_ = param.as_bool(); + } + } + + return result; +} + +void ArmorYoloDetectorNode::setModeCallback( + const std::shared_ptr request, + const std::shared_ptr response) { + response->success = true; + response->message = "0"; + + fyt::VisionMode mode = static_cast(request->mode); + std::string mode_name = fyt::visionModeToString(mode); + + if (mode_name == "UNKNOWN") { + FYT_ERROR("armor_yolo_detect", "Invalid mode: {}", request->mode); + return; + } + + auto createImageSub = [this]() { + if (img_sub_ == nullptr) { + img_sub_ = this->create_subscription( + "image_raw", rclcpp::SensorDataQoS(), + std::bind(&ArmorYoloDetectorNode::imageCallback, this, std::placeholders::_1)); + } + }; + + switch (mode) { + case fyt::VisionMode::AUTO_AIM_RED: { + detector_->params.detect_color = 0; // RED + createImageSub(); + break; + } + case fyt::VisionMode::AUTO_AIM_BLUE: { + detector_->params.detect_color = 1; // BLUE + createImageSub(); + break; + } + default: { + img_sub_.reset(); + std::lock_guard lock(queue_mutex_); + frame_queue_.clear(); + } + } + + FYT_WARN("armor_yolo_detect", "Set mode to {}", mode_name); +} + +void ArmorYoloDetectorNode::createDebugPublishers() { + result_img_pub_ = image_transport::create_publisher(this, "armor_detector/result_img"); +} + +void ArmorYoloDetectorNode::destroyDebugPublishers() { + result_img_pub_.shutdown(); +} + +void ArmorYoloDetectorNode::refreshDebugPublishersIfNeeded() { + if (!debug_publishers_refresh_requested_.exchange(false, std::memory_order_relaxed)) { + return; + } + + std::lock_guard lock(processing_mutex_); + destroyDebugPublishers(); + if (debug_) { + createDebugPublishers(); + } +} + +void ArmorYoloDetectorNode::publishMarkers() { + using Marker = visualization_msgs::msg::Marker; + armor_marker_.action = armors_msg_.armors.empty() ? Marker::DELETEALL : Marker::ADD; + marker_array_.markers.emplace_back(armor_marker_); + marker_pub_->publish(marker_array_); +} + +} // namespace armor_yolo_detect + +#include "rclcpp_components/register_node_macro.hpp" + +RCLCPP_COMPONENTS_REGISTER_NODE(armor_yolo_detect::ArmorYoloDetectorNode) diff --git a/src/rm_auto_aim/armor_yolo_detect/src/async_detector.cpp b/src/rm_auto_aim/armor_yolo_detect/src/async_detector.cpp new file mode 100644 index 0000000..ec79a12 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/src/async_detector.cpp @@ -0,0 +1,113 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// Async detector implementation +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "armor_yolo_detect/async_detector.hpp" + +namespace armor_yolo_detect { + +AsyncDetector::AsyncDetector() = default; + +AsyncDetector::~AsyncDetector() { + stop(); +} + +void AsyncDetector::init(std::shared_ptr detector, int queue_size) { + detector_ = detector; + max_queue_size_ = static_cast(std::max(1, queue_size)); +} + +void AsyncDetector::start() { + if (running_) { + return; + } + + running_ = true; + processing_thread_ = std::thread(&AsyncDetector::processingLoop, this); +} + +void AsyncDetector::stop() { + if (!running_) { + return; + } + + running_ = false; + queue_cv_.notify_one(); + + if (processing_thread_.joinable()) { + processing_thread_.join(); + } +} + +void AsyncDetector::enqueue(const cv::Mat& img) { + std::lock_guard lock(queue_mutex_); + + // Remove oldest frame if queue is full + if (frame_queue_.size() >= max_queue_size_) { + frame_queue_.pop_front(); + } + + static uint64_t frame_id_counter = 0; + AsyncFrame frame; + frame.img = img.clone(); + frame.frame_id = frame_id_counter++; + frame.timestamp = std::chrono::steady_clock::now(); + + frame_queue_.push_back(std::move(frame)); + queue_cv_.notify_one(); +} + +std::vector AsyncDetector::getLatestResult() { + std::lock_guard lock(result_mutex_); + return latest_result_; +} + +void AsyncDetector::processingLoop() { + while (running_) { + AsyncFrame frame; + + { + std::unique_lock lock(queue_mutex_); + queue_cv_.wait_for( + lock, + std::chrono::milliseconds(100), + [this]() { return !frame_queue_.empty() || !running_; }); + + if (!running_ && frame_queue_.empty()) { + break; + } + + if (frame_queue_.empty()) { + continue; + } + + frame = std::move(frame_queue_.front()); + frame_queue_.pop_front(); + } + + // Process frame + if (detector_) { + auto result = detector_->detect(frame.img); + + { + std::lock_guard lock(result_mutex_); + latest_result_ = result; + } + } + } +} + +} // namespace armor_yolo_detect diff --git a/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp b/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp new file mode 100644 index 0000000..a2d1812 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/src/trt_logger.cpp @@ -0,0 +1,7 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// +// Licensed under the Apache License, Version 2.0 (the "License"); + +#include "armor_yolo_detect/trt_logger.hpp" + +Logger gLogger; diff --git a/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp b/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp new file mode 100644 index 0000000..96c5a57 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/src/yolo_tensorrt.cpp @@ -0,0 +1,712 @@ +// Copyright chenyy 2026. Licensed under the MIT License. +// TensorRT inference engine implementation + +#include "armor_yolo_detect/yolo_tensorrt.hpp" +#include "armor_yolo_detect/trt_logger.hpp" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace { +inline uint16_t floatToHalf(float f) { + uint32_t x; + std::memcpy(&x, &f, sizeof(float)); + uint32_t sign = (x >> 16) & 0x8000; + uint32_t exp = (x & 0x7f800000) >> 23; + uint32_t mant = x & 0x007fffff; + if (exp == 0) return sign; + if (exp == 255) return sign | 0x7c00 | (mant ? 1 : 0); + int new_exp = static_cast(exp) - 127 + 15; + if (new_exp <= 0) return sign; + if (new_exp >= 31) return sign | 0x7c00; + return sign | (static_cast(new_exp) << 10) | (mant >> 13); +} +} // namespace + +namespace armor_yolo_detect { + +YoloTensorRT::~YoloTensorRT() { + if (cuda_stream_ != nullptr) { + cudaStreamDestroy(cuda_stream_); + cuda_stream_ = nullptr; + } + + if (device_buffer_[0]) { + cudaFree(device_buffer_[0]); + device_buffer_[0] = nullptr; + } + if (device_buffer_[1]) { + cudaFree(device_buffer_[1]); + device_buffer_[1] = nullptr; + } + + if (context_) { +#if NV_TENSORRT_MAJOR >= 10 + delete context_; +#else + context_->destroy(); +#endif + context_ = nullptr; + } + if (engine_) { +#if NV_TENSORRT_MAJOR >= 10 + delete engine_; +#else + engine_->destroy(); +#endif + engine_ = nullptr; + } + if (runtime_) { +#if NV_TENSORRT_MAJOR >= 10 + delete runtime_; +#else + runtime_->destroy(); +#endif + runtime_ = nullptr; + } +} + +bool YoloTensorRT::initFromEngine(const std::string& engine_path) { + std::ifstream engine_file(engine_path, std::ios::binary); + if (!engine_file.good()) { + std::cerr << "Error: Failed to open engine file: " << engine_path << std::endl; + return false; + } + + engine_file.seekg(0, std::ifstream::end); + const size_t engine_size = static_cast(engine_file.tellg()); + engine_file.seekg(0, std::ifstream::beg); + + std::vector engine_data(engine_size); + engine_file.read(engine_data.data(), static_cast(engine_size)); + engine_file.close(); + + if (cudaSetDevice(0) != cudaSuccess) { + std::cerr << "Error: cudaSetDevice(0) failed" << std::endl; + return false; + } + + if (cuda_stream_ == nullptr && cudaStreamCreate(&cuda_stream_) != cudaSuccess) { + std::cerr << "Error: cudaStreamCreate failed" << std::endl; + return false; + } + + runtime_ = nvinfer1::createInferRuntime(gLogger); + if (!runtime_) { + std::cerr << "Error: Failed to create TensorRT runtime" << std::endl; + return false; + } + + engine_ = runtime_->deserializeCudaEngine(engine_data.data(), engine_size); + if (!engine_) { + std::cerr << "Error: Failed to deserialize TensorRT engine" << std::endl; + return false; + } + + context_ = engine_->createExecutionContext(); + if (!context_) { + std::cerr << "Error: Failed to create TensorRT execution context" << std::endl; + return false; + } + +#if NV_TENSORRT_MAJOR >= 10 + io_tensor_count_ = static_cast(engine_->getNbIOTensors()); + for (int i = 0; i < io_tensor_count_; ++i) { + const char* tensor_name = engine_->getIOTensorName(i); + const auto mode = engine_->getTensorIOMode(tensor_name); + if (mode == nvinfer1::TensorIOMode::kINPUT) { + input_index_ = i; + input_tensor_name_ = tensor_name; + if (engine_->getTensorDataType(tensor_name) == nvinfer1::DataType::kHALF) { + is_input_half_ = true; + } + } else if (mode == nvinfer1::TensorIOMode::kOUTPUT) { + output_index_ = i; + output_tensor_name_ = tensor_name; + } + } +#else + input_index_ = engine_->getBindingIndex("images"); + output_index_ = 1 - input_index_; + io_tensor_count_ = 2; + if (engine_->getBindingDataType(input_index_) == nvinfer1::DataType::kHALF) { + is_input_half_ = true; + } +#endif + +#if NV_TENSORRT_MAJOR >= 10 + if (input_tensor_name_.empty() || output_tensor_name_.empty()) { + std::cerr << "Error: Failed to resolve TensorRT I/O tensor names" << std::endl; + return false; + } + nvinfer1::Dims output_dims = engine_->getTensorShape(output_tensor_name_.c_str()); +#else + nvinfer1::Dims output_dims = engine_->getBindingDimensions(output_index_); +#endif + + if (output_dims.nbDims >= 2) { + output_rows_ = output_dims.d[output_dims.nbDims - 2]; + output_cols_ = output_dims.d[output_dims.nbDims - 1]; + } + if (output_rows_ <= 0 || output_cols_ <= 0) { + output_rows_ = OUTPUT_ROWS; + output_cols_ = OUTPUT_COLS; + } + + const size_t input_size = + static_cast(INPUT_WIDTH) * static_cast(INPUT_HEIGHT) * + static_cast(INPUT_C) * sizeof(float); + const size_t output_size = + static_cast(output_rows_) * static_cast(output_cols_) * sizeof(float); + + if (cudaMalloc(&device_buffer_[input_index_], input_size) != cudaSuccess) { + std::cerr << "Error: cudaMalloc failed for input buffer" << std::endl; + return false; + } + if (cudaMalloc(&device_buffer_[output_index_], output_size) != cudaSuccess) { + std::cerr << "Error: cudaMalloc failed for output buffer" << std::endl; + return false; + } + + input_buffer_.resize(static_cast(INPUT_WIDTH) * static_cast(INPUT_HEIGHT) * + static_cast(INPUT_C)); + output_buffer_.resize(static_cast(output_rows_) * static_cast(output_cols_)); + + return true; +} + +bool YoloTensorRT::buildFromOnnx( + const std::string& onnx_path, + const std::string& engine_path, + int max_batch_size) { + (void)max_batch_size; + + initLibNvInferPlugins(&gLogger, ""); + + auto builder = nvinfer1::createInferBuilder(gLogger); + if (!builder) { + std::cerr << "Error: Failed to create TensorRT builder" << std::endl; + return false; + } + +#if NV_TENSORRT_MAJOR >= 10 + auto network = builder->createNetworkV2(0U); +#else + const auto explicit_batch = + 1U << static_cast(nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH); + auto network = builder->createNetworkV2(explicit_batch); +#endif + if (!network) { + std::cerr << "Error: Failed to create TensorRT network" << std::endl; + return false; + } + + auto parser = nvonnxparser::createParser(*network, gLogger); + if (!parser) { + std::cerr << "Error: Failed to create ONNX parser" << std::endl; + return false; + } + + if (!parser->parseFromFile(onnx_path.c_str(), static_cast(nvinfer1::ILogger::Severity::kWARNING))) { + std::cerr << "Error: Failed to parse ONNX model" << std::endl; + return false; + } + + auto config = builder->createBuilderConfig(); +#if NV_TENSORRT_MAJOR >= 10 + config->setMemoryPoolLimit(nvinfer1::MemoryPoolType::kWORKSPACE, 1ULL << 30); +#else + builder->setMaxBatchSize(max_batch_size); + builder->setMaxWorkspaceSize(1ULL << 30); +#endif + + std::cout << "Building TensorRT engine from ONNX..." << std::endl; + +#if NV_TENSORRT_MAJOR >= 10 + auto serialized_engine = builder->buildSerializedNetwork(*network, *config); + if (!serialized_engine) { + std::cerr << "Error: Failed to build serialized TensorRT engine" << std::endl; + return false; + } + + runtime_ = nvinfer1::createInferRuntime(gLogger); + if (!runtime_) { + std::cerr << "Error: Failed to create TensorRT runtime" << std::endl; + return false; + } + + engine_ = runtime_->deserializeCudaEngine(serialized_engine->data(), serialized_engine->size()); +#else + engine_ = builder->buildEngineWithConfig(*network, *config); + auto serialized_engine = engine_ ? engine_->serialize() : nullptr; +#endif + + if (!engine_) { + std::cerr << "Error: Failed to build TensorRT engine" << std::endl; + return false; + } + + std::ofstream engine_file(engine_path, std::ios::binary); + engine_file.write(static_cast(serialized_engine->data()), + static_cast(serialized_engine->size())); + engine_file.close(); + + context_ = engine_->createExecutionContext(); + if (!context_) { + std::cerr << "Error: Failed to create TensorRT execution context" << std::endl; + return false; + } + +#if NV_TENSORRT_MAJOR >= 10 + io_tensor_count_ = static_cast(engine_->getNbIOTensors()); + for (int i = 0; i < io_tensor_count_; ++i) { + const char* tensor_name = engine_->getIOTensorName(i); + const auto mode = engine_->getTensorIOMode(tensor_name); + if (mode == nvinfer1::TensorIOMode::kINPUT) { + input_index_ = i; + input_tensor_name_ = tensor_name; + if (engine_->getTensorDataType(tensor_name) == nvinfer1::DataType::kHALF) { + is_input_half_ = true; + } + } else if (mode == nvinfer1::TensorIOMode::kOUTPUT) { + output_index_ = i; + output_tensor_name_ = tensor_name; + } + } + nvinfer1::Dims output_dims = engine_->getTensorShape(output_tensor_name_.c_str()); +#else + input_index_ = engine_->getBindingIndex("images"); + output_index_ = 1 - input_index_; + io_tensor_count_ = 2; + if (engine_->getBindingDataType(input_index_) == nvinfer1::DataType::kHALF) { + is_input_half_ = true; + } + nvinfer1::Dims output_dims = engine_->getBindingDimensions(output_index_); +#endif + + if (output_dims.nbDims >= 2) { + output_rows_ = output_dims.d[output_dims.nbDims - 2]; + output_cols_ = output_dims.d[output_dims.nbDims - 1]; + } + if (output_rows_ <= 0 || output_cols_ <= 0) { + output_rows_ = OUTPUT_ROWS; + output_cols_ = OUTPUT_COLS; + } + + const size_t input_size = + static_cast(INPUT_WIDTH) * static_cast(INPUT_HEIGHT) * + static_cast(INPUT_C) * sizeof(float); + const size_t output_size = + static_cast(output_rows_) * static_cast(output_cols_) * sizeof(float); + + if (cuda_stream_ == nullptr && cudaStreamCreate(&cuda_stream_) != cudaSuccess) { + std::cerr << "Error: cudaStreamCreate failed" << std::endl; + return false; + } + + if (cudaMalloc(&device_buffer_[input_index_], input_size) != cudaSuccess) { + std::cerr << "Error: cudaMalloc failed for input buffer" << std::endl; + return false; + } + if (cudaMalloc(&device_buffer_[output_index_], output_size) != cudaSuccess) { + std::cerr << "Error: cudaMalloc failed for output buffer" << std::endl; + return false; + } + + input_buffer_.resize(static_cast(INPUT_WIDTH) * static_cast(INPUT_HEIGHT) * + static_cast(INPUT_C)); + output_buffer_.resize(static_cast(output_rows_) * static_cast(output_cols_)); + +#if NV_TENSORRT_MAJOR >= 10 + delete config; + delete parser; + delete network; + delete builder; +#else + config->destroy(); + parser->destroy(); + network->destroy(); + builder->destroy(); +#endif + + return true; +} + +cv::Mat YoloTensorRT::preprocess(const cv::Mat& img) { + cv::Mat resized; + cv::resize(img, resized, cv::Size(INPUT_WIDTH, INPUT_HEIGHT)); + + cv::Mat rgb; + if (resized.channels() == 3) { + // DO NOT convert to RGB. The model natively expects BGR! + // cv::cvtColor(resized, rgb, cv::COLOR_BGR2RGB); + rgb = resized; + } else { + cv::cvtColor(resized, rgb, cv::COLOR_GRAY2BGR); + } + + cv::Mat normalized; + rgb.convertTo(normalized, CV_32FC3, 1.0 / 255.0); + return normalized; +} + +bool YoloTensorRT::inferInternal(const float* input, float* output, int batch_size) { + if (cuda_stream_ == nullptr) { + std::cerr << "Error: CUDA stream is not initialized" << std::endl; + return false; + } + + const size_t num_input_elements = + static_cast(INPUT_WIDTH) * static_cast(INPUT_HEIGHT) * + static_cast(INPUT_C) * static_cast(batch_size); + + const void* copy_src = input; + size_t input_bytes = num_input_elements * sizeof(float); + + if (is_input_half_) { + if (half_input_buffer_.size() < num_input_elements) { + half_input_buffer_.resize(num_input_elements); + } + for (size_t i = 0; i < num_input_elements; ++i) { + half_input_buffer_[i] = floatToHalf(input[i]); + } + copy_src = half_input_buffer_.data(); + input_bytes = num_input_elements * sizeof(uint16_t); + } + + if (cudaMemcpyAsync( + device_buffer_[input_index_], copy_src, input_bytes, cudaMemcpyHostToDevice, cuda_stream_) != + cudaSuccess) { + std::cerr << "Error: cudaMemcpyAsync HostToDevice failed" << std::endl; + return false; + } + + size_t output_bytes = + static_cast(output_rows_) * static_cast(output_cols_) * sizeof(float) * + static_cast(batch_size); + +#if NV_TENSORRT_MAJOR >= 10 + nvinfer1::Dims input_dims = context_->getTensorShape(input_tensor_name_.c_str()); + bool has_dynamic_dim = false; + for (int i = 0; i < input_dims.nbDims; ++i) { + if (input_dims.d[i] == -1) { + has_dynamic_dim = true; + break; + } + } + + if (has_dynamic_dim) { + nvinfer1::Dims4 fixed_input_dims(batch_size, INPUT_C, INPUT_HEIGHT, INPUT_WIDTH); + if (!context_->setInputShape(input_tensor_name_.c_str(), fixed_input_dims)) { + std::cerr << "Error: setInputShape failed for input tensor: " << input_tensor_name_ << std::endl; + return false; + } + } + + nvinfer1::Dims output_dims = context_->getTensorShape(output_tensor_name_.c_str()); + if (output_dims.nbDims >= 2) { + const int resolved_rows = output_dims.d[output_dims.nbDims - 2]; + const int resolved_cols = output_dims.d[output_dims.nbDims - 1]; + if (resolved_rows > 0 && resolved_cols > 0) { + output_rows_ = resolved_rows; + output_cols_ = resolved_cols; + } + } + + const size_t required_output_elems = + static_cast(output_rows_) * static_cast(output_cols_); + if (required_output_elems > output_buffer_.size()) { + output_buffer_.resize(required_output_elems); + } + output_bytes = required_output_elems * sizeof(float) * static_cast(batch_size); + + if (!context_->setTensorAddress(input_tensor_name_.c_str(), device_buffer_[input_index_])) { + std::cerr << "Error: setTensorAddress failed for input tensor" << std::endl; + return false; + } + if (!context_->setTensorAddress(output_tensor_name_.c_str(), device_buffer_[output_index_])) { + std::cerr << "Error: setTensorAddress failed for output tensor" << std::endl; + return false; + } + if (!context_->enqueueV3(cuda_stream_)) { + std::cerr << "Error: TensorRT enqueueV3 failed" << std::endl; + return false; + } +#else + if (!context_->execute(batch_size, device_buffer_)) { + std::cerr << "Error: TensorRT execute failed" << std::endl; + return false; + } +#endif + + if (cudaMemcpyAsync( + output, device_buffer_[output_index_], output_bytes, cudaMemcpyDeviceToHost, cuda_stream_) != + cudaSuccess) { + std::cerr << "Error: cudaMemcpyAsync DeviceToHost failed" << std::endl; + return false; + } + + if (cudaStreamSynchronize(cuda_stream_) != cudaSuccess) { + std::cerr << "Error: cudaStreamSynchronize failed" << std::endl; + return false; + } + + return true; +} + +std::vector YoloTensorRT::postprocess(const float* output, int detect_color, bool dump_this_frame) { + std::vector objects; + + int dropped_by_conf = 0; + int dropped_by_color = 0; + + struct DumpCandidate { + int row = -1; + float conf = 0.0f; + float color_score = 0.0f; + int color_id = -1; + int num_id = -1; + float score = 0.0f; + }; + + std::vector dump_candidates; + if (dump_this_frame) { + dump_candidates.reserve(static_cast(dump_topk_)); + } + + for (int i = 0; i < output_rows_; i++) { + const float* row = output + i * output_cols_; + + const float conf = sigmoid(row[8]); + if (conf < conf_threshold_) { + dropped_by_conf++; + continue; + } + + int color_id = 0; + float max_color_score = sigmoid(row[9]); + for (int c = 1; c < 4; c++) { + const float color_score = sigmoid(row[9 + c]); + if (color_score > max_color_score) { + max_color_score = color_score; + color_id = c; + } + } + + if (color_id == 2 || color_id == 3 || + (detect_color >= 0 && detect_color == 0 && color_id == 1) || + (detect_color >= 0 && detect_color == 1 && color_id == 0)) { + dropped_by_color++; + continue; + } + + const int num_class_count = std::max(0, output_cols_ - 13); + if (num_class_count <= 0) { + continue; + } + + int num_id = 0; + float max_num_score = sigmoid(row[13]); + for (int c = 1; c < num_class_count; c++) { + const float num_score = sigmoid(row[13 + c]); + if (num_score > max_num_score) { + max_num_score = num_score; + num_id = c; + } + } + + YoloObject obj; + obj.prob = conf; // Only use detection config, not color conf + obj.label = num_id; + obj.color = static_cast(color_id); + + float min_x = std::numeric_limits::max(); + float max_x = std::numeric_limits::lowest(); + float min_y = std::numeric_limits::max(); + float max_y = std::numeric_limits::lowest(); + + for (int k = 0; k < 4; ++k) { + const float x = row[k * 2]; + const float y = row[k * 2 + 1]; + obj.landmarks[k * 2] = x; + obj.landmarks[k * 2 + 1] = y; + min_x = std::min(min_x, x); + max_x = std::max(max_x, x); + min_y = std::min(min_y, y); + max_y = std::max(max_y, y); + } + + obj.rect = cv::Rect_(min_x, min_y, max_x - min_x, max_y - min_y); + + objects.push_back(obj); + + if (dump_this_frame) { + dump_candidates.push_back(DumpCandidate{i, conf, max_color_score, color_id, num_id, obj.prob}); + std::sort(dump_candidates.begin(), dump_candidates.end(), + [](const DumpCandidate& a, const DumpCandidate& b) { + return a.score > b.score; + }); + if (static_cast(dump_candidates.size()) > dump_topk_) { + dump_candidates.resize(static_cast(dump_topk_)); + } + } + } + + std::vector result = objects; + + if (dump_this_frame) { + std::cerr << std::fixed << std::setprecision(4) + << "[YoloTensorRT][dump] frame=" << infer_counter_ + << " output_shape=[" << output_rows_ << "," << output_cols_ << "]" + << " topk=" << dump_candidates.size() + << " dropped_conf=" << dropped_by_conf + << " dropped_color=" << dropped_by_color + << " final_after_postprocess=" << result.size() + << std::endl; + } + + return result; +} + +std::vector YoloTensorRT::applyNMS( + const std::vector& boxes, + const std::vector& scores, + float nms_threshold) { + std::vector indices; + if (boxes.empty()) { + return indices; + } + + std::vector order(boxes.size()); + std::iota(order.begin(), order.end(), 0); + std::sort(order.begin(), order.end(), + [&scores](int i, int j) { return scores[i] > scores[j]; }); + + std::vector suppressed(boxes.size(), false); + + for (size_t i = 0; i < order.size(); i++) { + const int idx = order[i]; + if (suppressed[idx]) { + continue; + } + + indices.push_back(idx); + + for (size_t j = i + 1; j < order.size(); j++) { + const int idx_j = order[j]; + if (suppressed[idx_j]) { + continue; + } + + const cv::Rect inter = boxes[idx] & boxes[idx_j]; + const float inter_area = static_cast(inter.area()); + const float union_area = static_cast(boxes[idx].area() + boxes[idx_j].area()) - inter_area; + const float iou = (union_area > 0.0f) ? inter_area / union_area : 0.0f; + + if (iou > nms_threshold) { + suppressed[idx_j] = true; + } + } + } + + return indices; +} + +std::vector YoloTensorRT::infer(const cv::Mat& img, int detect_color) { + if (img.empty()) { + return {}; + } + + const cv::Mat preprocessed = preprocess(img); + + const int h = preprocessed.rows; + const int w = preprocessed.cols; + const int c = preprocessed.channels(); + + const size_t channel_size = static_cast(h) * static_cast(w); + const size_t required_input_elems = channel_size * static_cast(c); + if (input_buffer_.size() < required_input_elems) { + input_buffer_.resize(required_input_elems); + } + + std::array chw_channels = { + cv::Mat(h, w, CV_32F, input_buffer_.data() + channel_size * 0), + cv::Mat(h, w, CV_32F, input_buffer_.data() + channel_size * 1), + cv::Mat(h, w, CV_32F, input_buffer_.data() + channel_size * 2)}; + cv::split(preprocessed, chw_channels); + + if (!inferInternal(input_buffer_.data(), output_buffer_.data(), 1)) { + return {}; + } + + infer_counter_++; + const bool dump_this_frame = + dump_model_output_ && + (dump_interval_ <= 1 || (infer_counter_ % static_cast(dump_interval_) == 0)); + + auto objects = postprocess(output_buffer_.data(), detect_color, dump_this_frame); + + const float scale_x = static_cast(img.cols) / static_cast(INPUT_WIDTH); + const float scale_y = static_cast(img.rows) / static_cast(INPUT_HEIGHT); + const float max_x = static_cast(std::max(0, img.cols - 1)); + const float max_y = static_cast(std::max(0, img.rows - 1)); + + for (auto& object : objects) { + for (int k = 0; k < 4; ++k) { + const int x_idx = k * 2; + const int y_idx = x_idx + 1; + object.landmarks[x_idx] = std::clamp(object.landmarks[x_idx] * scale_x, 0.0f, max_x); + object.landmarks[y_idx] = std::clamp(object.landmarks[y_idx] * scale_y, 0.0f, max_y); + } + + const float x1 = std::min(std::min(object.landmarks[0], object.landmarks[2]), + std::min(object.landmarks[4], object.landmarks[6])); + const float y1 = std::min(std::min(object.landmarks[1], object.landmarks[3]), + std::min(object.landmarks[5], object.landmarks[7])); + const float x2 = std::max(std::max(object.landmarks[0], object.landmarks[2]), + std::max(object.landmarks[4], object.landmarks[6])); + const float y2 = std::max(std::max(object.landmarks[1], object.landmarks[3]), + std::max(object.landmarks[5], object.landmarks[7])); + + object.rect.x = x1; + object.rect.y = y1; + object.rect.width = std::max(0.0f, x2 - x1); + object.rect.height = std::max(0.0f, y2 - y1); + } + + std::vector boxes; + std::vector scores; + boxes.reserve(objects.size()); + scores.reserve(objects.size()); + for (const auto& obj : objects) { + boxes.push_back(cv::Rect(static_cast(obj.rect.x), static_cast(obj.rect.y), + static_cast(obj.rect.width), static_cast(obj.rect.height))); + scores.push_back(obj.prob); + } + + std::vector keep_indices = applyNMS(boxes, scores, nms_threshold_); + + std::vector final_objects; + final_objects.reserve(keep_indices.size()); + for (int idx : keep_indices) { + final_objects.push_back(objects[idx]); + } + + return final_objects; +} + +} // namespace armor_yolo_detect diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/GIT_COMMIT_ID b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/GIT_COMMIT_ID new file mode 100644 index 0000000..23716e4 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/GIT_COMMIT_ID @@ -0,0 +1 @@ +5c1b7ccbff7e5141c1da7a9d963d660e5741c319 diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/LICENSE b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/LICENSE new file mode 100644 index 0000000..48bc6bb --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) Microsoft Corporation + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/Privacy.md b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/Privacy.md new file mode 100644 index 0000000..fcc8468 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/Privacy.md @@ -0,0 +1,21 @@ +# Privacy + +## Data Collection +The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the repository. There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft's privacy statement. Our privacy statement is located at https://go.microsoft.com/fwlink/?LinkID=824704. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices. + +*** + +### Private Builds +No data collection is performed when using your private builds built from source code. + +### Official Builds +ONNX Runtime does not maintain any independent telemetry collection mechanisms outside of what is provided by the platforms it supports. However, where applicable, ONNX Runtime will take advantage of platform-supported telemetry systems to collect trace events with the goal of improving product quality. + +Currently telemetry is only implemented for Windows builds and is turned **ON** by default in the official builds distributed in their respective package management repositories ([see here](../README.md#binaries)). This may be expanded to cover other platforms in the future. Data collection is implemented via 'Platform Telemetry' per vendor platform providers (see [telemetry.h](../onnxruntime/core/platform/telemetry.h)). + +#### Technical Details +The Windows provider uses the [TraceLogging](https://docs.microsoft.com/en-us/windows/win32/tracelogging/trace-logging-about) API for its implementation. This enables ONNX Runtime trace events to be collected by the operating system, and based on user consent, this data may be periodically sent to Microsoft servers following GDPR and privacy regulations for anonymity and data access controls. + +Windows ML and onnxruntime C APIs allow Trace Logging to be turned on/off (see [API pages](../README.md#api-documentation) for details). +For information on how to enable and disable telemetry, see [C API: Telemetry](./C_API.md#telemetry). +There are equivalent APIs in the C#, Python, and Java language bindings as well. diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/README.md b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/README.md new file mode 100644 index 0000000..cde039c --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/README.md @@ -0,0 +1,63 @@ +

+ +**ONNX Runtime is a cross-platform inference and training machine-learning accelerator**. + +**ONNX Runtime inference** can enable faster customer experiences and lower costs, supporting models from deep learning frameworks such as PyTorch and TensorFlow/Keras as well as classical machine learning libraries such as scikit-learn, LightGBM, XGBoost, etc. ONNX Runtime is compatible with different hardware, drivers, and operating systems, and provides optimal performance by leveraging hardware accelerators where applicable alongside graph optimizations and transforms. [Learn more →](https://www.onnxruntime.ai/docs/#onnx-runtime-for-inferencing) + +**ONNX Runtime training** can accelerate the model training time on multi-node NVIDIA GPUs for transformer models with a one-line addition for existing PyTorch training scripts. [Learn more →](https://www.onnxruntime.ai/docs/#onnx-runtime-for-training) + +## Get Started & Resources + +* **General Information**: [onnxruntime.ai](https://onnxruntime.ai) + +* **Usage documentation and tutorials**: [onnxruntime.ai/docs](https://onnxruntime.ai/docs) + +* **YouTube video tutorials**: [youtube.com/@ONNXRuntime](https://www.youtube.com/@ONNXRuntime) + +* [**Upcoming Release Roadmap**](https://github.com/microsoft/onnxruntime/wiki/Upcoming-Release-Roadmap) + +* **Companion sample repositories**: + - ONNX Runtime Inferencing: [microsoft/onnxruntime-inference-examples](https://github.com/microsoft/onnxruntime-inference-examples) + - ONNX Runtime Training: [microsoft/onnxruntime-training-examples](https://github.com/microsoft/onnxruntime-training-examples) + +## Builtin Pipeline Status + +|System|Inference|Training| +|---|---|---| +|Windows|[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20CPU%20CI%20Pipeline?label=Windows+CPU)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=9)
[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20GPU%20CI%20Pipeline?label=Windows+GPU)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=10)
[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Windows%20GPU%20TensorRT%20CI%20Pipeline?label=Windows+GPU+TensorRT)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=47)|| +|Linux|[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Linux%20CPU%20CI%20Pipeline?label=Linux+CPU)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=11)
[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Linux%20CPU%20Minimal%20Build%20E2E%20CI%20Pipeline?label=Linux+CPU+Minimal+Build)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=64)
[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Linux%20GPU%20CI%20Pipeline?label=Linux+GPU)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=12)
[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Linux%20GPU%20TensorRT%20CI%20Pipeline?label=Linux+GPU+TensorRT)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=45)
[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Linux%20OpenVINO%20CI%20Pipeline?label=Linux+OpenVINO)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=55)|[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/orttraining-linux-ci-pipeline?label=Linux+CPU+Training)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=86)
[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/orttraining-linux-gpu-ci-pipeline?label=Linux+GPU+Training)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=84)
[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/orttraining/orttraining-ortmodule-distributed?label=Training+Distributed)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=148)| +|Mac|[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/MacOS%20CI%20Pipeline?label=MacOS+CPU)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=13)|| +|Android|[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/Android%20CI%20Pipeline?label=Android)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=53)|| +|iOS|[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/iOS%20CI%20Pipeline?label=iOS)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=134)|| +|Web|[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/ONNX%20Runtime%20Web%20CI%20Pipeline?label=Web)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=161)|| +|Other|[![Build Status](https://dev.azure.com/onnxruntime/onnxruntime/_apis/build/status/onnxruntime-binary-size-checks-ci-pipeline?repoName=microsoft%2Fonnxruntime&label=Binary+Size+Check)](https://dev.azure.com/onnxruntime/onnxruntime/_build/latest?definitionId=187&repoName=microsoft%2Fonnxruntime)|| + +This project is tested with [BrowserStack](https://www.browserstack.com/home). + +## Third-party Pipeline Status + +|System|Inference|Training| +|---|---|---| +|Linux|[![Build Status](https://github.com/Ascend/onnxruntime/actions/workflows/build-and-test.yaml/badge.svg)](https://github.com/Ascend/onnxruntime/actions/workflows/build-and-test.yaml)|| + +## Data/Telemetry + +Windows distributions of this project may collect usage data and send it to Microsoft to help improve our products and services. See the [privacy statement](docs/Privacy.md) for more details. + +## Contributions and Feedback + +We welcome contributions! Please see the [contribution guidelines](CONTRIBUTING.md). + +For feature requests or bug reports, please file a [GitHub Issue](https://github.com/Microsoft/onnxruntime/issues). + +For general discussion or questions, please use [GitHub Discussions](https://github.com/microsoft/onnxruntime/discussions). + +## Code of Conduct + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) +or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +## License + +This project is licensed under the [MIT License](LICENSE). diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/ThirdPartyNotices.txt b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/ThirdPartyNotices.txt new file mode 100644 index 0000000..6a11f41 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/ThirdPartyNotices.txt @@ -0,0 +1,6508 @@ +THIRD PARTY SOFTWARE NOTICES AND INFORMATION + +Do Not Translate or Localize + +This software incorporates material from third parties. Microsoft makes certain +open source code available at http://3rdpartysource.microsoft.com, or you may +send a check or money order for US $5.00, including the product name, the open +source component name, and version number, to: + +Source Code Compliance Team +Microsoft Corporation +One Microsoft Way +Redmond, WA 98052 +USA + +Notwithstanding any other terms, you may reverse engineer this software to the +extent required to debug changes to any libraries licensed under the GNU Lesser +General Public License. + +_____ + +Intel Math Kernel Library (Intel MKL) + +Intel Simplified Software License (Version April 2018) + +Copyright (c) 2018 Intel Corporation. + +Use and Redistribution. You may use and redistribute the software (the “Software”), without modification, +provided the following conditions are met: + +* Redistributions must reproduce the above copyright notice and the following terms of use in the Software +and in the documentation and/or other materials provided with the distribution. + +* Neither the name of Intel nor the names of its suppliers may be used to endorse or promote products +derived from this Software without specific prior written permission. + +* No reverse engineering, decompilation, or disassembly of this Software is permitted. + +Limited patent license. Intel grants you a world-wide, royalty-free, non-exclusive license under patents it now +or hereafter owns or controls to make, have made, use, import, offer to sell and sell (“Utilize”) this Software, +but solely to the extent that any such patent is necessary to Utilize the Software alone. The patent license +shall not apply to any combinations which include this software. No hardware per se is licensed hereunder. + +Third party and other Intel programs. “Third Party Programs” are the files listed in the “third-party-programs.txt” +text file that is included with the Software and may include Intel programs under separate license terms. +Third Party Programs, even if included with the distribution of the Materials, are governed by +separate license terms and those license terms solely govern your use of those programs. + +DISCLAIMER. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE DISCLAIMED. THIS SOFTWARE IS +NOT INTENDED FOR USE IN SYSTEMS OR APPLICATIONS WHERE FAILURE OF THE SOFTWARE +MAY CAUSE PERSONAL INJURY OR DEATH AND YOU AGREE THAT YOU ARE FULLY RESPONSIBLE FOR ANY +CLAIMS, COSTS, DAMAGES, EXPENSES, AND ATTORNEYS’ FEES ARISING OUT OF ANY SUCH USE, +EVEN IF ANY CLAIM ALLEGES THAT INTEL WAS NEGLIGENT REGARDING THE DESIGN OR MANUFACTURE OF +THE MATERIALS. + +LIMITATION OF LIABILITY. IN NO EVENT WILL INTEL BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. YOU AGREE TO INDEMNIFY AND HOLD INTEL HARMLESS AGAINST ANY CLAIMS +AND EXPENSES RESULTING FROM YOUR USE OR UNAUTHORIZED USE OF THE SOFTWARE. + +No support. Intel may make changes to the Software, at any time without notice, and is not obligated to +support, update or provide training for the Software. + +Termination. Intel may terminate your right to use the Software in the event of your breach of this Agreement +and you fail to cure the breach within a reasonable period of time. + +Feedback. Should you provide Intel with comments, modifications, corrections, enhancements or other input +(“Feedback”) related to the Software Intel will be free to use, disclose, reproduce, license or otherwise +distribute or exploit the Feedback in its sole discretion without any obligations or restrictions of any kind, +including without limitation, intellectual property rights or licensing obligations. + +Compliance with laws. You agree to comply with all relevant laws and regulations governing your use, +transfer, import or export (or prohibition thereof) of the Software. + +Governing law. All disputes will be governed by the laws of the United States of America and the State of +Delaware without reference to conflict of law principles and subject to the exclusive jurisdiction of the state or +federal courts sitting in the State of Delaware, and each party agrees that it submits to the personal +jurisdiction and venue of those courts and waives any objections. The United Nations Convention on +Contracts for the International Sale of Goods (1980) is specifically excluded and will not apply to the +Software. + +*Other names and brands may be claimed as the property of others. + +_____ + +protocolbuffers/protobuf + +Copyright 2008 Google Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Code generated by the Protocol Buffer compiler is owned by the owner +of the input file used when generating it. This code is not +standalone and requires a support library to be linked with it. This +support library is itself covered by the above license. + +_____ + +madler/zlib + +The deflate format used by zlib was defined by Phil Katz. The deflate and +zlib specifications were written by L. Peter Deutsch. Thanks to all the +people who reported problems and suggested various improvements in zlib; they +are too numerous to cite here. + +Copyright notice: + + (C) 1995-2017 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +If you use the zlib library in a product, we would appreciate *not* receiving +lengthy legal documents to sign. The sources are provided for free but without +warranty of any kind. The library has been entirely written by Jean-loup +Gailly and Mark Adler; it does not include third-party code. + +If you redistribute modified sources, we would appreciate that you include in +the file ChangeLog history information documenting your changes. Please read +the FAQ for more information on the distribution of modified source versions. + +_____ + +pybind/pybind11 + +Copyright (c) 2016 Wenzel Jakob , All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Please also refer to the file CONTRIBUTING.md, which clarifies licensing of +external contributions to this project including patches, pull requests, etc. + +_____ + +onnx +Open Neural Network Exchange + +Copyright (c) Facebook, Inc. and Microsoft Corporation. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +_____ + +Eigen + +MPL v2.0 +Mozilla Public License Version 2.0 + + +================================== + +1. Definitions + +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions + +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities + +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation + +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination + +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + +_____ + +intel/dnnl + +Copyright 2016-2018 Intel Corporation + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +sub-components: + +xbyak + +Copyright (c) 2007 MITSUNARI Shigeo. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. +Neither the name of the copyright owner nor the names of its contributors may +be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +Microsoft GSL + +Copyright (c) 2015 Microsoft Corporation. All rights reserved. + +This code is licensed under the MIT License (MIT). + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +_____ + +Tensorflow + +Copyright 2018 The TensorFlow Authors. All rights reserved. + +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, +and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by +the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all +other entities that control, are controlled by, or are under common +control with that entity. For the purposes of this definition, +"control" means (i) the power, direct or indirect, to cause the +direction or management of such entity, whether by contract or +otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity +exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, +including but not limited to software source code, documentation +source, and configuration files. + +"Object" form shall mean any form resulting from mechanical +transformation or translation of a Source form, including but +not limited to compiled object code, generated documentation, +and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or +Object form, made available under the License, as indicated by a +copyright notice that is included in or attached to the work +(an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object +form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications +represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain +separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including +the original version of the Work and any modifications or additions +to that Work or Derivative Works thereof, that is intentionally +submitted to Licensor for inclusion in the Work by the copyright owner +or by an individual or Legal Entity authorized to submit on behalf of +the copyright owner. For the purposes of this definition, "submitted" +means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, +and issue tracking systems that are managed by, or on behalf of, the +Licensor for the purpose of discussing and improving the Work, but +excluding communication that is conspicuously marked or otherwise +designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity +on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the +Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of +this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable +(except as stated in this section) patent license to make, have made, +use, offer to sell, sell, import, and otherwise transfer the Work, +where such license applies only to those patent claims licensable +by such Contributor that are necessarily infringed by their +Contribution(s) alone or by combination of their Contribution(s) +with the Work to which such Contribution(s) was submitted. If You +institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct +or contributory patent infringement, then any patent licenses +granted to You under this License for that Work shall terminate +as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the +Work or Derivative Works thereof in any medium, with or without +modifications, and in Source or Object form, provided that You +meet the following conditions: + +(a) You must give any other recipients of the Work or +Derivative Works a copy of this License; and + +(b) You must cause any modified files to carry prominent notices +stating that You changed the files; and + +(c) You must retain, in the Source form of any Derivative Works +that You distribute, all copyright, patent, trademark, and +attribution notices from the Source form of the Work, +excluding those notices that do not pertain to any part of +the Derivative Works; and + +(d) If the Work includes a "NOTICE" text file as part of its +distribution, then any Derivative Works that You distribute must +include a readable copy of the attribution notices contained +within such NOTICE file, excluding those notices that do not +pertain to any part of the Derivative Works, in at least one +of the following places: within a NOTICE text file distributed +as part of the Derivative Works; within the Source form or +documentation, if provided along with the Derivative Works; or, +within a display generated by the Derivative Works, if and +wherever such third-party notices normally appear. The contents +of the NOTICE file are for informational purposes only and +do not modify the License. You may add Your own attribution +notices within Derivative Works that You distribute, alongside +or as an addendum to the NOTICE text from the Work, provided +that such additional attribution notices cannot be construed +as modifying the License. + +You may add Your own copyright statement to Your modifications and +may provide additional or different license terms and conditions +for use, reproduction, or distribution of Your modifications, or +for any such Derivative Works as a whole, provided Your use, +reproduction, and distribution of the Work otherwise complies with +the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, +any Contribution intentionally submitted for inclusion in the Work +by You to the Licensor shall be under the terms and conditions of +this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify +the terms of any separate license agreement you may have executed +with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade +names, trademarks, service marks, or product names of the Licensor, +except as required for reasonable and customary use in describing the +origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or +agreed to in writing, Licensor provides the Work (and each +Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +implied, including, without limitation, any warranties or conditions +of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A +PARTICULAR PURPOSE. You are solely responsible for determining the +appropriateness of using or redistributing the Work and assume any +risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, +whether in tort (including negligence), contract, or otherwise, +unless required by applicable law (such as deliberate and grossly +negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, +incidental, or consequential damages of any character arising as a +result of this License or out of the use or inability to use the +Work (including but not limited to damages for loss of goodwill, +work stoppage, computer failure or malfunction, or any and all +other commercial damages or losses), even if such Contributor +has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing +the Work or Derivative Works thereof, You may choose to offer, +and charge a fee for, acceptance of support, warranty, indemnity, +or other liability obligations and/or rights consistent with this +License. However, in accepting such obligations, You may act only +on Your own behalf and on Your sole responsibility, not on behalf +of any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason +of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017, The TensorFlow Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +_____ + +Microsoft Cognitive Toolkit (CNTK) + +Copyright (c) Microsoft Corporation. All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +_____ + +NumPy License + +Copyright (c) 2005, NumPy Developers + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + Neither the name of the NumPy Developers nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +Pytorch / Caffe2 + +From PyTorch: + +Copyright (c) 2016- Facebook, Inc (Adam Paszke) +Copyright (c) 2014- Facebook, Inc (Soumith Chintala) +Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) +Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) +Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) +Copyright (c) 2011-2013 NYU (Clement Farabet) +Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) +Copyright (c) 2006 Idiap Research Institute (Samy Bengio) +Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) + +From Caffe2: + +Copyright (c) 2016-present, Facebook Inc. All rights reserved. + +All contributions by Facebook: +Copyright (c) 2016 Facebook Inc. + +All contributions by Google: +Copyright (c) 2015 Google Inc. +All rights reserved. + +All contributions by Yangqing Jia: +Copyright (c) 2015 Yangqing Jia +All rights reserved. + +All contributions from Caffe: +Copyright(c) 2013, 2014, 2015, the respective contributors +All rights reserved. + +All other contributions: +Copyright(c) 2015, 2016 the respective contributors +All rights reserved. + +Caffe2 uses a copyright model similar to Caffe: each contributor holds +copyright over their contributions to Caffe2. The project versioning records +all such contribution and copyright details. If a contributor wants to further +mark their specific copyright on a particular contribution, they should +indicate their copyright solely in the commit message of the change when it is +committed. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America + and IDIAP Research Institute nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +_____ + +Caffe + +COPYRIGHT + +All contributions by the University of California: +Copyright (c) 2014-2017 The Regents of the University of California (Regents) +All rights reserved. + +All other contributions: +Copyright (c) 2014-2017, the respective contributors +All rights reserved. + +Caffe uses a shared copyright model: each contributor holds copyright over +their contributions to Caffe. The project versioning records all such +contribution and copyright details. If a contributor wants to further mark +their specific copyright on a particular contribution, they should indicate +their copyright solely in the commit message of the change when it is +committed. + +LICENSE + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +CONTRIBUTION AGREEMENT + +By contributing to the BVLC/caffe repository through pull-request, comment, +or otherwise, the contributor releases their content to the +license and copyright terms herein. + +_____ + +The LLVM Compiler Infrastructure + +============================================================================== +LLVM Release License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2003-2017 University of Illinois at Urbana-Champaign. +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +Google Test llvm/utils/unittest/googletest +OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex} +pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT} +ARM contributions llvm/lib/Target/ARM/LICENSE.TXT +md5 contributions llvm/lib/Support/MD5.cpp llvm/include/llvm/Support/MD5.h + +_____ + +google/benchmark + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +CONTRIBUTORS + +# People who have agreed to one of the CLAs and can contribute patches. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# Names should be added to this file only after verifying that +# the individual or the individual's organization has agreed to +# the appropriate Contributor License Agreement, found here: +# +# https://developers.google.com/open-source/cla/individual +# https://developers.google.com/open-source/cla/corporate +# +# The agreement for individuals can be filled out on the web. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file, depending on whether the +# individual or corporate CLA was used. +# +# Names should be added to this file as: +# Name +# +# Please keep the list sorted. + +Albert Pretorius +Arne Beer +Billy Robert O'Neal III +Chris Kennelly +Christopher Seymour +David Coeurjolly +Deniz Evrenci +Dominic Hamon +Dominik Czarnota +Eric Fiselier +Eugene Zhuk +Evgeny Safronov +Federico Ficarelli +Felix Homann +Ismael Jimenez Martinez +Jern-Kuan Leong +JianXiong Zhou +Joao Paulo Magalhaes +John Millikin +Jussi Knuuttila +Kai Wolf +Kishan Kumar +Kaito Udagawa +Lei Xu +Matt Clarkson +Maxim Vafin +Nick Hutchinson +Oleksandr Sochka +Pascal Leroy +Paul Redmond +Pierre Phaneuf +Radoslav Yovchev +Raul Marin +Ray Glover +Robert Guo +Roman Lebedev +Shuo Chen +Tobias Ulvgård +Tom Madams +Yixuan Qiu +Yusuke Suzuki +Zbigniew Skowron + +AUTHORS + +# This is the official list of benchmark authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. +# +# Names should be added to this file as: +# Name or Organization +# The email address is not required for organizations. +# +# Please keep the list sorted. + +Albert Pretorius +Arne Beer +Carto +Christopher Seymour +David Coeurjolly +Deniz Evrenci +Dirac Research +Dominik Czarnota +Eric Fiselier +Eugene Zhuk +Evgeny Safronov +Federico Ficarelli +Felix Homann +Google Inc. +International Business Machines Corporation +Ismael Jimenez Martinez +Jern-Kuan Leong +JianXiong Zhou +Joao Paulo Magalhaes +Jussi Knuuttila +Kaito Udagawa +Kishan Kumar +Lei Xu +Matt Clarkson +Maxim Vafin +MongoDB Inc. +Nick Hutchinson +Oleksandr Sochka +Paul Redmond +Radoslav Yovchev +Roman Lebedev +Shuo Chen +Steinar H. Gunderson +Stripe, Inc. +Yixuan Qiu +Yusuke Suzuki +Zbigniew Skowron + +_____ + +HalideIR + +Copyright (c) 2016 HalideIR contributors +Copyright (c) 2012-2014 MIT CSAIL, Google Inc., and other contributors +HalideIR is derived from the Halide project. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +_____ + +Distributed Machine Learning Common Codebase + +Copyright (c) 2015 by Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +_____ + +DLPack: Open In Memory Tensor Structure + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017 by Contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +_____ + +HowardHinnant/date + +The source code in this project is released using the MIT License. There is no +global license for the project because each file is licensed individually with +different author names and/or dates. + +If you contribute to this project, please add your name to the license of each +file you modify. If you have already contributed to this project and forgot to +add your name to the license, please feel free to submit a new P/R to add your +name to the license in each file you modified. + +For convenience, here is a copy of the MIT license found in each file except +without author names or dates: + +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +_____ + +TVM Open Deep Learning Compiler Stack + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +CONTRIBUTORS + +TVM Contributors +================ +TVM adopts the Apache style model and governs by merit. We believe that it is important to create an inclusive community where everyone can use, +contribute to, and influence the direction of the project. We actively invite contributors who have earned the merit to be part of the development community. + +See the [community structure document](http://docs.tvm.ai/contribute/community.html) for the explanation of community structure and contribution guidelines. + +## Committers +- [Tianqi Chen](https://github.com/tqchen) (PMC) +- [Thierry Moreau](http://homes.cs.washington.edu/~moreau/) +- [Ziheng Jiang](https://github.com/ZihengJiang) +- [Haichen Shen](http://homes.cs.washington.edu/~haichen/) +- [Yizhi Liu](https://github.com/yzhliu) + +## Code Owners +- [Aditya Atluri](https://github.com/adityaatluri) ROCM +- [Leyuan Wang](https://github.com/Laurawly) TOPI +- [Yuwei Hu](https://github.com/Huyuwei) TOPI +- [Zhixun Tan](https://github.com/phisiart) OpenGL/WebGL backend +- [Nick Hynes](https://github.com/nhynes) SGX and secured computing +- [Lianmin Zheng](https://github.com/merrymercy) AutoTVM + +## Reviewers +- [Zhi Chen](https://github.com/zhiics) +- [Xiaoqiang Dan](https://github.com/xqdan) +- [Liangfu Chen](https://github.com/liangfu) +- [Masahiro Masuda](https://github.com/masahi) +- [Kazutaka Morita](https://github.com/kazum) +- [Tatsuya Nishiyama](https://github.com/nishi-t) +- [Pariksheet Pinjari](https://github.com/PariksheetPinjari909) +- [Jared Roesch](https://github.com/jroesch) +- [Siva](https://github.com/srkreddy1238) +- [Siju Samuel](https://github.com/siju-samuel) +- [Alex Weaver](https://github.com/alex-weaver) +- [Yao Wang](https://github.com/kevinthesun) +- [Jian Weng](https://github.com/were) +- [Eddie Yan](https://github.com/eqy) +- [Joshua Z. Zhang](https://github.com/zhreshold) + +## List of Contributors +- [Full List of Contributors](https://github.com/dmlc/tvm/graphs/contributors) + - To contributors: please add your name to the list. +- [Qiao Zhang](https://github.com/zhangqiaorjc) +- [Haolong Zhang](https://github.com/haolongzhangm) +- [Cody Hao Yu](https://github.com/comaniac) +- [Chris Nuernberger](https://github.com/cnuernber) + +_____ + +FreeBSD: getopt.c file + +Copyright (c) 1987, 1993, 1994 +The Regents of the University of California. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + + 1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +3. Neither the name of the University nor the names of its contributors +may be used to endorse or promote products derived from this software +without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. +_____ + + +google/googletest + +Copyright 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +G3log : Asynchronous logger with Dynamic Sinks + +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or +distribute this software, either in source code form or as a compiled +binary, for any purpose, commercial or non-commercial, and by any +means. + +In jurisdictions that recognize copyright laws, the author or authors +of this software dedicate any and all copyright interest in the +software to the public domain. We make this dedication for the benefit +of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of +relinquishment in perpetuity of all present and future rights to this +software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to +_____ + +Scikit-learn + +Copyright (c) 2007–2018 The scikit-learn developers. +All rights reserved. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + a. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + b. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + c. Neither the name of the Scikit-learn Developers nor the names of + its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +_____ + +google/nsync + +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +_____ + +google/re2 + +Copyright (c) 2009 The RE2 Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +_____ +onnx/onnx-tensorrt + +MIT License + +Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +Copyright (c) 2018 Open Neural Network Exchange + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +_____ +nvidia/cutlass + +Copyright (c) 2017 - 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +SPDX-License-Identifier: BSD-3-Clause + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ +Boost + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + +_____ + +JDAI-CV/DNNLibrary + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [2019] [JD.com Inc. JD AI] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +_____ + +google/flatbuffers + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Google Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +_____ + +google/glog + +Copyright (c) 2008, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +A function gettimeofday in utilities.cc is based on + +http://www.google.com/codesearch/p?hl=en#dR3YEbitojA/COPYING&q=GetSystemTimeAsFileTime%20license:bsd + +The license of this code is: + +Copyright (c) 2003-2008, Jouni Malinen and contributors +All Rights Reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name(s) of the above-listed copyright holder(s) nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +abseil-cpp +https://github.com/abseil/abseil-cpp + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +_____ + +microsoft/wil + +MIT License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE + +_____ + +nlohmann/json + +MIT License + +Copyright (c) 2013-2019 Niels Lohmann + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +_____ + +dcleblanc/SafeInt + +MIT License + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +_____ +Open MPI + +3-Clause BSD License + +Most files in this release are marked with the copyrights of the +organizations who have edited them. The copyrights below are in no +particular order and generally reflect members of the Open MPI core +team who have contributed code to this release. The copyrights for +code used under license from other parties are included in the +corresponding files. + +Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana + University Research and Technology + Corporation. All rights reserved. +Copyright (c) 2004-2017 The University of Tennessee and The University + of Tennessee Research Foundation. All rights + reserved. +Copyright (c) 2004-2010 High Performance Computing Center Stuttgart, + University of Stuttgart. All rights reserved. +Copyright (c) 2004-2008 The Regents of the University of California. + All rights reserved. +Copyright (c) 2006-2017 Los Alamos National Security, LLC. All rights + reserved. +Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved. +Copyright (c) 2006-2010 Voltaire, Inc. All rights reserved. +Copyright (c) 2006-2017 Sandia National Laboratories. All rights reserved. +Copyright (c) 2006-2010 Sun Microsystems, Inc. All rights reserved. + Use is subject to license terms. +Copyright (c) 2006-2017 The University of Houston. All rights reserved. +Copyright (c) 2006-2009 Myricom, Inc. All rights reserved. +Copyright (c) 2007-2017 UT-Battelle, LLC. All rights reserved. +Copyright (c) 2007-2017 IBM Corporation. All rights reserved. +Copyright (c) 1998-2005 Forschungszentrum Juelich, Juelich Supercomputing + Centre, Federal Republic of Germany +Copyright (c) 2005-2008 ZIH, TU Dresden, Federal Republic of Germany +Copyright (c) 2007 Evergrid, Inc. All rights reserved. +Copyright (c) 2008 Chelsio, Inc. All rights reserved. +Copyright (c) 2008-2009 Institut National de Recherche en + Informatique. All rights reserved. +Copyright (c) 2007 Lawrence Livermore National Security, LLC. + All rights reserved. +Copyright (c) 2007-2017 Mellanox Technologies. All rights reserved. +Copyright (c) 2006-2010 QLogic Corporation. All rights reserved. +Copyright (c) 2008-2017 Oak Ridge National Labs. All rights reserved. +Copyright (c) 2006-2012 Oracle and/or its affiliates. All rights reserved. +Copyright (c) 2009-2015 Bull SAS. All rights reserved. +Copyright (c) 2010 ARM ltd. All rights reserved. +Copyright (c) 2016 ARM, Inc. All rights reserved. +Copyright (c) 2010-2011 Alex Brick . All rights reserved. +Copyright (c) 2012 The University of Wisconsin-La Crosse. All rights + reserved. +Copyright (c) 2013-2016 Intel, Inc. All rights reserved. +Copyright (c) 2011-2017 NVIDIA Corporation. All rights reserved. +Copyright (c) 2016 Broadcom Limited. All rights reserved. +Copyright (c) 2011-2017 Fujitsu Limited. All rights reserved. +Copyright (c) 2014-2015 Hewlett-Packard Development Company, LP. All + rights reserved. +Copyright (c) 2013-2017 Research Organization for Information Science (RIST). + All rights reserved. +Copyright (c) 2017-2018 Amazon.com, Inc. or its affiliates. All Rights + reserved. +Copyright (c) 2018 DataDirect Networks. All rights reserved. +Copyright (c) 2018-2019 Triad National Security, LLC. All rights reserved. + +$COPYRIGHT$ + +Additional copyrights may follow + +$HEADER$ + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer listed + in this license in the documentation and/or other materials + provided with the distribution. + +- Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +The copyright holders provide no reassurances that the source code +provided does not infringe any patent, copyright, or any other +intellectual property rights of third parties. The copyright holders +disclaim any liability to any recipient for claims brought against +recipient by any third party for infringement of that parties +intellectual property rights. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +The Android Open Source Project + +Copyright (C) 2017 The Android Open Source Project +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + +------ + +libprotobuf-mutator + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + ----- + + openucx/ucx + https://github.com/openucx/ucx + + Copyright (c) 2014-2015 UT-Battelle, LLC. All rights reserved. + Copyright (C) 2014-2020 Mellanox Technologies Ltd. All rights reserved. + Copyright (C) 2014-2015 The University of Houston System. All rights reserved. + Copyright (C) 2015 The University of Tennessee and The University + of Tennessee Research Foundation. All rights reserved. + Copyright (C) 2016-2020 ARM Ltd. All rights reserved. + Copyright (c) 2016 Los Alamos National Security, LLC. All rights reserved. + Copyright (C) 2016-2020 Advanced Micro Devices, Inc. All rights reserved. + Copyright (C) 2019 UChicago Argonne, LLC. All rights reserved. + Copyright (c) 2018-2020 NVIDIA CORPORATION. All rights reserved. + Copyright (C) 2020 Huawei Technologies Co., Ltd. All rights reserved. + Copyright (C) 2016-2020 Stony Brook University. All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + ----- + + From PyTorch: + + Copyright (c) 2016- Facebook, Inc (Adam Paszke) + Copyright (c) 2014- Facebook, Inc (Soumith Chintala) + Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) + Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) + Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) + Copyright (c) 2011-2013 NYU (Clement Farabet) + Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, Iain Melvin, Jason Weston) + Copyright (c) 2006 Idiap Research Institute (Samy Bengio) + Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, Samy Bengio, Johnny Mariethoz) + + From Caffe2: + + Copyright (c) 2016-present, Facebook Inc. All rights reserved. + + All contributions by Facebook: + Copyright (c) 2016 Facebook Inc. + + All contributions by Google: + Copyright (c) 2015 Google Inc. + All rights reserved. + + All contributions by Yangqing Jia: + Copyright (c) 2015 Yangqing Jia + All rights reserved. + + All contributions from Caffe: + Copyright(c) 2013, 2014, 2015, the respective contributors + All rights reserved. + + All other contributions: + Copyright(c) 2015, 2016 the respective contributors + All rights reserved. + + Caffe2 uses a copyright model similar to Caffe: each contributor holds + copyright over their contributions to Caffe2. The project versioning records + all such contribution and copyright details. If a contributor wants to further + mark their specific copyright on a particular contribution, they should + indicate their copyright solely in the commit message of the change when it is + committed. + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories America + and IDIAP Research Institute nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + +_____ + + mpi4py + https://github.com/mpi4py/mpi4py/ + + ======================= + LICENSE: MPI for Python + ======================= + + :Author: Lisandro Dalcin + :Contact: dalcinl@gmail.com + + + Copyright (c) 2019, Lisandro Dalcin. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +_____ +huggingface/transformers + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +_____ +msgpack/msgpack-python + +Copyright (C) 2008-2011 INADA Naoki + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +_____ +lanpa/tensorboardX + +MIT License + +Copyright (c) 2017 Tzu-Wei Huang + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +_____ +tensorflow/tensorboard + +Copyright 2017 The TensorFlow Authors. All rights reserved. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017, The TensorFlow Authors. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + +_____ + +cerberus + +Cerberus is a lightweight and extensible data validation library for Python. + +ISC License + +Copyright (c) 2012-2016 Nicola Iarocci. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +_____ + +MurmurHash3 + +MIT license + +https://github.com/aappleby/smhasher + +SMHasher is a test suite designed to test the distribution, collision, and +performance properties of non-cryptographic hash functions. +This is the home for the MurmurHash family of hash functions along with the +SMHasher test suite used to verify them. +SMHasher is released under the MIT license. +All MurmurHash versions are public domain software, and the author disclaims all copyright to their code. + +_____ + +gtest-ios-framework + +https://github.com/mestevens/gtest-ios-framework + +Copyright (c) 2013 Matthew Stevens + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +_____ + +DLPack + +https://github.com/dmlc/dlpack + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2017 by Contributors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +_____ + +emsdk + +MIT/Expat license + +https://github.com/emscripten-core/emsdk + +Copyright (c) 2018 Emscripten authors (see AUTHORS in Emscripten) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +---------------------------------------------------------------------------- + +This is the MIT/Expat License. For more information see: + +1. http://www.opensource.org/licenses/mit-license.php + +2. http://en.wikipedia.org/wiki/MIT_License + +_____ + +coremltools + +BSD-3-Clause License + +https://github.com/apple/coremltools + +Copyright (c) 2020, Apple Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +© 2021 GitHub, Inc. + +_____ + +react-native + +MIT License + +https://github.com/facebook/react-native + +Copyright (c) Facebook, Inc. and its affiliates. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +_____ + +pytorch/cpuinfo + +BSD 2-Clause "Simplified" License + +https://github.com/pytorch/cpuinfo + +Copyright (c) 2019 Google LLC +Copyright (c) 2017-2018 Facebook Inc. +Copyright (C) 2012-2017 Georgia Institute of Technology +Copyright (C) 2010-2012 Marat Dukhan + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +SQLite Is Public Domain + +All of the code and documentation in SQLite has been dedicated to the public +domain by the authors. All code authors, and representatives of the companies +they work for, have signed affidavits dedicating their contributions to the +public domain and originals of those signed affidavits are stored in a firesafe +at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, +compile, sell, or distribute the original SQLite code, either in source code +form or as a compiled binary, for any purpose, commercial or non-commercial, +and by any means. + +The previous paragraph applies to the deliverable code and documentation in +SQLite - those parts of the SQLite library that you actually bundle and ship +with a larger application. Some scripts used as part of the build process (for +example the "configure" scripts generated by autoconf) might fall under other +open-source licenses. Nothing from these build scripts ever reaches the final +deliverable SQLite library, however, and so the licenses associated with those +scripts should not be a factor in assessing your rights to copy and use the +SQLite library. + +All of the deliverable code in SQLite has been written from scratch. No code +has been taken from other projects or from the open internet. Every line of +code can be traced back to its original author, and all of those authors have +public domain dedications on file. So the SQLite code base is clean and is +uncontaminated with licensed code from other projects. + +_____ + +google/XNNPACK + +BSD License + +For XNNPACK software + +Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. +Copyright 2019 Google LLC + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name Facebook nor the names of its contributors may be used to + endorse or promote products derived from this software without specific + prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +google/sentencepiece, https://github.com/google/sentencepiece +(included when statically linked with onnxruntime-extensions) + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +_____ + +dlfcn-win32/dlfcn-win32 is licensed under the MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +_____ + +The Python Imaging Library (PIL) is + + Copyright © 1997-2011 by Secret Labs AB + Copyright © 1995-2011 by Fredrik Lundh + +Pillow is the friendly PIL fork. It is + + Copyright © 2010-2023 by Alex Clark and contributors + +Like PIL, Pillow is licensed under the open source HPND License: + +By obtaining, using, and/or copying this software and/or its associated +documentation, you agree that you have read, understood, and will comply +with the following terms and conditions: + +Permission to use, copy, modify, and distribute this software and its +associated documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appears in all copies, and that +both that copyright notice and this permission notice appear in supporting +documentation, and that the name of Secret Labs AB or the author not be +used in advertising or publicity pertaining to distribution of the software +without specific, written prior permission. + +SECRET LABS AB AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. +IN NO EVENT SHALL SECRET LABS AB OR THE AUTHOR BE LIABLE FOR ANY SPECIAL, +INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + +_____ + +openssl/openssl, https://github.com/openssl/openssl + + Apache License + Version 2.0, January 2004 + https://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + +_____ + +Tencent/rapidjson, https://github.com/Tencent/rapidjson + +Tencent is pleased to support the open source community by making RapidJSON available. + +Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved. + +If you have downloaded a copy of the RapidJSON binary from Tencent, please note that the RapidJSON binary is licensed under the MIT License. +If you have downloaded a copy of the RapidJSON source code from Tencent, please note that RapidJSON source code is licensed under the MIT License, except for the third-party components listed below which are subject to different license terms. Your integration of RapidJSON into your own projects may require compliance with the MIT License, as well as the other licenses applicable to the third-party components included within RapidJSON. To avoid the problematic JSON license in your own projects, it's sufficient to exclude the bin/jsonchecker/ directory, as it's the only code under the JSON license. +A copy of the MIT License is included in this file. + +Other dependencies and licenses: + +Open Source Software Licensed Under the BSD License: +-------------------------------------------------------------------- + +The msinttypes r29 +Copyright (c) 2006-2013 Alexander Chemeris +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +* Neither the name of copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Open Source Software Licensed Under the JSON License: +-------------------------------------------------------------------- + +json.org +Copyright (c) 2002 JSON.org +All Rights Reserved. + +JSON_checker +Copyright (c) 2002 JSON.org +All Rights Reserved. + + +Terms of the JSON License: +--------------------------------------------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +The Software shall be used for Good, not Evil. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Terms of the MIT License: +-------------------------------------------------------------------- + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +_____ + +boostorg/boost, https://github.com/boostorg/boost + +Boost Software License - Version 1.0 - August 17th, 2003 + +Permission is hereby granted, free of charge, to any person or organization +obtaining a copy of the software and accompanying documentation covered by +this license (the "Software") to use, reproduce, display, distribute, +execute, and transmit the Software, and to prepare derivative works of the +Software, and to permit third-parties to whom the Software is furnished to +do so, all subject to the following: + +The copyright notices in the Software and this entire statement, including +the above license grant, this restriction and the following disclaimer, +must be included in all copies of the Software, in whole or in part, and +all derivative works of the Software, unless such copies or derivative +works are solely in the form of machine-executable object code generated by +a source language processor. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +_____ + +libb64/libb64, https://github.com/libb64/libb64 + +Copyright-Only Dedication (based on United States law) or Public Domain Certification + +The person or persons who have associated work with this document (the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of his knowledge, the work of authorship identified is in the public domain of the country from which the work is published, or (b) hereby dedicates whatever copyright the dedicators holds in the work of authorship identified below (the "Work") to the public domain. A certifier, moreover, dedicates any copyright interest he may have in the associated work, and for these purposes, is described as a "dedicator" below. + +A certifier has taken reasonable steps to verify the copyright status of this work. Certifier recognizes that his good faith efforts may not shield him from liability if in fact the work certified is not in the public domain. + +Dedicator makes this dedication for the benefit of the public at large and to the detriment of the Dedicator's heirs and successors. Dedicator intends this dedication to be an overt act of relinquishment in perpetuity of all present and future rights under copyright law, whether vested or contingent, in the Work. Dedicator understands that such relinquishment of all rights includes the relinquishment of all rights to enforce (by lawsuit or otherwise) those copyrights in the Work. + +Dedicator recognizes that, once placed in the public domain, the Work may be freely reproduced, distributed, transmitted, used, modified, built upon, or otherwise exploited by anyone for any purpose, commercial or non-commercial, and in any way, including by methods that have not yet been invented or conceived. + +_____ + +posix pthread library, https://sourceforge.net/projects/pthreads4w + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +_____ + +Triton Inference Server & Client, https://github.com/triton-inference-server + +Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of NVIDIA CORPORATION nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +microsoft/mimalloc, https://github.com/microsoft/mimalloc + +MIT License + +Copyright (c) 2018-2021 Microsoft Corporation, Daan Leijen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +_____ + +TensorFlow.js + +https://github.com/tensorflow/tfjs + + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +—— + +curl/curl + +https://github.com/curl + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (C) Daniel Stenberg, , and many +contributors, see the THANKS file. + +All rights reserved. + +Permission to use, copy, modify, and distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright +notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization of the copyright holder. + +_____ + +Intel neural-compressor + +https://github.com/intel/neural-compressor + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + ============================================================================ + + Copyright 2016-2019 Intel Corporation + Copyright 2018 YANDEX LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + This distribution includes third party software ("third party programs"). + This third party software, even if included with the distribution of + the Intel software, may be governed by separate license terms, including + without limitation, third party license terms, other Intel software license + terms, and open source software license terms. These separate license terms + govern your use of the third party programs as set forth in the + "THIRD-PARTY-PROGRAMS" file. + +_____ + +FlashAttention, https://github.com/Dao-AILab/flash-attention + +BSD 3-Clause License + +Copyright (c) 2022, the respective contributors, as shown by the AUTHORS file. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the copyright holder nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_____ + +composable_kernel + +https://github.com/ROCmSoftwarePlatform/composable_kernel + +Copyright (c) 2018- , Advanced Micro Devices, Inc. (Chao Liu, Jing Zhang) +Copyright (c) 2019- , Advanced Micro Devices, Inc. (Letao Qin, Qianfeng Zhang, Liang Huang, Shaojie Wang) +Copyright (c) 2022- , Advanced Micro Devices, Inc. (Anthony Chang, Chunyu Lai, Illia Silin, Adam Osewski, Poyen Chen, Jehandad Khan) +Copyright (c) 2019-2021, Advanced Micro Devices, Inc. (Hanwen Chang) +Copyright (c) 2019-2020, Advanced Micro Devices, Inc. (Tejash Shah) +Copyright (c) 2020 , Advanced Micro Devices, Inc. (Xiaoyan Zhou) +Copyright (c) 2021-2022, Advanced Micro Devices, Inc. (Jianfeng Yan) + +SPDX-License-Identifier: MIT +Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +_____ + +neural-speed + +https://github.com/intel/neural-speed + + Apache License + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + ============================================================================ + + Copyright 2016-2019 Intel Corporation + Copyright 2018 YANDEX LLC + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + + This distribution includes third party software ("third party programs"). + This third party software, even if included with the distribution of + the Intel software, may be governed by separate license terms, including + without limitation, third party license terms, other Intel software license + terms, and open source software license terms. These separate license terms + govern your use of the third party programs as set forth in the + "THIRD-PARTY-PROGRAMS" file. diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/VERSION_NUMBER b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/VERSION_NUMBER new file mode 100644 index 0000000..0044d6c --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/VERSION_NUMBER @@ -0,0 +1 @@ +1.20.1 diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/core/providers/custom_op_context.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/core/providers/custom_op_context.h new file mode 100644 index 0000000..b10126d --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/core/providers/custom_op_context.h @@ -0,0 +1,10 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +// CustomOpContext defines an interface allowing a custom op to access ep-specific resources. +struct CustomOpContext { + CustomOpContext() = default; + virtual ~CustomOpContext() {}; +}; \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/core/providers/resource.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/core/providers/resource.h new file mode 100644 index 0000000..bd123e1 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/core/providers/resource.h @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +enum ResourceOffset { + cpu_resource_offset = 0, + cuda_resource_offset = 10000, + dml_resource_offset = 20000, + rocm_resource_offset = 30000, + // offsets for other ort eps + custom_ep_resource_offset = 10000000, + // offsets for customized eps +}; \ No newline at end of file diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/cpu_provider_factory.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/cpu_provider_factory.h new file mode 100644 index 0000000..2926786 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/cpu_provider_factory.h @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#include "onnxruntime_c_api.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * \param use_arena zero: false. non-zero: true. + */ +ORT_EXPORT +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CPU, _In_ OrtSessionOptions* options, int use_arena) +ORT_ALL_ARGS_NONNULL; + +#ifdef __cplusplus +} +#endif diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_c_api.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_c_api.h new file mode 100644 index 0000000..bde27df --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_c_api.h @@ -0,0 +1,4917 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// See docs\c_cxx\README.md on generating the Doxygen documentation from this file + +/** \mainpage ONNX Runtime + * + * ONNX Runtime is a high-performance inference and training graph execution engine for deep learning models. + * + * ONNX Runtime's C, C++ APIs offer an easy to use interface to onboard and execute onnx models. + * - \subpage c_cpp_api "Core C, C++ APIs" + * - \subpage training_c_cpp_api "Training C, C++ APIs for on-device training" + * + * \page c_cpp_api Core C, C++ APIs + *

C

+ * + * ::OrtApi - Click here to go to the structure with all C API functions. + * + *

C++

+ * + * ::Ort - Click here to go to the namespace holding all of the C++ wrapper classes + * + * It is a set of header only wrapper classes around the C API. The goal is to turn the C style return value error codes into C++ exceptions, and to + * automate memory management through standard C++ RAII principles. + * + * \addtogroup Global + * ONNX Runtime C API + * @{ + */ + +#pragma once +#include +#include +#include +#include + +/** \brief The API version defined in this header + * + * This value is used by some API functions to behave as this version of the header expects. + */ +#define ORT_API_VERSION 20 + +#ifdef __cplusplus +extern "C" { +#endif + +//! @} +// SAL2 Definitions +#ifndef _WIN32 +#define _In_ +#define _In_z_ +#define _In_opt_ +#define _In_opt_z_ +#define _Out_ +#define _Outptr_ +#define _Out_opt_ +#define _Inout_ +#define _Inout_opt_ +#define _Frees_ptr_opt_ +#define _Ret_maybenull_ +#define _Ret_notnull_ +#define _Check_return_ +#define _Outptr_result_maybenull_ +#define _In_reads_(X) +#define _Inout_updates_(X) +#define _Out_writes_(X) +#define _Inout_updates_all_(X) +#define _Out_writes_bytes_all_(X) +#define _Out_writes_all_(X) +#define _Success_(X) +#define _Outptr_result_buffer_maybenull_(X) +#define ORT_ALL_ARGS_NONNULL __attribute__((nonnull)) +#else +#include +#define ORT_ALL_ARGS_NONNULL +#endif + +#ifdef _WIN32 +// Define ORT_DLL_IMPORT if your program is dynamically linked to Ort. +// dllexport is not used, we use a .def file. +#ifdef ORT_DLL_IMPORT +#define ORT_EXPORT __declspec(dllimport) +#else +#define ORT_EXPORT +#endif +#define ORT_API_CALL _stdcall +#define ORT_MUST_USE_RESULT +#define ORTCHAR_T wchar_t +#else +// To make symbols visible on macOS/iOS +#ifdef __APPLE__ +#define ORT_EXPORT __attribute__((visibility("default"))) +#else +#define ORT_EXPORT +#endif +#define ORT_API_CALL +#define ORT_MUST_USE_RESULT __attribute__((warn_unused_result)) +#define ORTCHAR_T char +#endif + +/// ORTCHAR_T, ORT_TSTR are reserved specifically for path handling. +/// All other strings are UTF-8 encoded, use char and std::string +#ifndef ORT_TSTR +#ifdef _WIN32 +#define ORT_TSTR(X) L##X +// When X is a macro, L##X is not defined. In this case, we need to use ORT_TSTR_ON_MACRO. +#define ORT_TSTR_ON_MACRO(X) L"" X +#else +#define ORT_TSTR(X) X +#define ORT_TSTR_ON_MACRO(X) X +#endif +#endif + +// On Windows, ORT_FILE is a wchar_t version of the __FILE__ macro. +// Otherwise, ORT_FILE is equivalent to __FILE__. +#ifndef ORT_FILE +#define ORT_FILE_INTERNAL(x) ORT_TSTR(x) +#define ORT_FILE ORT_FILE_INTERNAL(__FILE__) +#endif + +// Any pointer marked with _In_ or _Out_, cannot be NULL. + +// Windows users should use unicode paths when possible to bypass the MAX_PATH limitation +// Every pointer marked with _In_ or _Out_, cannot be NULL. Caller should ensure that. +// for ReleaseXXX(...) functions, they can accept NULL pointer. + +#ifdef __cplusplus +// For any compiler with C++11 support, MSVC 2015 and greater, or Clang version supporting noexcept. +// Such complex condition is needed because compilers set __cplusplus value differently. +#ifndef __has_feature +#define __has_feature(x) 0 +#endif +#if ((__cplusplus >= 201103L) || (_MSC_VER >= 1900) || (defined(__has_feature) && __has_feature(cxx_noexcept))) +#define NO_EXCEPTION noexcept +#else +#define NO_EXCEPTION throw() +#endif +#else +#define NO_EXCEPTION +#endif + +// __VA_ARGS__ on Windows and Linux are different +#define ORT_API(RETURN_TYPE, NAME, ...) RETURN_TYPE ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION + +#define ORT_API_STATUS(NAME, ...) \ + _Success_(return == 0) _Check_return_ _Ret_maybenull_ OrtStatusPtr ORT_API_CALL NAME(__VA_ARGS__) \ + NO_EXCEPTION ORT_MUST_USE_RESULT + +// XXX: Unfortunately, SAL annotations are known to not work with function pointers +#define ORT_API2_STATUS(NAME, ...) \ + _Check_return_ _Ret_maybenull_ OrtStatusPtr(ORT_API_CALL* NAME)(__VA_ARGS__) NO_EXCEPTION ORT_MUST_USE_RESULT + +// Used in *.cc files. Almost as same as ORT_API_STATUS, except without ORT_MUST_USE_RESULT and ORT_EXPORT +#define ORT_API_STATUS_IMPL(NAME, ...) \ + _Success_(return == 0) _Check_return_ _Ret_maybenull_ OrtStatusPtr ORT_API_CALL NAME(__VA_ARGS__) NO_EXCEPTION + +#define ORT_CLASS_RELEASE(X) void(ORT_API_CALL * Release##X)(_Frees_ptr_opt_ Ort##X * input) + +#ifdef __DOXYGEN__ +#undef ORT_API_STATUS +#define ORT_API_STATUS(NAME, ...) OrtStatus* NAME(__VA_ARGS__) +#undef ORT_API2_STATUS +#define ORT_API2_STATUS(NAME, ...) OrtStatus* NAME(__VA_ARGS__) +#undef ORT_CLASS_RELEASE +#define ORT_CLASS_RELEASE(X) void Release##X(Ort##X* input) +#undef NO_EXCEPTION +#define NO_EXCEPTION +#endif +/** \addtogroup Global + * ONNX Runtime C API + * @{ + */ + +/** Copied from TensorProto::DataType + * Currently, Ort doesn't support complex64, complex128 + */ +typedef enum ONNXTensorElementDataType { + ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED, + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT, // maps to c type float + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8, // maps to c type uint8_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8, // maps to c type int8_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16, // maps to c type uint16_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16, // maps to c type int16_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32, // maps to c type int32_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64, // maps to c type int64_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING, // maps to c++ type std::string + ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL, + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16, + ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE, // maps to c type double + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32, // maps to c type uint32_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64, // maps to c type uint64_t + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX64, // complex with float32 real and imaginary components + ONNX_TENSOR_ELEMENT_DATA_TYPE_COMPLEX128, // complex with float64 real and imaginary components + ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16, // Non-IEEE floating-point format based on IEEE754 single-precision + // float 8 types were introduced in onnx 1.14, see https://onnx.ai/onnx/technical/float8.html + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN, // Non-IEEE floating-point format based on IEEE754 single-precision + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ, // Non-IEEE floating-point format based on IEEE754 single-precision + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2, // Non-IEEE floating-point format based on IEEE754 single-precision + ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ, // Non-IEEE floating-point format based on IEEE754 single-precision + // Int4 types were introduced in ONNX 1.16. See https://onnx.ai/onnx/technical/int4.html + ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT4, // maps to a pair of packed uint4 values (size == 1 byte) + ONNX_TENSOR_ELEMENT_DATA_TYPE_INT4 // maps to a pair of packed int4 values (size == 1 byte) +} ONNXTensorElementDataType; + +// Synced with onnx TypeProto oneof +typedef enum ONNXType { + ONNX_TYPE_UNKNOWN, + ONNX_TYPE_TENSOR, + ONNX_TYPE_SEQUENCE, + ONNX_TYPE_MAP, + ONNX_TYPE_OPAQUE, + ONNX_TYPE_SPARSETENSOR, + ONNX_TYPE_OPTIONAL +} ONNXType; + +// These types are synced with internal +// SparseFormatFlags +typedef enum OrtSparseFormat { + ORT_SPARSE_UNDEFINED = 0, + ORT_SPARSE_COO = 0x1, + ORT_SPARSE_CSRC = 0x2, + ORT_SPARSE_BLOCK_SPARSE = 0x4 +} OrtSparseFormat; + +// Enum allows to query sparse tensor indices +enum OrtSparseIndicesFormat { + ORT_SPARSE_COO_INDICES, + ORT_SPARSE_CSR_INNER_INDICES, + ORT_SPARSE_CSR_OUTER_INDICES, + ORT_SPARSE_BLOCK_SPARSE_INDICES +}; + +/** \brief Logging severity levels + * + * In typical API usage, specifying a logging severity level specifies the minimum severity of log messages to show. + */ +typedef enum OrtLoggingLevel { + ORT_LOGGING_LEVEL_VERBOSE, ///< Verbose informational messages (least severe). + ORT_LOGGING_LEVEL_INFO, ///< Informational messages. + ORT_LOGGING_LEVEL_WARNING, ///< Warning messages. + ORT_LOGGING_LEVEL_ERROR, ///< Error messages. + ORT_LOGGING_LEVEL_FATAL, ///< Fatal error messages (most severe). +} OrtLoggingLevel; + +typedef enum OrtErrorCode { + ORT_OK, + ORT_FAIL, + ORT_INVALID_ARGUMENT, + ORT_NO_SUCHFILE, + ORT_NO_MODEL, + ORT_ENGINE_ERROR, + ORT_RUNTIME_EXCEPTION, + ORT_INVALID_PROTOBUF, + ORT_MODEL_LOADED, + ORT_NOT_IMPLEMENTED, + ORT_INVALID_GRAPH, + ORT_EP_FAIL, +} OrtErrorCode; + +typedef enum OrtOpAttrType { + ORT_OP_ATTR_UNDEFINED = 0, + ORT_OP_ATTR_INT, + ORT_OP_ATTR_INTS, + ORT_OP_ATTR_FLOAT, + ORT_OP_ATTR_FLOATS, + ORT_OP_ATTR_STRING, + ORT_OP_ATTR_STRINGS, +} OrtOpAttrType; + +//! @} +#define ORT_RUNTIME_CLASS(X) \ + struct Ort##X; \ + typedef struct Ort##X Ort##X + +/** \addtogroup Global + * ONNX Runtime C API + * @{ + */ +// The actual types defined have an Ort prefix +ORT_RUNTIME_CLASS(Env); +ORT_RUNTIME_CLASS(Status); // nullptr for Status* indicates success +ORT_RUNTIME_CLASS(MemoryInfo); +ORT_RUNTIME_CLASS(IoBinding); +ORT_RUNTIME_CLASS(Session); // Don't call ReleaseSession from Dllmain (because session owns a thread pool) +ORT_RUNTIME_CLASS(Value); +ORT_RUNTIME_CLASS(RunOptions); +ORT_RUNTIME_CLASS(TypeInfo); +ORT_RUNTIME_CLASS(TensorTypeAndShapeInfo); +ORT_RUNTIME_CLASS(MapTypeInfo); +ORT_RUNTIME_CLASS(SequenceTypeInfo); +ORT_RUNTIME_CLASS(OptionalTypeInfo); +ORT_RUNTIME_CLASS(SessionOptions); +ORT_RUNTIME_CLASS(CustomOpDomain); +ORT_RUNTIME_CLASS(ModelMetadata); +ORT_RUNTIME_CLASS(ThreadPoolParams); +ORT_RUNTIME_CLASS(ThreadingOptions); +ORT_RUNTIME_CLASS(ArenaCfg); +ORT_RUNTIME_CLASS(PrepackedWeightsContainer); +ORT_RUNTIME_CLASS(TensorRTProviderOptionsV2); +ORT_RUNTIME_CLASS(CUDAProviderOptionsV2); +ORT_RUNTIME_CLASS(CANNProviderOptions); +ORT_RUNTIME_CLASS(DnnlProviderOptions); +ORT_RUNTIME_CLASS(Op); +ORT_RUNTIME_CLASS(OpAttr); +ORT_RUNTIME_CLASS(Logger); +ORT_RUNTIME_CLASS(ShapeInferContext); +ORT_RUNTIME_CLASS(LoraAdapter); + +#ifdef _WIN32 +typedef _Return_type_success_(return == 0) OrtStatus* OrtStatusPtr; +#else +typedef OrtStatus* OrtStatusPtr; +#endif + +/** \brief Memory allocation interface + * + * Structure of function pointers that defines a memory allocator. This can be created and filled in by the user for custom allocators. + * + * When an allocator is passed to any function, be sure that the allocator object is not destroyed until the last allocated object using it is freed. + */ +typedef struct OrtAllocator { + uint32_t version; ///< Must be initialized to ORT_API_VERSION + void*(ORT_API_CALL* Alloc)(struct OrtAllocator* this_, size_t size); ///< Returns a pointer to an allocated block of `size` bytes + void(ORT_API_CALL* Free)(struct OrtAllocator* this_, void* p); ///< Free a block of memory previously allocated with OrtAllocator::Alloc + const struct OrtMemoryInfo*(ORT_API_CALL* Info)(const struct OrtAllocator* this_); ///< Return a pointer to an ::OrtMemoryInfo that describes this allocator + /** + * @brief Optional allocation function to use for memory allocations made during session initialization. + * Use this function if you want to separate allocations made by ORT during Run() calls from + * those made during session initialization. This allows for separate memory management strategies for these allocations. + */ + void*(ORT_API_CALL* Reserve)(struct OrtAllocator* this_, size_t size); ///< Returns a pointer to an allocated block of `size` bytes +} OrtAllocator; + +typedef void(ORT_API_CALL* OrtLoggingFunction)( + void* param, OrtLoggingLevel severity, const char* category, const char* logid, const char* code_location, + const char* message); + +/** \brief Graph optimization level + * + * Refer to https://www.onnxruntime.ai/docs/performance/graph-optimizations.html#graph-optimization-levels + * for an in-depth understanding of the Graph Optimization Levels. + */ +typedef enum GraphOptimizationLevel { + ORT_DISABLE_ALL = 0, + ORT_ENABLE_BASIC = 1, + ORT_ENABLE_EXTENDED = 2, + ORT_ENABLE_ALL = 99 +} GraphOptimizationLevel; + +typedef enum ExecutionMode { + ORT_SEQUENTIAL = 0, + ORT_PARALLEL = 1, +} ExecutionMode; + +/** \brief Language projection identifiers + * /see OrtApi::SetLanguageProjection + */ +typedef enum OrtLanguageProjection { + ORT_PROJECTION_C = 0, + ORT_PROJECTION_CPLUSPLUS = 1, + ORT_PROJECTION_CSHARP = 2, + ORT_PROJECTION_PYTHON = 3, + ORT_PROJECTION_JAVA = 4, + ORT_PROJECTION_WINML = 5, + ORT_PROJECTION_NODEJS = 6, +} OrtLanguageProjection; + +struct OrtKernelInfo; +typedef struct OrtKernelInfo OrtKernelInfo; +struct OrtKernelContext; +typedef struct OrtKernelContext OrtKernelContext; +struct OrtCustomOp; +typedef struct OrtCustomOp OrtCustomOp; + +typedef enum OrtAllocatorType { + OrtInvalidAllocator = -1, + OrtDeviceAllocator = 0, + OrtArenaAllocator = 1 +} OrtAllocatorType; + +/** \brief Memory types for allocated memory, execution provider specific types should be extended in each provider. + */ +// Whenever this struct is updated, please also update the MakeKey function in onnxruntime / core / framework / execution_provider.cc +typedef enum OrtMemType { + OrtMemTypeCPUInput = -2, ///< Any CPU memory used by non-CPU execution provider + OrtMemTypeCPUOutput = -1, ///< CPU accessible memory outputted by non-CPU execution provider, i.e. CUDA_PINNED + OrtMemTypeCPU = OrtMemTypeCPUOutput, ///< Temporary CPU accessible memory allocated by non-CPU execution provider, i.e. CUDA_PINNED + OrtMemTypeDefault = 0, ///< The default allocator for execution provider +} OrtMemType; + +/** \brief This mimics OrtDevice type constants so they can be returned in the API + */ +typedef enum OrtMemoryInfoDeviceType { + OrtMemoryInfoDeviceType_CPU = 0, + OrtMemoryInfoDeviceType_GPU = 1, + OrtMemoryInfoDeviceType_FPGA = 2 +} OrtMemoryInfoDeviceType; + +/** \brief Algorithm to use for cuDNN Convolution Op + */ +typedef enum OrtCudnnConvAlgoSearch { + OrtCudnnConvAlgoSearchExhaustive, // expensive exhaustive benchmarking using cudnnFindConvolutionForwardAlgorithmEx + OrtCudnnConvAlgoSearchHeuristic, // lightweight heuristic based search using cudnnGetConvolutionForwardAlgorithm_v7 + OrtCudnnConvAlgoSearchDefault, // default algorithm using CUDNN_CONVOLUTION_FWD_ALGO_IMPLICIT_PRECOMP_GEMM +} OrtCudnnConvAlgoSearch; + +/** \brief CUDA Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_CUDA + */ +typedef struct OrtCUDAProviderOptions { +#ifdef __cplusplus + OrtCUDAProviderOptions() + : device_id{}, + cudnn_conv_algo_search{OrtCudnnConvAlgoSearchExhaustive}, + gpu_mem_limit{SIZE_MAX}, + arena_extend_strategy{}, + do_copy_in_default_stream{1}, + has_user_compute_stream{}, + user_compute_stream{}, + default_memory_arena_cfg{}, + tunable_op_enable{false}, + tunable_op_tuning_enable{false}, + tunable_op_max_tuning_duration_ms{} {} +#endif + + /** \brief CUDA device Id + * Defaults to 0. + */ + int device_id; + + /** \brief CUDA Convolution algorithm search configuration. + * See enum OrtCudnnConvAlgoSearch for more details. + * Defaults to OrtCudnnConvAlgoSearchExhaustive. + */ + OrtCudnnConvAlgoSearch cudnn_conv_algo_search; + + /** \brief CUDA memory limit (To use all possible memory pass in maximum size_t) + * Defaults to SIZE_MAX. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + size_t gpu_mem_limit; + + /** \brief Strategy used to grow the memory arena + * 0 = kNextPowerOfTwo
+ * 1 = kSameAsRequested
+ * Defaults to 0. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + int arena_extend_strategy; + + /** \brief Flag indicating if copying needs to take place on the same stream as the compute stream in the CUDA EP + * 0 = Use separate streams for copying and compute. + * 1 = Use the same stream for copying and compute. + * Defaults to 1. + * WARNING: Setting this to 0 may result in data races for some models. + * Please see issue #4829 for more details. + */ + int do_copy_in_default_stream; + + /** \brief Flag indicating if there is a user provided compute stream + * Defaults to 0. + */ + int has_user_compute_stream; + + /** \brief User provided compute stream. + * If provided, please set `has_user_compute_stream` to 1. + */ + void* user_compute_stream; + + /** \brief CUDA memory arena configuration parameters + */ + OrtArenaCfg* default_memory_arena_cfg; + + /** \brief Enable TunableOp for using. + * Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default. + * This option can be overridden by environment variable ORT_CUDA_TUNABLE_OP_ENABLE. + */ + int tunable_op_enable; + + /** \brief Enable TunableOp for tuning. + * Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default. + * This option can be overridden by environment variable ORT_CUDA_TUNABLE_OP_TUNING_ENABLE. + */ + int tunable_op_tuning_enable; + + /** \brief Max tuning duration time limit for each instance of TunableOp. + * Defaults to 0 to disable the limit. + */ + int tunable_op_max_tuning_duration_ms; + +} OrtCUDAProviderOptions; + +/** \brief ROCM Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_ROCM + */ +typedef struct OrtROCMProviderOptions { +#ifdef __cplusplus + OrtROCMProviderOptions() + : device_id{}, + miopen_conv_exhaustive_search{0}, + gpu_mem_limit{SIZE_MAX}, + arena_extend_strategy{}, + do_copy_in_default_stream{1}, + has_user_compute_stream{}, + user_compute_stream{}, + default_memory_arena_cfg{}, + enable_hip_graph{false}, + tunable_op_enable{false}, + tunable_op_tuning_enable{false}, + tunable_op_max_tuning_duration_ms{} {} +#endif + + /** \brief ROCM device Id + * Defaults to 0. + */ + int device_id; + + /** \brief ROCM MIOpen Convolution algorithm exaustive search option. + * Defaults to 0 (false). + */ + int miopen_conv_exhaustive_search; + + /** \brief ROCM memory limit (To use all possible memory pass in maximum size_t) + * Defaults to SIZE_MAX. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + size_t gpu_mem_limit; + + /** \brief Strategy used to grow the memory arena + * 0 = kNextPowerOfTwo
+ * 1 = kSameAsRequested
+ * Defaults to 0. + * \note If a ::OrtArenaCfg has been applied, it will override this field + */ + int arena_extend_strategy; + + /** \brief Flag indicating if copying needs to take place on the same stream as the compute stream in the ROCM EP + * 0 = Use separate streams for copying and compute. + * 1 = Use the same stream for copying and compute. + * Defaults to 1. + * WARNING: Setting this to 0 may result in data races for some models. + * Please see issue #4829 for more details. + */ + int do_copy_in_default_stream; + + /** \brief Flag indicating if there is a user provided compute stream + * Defaults to 0. + */ + int has_user_compute_stream; + + /** \brief User provided compute stream. + * If provided, please set `has_user_compute_stream` to 1. + */ + void* user_compute_stream; + + /** \brief ROCM memory arena configuration parameters + */ + OrtArenaCfg* default_memory_arena_cfg; + + int enable_hip_graph; + + /** \brief Enable TunableOp for using. + * Set it to 1/0 to enable/disable TunableOp. Otherwise, it is disabled by default. + * This option can be overridden by environment variable ORT_ROCM_TUNABLE_OP_ENABLE. + */ + int tunable_op_enable; + + /** \brief Enable TunableOp for tuning. + * Set it to 1/0 to enable/disable TunableOp tuning. Otherwise, it is disabled by default. + * This option can be overridden by environment variable ORT_ROCM_TUNABLE_OP_TUNING_ENABLE. + */ + int tunable_op_tuning_enable; + + /** \brief Max tuning duration time limit for each instance of TunableOp. + * Defaults to 0 to disable the limit. + */ + int tunable_op_max_tuning_duration_ms; + +} OrtROCMProviderOptions; + +/** \brief TensorRT Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + */ +typedef struct OrtTensorRTProviderOptions { + int device_id; ///< CUDA device id (0 = default device) + int has_user_compute_stream; // indicator of user specified CUDA compute stream. + void* user_compute_stream; // user specified CUDA compute stream. + int trt_max_partition_iterations; // maximum iterations for TensorRT parser to get capability + int trt_min_subgraph_size; // minimum size of TensorRT subgraphs + size_t trt_max_workspace_size; // maximum workspace size for TensorRT. + int trt_fp16_enable; // enable TensorRT FP16 precision. Default 0 = false, nonzero = true + int trt_int8_enable; // enable TensorRT INT8 precision. Default 0 = false, nonzero = true + const char* trt_int8_calibration_table_name; // TensorRT INT8 calibration table name. + int trt_int8_use_native_calibration_table; // use native TensorRT generated calibration table. Default 0 = false, nonzero = true + int trt_dla_enable; // enable DLA. Default 0 = false, nonzero = true + int trt_dla_core; // DLA core number. Default 0 + int trt_dump_subgraphs; // dump TRT subgraph. Default 0 = false, nonzero = true + int trt_engine_cache_enable; // enable engine caching. Default 0 = false, nonzero = true + const char* trt_engine_cache_path; // specify engine cache path + int trt_engine_decryption_enable; // enable engine decryption. Default 0 = false, nonzero = true + const char* trt_engine_decryption_lib_path; // specify engine decryption library path + int trt_force_sequential_engine_build; // force building TensorRT engine sequentially. Default 0 = false, nonzero = true + // This is the legacy struct and don't add new fields here. + // For new field that can be represented by string, please add it in include/onnxruntime/core/providers/tensorrt/tensorrt_provider_options.h + // For non-string field, need to create a new separate api to handle it. +} OrtTensorRTProviderOptions; + +/** \brief MIGraphX Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX + */ +typedef struct OrtMIGraphXProviderOptions { + int device_id; // hip device id. + int migraphx_fp16_enable; // MIGraphX FP16 precision. Default 0 = false, nonzero = true + int migraphx_int8_enable; // MIGraphX INT8 precision. Default 0 = false, nonzero = true + int migraphx_use_native_calibration_table; // MIGraphx INT8 cal table. Default 0 = false, noznero = true + const char* migraphx_int8_calibration_table_name; // MIGraphx INT8 calibration table name + int migraphx_save_compiled_model; // migraphx save compiled model. Default 0 = false, noznero = true + const char* migraphx_save_model_path; // migraphx model path name + int migraphx_load_compiled_model; // migraphx int8 cal table. Default 0 = false, noznero = true + const char* migraphx_load_model_path; // migraphx model path name + bool migraphx_exhaustive_tune; // migraphx tuned compile Default = false +} OrtMIGraphXProviderOptions; + +/** \brief OpenVINO Provider Options + * + * \see OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO + */ +typedef struct OrtOpenVINOProviderOptions { +#ifdef __cplusplus + OrtOpenVINOProviderOptions() : device_type{}, + enable_npu_fast_compile{}, + device_id{}, + num_of_threads{}, + cache_dir{}, + context{}, + enable_opencl_throttling{}, + enable_dynamic_shapes{} {} +#endif + /** \brief Device type string + * + * Valid settings are one of: "CPU_FP32", "CPU_FP16", "GPU_FP32", "GPU_FP16" + */ + const char* device_type; + unsigned char enable_npu_fast_compile; + const char* device_id; + size_t num_of_threads; ///< 0 = Use default number of threads + const char* cache_dir; // path is set to empty by default + void* context; + unsigned char enable_opencl_throttling; ///< 0 = disabled, nonzero = enabled + unsigned char enable_dynamic_shapes; ///< 0 = disabled, nonzero = enabled +} OrtOpenVINOProviderOptions; + +struct OrtApi; +typedef struct OrtApi OrtApi; + +struct OrtTrainingApi; +typedef struct OrtTrainingApi OrtTrainingApi; + +/** \brief The helper interface to get the right version of OrtApi + * + * Get a pointer to this structure through ::OrtGetApiBase + */ +struct OrtApiBase { + /** \brief Get a pointer to the requested version of the ::OrtApi + * + * \param[in] version Must be ::ORT_API_VERSION + * \return The ::OrtApi for the version requested, nullptr will be returned if this version is unsupported, for example when using a runtime + * older than the version created with this header file. + * + * One can call GetVersionString() to get the version of the Onnxruntime library for logging + * and error reporting purposes. + */ + const OrtApi*(ORT_API_CALL* GetApi)(uint32_t version)NO_EXCEPTION; + + /** \brief Returns a null terminated string of the version of the Onnxruntime library (eg: "1.8.1") + * + * \return UTF-8 encoded version string. Do not deallocate the returned buffer. + */ + const char*(ORT_API_CALL* GetVersionString)(void)NO_EXCEPTION; +}; + +typedef struct OrtApiBase OrtApiBase; + +/** \brief The Onnxruntime library's entry point to access the C API + * + * Call this to get the a pointer to an ::OrtApiBase + */ +ORT_EXPORT const OrtApiBase* ORT_API_CALL OrtGetApiBase(void) NO_EXCEPTION; + +/** \brief Thread work loop function + * + * Onnxruntime will provide the working loop on custom thread creation + * Argument is an onnxruntime built-in type which will be provided when thread pool calls OrtCustomCreateThreadFn + */ +typedef void (*OrtThreadWorkerFn)(void* ort_worker_fn_param); + +typedef const struct OrtCustomHandleType { + char __place_holder; +}* OrtCustomThreadHandle; + +/** \brief Ort custom thread creation function + * + * The function should return a thread handle to be used in onnxruntime thread pools + * Onnxruntime will throw exception on return value of nullptr or 0, indicating that the function failed to create a thread + */ +typedef OrtCustomThreadHandle (*OrtCustomCreateThreadFn)(void* ort_custom_thread_creation_options, OrtThreadWorkerFn ort_thread_worker_fn, void* ort_worker_fn_param); + +/** \brief Custom thread join function + * + * Onnxruntime thread pool destructor will call the function to join a custom thread. + * Argument ort_custom_thread_handle is the value returned by OrtCustomCreateThreadFn + */ +typedef void (*OrtCustomJoinThreadFn)(OrtCustomThreadHandle ort_custom_thread_handle); + +typedef OrtStatus*(ORT_API_CALL* RegisterCustomOpsFn)(OrtSessionOptions* options, const OrtApiBase* api); + +/** \brief Callback function for RunAsync + * + * \param[in] user_data User specific data that passed back to the callback + * \param[out] outputs On succeed, outputs host inference results, on error, the value will be nullptr + * \param[out] num_outputs Number of outputs, on error, the value will be zero + * \param[out] status On error, status will provide details + */ +typedef void (*RunAsyncCallbackFn)(void* user_data, OrtValue** outputs, size_t num_outputs, OrtStatusPtr status); + +/** \brief The C API + * + * All C API functions are defined inside this structure as pointers to functions. + * Call OrtApiBase::GetApi to get a pointer to it + * + * \nosubgrouping + */ +struct OrtApi { + /// \name OrtStatus + /// @{ + + /** + * \brief Create an OrtStatus from a null terminated string + * + * \param[in] code + * \param[in] msg A null-terminated string. Its contents will be copied. + * \return A new OrtStatus object, must be destroyed with OrtApi::ReleaseStatus + */ + OrtStatus*(ORT_API_CALL* CreateStatus)(OrtErrorCode code, _In_ const char* msg)NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Get OrtErrorCode from OrtStatus + * + * \param[in] status + * \return OrtErrorCode that \p status was created with + */ + OrtErrorCode(ORT_API_CALL* GetErrorCode)(_In_ const OrtStatus* status) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Get error string from OrtStatus + * + * \param[in] status + * \return The error message inside the `status`. Do not free the returned value. + */ + const char*(ORT_API_CALL* GetErrorMessage)(_In_ const OrtStatus* status)NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an OrtEnv + * + * \note Invoking this function will return the same instance of the environment as that returned by a previous call + * to another env creation function; all arguments to this function will be ignored. + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnv, OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out); + + /** \brief Create an OrtEnv + * + * \note Invoking this function will return the same instance of the environment as that returned by a previous call + * to another env creation function; all arguments to this function will be ignored. If you want to provide your + * own logging function, consider setting it using the SetUserLoggingFunction API instead. + * \param[in] logging_function A pointer to a logging function. + * \param[in] logger_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to + * `logging_function`. This parameter is optional. + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithCustomLogger, _In_ OrtLoggingFunction logging_function, _In_opt_ void* logger_param, + _In_ OrtLoggingLevel log_severity_level, _In_ const char* logid, _Outptr_ OrtEnv** out); + + /** \brief Enable Telemetry + * + * \note Telemetry events are on by default since they are lightweight + * \param[in] env + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableTelemetryEvents, _In_ const OrtEnv* env); + /** \brief Disable Telemetry + * + * \see OrtApi::EnableTelemetryEvents + * \param[in] env + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableTelemetryEvents, _In_ const OrtEnv* env); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Create an OrtSession from a model file + * + * \param[in] env + * \param[in] model_path + * \param[in] options + * \param[out] out Returned newly created OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + // TODO: document the path separator convention? '/' vs '\' + // TODO: should specify the access characteristics of model_path. Is this read only during the + // execution of CreateSession, or does the OrtSession retain a handle to the file/directory + // and continue to access throughout the OrtSession lifetime? + // What sort of access is needed to model_path : read or read/write? + ORT_API2_STATUS(CreateSession, _In_ const OrtEnv* env, _In_ const ORTCHAR_T* model_path, + _In_ const OrtSessionOptions* options, _Outptr_ OrtSession** out); + + /** \brief Create an OrtSession from memory + * + * \param[in] env + * \param[in] model_data + * \param[in] model_data_length + * \param[in] options + * \param[out] out Returned newly created OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionFromArray, _In_ const OrtEnv* env, _In_ const void* model_data, size_t model_data_length, + _In_ const OrtSessionOptions* options, _Outptr_ OrtSession** out); + + /** \brief Run the model in an ::OrtSession + * + * Will not return until the model run has completed. Multiple threads might be used to run the model based on + * the options in the ::OrtSession and settings used when creating the ::OrtEnv + * + * \param[in] session + * \param[in] run_options If nullptr, will use a default ::OrtRunOptions + * \param[in] input_names Array of null terminated UTF8 encoded strings of the input names + * \param[in] inputs Array of ::OrtValue%s of the input values + * \param[in] input_len Number of elements in the input_names and inputs arrays + * \param[in] output_names Array of null terminated UTF8 encoded strings of the output names + * \param[in] output_names_len Number of elements in the output_names and outputs array + * \param[out] outputs Array of ::OrtValue%s that the outputs are stored in. This can also be + * an array of nullptr values, in this case ::OrtValue objects will be allocated and pointers + * to them will be set into the `outputs` array. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(Run, _Inout_ OrtSession* session, _In_opt_ const OrtRunOptions* run_options, + _In_reads_(input_len) const char* const* input_names, + _In_reads_(input_len) const OrtValue* const* inputs, size_t input_len, + _In_reads_(output_names_len) const char* const* output_names, size_t output_names_len, + _Inout_updates_all_(output_names_len) OrtValue** outputs); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Create an ::OrtSessionOptions object + * + * To use additional providers, you must build ORT with the extra providers enabled. Then call one of these + * functions to enable them in the session:
+ * OrtSessionOptionsAppendExecutionProvider_CPU
+ * OrtSessionOptionsAppendExecutionProvider_CUDA
+ * OrtSessionOptionsAppendExecutionProvider_(remaining providers...)
+ * The order they are called indicates the preference order as well. In other words call this method + * on your most preferred execution provider first followed by the less preferred ones. + * If none are called Ort will use its internal CPU execution provider. + * + * \param[out] options The newly created OrtSessionOptions. Must be freed with OrtApi::ReleaseSessionOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionOptions, _Outptr_ OrtSessionOptions** options); + + /** \brief Set filepath to save optimized model after graph level transformations + * + * \param[in] options + * \param[in] optimized_model_filepath + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetOptimizedModelFilePath, _Inout_ OrtSessionOptions* options, + _In_ const ORTCHAR_T* optimized_model_filepath); + + /** \brief Create a copy of an existing ::OrtSessionOptions + * + * \param[in] in_options OrtSessionOptions to copy + * \param[out] out_options Returned newly created ::OrtSessionOptions. Must be freed with OrtApi::ReleaseSessionOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CloneSessionOptions, _In_ const OrtSessionOptions* in_options, + _Outptr_ OrtSessionOptions** out_options); + + /** \brief Set execution mode + * + * Controls whether you want to execute operators in your graph sequentially or in parallel. Usually when the model + * has many branches, setting this option to ExecutionMode.ORT_PARALLEL will give you better performance. + * See [docs/ONNX_Runtime_Perf_Tuning.md] for more details. + * + * \param[in] options + * \param[in] execution_mode + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionExecutionMode, _Inout_ OrtSessionOptions* options, ExecutionMode execution_mode); + + /** \brief Enable profiling for a session + * + * \param[in] options + * \param[in] profile_file_prefix + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableProfiling, _Inout_ OrtSessionOptions* options, _In_ const ORTCHAR_T* profile_file_prefix); + + /** \brief Disable profiling for a session + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableProfiling, _Inout_ OrtSessionOptions* options); + + /** \brief Enable the memory pattern optimization + * + * The idea is if the input shapes are the same, we could trace the internal memory allocation + * and generate a memory pattern for future request. So next time we could just do one allocation + * with a big chunk for all the internal memory allocation. + * \note Memory pattern optimization is only available when Sequential Execution mode is enabled (see OrtApi::SetSessionExecutionMode) + * + * \see OrtApi::DisableMemPattern + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableMemPattern, _Inout_ OrtSessionOptions* options); + + /** \brief Disable the memory pattern optimization + * + * \see OrtApi::EnableMemPattern + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableMemPattern, _Inout_ OrtSessionOptions* options); + + /** \brief Enable the memory arena on CPU + * + * Arena may pre-allocate memory for future usage. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableCpuMemArena, _Inout_ OrtSessionOptions* options); + + /** \brief Disable the memory arena on CPU + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisableCpuMemArena, _Inout_ OrtSessionOptions* options); + + /** \brief Set session log id + * + * \param[in] options + * \param[in] logid The log identifier. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogId, _Inout_ OrtSessionOptions* options, const char* logid); + + /** \brief Set session log verbosity level + * + * Applies to session load, initialization, etc + * + * \param[in] options + * \param[in] session_log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogVerbosityLevel, _Inout_ OrtSessionOptions* options, int session_log_verbosity_level); + + /** \brief Set session log severity level + * + * \param[in] options + * \param[in] session_log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionLogSeverityLevel, _Inout_ OrtSessionOptions* options, int session_log_severity_level); + + /** \brief Set the optimization level to apply when loading a graph + * + * Please see https://onnxruntime.ai/docs/performance/model-optimizations/graph-optimizations.html for an in-depth explanation + * \param[in,out] options The session options object + * \param[in] graph_optimization_level The optimization level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetSessionGraphOptimizationLevel, _Inout_ OrtSessionOptions* options, + GraphOptimizationLevel graph_optimization_level); + + /** \brief Sets the number of threads used to parallelize the execution within nodes + * + * When running a single node operation, ex. add, this sets the maximum number of threads to use. + * + * \note If built with OpenMP, this has no effect on the number of threads used. In this case + * use the OpenMP env variables to configure the number of intra op num threads. + * + * \param[in] options + * \param[in] intra_op_num_threads Number of threads to use
+ * A value of 0 will use the default number of threads
+ * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetIntraOpNumThreads, _Inout_ OrtSessionOptions* options, int intra_op_num_threads); + + /** \brief Sets the number of threads used to parallelize the execution of the graph + * + * If nodes can be run in parallel, this sets the maximum number of threads to use to run them in parallel. + * + * \note If sequential execution is enabled this value is ignored, it acts as if it was set to 1. + * + * \param[in] options + * \param[in] inter_op_num_threads Number of threads to use
+ * A value of 0 will use the default number of threads
+ * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetInterOpNumThreads, _Inout_ OrtSessionOptions* options, int inter_op_num_threads); + + /// @} + /// \name OrtCustomOpDomain + /// @{ + + /** \brief Create a custom op domain + * + * \param[in] domain + * \param[out] out Newly created domain. Must be freed with OrtApi::ReleaseCustomOpDomain + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateCustomOpDomain, _In_ const char* domain, _Outptr_ OrtCustomOpDomain** out); + + /** \brief Add a custom op to a custom op domain + * + * \note The OrtCustomOp* pointer must remain valid until the ::OrtCustomOpDomain using it is released + * + * \param[in] custom_op_domain + * \param[in] op + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CustomOpDomain_Add, _Inout_ OrtCustomOpDomain* custom_op_domain, _In_ const OrtCustomOp* op); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Add custom op domain to a session options + * + * \note The OrtCustomOpDomain* must not be deleted until all sessions using it are released + * + * \param[in] options + * \param[in] custom_op_domain + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddCustomOpDomain, _Inout_ OrtSessionOptions* options, _In_ OrtCustomOpDomain* custom_op_domain); + + /** \deprecated Use OrtApi::RegisterCustomOpsLibrary_V2. + * + * Registers custom ops from a shared library. + * + * Loads a shared library (dll on windows, so on linux, etc) named 'library_path' and looks for this entry point: + * OrtStatus* RegisterCustomOps(OrtSessionOptions * options, const OrtApiBase* api); + * It then passes in the provided session options to this function along with the api base. + * The handle to the loaded library is returned in library_handle. It can be freed by the caller after all sessions using the passed in + * session options are destroyed, or if an error occurs and it is non null. + * + * \param[in] options + * \param[in] library_path + * \param[out] library_handle OS specific handle to the loaded library (Use FreeLibrary on Windows, dlclose on Linux, etc.. to unload) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RegisterCustomOpsLibrary, _Inout_ OrtSessionOptions* options, _In_ const char* library_path, _Outptr_ void** library_handle); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Get input count for a session + * + * This number must also match the number of inputs passed to OrtApi::Run + * + * \see OrtApi::SessionGetInputTypeInfo, OrtApi::SessionGetInputName, OrtApi::Session + * + * \param[in] session + * \param[out] out Number of inputs + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get output count for a session + * + * This number must also match the number of outputs returned by OrtApi::Run + * + * \see OrtApi::SessionGetOutputTypeInfo, OrtApi::SessionGetOutputName, OrtApi::Session + * + * \param[in] session + * \param[out] out Number of outputs + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get overridable initializer count + * + * \see OrtApi::SessionGetOverridableInitializerTypeInfo, OrtApi::SessionGetOverridableInitializerName + * + * \param[in] session + * \param[in] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerCount, _In_ const OrtSession* session, _Out_ size_t* out); + + /** \brief Get input type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetInputCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get output type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOutputCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get overridable initializer type information + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOverridableInitializerCount returns (exclusive) + * \param[out] type_info Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerTypeInfo, _In_ const OrtSession* session, size_t index, _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get input name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetInputCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetInputName, _In_ const OrtSession* session, size_t index, _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get output name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOutputCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOutputName, _In_ const OrtSession* session, size_t index, _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get overridable initializer name + * + * \param[in] session + * \param[in] index Must be between 0 (inclusive) and what OrtApi::SessionGetOverridableInitializerCount returns (exclusive) + * \param[in] allocator + * \param[out] value Set to a null terminated UTF-8 encoded string allocated using `allocator`. Must be freed using `allocator`. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetOverridableInitializerName, _In_ const OrtSession* session, size_t index, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /// @} + /// \name OrtRunOptions + /// @{ + + /** \brief Create an OrtRunOptions + * + * \param[out] out Returned newly created ::OrtRunOptions. Must be freed with OrtApi::ReleaseRunOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateRunOptions, _Outptr_ OrtRunOptions** out); + + /** \brief Set per-run log verbosity level + * + * \see OrtApi::RunOptionsGetRunLogVerbosityLevel + * + * \param[in] options + * \param[in] log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsSetRunLogVerbosityLevel, _Inout_ OrtRunOptions* options, int log_verbosity_level); + + /** \brief Set per-run log severity level + * + * \see OrtApi::RunOptionsGetRunLogSeverityLevel + * + * \param[in] options + * \param[in] log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + */ + ORT_API2_STATUS(RunOptionsSetRunLogSeverityLevel, _Inout_ OrtRunOptions* options, int log_severity_level); + + /** \brief Set per-run tag + * + * This is used in a per-run log identifier. + * + * \see OrtApi::RunOptionsGetRunTag + * + * \param[in] options + * \param[in] run_tag The run tag. + */ + ORT_API2_STATUS(RunOptionsSetRunTag, _Inout_ OrtRunOptions* options, _In_ const char* run_tag); + + /** \brief Get per-run log verbosity level + * + * \see OrtApi::RunOptionsSetRunLogVerbosityLevel + * + * \param[in] options + * \param[out] log_verbosity_level \snippet{doc} snippets.dox Log Verbosity Level + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsGetRunLogVerbosityLevel, _In_ const OrtRunOptions* options, + _Out_ int* log_verbosity_level); + + /** \brief Get per-run log severity level + * + * \see OrtApi::RunOptionsSetRunLogSeverityLevel + * + * \param[in] options + * \param[out] log_severity_level The log severity level (refer to ::OrtLoggingLevel for possible values). + */ + ORT_API2_STATUS(RunOptionsGetRunLogSeverityLevel, _In_ const OrtRunOptions* options, _Out_ int* log_severity_level); + + /** \brief Get per-run tag + * + * This is used in a per-run log identifier. + * + * \see OrtApi::RunOptionsSetRunTag + * + * \param[in] options + * \param[out] run_tag The run tag. + * Do not free this value, it is owned by `options`. It will be invalidated if the run tag + * changes (i.e., with OrtApi::RunOptionsSetRunTag) or `options` is freed. + */ + ORT_API2_STATUS(RunOptionsGetRunTag, _In_ const OrtRunOptions* options, _Out_ const char** run_tag); + + /** \brief Set terminate flag + * + * If a currently executing session needs to be force terminated, this can be called from another thread to force it to fail with an error. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsSetTerminate, _Inout_ OrtRunOptions* options); + + /** \brief Clears the terminate flag + * + * Used so the OrtRunOptions instance can be used in a new OrtApi::Run call without it instantly terminating + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsUnsetTerminate, _Inout_ OrtRunOptions* options); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Create a tensor + * + * Create a tensor using a supplied ::OrtAllocator + * + * \param[in] allocator + * \param[in] shape Pointer to the tensor shape dimensions. + * \param[in] shape_len The number of tensor shape dimensions. + * \param[in] type + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorAsOrtValue, _Inout_ OrtAllocator* allocator, _In_ const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** \brief Create a tensor backed by a user supplied buffer + * + * Create a tensor with user's buffer. You can fill the buffer either before calling this function or after. + * p_data is owned by caller. ReleaseValue won't release p_data. + * + * \param[in] info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param[in] p_data Pointer to the data buffer. + * \param[in] p_data_len The number of bytes in the data buffer. + * \param[in] shape Pointer to the tensor shape dimensions. + * \param[in] shape_len The number of tensor shape dimensions. + * \param[in] type The data type. + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorWithDataAsOrtValue, _In_ const OrtMemoryInfo* info, _Inout_ void* p_data, + size_t p_data_len, _In_ const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type, + _Outptr_ OrtValue** out); + + /** \brief Return if an ::OrtValue is a tensor type + * + * \param[in] value A tensor type (string tensors are not supported) + * \param[out] out Set to 1 iff ::OrtValue is a tensor, 0 otherwise + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(IsTensor, _In_ const OrtValue* value, _Out_ int* out); + + /** \brief Get a pointer to the raw data inside a tensor + * + * Used to read/write/modify the internal tensor data directly. + * \note The returned pointer is valid until the \p value is destroyed. + * + * \param[in] value A tensor type (string tensors are not supported) + * \param[out] out Filled in with a pointer to the internal storage + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorMutableData, _In_ OrtValue* value, _Outptr_ void** out); + + /** \brief Set all strings at once in a string tensor + * + * \param[in,out] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[in] s An array of strings. Each string in this array must be null terminated. + * \param[in] s_len Count of strings in s (Must match the size of \p value's tensor shape) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillStringTensor, _Inout_ OrtValue* value, _In_ const char* const* s, size_t s_len); + + /** \brief Get total byte length for all strings in a string tensor + * + * Typically used with OrtApi::GetStringTensorContent + * + * \param[in] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[out] len Total byte length of all strings (does not include trailing nulls) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorDataLength, _In_ const OrtValue* value, _Out_ size_t* len); + + /** \brief Get all strings from a string tensor + * + * An example of the results:
+ * Given \p value is a string tensor with the strings { "This" "is" "a" "test" }
+ * \p s must have a size of 11 bytes
+ * \p offsets must have 4 elements
+ * After the call, these values will be filled in:
+ * \p s will contain "Thisisatest"
+ * \p offsets will contain { 0, 4, 6, 7 }
+ * The length of the last string is just s_len - offsets[last] + * + * \param[in] value A tensor of type ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING + * \param[in] s Buffer to sequentially write all tensor strings to. Each string is NOT null-terminated. + * \param[in] s_len Number of bytes of buffer pointed to by \p s (Get it from OrtApi::GetStringTensorDataLength) + * \param[out] offsets Array of start offsets into the strings written to \p s + * \param[in] offsets_len Number of elements in offsets + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorContent, _In_ const OrtValue* value, _Out_writes_bytes_all_(s_len) void* s, + size_t s_len, _Out_writes_all_(offsets_len) size_t* offsets, size_t offsets_len); + + /// @} + /// \name OrtTypeInfo + /// @{ + + /** \brief Get ::OrtTensorTypeAndShapeInfo from an ::OrtTypeInfo + * + * \param[in] type_info + * \param[out] out Do not free this value, it will be valid until type_info is freed. + * If type_info does not represent tensor, this value will be set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToTensorInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtTensorTypeAndShapeInfo** out); + + /** \brief Get ::ONNXType from ::OrtTypeInfo + * + * \param[in] type_info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetOnnxTypeFromTypeInfo, _In_ const OrtTypeInfo* type_info, _Out_ enum ONNXType* out); + + /// @} + /// \name OrtTensorTypeAndShapeInfo + /// @{ + + /** \brief Create an ::OrtTensorTypeAndShapeInfo object + * + * \param[out] out Returns newly created ::OrtTensorTypeAndShapeInfo. Must be freed with OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorTypeAndShapeInfo, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Set element type in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] type + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetTensorElementType, _Inout_ OrtTensorTypeAndShapeInfo* info, enum ONNXTensorElementDataType type); + + /** \brief Set shape information in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] dim_values Array with `dim_count` elements. Can contain negative values. + * \param[in] dim_count Number of elements in `dim_values` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetDimensions, OrtTensorTypeAndShapeInfo* info, _In_ const int64_t* dim_values, size_t dim_count); + + /** \brief Get element type in ::OrtTensorTypeAndShapeInfo + * + * \see OrtApi::SetTensorElementType + * + * \param[in] info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorElementType, _In_ const OrtTensorTypeAndShapeInfo* info, + _Out_ enum ONNXTensorElementDataType* out); + + /** \brief Get dimension count in ::OrtTensorTypeAndShapeInfo + * + * \see OrtApi::GetDimensions + * + * \param[in] info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDimensionsCount, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ size_t* out); + + /** \brief Get dimensions in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[out] dim_values Array with `dim_values_length` elements. On return, filled with the dimensions stored in the ::OrtTensorTypeAndShapeInfo + * \param[in] dim_values_length Number of elements in `dim_values`. Use OrtApi::GetDimensionsCount to get this value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDimensions, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ int64_t* dim_values, + size_t dim_values_length); + + /** \brief Get symbolic dimension names in ::OrtTensorTypeAndShapeInfo + * + * \param[in] info + * \param[in] dim_params Array with `dim_params_length` elements. On return filled with pointers to null terminated strings of the dimension names + * \param[in] dim_params_length Number of elements in `dim_params`. Use OrtApi::GetDimensionsCount to get this value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSymbolicDimensions, _In_ const OrtTensorTypeAndShapeInfo* info, + _Out_writes_all_(dim_params_length) const char* dim_params[], size_t dim_params_length); + + /** \brief Get total number of elements in a tensor shape from an ::OrtTensorTypeAndShapeInfo + * + * Return the number of elements specified by the tensor shape (all dimensions multiplied by each other). + * For 0 dimensions, 1 is returned. If any dimension is less than 0, the result is always -1. + * + * Examples:
+ * [] = 1
+ * [1,3,4] = 12
+ * [2,0,4] = 0
+ * [-1,3,4] = -1
+ * + * \param[in] info + * \param[out] out Number of elements + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorShapeElementCount, _In_ const OrtTensorTypeAndShapeInfo* info, _Out_ size_t* out); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Get type and shape information from a tensor ::OrtValue + * + * \param[in] value Must be a tensor (not a map/sequence/etc) or will return failure + * \param[out] out Newly created ::OrtTensorTypeAndShapeInfo. Must be freed with OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorTypeAndShape, _In_ const OrtValue* value, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Get type information of an OrtValue + * + * \param[in] value + * \param[out] out Newly created ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTypeInfo, _In_ const OrtValue* value, _Outptr_result_maybenull_ OrtTypeInfo** out); + + /** \brief Get ONNXType of an ::OrtValue + * + * \param[in] value + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValueType, _In_ const OrtValue* value, _Out_ enum ONNXType* out); + + /// @} + /// \name OrtMemoryInfo + /// @{ + + /** \brief Create an ::OrtMemoryInfo + * + * \param[in] name + * \param[in] type + * \param[in] id + * \param[in] mem_type + * \param[out] out Newly created ::OrtMemoryInfo. Must be freed with OrtAPi::ReleaseMemoryInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateMemoryInfo, _In_ const char* name, enum OrtAllocatorType type, int id, + enum OrtMemType mem_type, _Outptr_ OrtMemoryInfo** out); + + /** \brief Create an ::OrtMemoryInfo for CPU memory + * + * Special case version of OrtApi::CreateMemoryInfo for CPU based memory. Same as using OrtApi::CreateMemoryInfo with name = "Cpu" and id = 0. + * + * \param[in] type + * \param[in] mem_type + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateCpuMemoryInfo, enum OrtAllocatorType type, enum OrtMemType mem_type, + _Outptr_ OrtMemoryInfo** out); + + /** \brief Compare ::OrtMemoryInfo objects for equality + * + * Compares all settings of each ::OrtMemoryInfo for equality + * + * \param[in] info1 + * \param[in] info2 + * \param[out] out Set to 0 if equal, -1 if not equal + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CompareMemoryInfo, _In_ const OrtMemoryInfo* info1, _In_ const OrtMemoryInfo* info2, _Out_ int* out); + + /** \brief Get name from ::OrtMemoryInfo + * + * \param[in] ptr + * \param[out] out Writes null terminated string to this pointer. Do NOT free the returned pointer. It is valid for the lifetime of the ::OrtMemoryInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(MemoryInfoGetName, _In_ const OrtMemoryInfo* ptr, _Out_ const char** out); + + /** \brief Get the id from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetId, _In_ const OrtMemoryInfo* ptr, _Out_ int* out); + + /** \brief Get the ::OrtMemType from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetMemType, _In_ const OrtMemoryInfo* ptr, _Out_ OrtMemType* out); + + /** \brief Get the ::OrtAllocatorType from ::OrtMemoryInfo + */ + ORT_API2_STATUS(MemoryInfoGetType, _In_ const OrtMemoryInfo* ptr, _Out_ OrtAllocatorType* out); + + /// @} + /// \name OrtAllocator + /// @{ + + /// \brief Calls OrtAllocator::Alloc function + ORT_API2_STATUS(AllocatorAlloc, _Inout_ OrtAllocator* ort_allocator, size_t size, _Outptr_ void** out); + /// \brief Calls OrtAllocator::Free function + ORT_API2_STATUS(AllocatorFree, _Inout_ OrtAllocator* ort_allocator, void* p); + /// \brief Calls OrtAllocator::Info function + ORT_API2_STATUS(AllocatorGetInfo, _In_ const OrtAllocator* ort_allocator, _Outptr_ const struct OrtMemoryInfo** out); + + /** \brief Get the default allocator + * + * The default allocator is a CPU based, non-arena. Always returns the same pointer to the same default allocator. + * + * \param[out] out Returned value should NOT be freed + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetAllocatorWithDefaultOptions, _Outptr_ OrtAllocator** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Override session symbolic dimensions + * + * Override symbolic dimensions (by specific denotation strings) with actual values if known at session initialization time to enable + * optimizations that can take advantage of fixed values (such as memory planning, etc) + * + * \param[in] options + * \param[in] dim_denotation + * \param[in] dim_value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddFreeDimensionOverride, _Inout_ OrtSessionOptions* options, _In_ const char* dim_denotation, + _In_ int64_t dim_value); + + /// @} + /// \name OrtValue + /// @{ + + /* Internal information (not seen in Doxygen) + * + * APIs to support non-tensor types - map and sequence. + * Currently only the following types are supported + * Note: the following types should be kept in sync with data_types.h + * Map types + * ========= + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * std::map + * + * Sequence types + * ============== + * std::vector + * std::vector + * std::vector + * std::vector + * std::vector> + * std::vector + */ + + /** \brief Get non tensor data from an ::OrtValue + * + * If `value` is of type ONNX_TYPE_MAP, you need to retrieve the keys and values + * separately. Use index=0 to retrieve keys and index=1 to retrieve values. + * If `value` is of type ONNX_TYPE_SEQUENCE, use index to retrieve the index'th element + * of the sequence. + * + * \param[in] value + * \param[in] index See above for usage based on `value` type + * \param[in] allocator Allocator used to allocate ::OrtValue + * \param[out] out Created ::OrtValue that holds the element requested. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValue, _In_ const OrtValue* value, int index, _Inout_ OrtAllocator* allocator, + _Outptr_ OrtValue** out); + + /** \brief Get non tensor value count from an ::OrtValue + * + * If `value` is of type ONNX_TYPE_MAP 2 will always be returned. For ONNX_TYPE_SEQUENCE + * the number of elements in the sequence will be returned + * + * \param[in] value + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetValueCount, _In_ const OrtValue* value, _Out_ size_t* out); + + /** \brief Create a map or sequence ::OrtValue + * + * To construct a map (ONNX_TYPE_MAP), use num_values = 2 and `in` should be an array of 2 ::OrtValue%s + * representing keys and values.
+ * + * To construct a sequence (ONNX_TYPE_SEQUENCE), use num_values = N where N is the number of the elements in the + * sequence. 'in' should be an array of N ::OrtValue%s. + * + * \param[in] in See above for details + * \param[in] num_values + * \param[in] value_type Must be either ONNX_TYPE_MAP or ONNX_TYPE_SEQUENCE + * \param[out] out Newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateValue, _In_reads_(num_values) const OrtValue* const* in, size_t num_values, + enum ONNXType value_type, _Outptr_ OrtValue** out); + + /** \brief Create an opaque (custom user defined type) ::OrtValue + * + * Constructs an ::OrtValue that contains a value of non-standard type created for + * experiments or while awaiting standardization. ::OrtValue in this case would contain + * an internal representation of the Opaque type. Opaque types are distinguished from + * each other by two strings 1) domain and 2) type name. The combination of the two + * must be unique, so the type representation is properly identified internally. The combination + * must be properly registered from within ORT at both compile/run time or by another API. + * + * To construct the ::OrtValue pass domain and type names, also a pointer to a data container + * the type of which must be known to both ORT and the client program. That data container may or may + * not match the internal representation of the Opaque type. The sizeof(data_container) is passed for + * verification purposes. + * + * \param[in] domain_name Null terminated string of the domain name + * \param[in] type_name Null terminated string of the type name + * \param[in] data_container User pointer Data to populate ::OrtValue + * \param[in] data_container_size Size in bytes of what `data_container` points to + * \param[out] out Newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateOpaqueValue, _In_z_ const char* domain_name, _In_z_ const char* type_name, + _In_ const void* data_container, size_t data_container_size, _Outptr_ OrtValue** out); + + /** \brief Get internal data from an opaque (custom user defined type) ::OrtValue + * + * Copies internal data from an opaque value into a user provided buffer + * + * \see OrtApi::CreateOpaqueValue + * + * \param[in] domain_name Null terminated string of the domain name + * \param[in] type_name Null terminated string of the type name + * \param[in] in The opaque ::OrtValue + * \param[out] data_container Buffer to copy data into + * \param[out] data_container_size Size in bytes of the buffer pointed to by data_container. Must match the size of the internal buffer. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetOpaqueValue, _In_ const char* domain_name, _In_ const char* type_name, _In_ const OrtValue* in, + _Out_ void* data_container, size_t data_container_size); + + /// @} + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Get a float stored as an attribute in the graph node + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_float, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ float* out); + + /** \brief Fetch a 64-bit int stored as an attribute in the graph node + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_int64, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ int64_t* out); + + /** \brief Fetch a string stored as an attribute in the graph node + * + * If `out` is nullptr, the value of `size` is set to the true size of the string + * attribute, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual string attribute's size, + * the value of `size` is set to the true size of the string attribute, the provided memory + * is filled with the attribute's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string attribute's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string attribute + * and a failure status is returned.) + * + * \param[in] info ::OrtKernelInfo instance + * \param[in] name Null terminated string of the name of the attribute + * \param[out] out Pointer to memory where the attribute will be stored + * \param[in,out] size See above comments for details + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_string, _In_ const OrtKernelInfo* info, _In_ const char* name, _Out_ char* out, + _Inout_ size_t* size); + + /// @} + /// \name OrtKernelContext + /// Custom operator APIs. + /// @{ + + /** \brief Used for custom operators, get the input count of a kernel + * + * \see ::OrtCustomOp + */ + ORT_API2_STATUS(KernelContext_GetInputCount, _In_ const OrtKernelContext* context, _Out_ size_t* out); + + /** \brief Used for custom operators, get the output count of a kernel + * + * \see ::OrtCustomOp + */ + ORT_API2_STATUS(KernelContext_GetOutputCount, _In_ const OrtKernelContext* context, _Out_ size_t* out); + + /** \brief Used for custom operators, get an input of a kernel + * + * The function attempts fetches the input of the kernel. If the input is optional + * and not present, the function returns success and out is set to nullptr. + * + * \param[in] context ::OrtKernelContext instance + * \param[in] index See KernelContext_GetInputCount for boundaries check. + * \param[out] out OrtValue if the input is present otherwise is set nullptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetInput, _In_ const OrtKernelContext* context, _In_ size_t index, + _Out_ const OrtValue** out); + + /** \brief Used for custom operators, get an output of a kernel + * + * The function attempts fetches the output of the kernel. If the output is optional + * and not present, the function returns success and out is set to nullptr. + * + * \param[in] context ::OrtKernelContext instance + * \param[in] index See KernelContext_GetOutputCount for boundaries check. + * \param[in] dim_values output dimensions + * \param[in] dim_count number of dimensions + * \param[out] out a ptr to OrtValue to output otherwise set to nullptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetOutput, _Inout_ OrtKernelContext* context, _In_ size_t index, + _In_ const int64_t* dim_values, size_t dim_count, _Outptr_ OrtValue** out); + + /// @} + /// \name OrtEnv + /// @{ + ORT_CLASS_RELEASE(Env); + /// @} + /// \name OrtStatus + /// @{ + ORT_CLASS_RELEASE(Status); + /// @} + /// \name OrtMemoryInfo + /// @{ + ORT_CLASS_RELEASE(MemoryInfo); + /// @} + /// \name OrtSession + /// @{ + ORT_CLASS_RELEASE(Session); // Don't call ReleaseSession from Dllmain (because session owns a thread pool) + /// @} + /// \name OrtValue + /// @{ + ORT_CLASS_RELEASE(Value); + /// @} + /// \name OrtRunOptions + /// @{ + ORT_CLASS_RELEASE(RunOptions); + /// @} + /// \name OrtTypeInfo + /// @{ + ORT_CLASS_RELEASE(TypeInfo); + /// @} + /// \name OrtTensorTypeAndShapeInfo + /// @{ + ORT_CLASS_RELEASE(TensorTypeAndShapeInfo); + /// @} + /// \name OrtSessionOptions + /// @{ + ORT_CLASS_RELEASE(SessionOptions); + /// @} + /// \name OrtCustomOpDomain + /// @{ + ORT_CLASS_RELEASE(CustomOpDomain); + + /// @} + /// \name OrtTypeInfo + /// @{ + + /** \brief Get denotation from type information + * + * Augments ::OrtTypeInfo to return denotations on the type. + * + * This is used by WinML to determine if an input/output is intended to be an Image or a Tensor. + * + * \param[in] type_info + * \param[out] denotation Pointer to the null terminated denotation string is written to this pointer. This pointer is valid until the object is destroyed or the name is changed, do not free. + * \param[out] len Length in bytes of the string returned in `denotation` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetDenotationFromTypeInfo, _In_ const OrtTypeInfo* type_info, _Out_ const char** const denotation, + _Out_ size_t* len); + + /** \brief Get detailed map information from an ::OrtTypeInfo + * + * This augments ::OrtTypeInfo to return an ::OrtMapTypeInfo when the type is a map. + * The OrtMapTypeInfo has additional information about the map's key type and value type. + * + * This is used by WinML to support model reflection APIs. + * + * \param[out] type_info + * \param[out] out A pointer to the ::OrtMapTypeInfo. Do not free this value. If type_info + * does not contain a map, this value will be set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToMapTypeInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtMapTypeInfo** out); + + /** \brief Cast ::OrtTypeInfo to an ::OrtSequenceTypeInfo + * + * This api augments ::OrtTypeInfo to return an ::OrtSequenceTypeInfo when the type is a sequence. + * The ::OrtSequenceTypeInfo has additional information about the sequence's element type. + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] type_info + * \param[out] out A pointer to the OrtSequenceTypeInfo. Do not free this value. If type_info + * doesn not contain a sequence, this value will be set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CastTypeInfoToSequenceTypeInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtSequenceTypeInfo** out); + + /// @} + /// \name OrtMapTypeInfo + /// @{ + + /** \brief Get key type from an ::OrtMapTypeInfo + * + * Key types are restricted to being scalar types. + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] map_type_info + * \param[out] out + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetMapKeyType, _In_ const OrtMapTypeInfo* map_type_info, _Out_ enum ONNXTensorElementDataType* out); + + /** \brief Get the value type from an ::OrtMapTypeInfo + * + * \param[in] map_type_info + * \param[out] type_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetMapValueType, _In_ const OrtMapTypeInfo* map_type_info, _Outptr_ OrtTypeInfo** type_info); + + /// @} + /// \name OrtSequenceTypeInfo + /// @{ + + /** \brief Get element type from an ::OrtSequenceTypeInfo + * + * This is used by WinML to support model reflection APIs. + * + * \param[in] sequence_type_info + * \param[out] type_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSequenceElementType, _In_ const OrtSequenceTypeInfo* sequence_type_info, + _Outptr_ OrtTypeInfo** type_info); + + /// @} + /// \name OrtMapTypeInfo + /// @{ + ORT_CLASS_RELEASE(MapTypeInfo); + /// @} + /// \name OrtSequenceTypeInfo + /// @{ + ORT_CLASS_RELEASE(SequenceTypeInfo); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief End profiling and return filename of the profile data + * + * Profiling is turned on through OrtApi::EnableProfiling + * + * \param[in] session + * \param[in] allocator + * \param[out] out Null terminated string of the filename, allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionEndProfiling, _In_ OrtSession* session, _Inout_ OrtAllocator* allocator, _Outptr_ char** out); + + /** \brief Get ::OrtModelMetadata from an ::OrtSession + * + * \param[in] session + * \param[out] out Newly created ::OrtModelMetadata. Must be freed using OrtApi::ReleaseModelMetadata + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetModelMetadata, _In_ const OrtSession* session, _Outptr_ OrtModelMetadata** out); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** \brief Get `producer name` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetProducerName, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get `graph name` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetGraphName, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Get `domain` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetDomain, _In_ const OrtModelMetadata* model_metadata, _Inout_ OrtAllocator* allocator, + _Outptr_ char** value); + + /** \brief Get `description` from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetDescription, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /** \brief Return data for a key in the custom metadata map in an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[in] allocator + * \param[in] key Null terminated string + * \param[out] value Set to a null terminated string allocated using `allocator`. Must be freed using `allocator` + * `value` will be set to nullptr if the given key is not found in the custom metadata map. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataLookupCustomMetadataMap, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _In_ const char* key, _Outptr_result_maybenull_ char** value); + + /** \brief Get version number from an ::OrtModelMetadata + * + * \param[in] model_metadata + * \param[out] value Set to the version number + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetVersion, _In_ const OrtModelMetadata* model_metadata, _Out_ int64_t* value); + + ORT_CLASS_RELEASE(ModelMetadata); + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an OrtEnv + * + * Create an environment with global threadpools that will be shared across sessions. + * Use this in conjunction with OrtApi::DisablePerSessionThreads or else the session will use + * its own thread pools. + * + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[in] tp_options + * \param[out] out Returned newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithGlobalThreadPools, OrtLoggingLevel log_severity_level, _In_ const char* logid, + _In_ const OrtThreadingOptions* tp_options, _Outptr_ OrtEnv** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Use global thread pool on a session + * + * Disable using per session thread pool and use the shared global threadpool. + * This should be used in conjunction with OrtApi::CreateEnvWithGlobalThreadPools. + * + * \param[in] options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(DisablePerSessionThreads, _Inout_ OrtSessionOptions* options); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Create an ::OrtThreadingOptions + * + * \param[out] out Newly created ::OrtThreadingOptions. Must be freed with OrtApi::ReleaseThreadingOptions + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateThreadingOptions, _Outptr_ OrtThreadingOptions** out); + + ORT_CLASS_RELEASE(ThreadingOptions); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** + * + * \param[in] model_metadata + * \param[in] allocator + * \param[out] keys Array of null terminated strings (array count = num_keys) allocated using `allocator`. + * The strings and the pointer array must be freed using `allocator` + * `keys` will be set to nullptr if the custom metadata map is empty. + * \param[out] num_keys Set to the number of elements in the `keys` array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetCustomMetadataMapKeys, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_result_buffer_maybenull_(*num_keys) char*** keys, _Out_ int64_t* num_keys); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** + * + * Override symbolic dimensions (by specific name strings) with actual values + * if known at session initialization time to enable optimizations that can + * take advantage of fixed values (such as memory planning, etc) + * + */ + ORT_API2_STATUS(AddFreeDimensionOverrideByName, + _Inout_ OrtSessionOptions* options, _In_ const char* dim_name, + _In_ int64_t dim_value); + + /// @} + /// \name Misc + /// @{ + + /** \brief Get the names of all available providers + * + * \note The providers in the list are not guaranteed to be usable. They may fail to load due to missing system dependencies. + * For example, if the CUDA/cuDNN libraries are not installed, the CUDA provider will report an error when it is added to the session options. + * + * \param[out] out_ptr Set to a pointer to an array of null terminated strings of the available providers. The entries and the + * array itself must be freed using OrtApi::ReleaseAvailableProviders + * \param[out] provider_length Set to the number of entries in the `out_ptr` array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetAvailableProviders, _Outptr_ char*** out_ptr, _Out_ int* provider_length); + + /** \brief Release data from OrtApi::GetAvailableProviders. This API will never fail + * so you can rely on it in a noexcept code. + * + * \param[in] ptr The `out_ptr` result from OrtApi::GetAvailableProviders. + * \param[in] providers_length The `provider_length` result from OrtApi::GetAvailableProviders + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ReleaseAvailableProviders, _In_ char** ptr, + _In_ int providers_length); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Get the length of a single string in a string tensor + * + * \param[in] value A string tensor + * \param[in] index Index of the string in the tensor + * \param[out] out Set to number of bytes of the string element + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorElementLength, _In_ const OrtValue* value, size_t index, _Out_ size_t* out); + + /** \brief Get a single string from a string tensor + * + * \param[in] value A string tensor + * \param[in] s_len Number of bytes in the `s` buffer. Must match the value returned by OrtApi::GetStringTensorElementLength. + * \param[in] index Index of the string in the tensor + * \param[out] s The string element contents in UTF-8 encoding. The string is NOT null-terminated. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetStringTensorElement, _In_ const OrtValue* value, size_t s_len, size_t index, _Out_writes_bytes_all_(s_len) void* s); + + /** \brief Set a single string in a string tensor + * + * \param[in] value A string tensor + * \param[in] s A null terminated UTF-8 encoded string + * \param[in] index Index of the string in the tensor to set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillStringTensorElement, _Inout_ OrtValue* value, _In_ const char* s, size_t index); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Set a session configuration entry as a pair of strings + * + * If a configuration with same key exists, this will overwrite the configuration with the given config_value. + * + * The config_key and the format of config_value are defined in onnxruntime_session_options_config_keys.h + * + * \param[in] options + * \param[in] config_key A null terminated string representation of the config key + * \param[in] config_value A null terminated string representation of the config value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddSessionConfigEntry, _Inout_ OrtSessionOptions* options, + _In_z_ const char* config_key, _In_z_ const char* config_value); + + /// @} + /// \name OrtAllocator + /// @{ + + /** \brief Create an allocator for an ::OrtSession following an ::OrtMemoryInfo + * + * \param[in] session + * \param[in] mem_info valid ::OrtMemoryInfo instance + * \param[out] out Newly created ::OrtAllocator. Must be freed with OrtApi::ReleaseAllocator + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateAllocator, _In_ const OrtSession* session, _In_ const OrtMemoryInfo* mem_info, + _Outptr_ OrtAllocator** out); + + /** \brief Release an ::OrtAllocator obtained from OrtApi::CreateAllocator + */ + ORT_CLASS_RELEASE(Allocator); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Run a model using Io Bindings for the inputs & outputs + * + * \see OrtApi::Run + * + * \param[in] session + * \param[in] run_options + * \param[in] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunWithBinding, _Inout_ OrtSession* session, _In_ const OrtRunOptions* run_options, _In_ const OrtIoBinding* binding_ptr); + + /** \brief Create an ::OrtIoBinding instance + * + * An IoBinding object allows one to bind pre-allocated ::OrtValue%s to input names. + * Thus if you want to use a raw on device buffer as input or output you can avoid + * extra copy during runtime. + * + * \param[in] session + * \param[out] out Newly created ::OrtIoBinding. Must be freed with OrtApi::ReleaseIoBinding + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateIoBinding, _Inout_ OrtSession* session, _Outptr_ OrtIoBinding** out); + + /// @} + /// \name OrtIoBinding + /// @{ + + /** \brief Release an ::OrtIoBinding obtained from OrtApi::CreateIoBinding + */ + ORT_CLASS_RELEASE(IoBinding); + + /** \brief Bind an ::OrtValue to an ::OrtIoBinding input + * + * When using OrtApi::RunWithBinding this value is used for the named input + * + * \param[in] binding_ptr + * \param[in] name Name for the model input + * \param[in] val_ptr ::OrtValue of Tensor type. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindInput, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtValue* val_ptr); + + /** \brief Bind an ::OrtValue to an ::OrtIoBinding output + * + * When using OrtApi::RunWithBinding this value is used for the named output + * + * \param[in] binding_ptr + * \param[in] name Null terminated string of the model output name + * \param[in] val_ptr ::OrtValue of Tensor type. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindOutput, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtValue* val_ptr); + + /** \brief Bind an ::OrtIoBinding output to a device + * + * Binds the ::OrtValue to a device which is specified by ::OrtMemoryInfo. + * You can either create an instance of ::OrtMemoryInfo with a device id or obtain one from the allocator that you have created/are using + * This is useful when one or more outputs have dynamic shapes and, it is hard to pre-allocate and bind a chunk of + * memory within ::OrtValue ahead of time. + * + * \see OrtApi::RunWithBinding + * + * \param[in] binding_ptr + * \param[in] name Null terminated string of the device name + * \param[in] mem_info_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(BindOutputToDevice, _Inout_ OrtIoBinding* binding_ptr, _In_ const char* name, _In_ const OrtMemoryInfo* mem_info_ptr); + + /** \brief Get the names of an ::OrtIoBinding's outputs + * + * Returns the names of the outputs in the order they were bound. This is useful after running the model + * with bound outputs because the returned names are in order in which output ::OrtValue are returned. This is useful if + * the order of outputs and their names is not known. + * + * \param[in] binding_ptr + * \param[in] allocator Allocator used to allocate continuous buffers for output strings and lengths. + * \param[out] buffer Returns an array of non-null terminated UTF-8 strings. The number of strings stored is returned in the count parameter. + * This buffer is allocated using `allocator` and must be freed using it. + * \param[out] lengths Returns an array of `count` lengths of the strings returned in `buffer` + * This buffer is allocated using `allocator` and must be freed using it. + * \param[out] count Number of strings returned. If `binding_ptr` has no bound outputs, zero is returned, + * no memory allocation is performed and buffer and lengths are set to nullptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetBoundOutputNames, _In_ const OrtIoBinding* binding_ptr, _In_ OrtAllocator* allocator, + _Out_ char** buffer, _Out_writes_all_(count) size_t** lengths, _Out_ size_t* count); + + /** \brief Get the output ::OrtValue objects from an ::OrtIoBinding + * + * Returns an array of pointers to individually allocated ::OrtValue%s that contain results of a model execution with OrtApi::RunWithBinding + * The array contains the same number of ::OrtValue%s and they are in the same order as they were bound with OrtApi::BindOutput + * or OrtApi::BindOutputToDevice. + * + * The returned ::OrtValue%s must be released using OrtApi::ReleaseValue after they are no longer needed. + * The array is allocated using the specified instance of the allocator and must be freed using the same allocator after + * all the ::OrtValue%s contained therein are individually released. + * + * \param[in] binding_ptr + * \param[in] allocator Allocator used to allocate output array + * \param[out] output Set to the allocated array of allocated ::OrtValue outputs. Set to nullptr if there are 0 outputs. + * \param[out] output_count Set to number of ::OrtValue%s returned + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetBoundOutputValues, _In_ const OrtIoBinding* binding_ptr, _In_ OrtAllocator* allocator, + _Out_writes_all_(output_count) OrtValue*** output, _Out_ size_t* output_count); + + /** \brief Clears any previously set Inputs for an ::OrtIoBinding + */ + void(ORT_API_CALL* ClearBoundInputs)(_Inout_ OrtIoBinding* binding_ptr) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /** \brief Clears any previously set Outputs for an ::OrtIoBinding + */ + void(ORT_API_CALL* ClearBoundOutputs)(_Inout_ OrtIoBinding* binding_ptr) NO_EXCEPTION ORT_ALL_ARGS_NONNULL; + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Direct memory access to a specified tensor element + * + * For example, given a tensor with shape of [3,224,224], a pointer to the element at location [2,150,128] can be retrieved + * + * This function only works for numeric type tensors (No strings, etc). + * This is a no-copy method whose returned pointer is valid until the passed in ::OrtValue is free'd. + * + * \param[in] value + * \param[in] location_values Pointer to an array of index values that specify an element's location relative to its shape + * \param[in] location_values_count Number of elements in location_values. Must match the number of elements in the tensor's shape. + * \param[out] out Set to a pointer to the element specified + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(TensorAt, _Inout_ OrtValue* value, const int64_t* location_values, size_t location_values_count, _Outptr_ void** out); + + /// @} + /// \name OrtEnv + /// @{ + + /** \brief Create an allocator and register it with the ::OrtEnv + * + * Enables sharing the allocator between multiple sessions that use the same env instance. + * Lifetime of the created allocator will be valid for the duration of the environment. + * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered. + * + * See https://onnxruntime.ai/docs/get-started/with-c.html for details. + * + * \param[in] env ::OrtEnv instance + * \param[in] mem_info + * \param[in] arena_cfg Pass nullptr for defaults + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateAndRegisterAllocator, _Inout_ OrtEnv* env, _In_ const OrtMemoryInfo* mem_info, + _In_ const OrtArenaCfg* arena_cfg); + + /** \brief Set language projection + * + * Set the language projection for collecting telemetry data when Env is created. + * + * The default is ORT_PROJECTION_C, which means it will classify the language not in the list to C also. + * + * \param[in] ort_env + * \param[in] projection + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetLanguageProjection, _In_ const OrtEnv* ort_env, _In_ OrtLanguageProjection projection); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Return the time that profiling was started + * + * \note The timer precision varies per platform. On Windows and MacOS, the precision will be ~100ns + * + * \param[in] session + * \param[out] out nanoseconds of profiling's start time + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionGetProfilingStartTimeNs, _In_ const OrtSession* session, _Outptr_ uint64_t* out); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Set global intra-op thread count + * + * This configures the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools + * + * \param[in] tp_options + * \param[in] intra_op_num_threads Number of threads, special values:
+ * 0 = Use default thread count
+ * 1 = The invoking thread will be used; no threads will be created in the thread pool. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalIntraOpNumThreads, _Inout_ OrtThreadingOptions* tp_options, int intra_op_num_threads); + + /** \brief Set global inter-op thread count + * + * This configures the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools + * + * \param[in] tp_options + * \param[in] inter_op_num_threads Number of threads, special values:
+ * 0 = Use default thread count
+ * 1 = The invoking thread will be used; no threads will be created in the thread pool. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalInterOpNumThreads, _Inout_ OrtThreadingOptions* tp_options, int inter_op_num_threads); + + /** \brief Set global spin control options + * + * This will configure the global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools. + * Allow spinning of thread pools when their queues are empty. This will set the value for both + * inter_op and intra_op threadpools. + * + * \param[in] tp_options + * \param[in] allow_spinning Valid values are 0 or 1.
+ * 0 = It won't spin (recommended if CPU usage is high)
+ * 1 = Threadpool will spin to wait for queue to become non-empty + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalSpinControl, _Inout_ OrtThreadingOptions* tp_options, int allow_spinning); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Add a pre-allocated initializer to a session + * + * If a model contains an initializer with a name that is same as the name passed to this call, + * ORT will use this initializer instance instead of deserializing one from the model file. This + * is useful when you want to share the same initializer across sessions. + * + * \param[in] options + * \param[in] name Null terminated string of the initializer name + * \param[in] val ::OrtValue containing the initializer. Its lifetime and the underlying initializer buffer must be + * managed by the user (created using the OrtApi::CreateTensorWithDataAsOrtValue) and it must outlive the session object + * to which it is added. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddInitializer, _Inout_ OrtSessionOptions* options, _In_z_ const char* name, + _In_ const OrtValue* val); + + /// @} + /// \name OrtEnv + /// @{ + + /** + * Create a custom environment with global threadpools and logger that will be shared across sessions. + * Use this in conjunction with OrtApi::DisablePerSessionThreads or else the session will use + * its own thread pools. + * + * \param[in] logging_function A pointer to a logging function. + * \param[in] logger_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to + * `logging_function`. + * \param[in] log_severity_level The log severity level. + * \param[in] logid The log identifier. + * \param[in] tp_options + * \param[out] out Newly created OrtEnv. Must be freed with OrtApi::ReleaseEnv + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateEnvWithCustomLoggerAndGlobalThreadPools, OrtLoggingFunction logging_function, _In_opt_ void* logger_param, OrtLoggingLevel log_severity_level, + _In_ const char* logid, _In_ const struct OrtThreadingOptions* tp_options, _Outptr_ OrtEnv** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append CUDA provider to session options + * + * If CUDA is not available (due to a non CUDA enabled build, or if CUDA is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] cuda_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CUDA, + _In_ OrtSessionOptions* options, _In_ const OrtCUDAProviderOptions* cuda_options); + + /** \brief Append ROCM execution provider to the session options + * + * If ROCM is not available (due to a non ROCM enabled build, or if ROCM is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] rocm_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_ROCM, + _In_ OrtSessionOptions* options, _In_ const OrtROCMProviderOptions* rocm_options); + + /** \brief Append OpenVINO execution provider to the session options + * + * If OpenVINO is not available (due to a non OpenVINO enabled build, or if OpenVINO is not installed on the system), this function will fail. + * + * \param[in] options + * \param[in] provider_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_OpenVINO, + _In_ OrtSessionOptions* options, _In_ const OrtOpenVINOProviderOptions* provider_options); + + /// @} + /// \name OrtThreadingOptions + /// @{ + + /** \brief Set threading flush-to-zero and denormal-as-zero + * + * Sets global thread pool options to be used in the call to OrtApi::CreateEnvWithGlobalThreadPools. + * Flush-to-zero and denormal-as-zero are applied to threads in both intra and inter global thread pool. + * \note This option is not needed if the models used have no denormals. Having no denormals is recommended as this option may hurt model accuracy. + * + * \param[in] tp_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalDenormalAsZero, _Inout_ OrtThreadingOptions* tp_options); + + /// @} + /// \name OrtArenaCfg + /// @{ + + /** \deprecated Use OrtApi::CreateArenaCfgV2 + * + * This will create the configuration of an arena that can eventually be used to define an arena based allocator's behavior + * + * \param[in] max_mem Use 0 to allow ORT to choose the default + * \param[in] arena_extend_strategy Use -1 to allow ORT to choose the default, 0 = kNextPowerOfTwo, 1 = kSameAsRequested + * \param[in] initial_chunk_size_bytes Use -1 to allow ORT to choose the default + * \param[in] max_dead_bytes_per_chunk Use -1 to allow ORT to choose the default + * \param[in] out A pointer to an OrtArenaCfg instance + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateArenaCfg, _In_ size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, + int max_dead_bytes_per_chunk, _Outptr_ OrtArenaCfg** out); + + ORT_CLASS_RELEASE(ArenaCfg); + + /// @} + /// \name OrtModelMetadata + /// @{ + + /** + * Use this to obtain the description of the graph present in the model + * (doc_string field of the GraphProto message within the ModelProto message). + * If it doesn't exist, an empty string will be returned. + * + * \param[in] model_metadata An instance of ::OrtModelMetadata + * \param[in] allocator Allocator used to allocate the string that will be returned back + * \param[out] value Set to a null terminated string allocated using `allocator`. The caller is responsible for freeing it using `allocator` + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(ModelMetadataGetGraphDescription, _In_ const OrtModelMetadata* model_metadata, + _Inout_ OrtAllocator* allocator, _Outptr_ char** value); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append TensorRT provider to session options + * + * If TensorRT is not available (due to a non TensorRT enabled build, or if TensorRT is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] tensorrt_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_TensorRT, + _In_ OrtSessionOptions* options, _In_ const OrtTensorRTProviderOptions* tensorrt_options); + + /// @} + /// \name Misc + /// @{ + + /** \brief Set current GPU device ID + * + * Set the current device id of the GPU execution provider (CUDA/tensorrt/rocm). The device id should be less + * than the total number of devices available. This is only useful when multiple-GPUs are installed and it is + * required to restrict execution to a single GPU. + * + * \param[in] device_id + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetCurrentGpuDeviceId, _In_ int device_id); + + /** \brief Get current GPU device ID + * + * Get the current device id of the GPU execution provider (CUDA/tensorrt/rocm). + * + * \see OrtApi::SetCurrentGpuDeviceId + * + * \param[out] device_id + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetCurrentGpuDeviceId, _In_ int* device_id); + + /// @} + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Fetch an array of int64_t values stored as an attribute in the graph node + * + * + * If `out` is nullptr, the value of `size` is set to the true size of the attribute + * array's size, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual attribute array's size, + * the value of `size` is set to the true size of the attribute array's size, + * the provided memory is filled with the attribute's contents, + * and a success status is returned. + * + * If the `size` parameter is less than the actual attribute array's size and `out` + * is not nullptr, the value of `size` is set to the true size of the attribute array's size + * and a failure status is returned.) + * + * \param[in] info instance + * \param[in] name name of the attribute to be parsed + * \param[out] out pointer to memory where the attribute's contents are to be stored + * \param[in, out] size actual size of attribute array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttributeArray_float, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ float* out, _Inout_ size_t* size); + + /** \brief Fetch an array of int64_t values stored as an attribute in the graph node + * + * If `out` is nullptr, the value of `size` is set to the true size of the attribute + * array's size, and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual attribute array's size, + * the value of `size` is set to the true size of the attribute array's size, + * the provided memory is filled with the attribute's contents, + * and a success status is returned. + * + * If the `size` parameter is less than the actual attribute array's size and `out` + * is not nullptr, the value of `size` is set to the true size of the attribute array's size + * and a failure status is returned.) + * + * \param[in] info instance + * \param[in] name name of the attribute to be parsed + * \param[out] out pointer to memory where the attribute's contents are to be stored + * \param[in, out] size actual size of attribute array + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttributeArray_int64, _In_ const OrtKernelInfo* info, _In_ const char* name, + _Out_ int64_t* out, _Inout_ size_t* size); + + /// @} + /// \name OrtArenaCfg + /// @{ + + /** \brief Create an ::OrtArenaCfg + * + * Create the configuration of an arena that can eventually be used to define an arena based allocator's behavior. + * + * Supported keys are (See https://onnxruntime.ai/docs/get-started/with-c.html for details on what the + * following parameters mean and how to choose these values.): + * "max_mem": Maximum memory that can be allocated by the arena based allocator. + * Use 0 for ORT to pick the best value. Default is 0. + * "arena_extend_strategy": 0 = kNextPowerOfTwo, 1 = kSameAsRequested. + * Use -1 to allow ORT to choose the default. + * "initial_chunk_size_bytes": (Possible) Size of the first allocation in the arena. + * Only relevant if arena strategy is `kNextPowerOfTwo`. Use -1 to allow ORT to choose the default. + * Ultimately, the first allocation size is determined by the allocation memory request. + * "max_dead_bytes_per_chunk": Threshold of unused memory in an allocated chunk of arena memory after + * crossing which the current chunk is chunked into 2. + * "initial_growth_chunk_size_bytes": (Possible) Size of the second allocation in the arena. + * Only relevant if arena strategy is `kNextPowerOfTwo`. Use -1 to allow ORT to choose the default. + * "max_power_of_two_extend_bytes": The maximum enxtend size if arena strategy is `kNextPowerOfTwo`. + * It is not an allocation limit, it is only a limit for extension when requested byte is less than the limit. + * When requested bytes is more than the limit, allocator will still return as requested. + * Use -1 to allow ORT to choose the default 1GB for max_power_of_two_extend_bytes. + * Ultimately, the allocation size is determined by the allocation memory request. + * Further allocation sizes are governed by the arena extend strategy. + * + * \param[in] arena_config_keys Keys to configure the arena + * \param[in] arena_config_values Values to configure the arena + * \param[in] num_keys Number of keys in `arena_config_keys` and `arena_config_values` + * \param[out] out Newly created ::OrtArenaCfg. Must be freed with OrtApi::ReleaseArenaCfg + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateArenaCfgV2, _In_reads_(num_keys) const char* const* arena_config_keys, + _In_reads_(num_keys) const size_t* arena_config_values, _In_ size_t num_keys, + _Outptr_ OrtArenaCfg** out); + + /// @} + /// \name OrtRunOptions + /// @{ + + /** \brief Set a single run configuration entry as a pair of strings + * + * If a configuration with same key exists, this will overwrite the configuration with the given config_value + * + * The config_key and the format of config_value are defined in onnxruntime_run_options_config_keys.h + * + * \param[in] options + * \param[in] config_key A null terminated string representation of the config key + * \param[in] config_value A null terminated string representation of the config value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddRunConfigEntry, _Inout_ OrtRunOptions* options, + _In_z_ const char* config_key, _In_z_ const char* config_value); + + /// @} + /// \name OrtPrepackedWeightsContainer + /// @{ + + /** \brief Create an ::OrtPrepackedWeightsContainer + * + * This container will hold pre-packed buffers of shared initializers for sharing between sessions + * (i.e.) if there are shared initializers that can be shared between sessions, the pre-packed buffers + * of these (if any) may possibly be shared to provide memory footprint savings. Pass this container + * to sessions that you would like to share pre-packed buffers of shared initializers at session + * creation time. + * + * \param[out] out Newly created ::OrtPrepackedWeightsContainer. Must be freed with OrtApi::ReleasePrepackedWeightsContainer + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreatePrepackedWeightsContainer, _Outptr_ OrtPrepackedWeightsContainer** out); + + /** \brief Release OrtPrepackedWeightsContainer instance + * + * \note instance must not be released until the sessions using it are released + */ + ORT_CLASS_RELEASE(PrepackedWeightsContainer); + + /// @} + /// \name OrtSession + /// @{ + + /** \brief Create session with prepacked weights container + * + * Same functionality offered by OrtApi::CreateSession except that a container that contains + * pre-packed weights' buffers is written into/read from by the created session. + * This is useful when used in conjunction with OrtApi::AddInitializer which injects + * shared initializer info into sessions. Wherever possible, the pre-packed versions of these + * shared initializers are cached in this container so that multiple sessions can just re-use + * these instead of duplicating these in memory. + * + * \param[in] env OrtEnv instance instance + * \param[in] model_path Null terminated string of the path (wchar on Windows, char otherwise) + * \param[in] options + * \param[in] prepacked_weights_container + * \param[out] out Newly created ::OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionWithPrepackedWeightsContainer, _In_ const OrtEnv* env, _In_ const ORTCHAR_T* model_path, + _In_ const OrtSessionOptions* options, _Inout_ OrtPrepackedWeightsContainer* prepacked_weights_container, + _Outptr_ OrtSession** out); + + /** \brief Create session from memory with prepacked weights container + * + * Same functionality offered by OrtApi::CreateSessionFromArray except that a container that contains + * pre-packed weights' buffers is written into/read from by the created session. + * This is useful when used in conjunction with OrtApi::AddInitializer which injects + * shared initializer info into sessions. Wherever possible, the pre-packed versions of these + * shared initializers are cached in this container so that multiple sessions can just re-use + * these instead of duplicating these in memory. + * + * \param[in] env + * \param[in] model_data Array of bytes holding the model + * \param[in] model_data_length Number of bytes in `model_data_model` + * \param[in] options + * \param[in] prepacked_weights_container + * \param[out] out Newly created ::OrtSession. Must be freed with OrtApi::ReleaseSession + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSessionFromArrayWithPrepackedWeightsContainer, _In_ const OrtEnv* env, + _In_ const void* model_data, size_t model_data_length, + _In_ const OrtSessionOptions* options, _Inout_ OrtPrepackedWeightsContainer* prepacked_weights_container, + _Outptr_ OrtSession** out); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Append TensorRT execution provider to the session options + * + * If TensorRT is not available (due to a non TensorRT enabled build), this function will return failure. + * + * This is slightly different from OrtApi::SessionOptionsAppendExecutionProvider_TensorRT, it takes an + * ::OrtTensorRTProviderOptions which is publicly defined. This takes an opaque ::OrtTensorRTProviderOptionsV2 + * which must be created with OrtApi::CreateTensorRTProviderOptions. + * + * For OrtApi::SessionOptionsAppendExecutionProvider_TensorRT, the user needs to instantiate ::OrtTensorRTProviderOptions + * as well as allocate/release buffers for some members of ::OrtTensorRTProviderOptions. + * Here, OrtApi::CreateTensorRTProviderOptions and Ortapi::ReleaseTensorRTProviderOptions will do the memory management for you. + * + * \param[in] options + * \param[in] tensorrt_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_TensorRT_V2, + _In_ OrtSessionOptions* options, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options); + + /// @} + /// \name OrtTensorRTProviderOptionsV2 + /// @{ + + /** \brief Create an OrtTensorRTProviderOptionsV2 + * + * \param[out] out Newly created ::OrtTensorRTProviderOptionsV2. Must be released with OrtApi::ReleaseTensorRTProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateTensorRTProviderOptions, _Outptr_ OrtTensorRTProviderOptionsV2** out); + + /** \brief Set options in a TensorRT Execution Provider. + * + * Please refer to https://onnxruntime.ai/docs/execution-providers/TensorRT-ExecutionProvider.html#cc + * to know the available keys and values. Key should be in null terminated string format of the member of ::OrtTensorRTProviderOptionsV2 + * and value should be its related range. Recreates the options and only sets the supplied values. + * + * For example, key="trt_max_workspace_size" and value="2147483648" + * + * \param[in] tensorrt_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UpdateTensorRTProviderOptions, _Inout_ OrtTensorRTProviderOptionsV2* tensorrt_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Get serialized TensorRT provider options string. + * + * For example, "trt_max_workspace_size=2147483648;trt_max_partition_iterations=10;trt_int8_enable=1;......" + * + * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with OrtApi::CreateAllocator or OrtApi::GetAllocatorWithDefaultOptions + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorRTProviderOptionsAsString, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtTensorRTProviderOptionsV2 + * + * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does + */ + void(ORT_API_CALL* ReleaseTensorRTProviderOptions)(_Frees_ptr_opt_ OrtTensorRTProviderOptionsV2* input); + + /// @} + /// \name OrtSessionOptions + /// @{ + + /** \brief Enable custom operators + * + * See onnxruntime-extensions: https://github.com/microsoft/onnxruntime-extensions.git + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(EnableOrtCustomOps, _Inout_ OrtSessionOptions* options); + + /// @} + /// \name OrtAllocator + /// @{ + + /** \brief Register a custom allocator + * + * Enables sharing between multiple sessions that use the same env instance. + * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered. + * + * The behavior of this is exactly the same as OrtApi::CreateAndRegisterAllocator except + * instead of ORT creating an allocator based on provided info, in this case + * ORT uses the user-provided custom allocator. + * See https://onnxruntime.ai/docs/get-started/with-c.html for details. + * + * \param[in] env + * \param[in] allocator User provided allocator + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RegisterAllocator, _Inout_ OrtEnv* env, _In_ OrtAllocator* allocator); + + /** \brief Unregister a custom allocator + * + * It is an error if you provide an ::OrtMemoryInfo not corresponding to any + * registered allocators for sharing. + * + * \param[in] env + * \param[in] mem_info + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UnregisterAllocator, _Inout_ OrtEnv* env, + _In_ const OrtMemoryInfo* mem_info); + + /// @} + /// \name OrtValue + /// @{ + + /** \brief Sets *out to 1 iff an ::OrtValue is a SparseTensor, and 0 otherwise + * + * \param[in] value existing ::OrtValue + * \param[out] out unless an error occurs, contains 1 iff the value contains an instance + * of sparse tensor or 0 otherwise. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(IsSparseTensor, _In_ const OrtValue* value, _Out_ int* out); + + /** \brief Create an ::OrtValue with a sparse tensor that is empty. + * + * Use FillSparseTensor() functions to populate sparse tensor with non-zero values and + * format specific indices data. + * Use ReleaseValue to destroy the sparse tensor, this will also release the buffer inside the output value + * if any was allocated. + * \param[in,out] allocator allocator to use when performing an allocation. Allocation will be performed + * by FillSparseTensor() APIs. The lifespan of the allocator instance must eclipse the lifespan + * this sparse tensor instance as the same allocator will be used to free memory. + * \param[in] dense_shape shape of the original dense tensor + * \param[in] dense_shape_len number of shape dimensions being passed + * \param[in] type must be one of TENSOR_ELEMENT_DATA_TYPE_xxxx + * \param[out] out Should be freed by calling ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSparseTensorAsOrtValue, _Inout_ OrtAllocator* allocator, _In_ const int64_t* dense_shape, + size_t dense_shape_len, ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and COO indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape pointer to values shape array + * \param[in] values_shape_len length of the values_shape + * \param[in] values pointer to an array of values. For strings, pass const char**. + * \param[in] indices_data pointer to a location of COO indices + * \param[in] indices_num number of COO indices + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorCoo, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* indices_data, size_t indices_num); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and CSR indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape pointer to values shape array + * \param[in] values_shape_len length of the values_shape + * \param[in] values - pointer to an array of values. For strings, pass const char**. + * \param[in] inner_indices_data pointer to a location of CSR inner indices + * \param[in] inner_indices_num number of CSR inner indices + * \param[in] outer_indices_data pointer to a location of CSR outer indices + * \param[in] outer_indices_num number of CSR outer indices + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorCsr, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* inner_indices_data, size_t inner_indices_num, + _In_ const int64_t* outer_indices_data, size_t outer_indices_num); + + /** + * This fills populates an empty tensor that was created using OrtApi::CreateSparseTensorAsOrtValue. + * This will allocate required memory and copy the supplied NNZ values and BlockSparse indices into that memory allocation. + * Memory allocation is performed using the allocator that was specified with OrtApi::CreateSparseTensorAsOrtValue. + * + * \param[in,out] ort_value ::OrtValue to populate with data + * \param[in] data_mem_info serves to identify the location of the data to be copied. If the allocator specified + * at the creation time has memory info that is not the same as mem_info argument to this function a X-device copy will be performed. + * String data is assumed to be on CPU and will only be copied into a CPU allocated buffer. + * \param[in] values_shape + * \param[in] values_shape_len + * \param[in] values structure with values information + * \param[in] indices_shape_data pointer to a location of indices shape + * \param[in] indices_shape_len length of the block sparse indices shape + * \param[in] indices_data pointer to a location of indices data. Shape will determine the length of the indices data. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(FillSparseTensorBlockSparse, _Inout_ OrtValue* ort_value, _In_ const OrtMemoryInfo* data_mem_info, + _In_ const int64_t* values_shape, size_t values_shape_len, _In_ const void* values, + _In_ const int64_t* indices_shape_data, size_t indices_shape_len, + _In_ const int32_t* indices_data); + + /** + * Create an ::OrtValue with a sparse tensor. This is the first step. + * Next, use UseIndices() functions to supply sparse tensor with + * format specific indices data and set its sparse format to a specific enum value. + * This will not perform memory allocations. It will + * use supplied user buffer which should outlive the created sparse tensor. + * Use OrtApi::ReleaseValue to destroy the sparse tensor. It would not release the supplied values buffer. + * This function can not be used to map strings from the user allocated memory. Strings must always be copied + * and have UTF-8 encoding. Therefore, use OrtApi::CreateSparseTensorAsOrtValue above and then fill it with data + * using appropriate Make*() function. + * + * \param[in] info memory info where sparse values reside. + * \param[in,out] p_data pointer to a user allocated buffer with values. To create a full sparse tensor with no non-zero + * values, pass nullptr + * \param[in] dense_shape shape of the original dense tensor + * \param[in] dense_shape_len number of shape dimensions being passed + * \param[in] values_shape shape of the values data. To create a fully sparse tensor with no non-zero values, + * pass {0} shape. + * \param[in] values_shape_len number of values shape dimensions + * \param[in] type must be one of TENSOR_ELEMENT_DATA_TYPE_xxxx + * \param[out] out Should be freed by calling ReleaseValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateSparseTensorWithValuesAsOrtValue, _In_ const OrtMemoryInfo* info, _Inout_ void* p_data, + _In_ const int64_t* dense_shape, size_t dense_shape_len, + _In_ const int64_t* values_shape, size_t values_shape_len, + ONNXTensorElementDataType type, _Outptr_ OrtValue** out); + + /** + * This assigns Coo format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_COO. This will not allocate any additional memory for data. The life span of + * indices_data buffer should eclipse the life span of this ::OrtValue. + * + * \param[in,out] ort_value ::OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in,out] indices_data pointer to a user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] indices_num number of COO indices. Should either be 0 for fully sparse tensors, be equal + * to the number of nnz values specified to OrtApi::CreateSparseTensorWithValuesAsOrtValue for 1-D {nnz} indices or + * be twice as number of nnz values for a 2-D indices {nnz, 2} + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseCooIndices, _Inout_ OrtValue* ort_value, _Inout_ int64_t* indices_data, size_t indices_num); + + /** + * The assigns CSR format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_CSRC. This will not allocate any additional memory for data. The life spans of + * inner_data and outer_data buffers should eclipse the life span of this ::OrtValue. + * + * \param[in,out] ort_value ::OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in,out] inner_data pointer to a user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] inner_num number of inner CSR indices. Should either be 0 for fully sparse tensors or be equal + * to the number of nnz values specified to OrtApi::CreateSparseTensorWithValuesAsOrtValue. + * \param[in,out] outer_data pointer to user pre-allocated buffer or nullptr for fully sparse tensors. + * \param[in] outer_num number of CSR outer indices. Should either be 0 for fully sparse tensors or + * equal to rows + 1 of the dense shape. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseCsrIndices, _Inout_ OrtValue* ort_value, _Inout_ int64_t* inner_data, size_t inner_num, + _Inout_ int64_t* outer_data, size_t outer_num); + + /** + * The assigns BlockSparse format indices to the SparseTensor that was created by + * OrtApi::CreateSparseTensorWithValuesAsOrtValue above. It also sets OrtSparseFormat to + * ORT_SPARSE_BLOCK_SPARSE. This will not allocate any additional memory for data. The life span of + * indices_data buffer must eclipse the lifespan of this ::OrtValue. + * + * \param[in,out] ort_value OrtValue instance constructed with OrtApi::CreateSparseTensorWithValuesAsOrtValue + * \param[in] indices_shape pointer to indices shape. Use {0} for fully sparse tensors + * \param[in] indices_shape_len length of the indices shape + * \param[in,out] indices_data pointer to user pre-allocated buffer or nullptr for fully sparse tensors. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(UseBlockSparseIndices, _Inout_ OrtValue* ort_value, const int64_t* indices_shape, size_t indices_shape_len, _Inout_ int32_t* indices_data); + + /** \brief Returns sparse tensor format enum iff a given ort value contains an instance of sparse tensor. + * + * \param[in] ort_value ::OrtValue that contains an instance of sparse tensor + * \param[out] out pointer to out parameter + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorFormat, _In_ const OrtValue* ort_value, _Out_ enum OrtSparseFormat* out); + + /** \brief Returns data type and shape of sparse tensor values (nnz) iff ::OrtValue contains a SparseTensor. + * + * \param[in] ort_value An ::OrtValue that contains a fully constructed sparse tensor + * \param[out] out Must be freed by OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorValuesTypeAndShape, _In_ const OrtValue* ort_value, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Returns numeric data for sparse tensor values (nnz). For string values use GetStringTensor*(). + * + * \param[in] ort_value an instance of ::OrtValue containing sparse tensor + * \param[out] out returns a pointer to values data. Do not attempt to free this ptr. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorValues, _In_ const OrtValue* ort_value, _Outptr_ const void** out); + + /** \brief Returns data type, shape for the type of indices specified by indices_format. + * + * \param[in] ort_value ::OrtValue containing sparse tensor. + * \param[in] indices_format One of the indices formats. It is an error to request a format that the sparse + * tensor does not contain. + * \param[out] out an instance of ::OrtTensorTypeAndShapeInfo. Must be freed by OrtApi::ReleaseTensorTypeAndShapeInfo + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorIndicesTypeShape, _In_ const OrtValue* ort_value, enum OrtSparseIndicesFormat indices_format, _Outptr_ OrtTensorTypeAndShapeInfo** out); + + /** \brief Returns indices data for the type of the indices specified by indices_format + * + * \param[in] ort_value ::OrtValue containing sparse tensor. + * \param[in] indices_format One of the indices formats. It is an error to request a format that the sparse tensor does not contain. + * \param[out] num_indices Pointer to where the number of indices entries is returned + * \param[out] indices Returned pointer to the indices data. Do not free the returned pointer as it refers to internal data owned by the ::OrtValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetSparseTensorIndices, _In_ const OrtValue* ort_value, enum OrtSparseIndicesFormat indices_format, _Out_ size_t* num_indices, _Outptr_ const void** indices); + /// @} + /// \name OrtSessionOptions + /// @{ + + /** + * \brief Sets out to 1 iff an optional type OrtValue has an element, 0 otherwise (OrtValue is None) + * Use this API to find if the optional type OrtValue is None or not. + * If the optional type OrtValue is not None, use the OrtValue just like any other OrtValue. + * For example, if you get an OrtValue that corresponds to Optional(tensor) and + * if HasValue() returns true, use it as tensor and so on. + + * \param[in] value Input OrtValue. + * \param[out] out indicating if the input OrtValue contains data (1) or if it is a None (0) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(HasValue, _In_ const OrtValue* value, _Out_ int* out); + + /// @} + /// \name OrtKernelContext + /// Custom operator APIs. + /// @{ + + /** \brief Used for custom operators, gets the GPU compute stream to use to launch the custom a GPU kernel + * \see ::OrtCustomOp + * \param[in] context OrtKernelContext instance + * \param[out] out Returns pointer to a GPU compute stream that can be used to launch the custom GPU kernel. + * If retrieving the GPU compute stream is not relevant (GPU not enabled in the build, kernel partitioned to + * some other EP), then a nullptr is returned as the output param. + * Do not free or mutate the returned pointer as it refers to internal data owned by the underlying session. + * Only use it for custom kernel launching. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetGPUComputeStream, _In_ const OrtKernelContext* context, _Outptr_ void** out); + + /// @} + /// \name GetTensorMemoryInfo + /// @{ + /** \brief Returns a pointer to the ::OrtMemoryInfo of a Tensor + * \param[in] value ::OrtValue containing tensor. + * \param[out] mem_info ::OrtMemoryInfo of the tensor. Do NOT free the returned pointer. It is valid for the lifetime of the ::OrtValue + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetTensorMemoryInfo, _In_ const OrtValue* value, _Out_ const OrtMemoryInfo** mem_info); + + /// @} + /// \name GetExecutionProviderApi + /// @{ + /** \brief Get a pointer to the requested version of the Execution Provider specific + * API extensions to the OrtApi + * \param[in] provider_name The name of the execution provider name. Currently only the following + * values are supported: "DML". + * \param[in] version Must be ::ORT_API_VERSION. + * \param[out] provider_api A void pointer containing a reference to the execution provider versioned api structure. + * For example, the provider_api pointer can be cast to the OrtDmlApi* when the provider_name is "DML". + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetExecutionProviderApi, _In_ const char* provider_name, _In_ uint32_t version, _Outptr_ const void** provider_api); + + /// @} + + /// \name SessionOptions + /// @{ + /** \brief Set custom thread creation function + * + * \param[in] options Session options + * \param[in] ort_custom_create_thread_fn Custom thread creation function + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomCreateThreadFn, _Inout_ OrtSessionOptions* options, _In_ OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /** \brief Set creation options for custom thread + * + * \param[in] options Session options + * \param[in] ort_custom_thread_creation_options Custom thread creation options (can be nullptr) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomThreadCreationOptions, _Inout_ OrtSessionOptions* options, _In_ void* ort_custom_thread_creation_options); + + /** \brief Set custom thread join function + * + * \param[in] options Session options + * \param[in] ort_custom_join_thread_fn Custom join thread function, must not be nullptr when ort_custom_create_thread_fn is set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsSetCustomJoinThreadFn, _Inout_ OrtSessionOptions* options, _In_ OrtCustomJoinThreadFn ort_custom_join_thread_fn); + /// @} + + /// \name OrtThreadingOptions + /// @{ + /** \brief Set custom thread creation function for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_create_thread_fn Custom thread creation function + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomCreateThreadFn, _Inout_ OrtThreadingOptions* tp_options, _In_ OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /** \brief Set custom thread creation options for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_thread_creation_options Custom thread creation options (can be nullptr) + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomThreadCreationOptions, _Inout_ OrtThreadingOptions* tp_options, _In_ void* ort_custom_thread_creation_options); + + /** \brief Set custom thread join function for global thread pools + * + * \param[inout] tp_options + * \param[in] ort_custom_join_thread_fn Custom thread join function, must not be nullptr when global ort_custom_create_thread_fn is set + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetGlobalCustomJoinThreadFn, _Inout_ OrtThreadingOptions* tp_options, _In_ OrtCustomJoinThreadFn ort_custom_join_thread_fn); + /// @} + + /** \brief Synchronize bound inputs. The call may be necessary for some providers, such as cuda, + * in case the system that allocated bound memory operated on a different stream. However, the + * operation is provider specific and could be a no-op. + * + * \param[inout] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SynchronizeBoundInputs, _Inout_ OrtIoBinding* binding_ptr); + + /** \brief Synchronize bound outputs. The call may be necessary for some providers, such as cuda, + * in case the system that allocated bound memory operated on a different stream. However, the + * operation is provider specific and could be a no-op. + * + * \param[inout] binding_ptr + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SynchronizeBoundOutputs, _Inout_ OrtIoBinding* binding_ptr); + + /// \name OrtSessionOptions + /// @{ + + /** \brief Append CUDA execution provider to the session options + * + * If CUDA is not available (due to a non CUDA enabled build), this function will return failure. + * + * This is slightly different from OrtApi::SessionOptionsAppendExecutionProvider_CUDA, it takes an + * ::OrtCUDAProviderOptions which is publicly defined. This takes an opaque ::OrtCUDAProviderOptionsV2 + * which must be created with OrtApi::CreateCUDAProviderOptions. + * + * For OrtApi::SessionOptionsAppendExecutionProvider_CUDA, the user needs to instantiate ::OrtCUDAProviderOptions + * as well as allocate/release buffers for some members of ::OrtCUDAProviderOptions. + * Here, OrtApi::CreateCUDAProviderOptions and Ortapi::ReleaseCUDAProviderOptions will do the memory management for you. + * + * \param[in] options + * \param[in] cuda_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CUDA_V2, + _In_ OrtSessionOptions* options, _In_ const OrtCUDAProviderOptionsV2* cuda_options); + + /// @} + /// \name OrtCUDAProviderOptionsV2 + /// @{ + + /** \brief Create an OrtCUDAProviderOptionsV2 + * + * \param[out] out Newly created ::OrtCUDAProviderOptionsV2. Must be released with OrtApi::ReleaseCudaProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(CreateCUDAProviderOptions, _Outptr_ OrtCUDAProviderOptionsV2** out); + + /** \brief Set options in a CUDA Execution Provider. + * + * Please refer to https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#configuration-options + * to know the available keys and values. Key should be in null terminated string format of the member of ::OrtCUDAProviderOptionsV2 + * and value should be its related range. Recreates the options and only sets the supplied values. + * + * For example, key="device_id" and value="0" + * + * \param[in] cuda_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(UpdateCUDAProviderOptions, _Inout_ OrtCUDAProviderOptionsV2* cuda_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** + * Get serialized CUDA provider options string. + * + * For example, "device_id=0;arena_extend_strategy=0;......" + * + * \param cuda_options - OrtCUDAProviderOptionsV2 instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions() + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(GetCUDAProviderOptionsAsString, _In_ const OrtCUDAProviderOptionsV2* cuda_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtCUDAProviderOptionsV2 + * + * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does + * + * \since Version 1.11. + */ + void(ORT_API_CALL* ReleaseCUDAProviderOptions)(_Frees_ptr_opt_ OrtCUDAProviderOptionsV2* input); + + /// @} + + /** \brief Append MIGraphX provider to session options + * + * If MIGraphX is not available (due to a non MIGraphX enabled build, or if MIGraphX is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] migraphx_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.11. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_MIGraphX, + _In_ OrtSessionOptions* options, _In_ const OrtMIGraphXProviderOptions* migraphx_options); + + /** \brief Replace initialized Tensors with external data with the data provided in initializers. + * + * The function will find the initialized TensorProtos with external data in the graph with the provided names and + * replace them with the provided tensors. The API verifies that the TensorProto being replaced + * has an external data reference and has the same name, dimensions and data type as its replacement. The replacement + * will occur before any of the optimizations take place. The data will be copied into the graph + * since TensorProto can't refer to the user provided buffers. + * + * Once the model has been loaded, the OrtValue(s) added to SessionOptions instance will be removed + * from the internal SessionOptions copy to save memory, the user provided buffers can then be deallocated + * and the SessionOptions instance that refers to them can be destroyed. + * + * \param[in] options + * \param[in] initializer_names Array of null terminated UTF-8 encoded strings of the initializers names. + * \param[in] initializers Array of ::OrtValue type + * \param[in] num_initializers Number of elements in the initializer_names and initializers + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.12. + */ + ORT_API2_STATUS(AddExternalInitializers, _In_ OrtSessionOptions* options, + _In_reads_(num_initializers) const char* const* initializer_names, + _In_reads_(num_initializers) const OrtValue* const* initializers, size_t num_initializers); + + /** \brief: Create attribute of onnxruntime operator + * + * \param[in] name Name of the attribute + * \param[in] data Data content of the attribute + * \param[in] len Number of bytes stored in data + * \param[in] type Data type + * \param[out] op_attr Attribute that has been created, which must be released by OrtApi::ReleaseOpAttr + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CreateOpAttr, + _In_ const char* name, + _In_ const void* data, + _In_ int len, + _In_ OrtOpAttrType type, + _Outptr_ OrtOpAttr** op_attr); + + /* \brief: Release op attribute + * + * \param[in] opAttr Attribute created by OrtApi::CreateOpAttr + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(OpAttr); + + /** \brief: Create onnxruntime native operator + * + * \param[in] info Kernel info + * \param[in] op_name Operator name + * \param[in] domain Operator domain + * \param[in] version Operator opset version + * \param[in] type_constraint_names Name of the type contraints, such as "T" or "T1" + * \param[in] type_constraint_values Type of each contraints + * \param[in] type_constraint_count Number of contraints + * \param[in] attr_values Attributes used to initialize the operator + * \param[in] attr_count Number of the attributes + * \param[in] input_count Number of inputs + * \param[in] output_count Number of outputs + * \param[out] ort_op Operator that has been created + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CreateOp, + _In_ const OrtKernelInfo* info, + _In_z_ const char* op_name, + _In_z_ const char* domain, + int version, + _In_reads_(type_constraint_count) const char** type_constraint_names, + _In_reads_(type_constraint_count) const ONNXTensorElementDataType* type_constraint_values, + int type_constraint_count, + _In_reads_(attr_count) const OrtOpAttr* const* attr_values, + int attr_count, + int input_count, + int output_count, + _Outptr_ OrtOp** ort_op); + + /** \brief: Invoke the operator created by OrtApi::CreateOp + * The inputs must follow the order as specified in onnx specification + * + * \param[in] context Kernel context + * \param[in] ort_op Operator that has been created + * \param[in] input_values Array of inputs + * \param[in] input_count Number of inputs + * \param[in] output_values Array of outputs + * \param[in] output_count Number of outputs + * + * \since Version 1.12. + */ + ORT_API2_STATUS(InvokeOp, + _In_ const OrtKernelContext* context, + _In_ const OrtOp* ort_op, + _In_ const OrtValue* const* input_values, + _In_ int input_count, + _Inout_ OrtValue* const* output_values, + _In_ int output_count); + + /* \brief: Release an onnxruntime operator + * + * \param[in] Op Operator created by OrtApi::CreateOp + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(Op); + + /** \brief: Append execution provider to the session options. + * \param[in] options + * \param[in] provider_name - provider to add. + * \param[in] provider_options_keys - keys to configure the provider options + * \param[in] provider_options_values - values to configure the provider options + * \param[in] num_keys - number of keys passed in + * + * Currently supported providers: + * QNN + * SNPE + * XNNPACK + * + * Note: If an execution provider has a dedicated SessionOptionsAppendExecutionProvider_ function + * that should be used to add it. + * + * QNN supported keys: + * "backend_path": file path to QNN backend library. + * "profiling_level": QNN profiling level, options: "off", "basic", "detailed". Default to off. + * "profiling_file_path": QNN profiling file path if ETW not enabled. + * "rpc_control_latency": QNN RPC control latency. + * "vtcm_mb": QNN VTCM size in MB. default to 0(not set). + * "htp_performance_mode": QNN performance mode, options: "burst", "balanced", "default", "high_performance", + * "high_power_saver", "low_balanced", "extreme_power_saver", "low_power_saver", "power_saver", "sustained_high_performance". Default to "default". + * "qnn_saver_path": File path to the QNN Saver backend library. If specified, QNN Saver will be enabled and will + * dump QNN API calls to disk for replay/debugging. QNN Saver produces incorrect model inference results and + * may alter model/EP partitioning. Use only for debugging. + * "qnn_context_priority": QNN context priority, options: "low", "normal", "normal_high", "high". Default to "normal". + * "htp_graph_finalization_optimization_mode": Set the optimization mode for graph finalization on the HTP backend. Available options: + * - "0": Default. + * - "1": Faster preparation time, less optimal graph. + * - "2": Longer preparation time, more optimal graph. + * - "3": Longest preparation time, most likely even more optimal graph. See QNN SDK documentation for specific details. + * "soc_model": The SoC model number. Refer to the QNN SDK documentation for valid values. Defaults to "0" (unknown). + * "htp_arch": The minimum HTP architecture the driver will use to select compatible QNN operators. Available options: + * - "0": Default (none). + * - "68" + * - "69" + * - "73" + * - "75" + * "device_id": The ID of the device to use when setting 'htp_arch'. Defaults to "0" (for single device). + * "enable_htp_fp16_precision": Used for float32 model for HTP backend. + * Enable the float32 model to be inferenced with fp16 precision. Otherwise, it will be fp32 precision. + * - "0": With fp32 precision. + * - "1": Default. With fp16 precision. + * "enable_htp_weight_sharing": Enable QNN weight sharing feature while compiling multiple graphs into one QNN context. + * - "0": Default. Disabled. + * - "1": Enabled. + * "offload_graph_io_quantization": Offload graph input quantization and graph output dequantization to another + * execution provider (typically CPU EP). + * - "0": Default. Disabled. QNN EP will handle quantization and dequantization of graph I/O. + * - "1": Enabled. + * + * SNPE supported keys: + * "runtime": SNPE runtime engine, options: "CPU", "CPU_FLOAT32", "GPU", "GPU_FLOAT32_16_HYBRID", "GPU_FLOAT16", + * "DSP", "DSP_FIXED8_TF", "AIP_FIXED_TF", "AIP_FIXED8_TF". + * Mapping to SNPE Runtime_t definition: CPU, CPU_FLOAT32 => zdl::DlSystem::Runtime_t::CPU; + * GPU, GPU_FLOAT32_16_HYBRID => zdl::DlSystem::Runtime_t::GPU; + * GPU_FLOAT16 => zdl::DlSystem::Runtime_t::GPU_FLOAT16; + * DSP, DSP_FIXED8_TF => zdl::DlSystem::Runtime_t::DSP. + * AIP_FIXED_TF, AIP_FIXED8_TF => zdl::DlSystem::Runtime_t::AIP_FIXED_TF. + * "priority": execution priority, options: "low", "normal". + * "buffer_type": ITensor or user buffers, options: "ITENSOR", user buffer with different types - "TF8", "TF16", "UINT8", "FLOAT". + * "ITENSOR" -- default, ITensor which is float only. + * "TF8" -- quantized model required, "FLOAT" -- for both quantized or non-quantized model + * "enable_init_cache": enable SNPE init caching feature, set to 1 to enabled it. Disabled by default. + * If SNPE is not available (due to a non Snpe enabled build or its dependencies not being installed), this function will fail. + * + * XNNPACK supported keys: + * "intra_op_num_threads": number of thread-pool size to use for XNNPACK execution provider. + * default value is 0, which means to use the session thread-pool size. + * + * \since Version 1.12. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider, _In_ OrtSessionOptions* options, + _In_ const char* provider_name, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /* \brief: Get a copy of kernel info + * + * \param[in] info Kernel info + * \param[out] info_copy Copy of kernel info + * + * \since Version 1.12. + */ + ORT_API2_STATUS(CopyKernelInfo, + _In_ const OrtKernelInfo* info, + _Outptr_ OrtKernelInfo** info_copy); + + /* \brief: Release kernel info + * + * \param[in] KernelInfo A copy of kernel info returned by CopyKernelInfo + * + * \since Version 1.12. + */ + ORT_CLASS_RELEASE(KernelInfo); + + /// \name Ort Training + /// @{ + /** \brief Gets the Training C Api struct + * + * Call this function to access the ::OrtTrainingApi structure that holds pointers to functions that enable + * training with onnxruntime. + * \note A NULL pointer will be returned and no error message will be printed if the training api + * is not supported with this build. A NULL pointer will be returned and an error message will be + * printed if the provided version is unsupported, for example when using a runtime older than the + * version created with this header file. + * + * \param[in] version Must be ::ORT_API_VERSION + * \return The ::OrtTrainingApi struct for the version requested. + * + * \since Version 1.13 + */ + const OrtTrainingApi*(ORT_API_CALL* GetTrainingApi)(uint32_t version)NO_EXCEPTION; + + /// @} + + /** \brief Append CANN provider to session options + * + * If CANN is not available (due to a non CANN enabled build, or if CANN is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] cann_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_CANN, + _In_ OrtSessionOptions* options, _In_ const OrtCANNProviderOptions* cann_options); + + /** \brief Create an OrtCANNProviderOptions + * + * \param[out] out created ::OrtCANNProviderOptions. Must be released with OrtApi::ReleaseCANNProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(CreateCANNProviderOptions, _Outptr_ OrtCANNProviderOptions** out); + + /** \brief Set options in a CANN Execution Provider. + * + * \param[in] cann_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(UpdateCANNProviderOptions, _Inout_ OrtCANNProviderOptions* cann_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Get serialized CANN provider options string. + * + * \param[in] cann_options OrtCANNProviderOptions instance + * \param[in] allocator a ptr to an instance of OrtAllocator obtained with CreateAllocator() + * or GetAllocatorWithDefaultOptions(), the specified allocator will be used to allocate + * continuous buffers for output strings and lengths. + * \param[out] ptr is a UTF-8 null terminated string allocated using 'allocator'. + * The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.13. + */ + ORT_API2_STATUS(GetCANNProviderOptionsAsString, _In_ const OrtCANNProviderOptions* cann_options, + _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an OrtCANNProviderOptions + * + * \param[in] input The pointer of OrtCANNProviderOptions which will been deleted + * + * \since Version 1.13. + */ + void(ORT_API_CALL* ReleaseCANNProviderOptions)(_Frees_ptr_opt_ OrtCANNProviderOptions* input); + + /* \brief Get OrtDevice type from MemoryInfo + * + * \since Version 1.14 + */ + void(ORT_API_CALL* MemoryInfoGetDeviceType)(_In_ const OrtMemoryInfo* ptr, _Out_ OrtMemoryInfoDeviceType* out); + + /* \brief Update the OrtEnv instance with custom log severity level + * + * \param[in] ort_env The OrtEnv instance being used + * \param[in] log_severity_level The log severity level. + * + * \since Version 1.14. + */ + ORT_API2_STATUS(UpdateEnvWithCustomLogLevel, _In_ OrtEnv* ort_env, OrtLoggingLevel log_severity_level); + + /* \brief Set affinities for intra op threads + * + * Affinity string follows format: + * logical_processor_id,logical_processor_id;logical_processor_id,logical_processor_id + * Semicolon isolates configurations among threads, while comma split processors where ith thread expected to attach to. + * e.g. 1,2,3;4,5 + * specifies affinities for two threads, with the 1st thread attach to the 1st, 2nd, and 3rd processor, and 2nd thread to the 4th and 5th. + * To ease the configuration, an "interval" is also allowed: + * e.g. 1-8;8-16;17-24 + * orders that the 1st thread runs on first eight processors, 2nd thread runs on next eight processors, and so forth. + * Note: + * 1. Once set, the number of thread affinities must equal to intra_op_num_threads - 1, + * ort does not set affinity on the main thread which is started and managed by the calling app; + * 2. For windows, ort will infer the group id from a logical processor id, for example, assuming there are two groups with each has 64 logical processors, + * an id of 64 will be inferred as the last processor of the 1st group, while 65 will be interpreted as the 1st processor of the second group. + * Hence 64-65 is an invalid configuration, because a windows thread cannot be attached to processors across group boundary. + * + * \since Version 1.14 + */ + ORT_API2_STATUS(SetGlobalIntraOpThreadAffinity, _Inout_ OrtThreadingOptions* tp_options, const char* affinity_string); + + /** \brief Register custom ops from a shared library. + * + * Loads a shared library (.dll on windows, .so on linux, etc) named 'library_name' and looks for this entry point: + * OrtStatus* RegisterCustomOps(OrtSessionOptions * options, const OrtApiBase* api); + * It then passes in the provided session options to this function along with the api base. + * + * The handle to the loaded library is automatically released by ORT when the last OrtSession that references the + * library handle is released. If no OrtSession is created, then the library handle is released when the provided + * OrtSessionOptions is released. + * + * \param[in] options The session options. + * \param[in] library_name The name of the shared library to load and register. Refer to OS-specific dynamic library + * loading utilities (e.g., LoadLibraryEx on Windows or dlopen on Linux/MacOS) for information + * on the format of library names and search paths. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(RegisterCustomOpsLibrary_V2, _Inout_ OrtSessionOptions* options, _In_ const ORTCHAR_T* library_name); + + /** \brief Register custom ops by calling a RegisterCustomOpsFn function. + * + * Searches for registration_func_name and if found calls it. + * + * The library containing the function must either be linked against or previously loaded by the executable. + * + * If you want ONNX Runtime to load the library and manage its lifetime, use RegisterCustomOpsLibrary_V2. + * + * RegisterCustomOpsUsingFunction can be used in scenarios where it may not be possible for ONNX Runtime to load + * the library from a path. e.g. mobile platforms where the library must be linked into the app. + * + * The registration function must have the signature of RegisterCustomOpsFn: + * OrtStatus* (*fn)(OrtSessionOptions* options, const OrtApiBase* api); + * + * See https://onnxruntime.ai/docs/reference/operators/add-custom-op.html for details on how the registration + * function should be implemented. + * + * \param[in] options OrtSessionOptions that is passed through as the first argument in the call to the + * registration function. + * \param[in] registration_func_name Name of registration function to use. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(RegisterCustomOpsUsingFunction, _Inout_ OrtSessionOptions* options, + _In_ const char* registration_func_name); + + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Get the number of inputs from ::OrtKernelInfo. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the number of inputs + * during kernel/session creation. + * + * \param[in] info Instance of ::OrtKernelInfo. + * \param[out] out Pointer to variable assigned with the result on success. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputCount, _In_ const OrtKernelInfo* info, _Out_ size_t* out); + + /** \brief Get the number of outputs from ::OrtKernelInfo. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the number of outputs + * during kernel/session creation. + * + * \param[in] info Instance of ::OrtKernelInfo. + * \param[out] out Pointer to variable assigned with the result on success. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputCount, _In_ const OrtKernelInfo* info, _Out_ size_t* out); + + /** \brief Get the name of a ::OrtKernelInfo's input. + * + * Used in the CreateKernel callback of an OrtCustomOp to query an input's name + * during kernel/session creation. + * + * If `out` is nullptr, the value of `size` is set to the size of the name + * string (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the name string's size, + * the value of `size` is set to the true size of the string (including null-terminator), + * the provided memory is filled with the string's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string + * and a failure status is returned. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index The index of the input name to get. Returns a failure status if out-of-bounds. + * \param[out] out Memory location into which to write the UTF-8 null-terminated string representing the input's name. + * \param[in,out] size Pointer to the size of the `out` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputName, _In_ const OrtKernelInfo* info, size_t index, _Out_ char* out, + _Inout_ size_t* size); + + /** \brief Get the name of a ::OrtKernelInfo's output. + * + * Used in the CreateKernel callback of an OrtCustomOp to query an output's name + * during kernel/session creation. + * + * If `out` is nullptr, the value of `size` is set to the size of the name + * string (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the name string's size, + * the value of `size` is set to the true size of the string (including null-terminator), + * the provided memory is filled with the string's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string + * and a failure status is returned. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index The index of the output name to get. Returns a failure status if out-of-bounds. + * \param[out] out Memory location into which to write the UTF-8 null-terminated string representing the output's + * name. + * \param[in,out] size Pointer to the size of the `out` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputName, _In_ const OrtKernelInfo* info, size_t index, _Out_ char* out, + _Inout_ size_t* size); + + /** \brief Get the type information for a ::OrtKernelInfo's input. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the shape and type information + * of an input during kernel/session creation. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index Which input to get the type information for + * \param[out] type_info Pointer set to the resulting ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetInputTypeInfo, _In_ const OrtKernelInfo* info, size_t index, + _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get the type information for a ::OrtKernelInfo's output. + * + * Used in the CreateKernel callback of an OrtCustomOp to query the shape and type information + * of an output during kernel/session creation. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[in] index Which input to get the type information for + * \param[out] type_info Pointer set to the resulting ::OrtTypeInfo. Must be freed with OrtApi::ReleaseTypeInfo. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(KernelInfo_GetOutputTypeInfo, _In_ const OrtKernelInfo* info, size_t index, + _Outptr_ OrtTypeInfo** type_info); + + /** \brief Get a ::OrtValue tensor stored as an attribute in the graph node. + * + * Used in the CreateKernel callback of an OrtCustomOp to get a tensor attribute. + * + * \param[in] info ::OrtKernelInfo instance. + * \param[in] name UTF-8 null-terminated string representing the attribute's name. + * \param[in] allocator Allocator used to allocate the internal tensor state. + * \param[out] out Returns newly created ::OrtValue. Must be freed with OrtApi::ReleaseValue, + * which will also free internal tensor state allocated with the provided allocator. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAttribute_tensor, _In_ const OrtKernelInfo* info, _In_z_ const char* name, + _Inout_ OrtAllocator* allocator, _Outptr_ OrtValue** out); + + /// @} + /// \name OrtSessionOptions + /// Custom operator APIs + /// @{ + + /** \brief Checks if the given session configuration entry exists. + * + * The config_key formats are defined in onnxruntime_session_options_config_keys.h + * + * Can be used in a custom operator library to check for session configuration entries + * that target one or more custom operators in the library. Example: The config entry + * custom_op.myop.some_key targets a custom op named "myop". + * + * \param[in] options The ::OrtSessionOptions instance. + * \param[in] config_key A null-terminated UTF-8 string representation of the configuration key. + * \param[out] out Pointer set to 1 if the entry exists and 0 otherwise. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(HasSessionConfigEntry, _In_ const OrtSessionOptions* options, + _In_z_ const char* config_key, _Out_ int* out); + + /** \brief Get a session configuration value. + * + * Returns a failure status if the configuration key does not exist. + * The config_key and the format of config_value are defined in onnxruntime_session_options_config_keys.h + * + * If `config_value` is nullptr, the value of `size` is set to the true size of the string + * value (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the actual string value's size, + * the value of `size` is set to the true size of the string value, the provided memory + * is filled with the value's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string value's size and `config_value` + * is not nullptr, the value of `size` is set to the true size of the string value + * and a failure status is returned. + * + * Can be used in a custom operator library to get session configuration entries + * that target one or more custom operators in the library. Example: The config entry + * custom_op.myop.some_key targets a custom op named "myop". + * + * \param[in] options The session options. + * \param[in] config_key A null-terminated UTF-8 string representation of the config key. + * \param[in] config_value Pointer to memory where the null-terminated UTF-8 string value will be stored. + * \param[in,out] size Pointer to the size of the `config_value` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.14 + */ + ORT_API2_STATUS(GetSessionConfigEntry, _In_ const OrtSessionOptions* options, + _In_z_ const char* config_key, _Out_ char* config_value, _Inout_ size_t* size); + + /// @} + + /** \brief Append dnnl provider to session options + * + * If oneDNN is not available, this function will return failure. + * + * \param[in] options + * \param[in] dnnl_options + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_Dnnl, + _In_ OrtSessionOptions* options, _In_ const OrtDnnlProviderOptions* dnnl_options); + + /** \brief Create an OrtDnnlProviderOptions + * + * \param[out] out Newly created ::OrtDnnlProviderOptions. Must be released with OrtApi::ReleaseDnnlProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(CreateDnnlProviderOptions, _Outptr_ OrtDnnlProviderOptions** out); + + /** \brief Set options in a oneDNN Execution Provider. + * + * Key should be in null terminated string format of the member of ::OrtDnnlProviderOptions + * and value should be its related range. + * + * For example, key="use_arena" and value="1" + * + * \param[in] dnnl_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(UpdateDnnlProviderOptions, _Inout_ OrtDnnlProviderOptions* dnnl_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** + * Get serialized oneDNN provider options string. + * + * For example, "use_arena=1;......" + * + * \param dnnl_options - OrtDnnlProviderOptions instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions() + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(GetDnnlProviderOptionsAsString, _In_ const OrtDnnlProviderOptions* dnnl_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtDnnlProviderOptions + * + * \since Version 1.15. + */ + void(ORT_API_CALL* ReleaseDnnlProviderOptions)(_Frees_ptr_opt_ OrtDnnlProviderOptions* input); + + /// \name OrtKernelInfo + /// Custom operator APIs. + /// @{ + + /** \brief Get the graph node name from ::OrtKernelInfo. + * + * If `out` is nullptr, the value of `size` is set to the size of the name + * string (including null-terminator), and a success status is returned. + * + * If the `size` parameter is greater than or equal to the name string's size, + * the value of `size` is set to the true size of the string (including null-terminator), + * the provided memory is filled with the string's contents, and a success status is returned. + * + * If the `size` parameter is less than the actual string's size and `out` + * is not nullptr, the value of `size` is set to the true size of the string + * and a failure status is returned. + * + * Can be used in a custom operator's CreateKernel callback to get the name of the operator's node name in the graph. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[out] out Memory location into which to write the UTF-8 null-terminated string representing the name. + * \param[in,out] size Pointer to the size of the `out` buffer. See above comments for details. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(KernelInfo_GetNodeName, _In_ const OrtKernelInfo* info, _Out_ char* out, _Inout_ size_t* size); + + /** \brief Get the session logger from ::OrtKernelInfo. + * + * Used in the CreateKernel callback of an OrtCustomOp to get a logger that can be used to log + * messages. + * + * \param[in] info An instance of ::OrtKernelInfo. + * \param[out] logger Pointer set to the session's ::OrtLogger. Owned by ONNX Runtime, so do not free. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(KernelInfo_GetLogger, _In_ const OrtKernelInfo* info, _Outptr_ const OrtLogger** logger); + + /// @} + /// \name OrtKernelContext + /// Custom operator APIs. + /// @{ + + /** \brief Get the runtime logger from ::OrtKernelContext. + * + * Used in the KernelCompute callback of an OrtCustomOp to get a logger that can be used to log + * messages during inference. + * + * \param[in] context An instance of ::OrtKernelContext. + * \param[out] logger Pointer set to the kernel context's ::OrtLogger. Owned by ONNX Runtime, so do not free. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(KernelContext_GetLogger, _In_ const OrtKernelContext* context, _Outptr_ const OrtLogger** logger); + + /// @} + /// \name OrtLogger + /// Custom operator APIs. + /// @{ + + /** \brief Logs a message at the given severity level using the provided ::OrtLogger. + * + * Only messages with a severity level equal or greater than the ::OrtLogger's logging severity level + * are logged. Use OrtApi::Logger_GetLoggingSeverityLevel to get the ::OrtLogger's logging severity + * level. + * + * Can be used in custom operators to log messages with the logger retrieved via OrtApi::KernelInfo_GetLogger. + * + * \param[in] logger The ::OrtLogger instance. + * \param[in] log_severity_level The message's severity level. + * \param[in] message The message to log. + * \param[in] file_path The filepath of the file in which the message is logged. Usually the value of ORT_FILE. + * \param[in] line_number The file line number in which the message is logged. Usually the value of __LINE__. + * \param[in] func_name The name of the function in which the message is logged. Usually the value of __FUNCTION__. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(Logger_LogMessage, _In_ const OrtLogger* logger, OrtLoggingLevel log_severity_level, + _In_z_ const char* message, _In_z_ const ORTCHAR_T* file_path, int line_number, + _In_z_ const char* func_name); + + /** \brief Get the logging severity level of the ::OrtLogger. + * + * Can be used in a custom operator to get the logging serverity level of the ::OrtLogger associated with + * the ::OrtKernelInfo. + * + * \param[in] logger The ::OrtLogger instance. + * \param[out] out Pointer to variable assigned with the logging severity level on success. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * \since Version 1.15 + */ + ORT_API2_STATUS(Logger_GetLoggingSeverityLevel, _In_ const OrtLogger* logger, _Out_ OrtLoggingLevel* out); + + /// @} + + /** \brief Get a ::OrtValue tensor stored as a constant initializer in the graph node. + * + * Used in the CreateKernel callback of an OrtCustomOp to get a tensor value. + * + * \param[in] info ::OrtKernelInfo instance. + * \param[in] index The node index. + * \param[out] is_constant Is it a constant node input or not. + * \param[out] out The OrtValue tensor value. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(KernelInfoGetConstantInput_tensor, _In_ const OrtKernelInfo* info, size_t index, _Out_ int* is_constant, _Outptr_ const OrtValue** out); + + /** \brief Get Optional Type information from an ::OrtTypeInfo + * + * This augments ::OrtTypeInfo to return an ::OrtOptionalTypeInfo when the type is optional. + * The OrtOptionalTypeInfo also has a nested ::OrtTypeInfo that describes the type of the optional value. + * ::OrtOptionalTypeInfo type can only appear within model metadata to describe inputs/outputs. + * The actual OrtValues that are supplied in place of optional type inputs should contain + * specific type that is described by ::OrtOptionalTypeInfo. + * + * So the picture: ::OrtTypeInfo -> ::OrtOptionalTypeInfo -> ::OrtTypeInfo (describes the type that can be supplied + * in place of the optional type when creating the actual ::OrtValue). + * + * \param[in] type_info + * \param[out] out A pointer to the ::OrtOptionalTypeInfo. Do not free this value, + * it is owned by OrtTypeInfo instance. When the type_info does not represent + * optional type, nullptr is returned in out. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(CastTypeInfoToOptionalTypeInfo, _In_ const OrtTypeInfo* type_info, + _Outptr_result_maybenull_ const OrtOptionalTypeInfo** out); + + /** \brief Get OrtTypeInfo for the allowed contained type from an ::OrtOptionalTypeInfo. + * + * This augments ::OrtOptionalTypeInfo to return an ::OrtTypeInfo for the contained type. + * The OrtOptionalTypeInfo has a nested ::OrtTypeInfo that describes the type of the optional value. + * ::OrtOptionalTypeInfo type can only appear within model metadata to describe inputs/outputs. + * The actual OrtValues that are supplied in place of optional type inputs should contain + * specific type that is described by the returned ::OrtTypeInfo. + * + * \param[in] optional_type_info + * \param[out] out A pointer to the ::OrtTypeInfo for what the optional value could be. + * it is owned by OrtOptionalTypeInfo instance. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(GetOptionalContainedTypeInfo, _In_ const OrtOptionalTypeInfo* optional_type_info, + _Outptr_ OrtTypeInfo** out); + + /** \brief Set a single string in a string tensor + * Do not zero terminate the string data. + * + * \param[in] value A string tensor + * \param[in] index - flat index of the element + * \param[in] length_in_bytes length of the buffer in utf-8 bytes (without the null terminator) + * \param[inout] buffer - address of return value + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(GetResizedStringTensorElementBuffer, _Inout_ OrtValue* value, _In_ size_t index, _In_ size_t length_in_bytes, _Inout_ char** buffer); + + /** \brief Get Allocator from KernelContext for a specific memoryInfo. Please use C API ReleaseAllocator to release out object + * + * \param[in] context OrtKernelContext instance + * \param[in] mem_info OrtMemoryInfo instance + * \param[out] out A pointer to OrtAllocator. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.15. + */ + ORT_API2_STATUS(KernelContext_GetAllocator, _In_ const OrtKernelContext* context, _In_ const OrtMemoryInfo* mem_info, _Outptr_ OrtAllocator** out); + + /** \brief Returns a null terminated string of the build info including git info and cxx flags + * + * \return UTF-8 encoded version string. Do not deallocate the returned buffer. + * + * \since Version 1.15. + */ + const char*(ORT_API_CALL* GetBuildInfoString)(void); + + /// \name OrtROCMProviderOptions + /// @{ + + /** \brief Create an OrtROCMProviderOptions + * + * \param[out] out Newly created ::OrtROCMProviderOptions. Must be released with OrtApi::ReleaseROCMProviderOptions + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.16. + */ + ORT_API2_STATUS(CreateROCMProviderOptions, _Outptr_ OrtROCMProviderOptions** out); + + /** \brief Set options in a ROCm Execution Provider. + * + * Please refer to https://onnxruntime.ai/docs/execution-providers/ROCm-ExecutionProvider.html + * to know the available keys and values. Key should be in null terminated string format of the member of + * ::OrtROCMProviderOptions and value should be its related range. + * + * For example, key="device_id" and value="0" + * + * \param[in] rocm_options + * \param[in] provider_options_keys Array of UTF-8 null-terminated string for provider options keys + * \param[in] provider_options_values Array of UTF-8 null-terminated string for provider options values + * \param[in] num_keys Number of elements in the `provider_option_keys` and `provider_options_values` arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.16. + */ + ORT_API2_STATUS(UpdateROCMProviderOptions, _Inout_ OrtROCMProviderOptions* rocm_options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** + * Get serialized ROCm provider options string. + * + * For example, "device_id=0;arena_extend_strategy=0;......" + * + * \param rocm_options - OrtROCMProviderOptions instance + * \param allocator - a ptr to an instance of OrtAllocator obtained with CreateAllocator() or GetAllocatorWithDefaultOptions() + * the specified allocator will be used to allocate continuous buffers for output strings and lengths. + * \param ptr - is a UTF-8 null terminated string allocated using 'allocator'. The caller is responsible for using the same allocator to free it. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.16. + */ + ORT_API2_STATUS(GetROCMProviderOptionsAsString, _In_ const OrtROCMProviderOptions* rocm_options, _Inout_ OrtAllocator* allocator, _Outptr_ char** ptr); + + /** \brief Release an ::OrtROCMProviderOptions + * + * \note This is an exception in the naming convention of other Release* functions, as the name of the method does not have the V2 suffix, but the type does + * + * \since Version 1.16. + */ + void(ORT_API_CALL* ReleaseROCMProviderOptions)(_Frees_ptr_opt_ OrtROCMProviderOptions* input); + + /** \brief Create an allocator with specific type and register it with the ::OrtEnv + * This API enhance CreateAndRegisterAllocator that it can create an allocator with specific type, not just CPU allocator + * Enables sharing the allocator between multiple sessions that use the same env instance. + * Lifetime of the created allocator will be valid for the duration of the environment. + * Returns an error if an allocator with the same ::OrtMemoryInfo is already registered. + * \param[in] env OrtEnv instance + * \param[in] provider_type ExecutionProvider type + * \param[in] mem_info OrtMemoryInfo instance + * \param[in] arena_cfg Arena configuration + * \param[in] provider_options_keys key of the provider options map + * \param[in] provider_options_values value of the provider options map + * \param[in] num_keys Length of the provider options map + */ + ORT_API2_STATUS(CreateAndRegisterAllocatorV2, _Inout_ OrtEnv* env, _In_ const char* provider_type, _In_ const OrtMemoryInfo* mem_info, _In_ const OrtArenaCfg* arena_cfg, + _In_reads_(num_keys) const char* const* provider_options_keys, _In_reads_(num_keys) const char* const* provider_options_values, _In_ size_t num_keys); + + /** \brief Run the model asynchronously in a thread owned by intra op thread pool + * + * \param[in] session + * \param[in] run_options If nullptr, will use a default ::OrtRunOptions + * \param[in] input_names Array of null terminated UTF8 encoded strings of the input names + * \param[in] input Array of ::OrtValue%s of the input values + * \param[in] input_len Number of elements in the input_names and inputs arrays + * \param[in] output_names Array of null terminated UTF8 encoded strings of the output names + * \param[in] output_names_len Number of elements in the output_names and outputs array + * \param[out] output OrtValue* array of size output_names_len. + * On calling RunAsync, output[i] could either be a null or a pointer to a preallocated OrtValue. + * Later, the output array will be passed to run_async_callback with all null(s) filled with valid + * OrtValue pointer(s) allocated by onnxruntime. + * NOTE: it is customer's duty to finally release the output array and each of its member, + * regardless of whether the member (OrtValue*) is allocated by onnxruntime or preallocated by the customer. + * \param[in] run_async_callback Callback function on model run completion + * \param[in] user_data User data that pass back to run_async_callback + */ + ORT_API2_STATUS(RunAsync, _Inout_ OrtSession* session, _In_opt_ const OrtRunOptions* run_options, + _In_reads_(input_len) const char* const* input_names, + _In_reads_(input_len) const OrtValue* const* input, size_t input_len, + _In_reads_(output_names_len) const char* const* output_names, size_t output_names_len, + _Inout_updates_all_(output_names_len) OrtValue** output, + _In_ RunAsyncCallbackFn run_async_callback, _In_opt_ void* user_data); + + /** + * Update TensorRT EP provider option where its data type is pointer, for example 'user_compute_stream'. + * If the data type of the provider option can be represented by string please use UpdateTensorRTProviderOptions. + * + * Note: It's caller's responsibility to properly manage the lifetime of the instance pointed by this pointer. + * + * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance + * \param key - Name of the provider option + * \param value - A pointer to the instance that will be assigned to this provider option + * + * \since Version 1.16. + */ + ORT_API2_STATUS(UpdateTensorRTProviderOptionsWithValue, _Inout_ OrtTensorRTProviderOptionsV2* tensorrt_options, _In_ const char* key, _In_ void* value); + + /** + * Get TensorRT EP provider option where its data type is pointer. + * If the data type of the provider option can be represented by string please use GetTensorRTProviderOptionsAsString. + * + * \param tensorrt_options - OrtTensorRTProviderOptionsV2 instance + * \param key - Name of the provider option + * \param ptr - A pointer to the instance that is kept by the provider option + * + * \since Version 1.16. + */ + ORT_API2_STATUS(GetTensorRTProviderOptionsByName, _In_ const OrtTensorRTProviderOptionsV2* tensorrt_options, _In_ const char* key, _Outptr_ void** ptr); + + /** + * Update CUDA EP provider option where its data type is pointer, for example 'user_compute_stream'. + * If the data type of the provider option can be represented by string please use UpdateCUDAProviderOptions. + * + * Note: It's caller's responsibility to properly manage the lifetime of the instance pointed by this pointer. + * + * \param cuda_options - OrtCUDAProviderOptionsV2 instance + * \param key - Name of the provider option + * \param value - A pointer to the instance that will be assigned to this provider option + * + * \since Version 1.16. + */ + ORT_API2_STATUS(UpdateCUDAProviderOptionsWithValue, _Inout_ OrtCUDAProviderOptionsV2* cuda_options, _In_ const char* key, _In_ void* value); + + /** + * Get CUDA EP provider option where its data type is pointer. + * If the data type of the provider option can be represented by string please use GetCUDAProviderOptionsAsString. + * + * \param cuda_options - OrtCUDAProviderOptionsV2 instance + * \param key - Name of the provider option + * \param ptr - A pointer to the instance that is kept by the provider option + * + * \since Version 1.16. + */ + ORT_API2_STATUS(GetCUDAProviderOptionsByName, _In_ const OrtCUDAProviderOptionsV2* cuda_options, _In_ const char* key, _Outptr_ void** ptr); + + /** + * Get a EP resource. + * E.g. a cuda stream or a cublas handle + * + * \param context - Kernel context + * \param resource_version - Version of the resource + * \param resource_id - Type of resource + * \param resource - A pointer to returned resource + * + * \since Version 1.16. + */ + ORT_API2_STATUS(KernelContext_GetResource, _In_ const OrtKernelContext* context, _In_ int resource_version, + _In_ int resource_id, _Outptr_ void** resource); + + /** \brief Set user logging function + * + * By default the logger created by the CreateEnv* functions is used to create the session logger as well. + * This function allows a user to override this default session logger with a logger of their own choosing. This way + * the user doesn't have to create a separate environment with a custom logger. This addresses the problem when + * the user already created an env but now wants to use a different logger for a specific session (for debugging or + * other reasons). + * + * \param[in] options + * \param[in] user_logging_function A pointer to a logging function. + * \param[in] user_logging_param A pointer to arbitrary data passed as the ::OrtLoggingFunction `param` parameter to + * `user_logging_function`. This parameter is optional. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + * + * \since Version 1.17. + */ + ORT_API2_STATUS(SetUserLoggingFunction, _Inout_ OrtSessionOptions* options, + _In_ OrtLoggingFunction user_logging_function, _In_opt_ void* user_logging_param); + + /** + * Get number of input from OrtShapeInferContext + * + * \param[in] context + * \param[out] out The number of inputs + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ShapeInferContext_GetInputCount, _In_ const OrtShapeInferContext* context, _Out_ size_t* out); + + /** + * Get type and shape info of an input + * + * \param[in] context + * \param[in] index The index of the input + * \param[out] info Type shape info of the input + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ShapeInferContext_GetInputTypeShape, _In_ const OrtShapeInferContext* context, _In_ size_t index, _Outptr_ OrtTensorTypeAndShapeInfo** info); + + /** + * Get attribute from OrtShapeInferContext. Note that OrtShapeInferContext is a per-node context, one could only read attribute from current node. + * + * \param[in] context + * \param[in] attr_name Name of the attribute + * \param[out] attr Handle of the attribute fetched + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ShapeInferContext_GetAttribute, _In_ const OrtShapeInferContext* context, _In_ const char* attr_name, _Outptr_ const OrtOpAttr** attr); + + /** + * Set type and shape info of an output + * + * \param[in] context + * \param[in] index The index of the output + * \param[out] info Type shape info of the output + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ShapeInferContext_SetOutputTypeShape, _In_ const OrtShapeInferContext* context, _In_ size_t index, _In_ const OrtTensorTypeAndShapeInfo* info); + + /** + * Set symbolic shape to type shape info + * + * \param[in] info Type shape info + * \param[in] dim_params Symbolic strings + * \param[in] dim_params_length Number of strings + * + * \since Version 1.17. + */ + ORT_API2_STATUS(SetSymbolicDimensions, _In_ OrtTensorTypeAndShapeInfo* info, _In_ const char* dim_params[], _In_ size_t dim_params_length); + + /** + * Read contents of an attribute to data + * + * \param[in] op_attr + * \param[in] type Attribute type + * \param[out] data Memory address to save raw content of the attribute + * \param[in] len Number of bytes allowed to store in data + * \param[out] out Number of bytes required to save the data when the call failed, or the real number of bytes saved to data on success + * + * \since Version 1.17. + */ + ORT_API2_STATUS(ReadOpAttr, _In_ const OrtOpAttr* op_attr, _In_ OrtOpAttrType type, _Inout_ void* data, _In_ size_t len, _Out_ size_t* out); + + /** \brief Set whether to use deterministic compute. + * + * Default is false. If set to true, this will enable deterministic compute for GPU kernels where possible. + * Note that this most likely will have a performance cost. + * + * \param[in] options + * \param[in] value + * + * \since Version 1.17. + */ + ORT_API2_STATUS(SetDeterministicCompute, _Inout_ OrtSessionOptions* options, bool value); + + /** + * Run fn in parallel + * + * \param[in] context + * \param[in] fn Function accepting usr_data and an integer as iterator + * \param[in] total The number of times fn is to be invoked + * \param[in] num_batch Number of batches by which the "total" is to be divided in maximum. When zero, there is no limit + * \param[in] usr_data User data to be passed back to fn + * + * \since Version 1.17. + */ + ORT_API2_STATUS(KernelContext_ParallelFor, _In_ const OrtKernelContext* context, _In_ void (*fn)(void*, size_t), _In_ size_t total, _In_ size_t num_batch, _In_ void* usr_data); + + /** \brief Append OpenVINO execution provider to the session options + * + * If OpenVINO is not available (due to a non OpenVINO enabled build, or if OpenVINO is not installed on the system), this function will fail. + * + * \param[in] options + * \param[in] provider_options_keys + * \param[in] provider_options_values + * \param[in] num_keys + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_OpenVINO_V2, + _In_ OrtSessionOptions* options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Append VitisAI provider to session options + * + * If VitisAI is not available (due to a non VitisAI enabled build, or if VitisAI is not installed on the system), this function will return failure. + * + * \param[in] options + * \param[in] provider_options_keys + * \param[in] provider_options_values + * \param[in] num_keys + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SessionOptionsAppendExecutionProvider_VitisAI, + _In_ OrtSessionOptions* options, + _In_reads_(num_keys) const char* const* provider_options_keys, + _In_reads_(num_keys) const char* const* provider_options_values, + _In_ size_t num_keys); + + /** \brief Get scratch buffer from the corresponding allocator under the sepcific OrtMemoryInfo object. + * NOTE: callers are responsible to release this scratch buffer from the corresponding allocator + * \param[in] context OrtKernelContext instance + * \param[in] mem_info OrtMemoryInfo instance + * \param[in] count_or_bytes How many bytes is this scratch buffer + * \param[out] out A pointer to the scrach buffer + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelContext_GetScratchBuffer, _In_ const OrtKernelContext* context, _In_ const OrtMemoryInfo* mem_info, _In_ size_t count_or_bytes, _Outptr_ void** out); + + /** \brief Get allocator from KernelInfo for a specific memory type. Please use C API ReleaseAllocator to release out object + * + * \param[in] info OrtKernelInfo instance + * \param[in] mem_type OrtMemType object + * \param[out] out A pointer to OrtAllocator + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(KernelInfoGetAllocator, _In_ const OrtKernelInfo* info, _In_ OrtMemType mem_type, _Outptr_ OrtAllocator** out); + + /** \brief Replace initialized Tensors with external data with the provided files in memory + * + * The function will find the initialized TensorProtos with external data in the graph with the provided + * external file names and the file content in memory. The API gets the external file name, offset, data length + * from TensorProto, and locate the tensor data from the file in memory buffer. + * It creates a Tensor to replace the existing Tensor in graph. The replacement + * will occur before any of the optimizations take place. The data will be copied into the graph + * since TensorProto can't refer to the user provided buffers. + * + * \param[in] options + * \param[in] external_initializer_file_names Array of null terminated UTF-8 encoded strings of the file names + * which holds the external initializers. + * \param[in] external_initializer_file_buffer_array Array of pointers to the buffer of the file content. + * The buffer can be freed after session creation. + * \param[in] external_initializer_file_lengths Array of size_t to indicate the length of file content + * \param[in] num_external_initializer_files Number of external files + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(AddExternalInitializersFromFilesInMemory, _In_ OrtSessionOptions* options, + _In_reads_(num_external_initializer_files) const ORTCHAR_T* const* external_initializer_file_names, + _In_reads_(num_external_initializer_files) char* const* external_initializer_file_buffer_array, + _In_reads_(num_external_initializer_files) const size_t* external_initializer_file_lengths, + size_t num_external_initializer_files); + + /** \brief Create an OrtLoraAdapter + * + * The function attempts to locate file specified by adapter_file_path, read it and create an OrtLoraAdapter + * instance. The adapter_file_path should be a valid path to a file that contains a valid Lora Adapter + * format. The function attempts to validate the format at load time. The file will always be memory mapped, unless + * the platform does not support memory mapping, in which case the file will be read into memory. + * + * \param[in] adapter_file_path adapter file path. + * \param[in] allocator optional pointer to a device allocator. If specified + * data is copied to the device at some point before Run() is invoked. If nullptr, data stays on CPU. + * The data would still be copied to device if required by the model at inference time. + * \param[out] out A pointer to a newly created OrtLoraAdapter instance. Must be released with + * OrtApi::ReleaseLoraAdapter. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateLoraAdapter, const ORTCHAR_T* adapter_file_path, _In_ OrtAllocator* allocator, + _Outptr_ OrtLoraAdapter** out); + + /** \brief Create an OrtLoraAdapter + * + * The function copies the bytes from the array and creates an OrtLoraAdapter instance. + * + * + * \param[in] bytes pointer to a valid Lora Adapter format buffer. + * \param[in] num_bytes length of bytes buffer. + * \param[in] allocator optional pointer to a device allocator. If specified + * data is copied to the device at some point before Run() is invoked. If nullptr, data stays on CPU. + * The data would still be copied to device if required by the model at inference time. + * \param[out] out A pointer to a newly created OrtLoraAdapter instance. Must be released with + * OrtApi::ReleaseLoraAdapter. + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(CreateLoraAdapterFromArray, _In_ const void* bytes, size_t num_bytes, _In_ OrtAllocator* allocator, + _Outptr_ OrtLoraAdapter** out); + + /** \brief Release an ::OrtLoraAdapter obtained from OrtApi::CreateLoraAdapter + */ + ORT_CLASS_RELEASE(LoraAdapter); + + /** \brief Add the Lora Adapter to the list of active adapters. + * + * The function adds the Lora Adapter to the list of active adapters. The Lora Adapter must be created with + * OrtApi::CreateLoraAdapter or FromArray. The Lora Adapter will be used by the session to run the model. + * The instance of the OrtRunOptions can then be used to customize the Run() calls. + * More than one OrtLoraAdapter can be active at the same time. Lora Parameters that belong to different + * Lora adapters that will be active at the same time must not overlap. + * This setting does not affect RunWithBinding. + * + * \param[in] options OrtRunOptions instance + * \param[in] adapter OrtLoraAdapter instance + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(RunOptionsAddActiveLoraAdapter, _Inout_ OrtRunOptions* options, _In_ const OrtLoraAdapter* adapter); + + /// @} + /// \name OrtEpDynamicOptions + /// @{ + + /** \brief Set DynamicOptions for EPs (Execution Providers) + * + * Valid options can be found in `include\onnxruntime\core\session\onnxruntime_session_options_config_keys.h` + * Look for `kOrtEpDynamicOptions` + * + * \param[in] sess OrtSession + * \param[in] keys Array of null terminated UTF8 encoded strings of EP dynamic option keys + * \param[in] values Array of null terminated UTF8 encoded string of EP dynamic option values + * \param[in] kv_len Number of elements in the keys and values arrays + * + * \snippet{doc} snippets.dox OrtStatus Return Value + */ + ORT_API2_STATUS(SetEpDynamicOptions, _Inout_ OrtSession* sess, _In_reads_(kv_len) const char* const* keys, + _In_reads_(kv_len) const char* const* values, _In_ size_t kv_len); +}; + +/* + * Steps to use a custom op: + * 1 Create an OrtCustomOpDomain with the domain name used by the custom ops + * 2 Create an OrtCustomOp structure for each op and add them to the domain + * 3 Call OrtAddCustomOpDomain to add the custom domain of ops to the session options + */ + +// Specifies some characteristics of inputs/outputs of custom ops: +// Specify if the inputs/outputs are one of: +// 1) Non-optional (input/output must be present in the node) +// 2) Optional (input/output may be absent in the node) +// 3) Variadic: A variadic input or output specifies N (i.e., the minimum arity) or more operands. +// Only the last input or output of a custom op may be marked as variadic. +// The homogeneity of the variadic input or output determines whether all operands must be of the same +// tensor element type. +typedef enum OrtCustomOpInputOutputCharacteristic { + INPUT_OUTPUT_REQUIRED = 0, + INPUT_OUTPUT_OPTIONAL, + INPUT_OUTPUT_VARIADIC, +} OrtCustomOpInputOutputCharacteristic; + +/* + * The OrtCustomOp structure defines a custom op's schema and its kernel callbacks. The callbacks are filled in by + * the implementor of the custom op. + */ +struct OrtCustomOp { + uint32_t version; // Must be initialized to ORT_API_VERSION + + // This callback creates the kernel, which is a user defined + // parameter that is passed to the Kernel* callbacks below. It is + // recommended to use CreateKernelV2 which allows for a safe error + // propagation by returning an OrtStatusPtr. + void*(ORT_API_CALL* CreateKernel)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api, + _In_ const OrtKernelInfo* info); + + // Returns the name of the op + const char*(ORT_API_CALL* GetName)(_In_ const struct OrtCustomOp* op); + + // Returns the type of the execution provider, return nullptr to use CPU execution provider + const char*(ORT_API_CALL* GetExecutionProviderType)(_In_ const struct OrtCustomOp* op); + + // Returns the count and types of the input & output tensors + ONNXTensorElementDataType(ORT_API_CALL* GetInputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + size_t(ORT_API_CALL* GetInputTypeCount)(_In_ const struct OrtCustomOp* op); + ONNXTensorElementDataType(ORT_API_CALL* GetOutputType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + size_t(ORT_API_CALL* GetOutputTypeCount)(_In_ const struct OrtCustomOp* op); + + // Perform a computation step. It is recommended to use + // KernelComputeV2 which allows for a safe error propagation by + // returning an OrtStatusPtr. + void(ORT_API_CALL* KernelCompute)(_In_ void* op_kernel, _In_ OrtKernelContext* context); + void(ORT_API_CALL* KernelDestroy)(_In_ void* op_kernel); + + // Returns the characteristics of the input & output tensors + OrtCustomOpInputOutputCharacteristic(ORT_API_CALL* GetInputCharacteristic)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + OrtCustomOpInputOutputCharacteristic(ORT_API_CALL* GetOutputCharacteristic)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + + // Returns the memory type of the input tensors. This API allows the custom op + // to place the inputs on specific devices. By default, it returns + // OrtMemTypeDefault, which means the input is placed on the default device for + // the execution provider. If the inputs need to be with different memory tyeps, + // this function can be overridden to return the specific memory types. + OrtMemType(ORT_API_CALL* GetInputMemoryType)(_In_ const struct OrtCustomOp* op, _In_ size_t index); + + // Returns the minimum number of input arguments expected for the variadic input. + // Applicable only for custom ops that have a variadic input. + int(ORT_API_CALL* GetVariadicInputMinArity)(_In_ const struct OrtCustomOp* op); + + // Returns true (non-zero) if all arguments of a variadic input have to be of the same type (homogeneous), + // and false (zero) otherwise. + // Applicable only for custom ops that have a variadic input. + int(ORT_API_CALL* GetVariadicInputHomogeneity)(_In_ const struct OrtCustomOp* op); + + // Returns the minimum number of output values expected for the variadic output. + // Applicable only for custom ops that have a variadic output. + int(ORT_API_CALL* GetVariadicOutputMinArity)(_In_ const struct OrtCustomOp* op); + + // Returns true (non-zero) if all outputs values of a variadic output have to be of the same type (homogeneous), + // and false (zero) otherwise. + // Applicable only for custom ops that have a variadic output. + int(ORT_API_CALL* GetVariadicOutputHomogeneity)(_In_ const struct OrtCustomOp* op); + + // Create the kernel state which is passed to each compute call. + OrtStatusPtr(ORT_API_CALL* CreateKernelV2)(_In_ const struct OrtCustomOp* op, _In_ const OrtApi* api, + _In_ const OrtKernelInfo* info, + _Out_ void** kernel); + + // Perform the computation step. + OrtStatusPtr(ORT_API_CALL* KernelComputeV2)(_In_ void* op_kernel, _In_ OrtKernelContext* context); + + OrtStatusPtr(ORT_API_CALL* InferOutputShapeFn)(_In_ const struct OrtCustomOp* op, _In_ OrtShapeInferContext*); + + // Get start range + int(ORT_API_CALL* GetStartVersion)(_In_ const struct OrtCustomOp* op); + int(ORT_API_CALL* GetEndVersion)(_In_ const struct OrtCustomOp* op); + + // Get the inplace_map that defines which output can reuse which input + // Callers will provide 2 raw int* and pass in their address, this function will fill these 2 arrays + // when return, output (*output_index)[i] may reuse the input (*input_index[i]). + // The return value is the size of these 2 arrays. + // Callers are responsible to delete these 2 arrays after use by calling OrtCustomOp::ReleaseMayInplace(). + size_t(ORT_API_CALL* GetMayInplace)(_Out_ int** input_index, _Out_ int** output_index); + + // Release the pointer input_index and output_index allocated from GetMayInplace() function. + // If GetMayInplace() is defined, this function MUST be defined as well. + void(ORT_API_CALL* ReleaseMayInplace)(_Frees_ptr_opt_ int* input_index, _Frees_ptr_opt_ int* output_index); + + // Same as GetMayInplace() and ReleaseMayInplace() + size_t(ORT_API_CALL* GetAliasMap)(_Out_ int** input_index, _Out_ int** output_index); + void(ORT_API_CALL* ReleaseAliasMap)(_Frees_ptr_opt_ int* input_index, _Frees_ptr_opt_ int* output_index); +}; + +/* + * This is the old way to add the CUDA provider to the session, please use SessionOptionsAppendExecutionProvider_CUDA above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with CUDA support and the CUDA provider shared library exists + * + * \param device_id CUDA device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_CUDA, _In_ OrtSessionOptions* options, int device_id); + +/* + * This is the old way to add the ROCm provider to the session, please use + * SessionOptionsAppendExecutionProvider_ROCM above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with + * HIP support and the ROCm provider shared library exists + * + * \param device_id HIP device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_ROCM, _In_ OrtSessionOptions* options, int device_id); + +/* + * This is the old way to add the MIGraphX provider to the session, please use + * SessionOptionsAppendExecutionProvider_MIGraphX above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with + * HIP support and the MIGraphX provider shared library exists + * + * \param device_id HIP device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_MIGraphX, _In_ OrtSessionOptions* options, int device_id); + +/* + * This is the old way to add the oneDNN provider to the session, please use + * SessionOptionsAppendExecutionProvider_oneDNN above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with + * oneDNN support and the oneDNN provider shared library exists + * + * \param use_arena zero: false. non-zero: true. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Dnnl, _In_ OrtSessionOptions* options, int use_arena); + +/* + * This is the old way to add the TensorRT provider to the session, please use SessionOptionsAppendExecutionProvider_TensorRT_V2 above to access the latest functionality + * This function always exists, but will only succeed if Onnxruntime was built with TensorRT support and the TensorRT provider shared library exists + * + * \param device_id CUDA device id, starts from zero. + */ +ORT_API_STATUS(OrtSessionOptionsAppendExecutionProvider_Tensorrt, _In_ OrtSessionOptions* options, int device_id); + +#ifdef __cplusplus +} +#endif +/// @} diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_cxx_api.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_cxx_api.h new file mode 100644 index 0000000..406ca3e --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_cxx_api.h @@ -0,0 +1,2435 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// Summary: The Ort C++ API is a header only wrapper around the Ort C API. +// +// The C++ API simplifies usage by returning values directly instead of error codes, throwing exceptions on errors +// and automatically releasing resources in the destructors. The primary purpose of C++ API is exception safety so +// all the resources follow RAII and do not leak memory. +// +// Each of the C++ wrapper classes holds only a pointer to the C internal object. Treat them like smart pointers. +// To create an empty object, pass 'nullptr' to the constructor (for example, Env e{nullptr};). However, you can't use them +// until you assign an instance that actually holds an underlying object. +// +// For Ort objects only move assignment between objects is allowed, there are no copy constructors. +// Some objects have explicit 'Clone' methods for this purpose. +// +// ConstXXXX types are copyable since they do not own the underlying C object, so you can pass them to functions as arguments +// by value or by reference. ConstXXXX types are restricted to const only interfaces. +// +// UnownedXXXX are similar to ConstXXXX but also allow non-const interfaces. +// +// The lifetime of the corresponding owning object must eclipse the lifetimes of the ConstXXXX/UnownedXXXX types. They exists so you do not +// have to fallback to C types and the API with the usual pitfalls. In general, do not use C API from your C++ code. + +#pragma once +#include "onnxruntime_c_api.h" +#include "onnxruntime_float16.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef ORT_NO_EXCEPTIONS +#include +#endif + +/** \brief All C++ Onnxruntime APIs are defined inside this namespace + * + */ +namespace Ort { + +/** \brief All C++ methods that can fail will throw an exception of this type + * + * If ORT_NO_EXCEPTIONS is defined, then any error will result in a call to abort() + */ +struct Exception : std::exception { + Exception(std::string&& string, OrtErrorCode code) : message_{std::move(string)}, code_{code} {} + + OrtErrorCode GetOrtErrorCode() const { return code_; } + const char* what() const noexcept override { return message_.c_str(); } + + private: + std::string message_; + OrtErrorCode code_; +}; + +#ifdef ORT_NO_EXCEPTIONS +// The #ifndef is for the very special case where the user of this library wants to define their own way of handling errors. +// NOTE: This header expects control flow to not continue after calling ORT_CXX_API_THROW +#ifndef ORT_CXX_API_THROW +#define ORT_CXX_API_THROW(string, code) \ + do { \ + std::cerr << Ort::Exception(string, code) \ + .what() \ + << std::endl; \ + abort(); \ + } while (false) +#endif +#else +#define ORT_CXX_API_THROW(string, code) \ + throw Ort::Exception(string, code) +#endif + +// This is used internally by the C++ API. This class holds the global variable that points to the OrtApi, +// it's in a template so that we can define a global variable in a header and make +// it transparent to the users of the API. +template +struct Global { + static const OrtApi* api_; +}; + +// If macro ORT_API_MANUAL_INIT is defined, no static initialization will be performed. Instead, user must call InitApi() before using it. +template +#ifdef ORT_API_MANUAL_INIT +const OrtApi* Global::api_{}; +inline void InitApi() noexcept { Global::api_ = OrtGetApiBase()->GetApi(ORT_API_VERSION); } + +// Used by custom operator libraries that are not linked to onnxruntime. Sets the global API object, which is +// required by C++ APIs. +// +// Example mycustomop.cc: +// +// #define ORT_API_MANUAL_INIT +// #include +// #undef ORT_API_MANUAL_INIT +// +// OrtStatus* ORT_API_CALL RegisterCustomOps(OrtSessionOptions* options, const OrtApiBase* api_base) { +// Ort::InitApi(api_base->GetApi(ORT_API_VERSION)); +// // ... +// } +// +inline void InitApi(const OrtApi* api) noexcept { Global::api_ = api; } +#else +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(push) +// "Global initializer calls a non-constexpr function." Therefore you can't use ORT APIs in the other global initializers. +// Please define ORT_API_MANUAL_INIT if it conerns you. +#pragma warning(disable : 26426) +#endif +const OrtApi* Global::api_ = OrtGetApiBase()->GetApi(ORT_API_VERSION); +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(pop) +#endif +#endif + +/// This returns a reference to the OrtApi interface in use +inline const OrtApi& GetApi() noexcept { return *Global::api_; } + +/// +/// This function returns the onnxruntime version string +/// +/// version string major.minor.rev +std::string GetVersionString(); + +/// +/// This function returns the onnxruntime build information: including git branch, +/// git commit id, build type(Debug/Release/RelWithDebInfo) and cmake cpp flags. +/// +/// string +std::string GetBuildInfoString(); + +/// +/// This is a C++ wrapper for OrtApi::GetAvailableProviders() and +/// returns a vector of strings representing the available execution providers. +/// +/// vector of strings +std::vector GetAvailableProviders(); + +/** \brief IEEE 754 half-precision floating point data type + * + * \details This struct is used for converting float to float16 and back + * so the user could feed inputs and fetch outputs using these type. + * + * The size of the structure should align with uint16_t and one can freely cast + * uint16_t buffers to/from Ort::Float16_t to feed and retrieve data. + * + * \code{.unparsed} + * // This example demonstrates converion from float to float16 + * constexpr float values[] = {1.f, 2.f, 3.f, 4.f, 5.f}; + * std::vector fp16_values; + * fp16_values.reserve(std::size(values)); + * std::transform(std::begin(values), std::end(values), std::back_inserter(fp16_values), + * [](float value) { return Ort::Float16_t(value); }); + * + * \endcode + */ +struct Float16_t : onnxruntime_float16::Float16Impl { + private: + /// + /// Constructor from a 16-bit representation of a float16 value + /// No conversion is done here. + /// + /// 16-bit representation + constexpr explicit Float16_t(uint16_t v) noexcept { val = v; } + + public: + using Base = onnxruntime_float16::Float16Impl; + + /// + /// Default constructor + /// + Float16_t() = default; + + /// + /// Explicit conversion to uint16_t representation of float16. + /// + /// uint16_t bit representation of float16 + /// new instance of Float16_t + constexpr static Float16_t FromBits(uint16_t v) noexcept { return Float16_t(v); } + + /// + /// __ctor from float. Float is converted into float16 16-bit representation. + /// + /// float value + explicit Float16_t(float v) noexcept { val = Base::ToUint16Impl(v); } + + /// + /// Converts float16 to float + /// + /// float representation of float16 value + float ToFloat() const noexcept { return Base::ToFloatImpl(); } + + /// + /// Checks if the value is negative + /// + /// true if negative + using Base::IsNegative; + + /// + /// Tests if the value is NaN + /// + /// true if NaN + using Base::IsNaN; + + /// + /// Tests if the value is finite + /// + /// true if finite + using Base::IsFinite; + + /// + /// Tests if the value represents positive infinity. + /// + /// true if positive infinity + using Base::IsPositiveInfinity; + + /// + /// Tests if the value represents negative infinity + /// + /// true if negative infinity + using Base::IsNegativeInfinity; + + /// + /// Tests if the value is either positive or negative infinity. + /// + /// True if absolute value is infinity + using Base::IsInfinity; + + /// + /// Tests if the value is NaN or zero. Useful for comparisons. + /// + /// True if NaN or zero. + using Base::IsNaNOrZero; + + /// + /// Tests if the value is normal (not zero, subnormal, infinite, or NaN). + /// + /// True if so + using Base::IsNormal; + + /// + /// Tests if the value is subnormal (denormal). + /// + /// True if so + using Base::IsSubnormal; + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + using Base::Abs; + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + using Base::Negate; + + /// + /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check + /// for two values by or'ing the private bits together and stripping the sign. They are both zero, + /// and therefore equivalent, if the resulting value is still zero. + /// + /// first value + /// second value + /// True if both arguments represent zero + using Base::AreZero; + + /// + /// User defined conversion operator. Converts Float16_t to float. + /// + explicit operator float() const noexcept { return ToFloat(); } + + using Base::operator==; + using Base::operator!=; + using Base::operator<; +}; + +static_assert(sizeof(Float16_t) == sizeof(uint16_t), "Sizes must match"); + +/** \brief bfloat16 (Brain Floating Point) data type + * + * \details This struct is used for converting float to bfloat16 and back + * so the user could feed inputs and fetch outputs using these type. + * + * The size of the structure should align with uint16_t and one can freely cast + * uint16_t buffers to/from Ort::BFloat16_t to feed and retrieve data. + * + * \code{.unparsed} + * // This example demonstrates converion from float to float16 + * constexpr float values[] = {1.f, 2.f, 3.f, 4.f, 5.f}; + * std::vector bfp16_values; + * bfp16_values.reserve(std::size(values)); + * std::transform(std::begin(values), std::end(values), std::back_inserter(bfp16_values), + * [](float value) { return Ort::BFloat16_t(value); }); + * + * \endcode + */ +struct BFloat16_t : onnxruntime_float16::BFloat16Impl { + private: + /// + /// Constructor from a uint16_t representation of bfloat16 + /// used in FromBits() to escape overload resolution issue with + /// constructor from float. + /// No conversion is done. + /// + /// 16-bit bfloat16 value + constexpr explicit BFloat16_t(uint16_t v) noexcept { val = v; } + + public: + using Base = onnxruntime_float16::BFloat16Impl; + + BFloat16_t() = default; + + /// + /// Explicit conversion to uint16_t representation of bfloat16. + /// + /// uint16_t bit representation of bfloat16 + /// new instance of BFloat16_t + static constexpr BFloat16_t FromBits(uint16_t v) noexcept { return BFloat16_t(v); } + + /// + /// __ctor from float. Float is converted into bfloat16 16-bit representation. + /// + /// float value + explicit BFloat16_t(float v) noexcept { val = Base::ToUint16Impl(v); } + + /// + /// Converts bfloat16 to float + /// + /// float representation of bfloat16 value + float ToFloat() const noexcept { return Base::ToFloatImpl(); } + + /// + /// Checks if the value is negative + /// + /// true if negative + using Base::IsNegative; + + /// + /// Tests if the value is NaN + /// + /// true if NaN + using Base::IsNaN; + + /// + /// Tests if the value is finite + /// + /// true if finite + using Base::IsFinite; + + /// + /// Tests if the value represents positive infinity. + /// + /// true if positive infinity + using Base::IsPositiveInfinity; + + /// + /// Tests if the value represents negative infinity + /// + /// true if negative infinity + using Base::IsNegativeInfinity; + + /// + /// Tests if the value is either positive or negative infinity. + /// + /// True if absolute value is infinity + using Base::IsInfinity; + + /// + /// Tests if the value is NaN or zero. Useful for comparisons. + /// + /// True if NaN or zero. + using Base::IsNaNOrZero; + + /// + /// Tests if the value is normal (not zero, subnormal, infinite, or NaN). + /// + /// True if so + using Base::IsNormal; + + /// + /// Tests if the value is subnormal (denormal). + /// + /// True if so + using Base::IsSubnormal; + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + using Base::Abs; + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + using Base::Negate; + + /// + /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check + /// for two values by or'ing the private bits together and stripping the sign. They are both zero, + /// and therefore equivalent, if the resulting value is still zero. + /// + /// first value + /// second value + /// True if both arguments represent zero + using Base::AreZero; + + /// + /// User defined conversion operator. Converts BFloat16_t to float. + /// + explicit operator float() const noexcept { return ToFloat(); } + + // We do not have an inherited impl for the below operators + // as the internal class implements them a little differently + bool operator==(const BFloat16_t& rhs) const noexcept; + bool operator!=(const BFloat16_t& rhs) const noexcept { return !(*this == rhs); } + bool operator<(const BFloat16_t& rhs) const noexcept; +}; + +static_assert(sizeof(BFloat16_t) == sizeof(uint16_t), "Sizes must match"); + +/** \brief float8e4m3fn (Float8 Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint8_t. + * See https://onnx.ai/onnx/technical/float8.html for further details. + */ +struct Float8E4M3FN_t { + uint8_t value; + constexpr Float8E4M3FN_t() noexcept : value(0) {} + constexpr Float8E4M3FN_t(uint8_t v) noexcept : value(v) {} + constexpr operator uint8_t() const noexcept { return value; } + // nan values are treated like any other value for operator ==, != + constexpr bool operator==(const Float8E4M3FN_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float8E4M3FN_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float8E4M3FN_t) == sizeof(uint8_t), "Sizes must match"); + +/** \brief float8e4m3fnuz (Float8 Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint8_t. + * See https://onnx.ai/onnx/technical/float8.html for further details. + */ +struct Float8E4M3FNUZ_t { + uint8_t value; + constexpr Float8E4M3FNUZ_t() noexcept : value(0) {} + constexpr Float8E4M3FNUZ_t(uint8_t v) noexcept : value(v) {} + constexpr operator uint8_t() const noexcept { return value; } + // nan values are treated like any other value for operator ==, != + constexpr bool operator==(const Float8E4M3FNUZ_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float8E4M3FNUZ_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float8E4M3FNUZ_t) == sizeof(uint8_t), "Sizes must match"); + +/** \brief float8e5m2 (Float8 Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint8_t. + * See https://onnx.ai/onnx/technical/float8.html for further details. + */ +struct Float8E5M2_t { + uint8_t value; + constexpr Float8E5M2_t() noexcept : value(0) {} + constexpr Float8E5M2_t(uint8_t v) noexcept : value(v) {} + constexpr operator uint8_t() const noexcept { return value; } + // nan values are treated like any other value for operator ==, != + constexpr bool operator==(const Float8E5M2_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float8E5M2_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float8E5M2_t) == sizeof(uint8_t), "Sizes must match"); + +/** \brief float8e5m2fnuz (Float8 Floating Point) data type + * \details It is necessary for type dispatching to make use of C++ API + * The type is implicitly convertible to/from uint8_t. + * See https://onnx.ai/onnx/technical/float8.html for further details. + */ +struct Float8E5M2FNUZ_t { + uint8_t value; + constexpr Float8E5M2FNUZ_t() noexcept : value(0) {} + constexpr Float8E5M2FNUZ_t(uint8_t v) noexcept : value(v) {} + constexpr operator uint8_t() const noexcept { return value; } + // nan values are treated like any other value for operator ==, != + constexpr bool operator==(const Float8E5M2FNUZ_t& rhs) const noexcept { return value == rhs.value; }; + constexpr bool operator!=(const Float8E5M2FNUZ_t& rhs) const noexcept { return value != rhs.value; }; +}; + +static_assert(sizeof(Float8E5M2FNUZ_t) == sizeof(uint8_t), "Sizes must match"); + +namespace detail { +// This is used internally by the C++ API. This macro is to make it easy to generate overloaded methods for all of the various OrtRelease* functions for every Ort* type +// This can't be done in the C API since C doesn't have function overloading. +#define ORT_DEFINE_RELEASE(NAME) \ + inline void OrtRelease(Ort##NAME* ptr) { GetApi().Release##NAME(ptr); } + +ORT_DEFINE_RELEASE(Allocator); +ORT_DEFINE_RELEASE(MemoryInfo); +ORT_DEFINE_RELEASE(CustomOpDomain); +ORT_DEFINE_RELEASE(ThreadingOptions); +ORT_DEFINE_RELEASE(Env); +ORT_DEFINE_RELEASE(RunOptions); +ORT_DEFINE_RELEASE(LoraAdapter); +ORT_DEFINE_RELEASE(Session); +ORT_DEFINE_RELEASE(SessionOptions); +ORT_DEFINE_RELEASE(TensorTypeAndShapeInfo); +ORT_DEFINE_RELEASE(SequenceTypeInfo); +ORT_DEFINE_RELEASE(MapTypeInfo); +ORT_DEFINE_RELEASE(TypeInfo); +ORT_DEFINE_RELEASE(Value); +ORT_DEFINE_RELEASE(ModelMetadata); +ORT_DEFINE_RELEASE(IoBinding); +ORT_DEFINE_RELEASE(ArenaCfg); +ORT_DEFINE_RELEASE(Status); +ORT_DEFINE_RELEASE(OpAttr); +ORT_DEFINE_RELEASE(Op); +ORT_DEFINE_RELEASE(KernelInfo); + +#undef ORT_DEFINE_RELEASE + +/** \brief This is a tagging template type. Use it with Base to indicate that the C++ interface object + * has no ownership of the underlying C object. + */ +template +struct Unowned { + using Type = T; +}; + +/** \brief Used internally by the C++ API. C++ wrapper types inherit from this. + * This is a zero cost abstraction to wrap the C API objects and delete them on destruction. + * + * All of the C++ classes + * a) serve as containers for pointers to objects that are created by the underlying C API. + * Their size is just a pointer size, no need to dynamically allocate them. Use them by value. + * b) Each of struct XXXX, XXX instances function as smart pointers to the underlying C API objects. + * they would release objects owned automatically when going out of scope, they are move-only. + * c) ConstXXXX and UnownedXXX structs function as non-owning, copyable containers for the above pointers. + * ConstXXXX allow calling const interfaces only. They give access to objects that are owned by somebody else + * such as Onnxruntime or instances of XXXX classes. + * d) serve convenient interfaces that return C++ objects and further enhance exception and type safety so they can be used + * in C++ code. + * + */ + +/// +/// This is a non-const pointer holder that is move-only. Disposes of the pointer on destruction. +/// +template +struct Base { + using contained_type = T; + + constexpr Base() = default; + constexpr explicit Base(contained_type* p) noexcept : p_{p} {} + ~Base() { OrtRelease(p_); } + + Base(const Base&) = delete; + Base& operator=(const Base&) = delete; + + Base(Base&& v) noexcept : p_{v.p_} { v.p_ = nullptr; } + Base& operator=(Base&& v) noexcept { + OrtRelease(p_); + p_ = v.release(); + return *this; + } + + constexpr operator contained_type*() const noexcept { return p_; } + + /// \brief Relinquishes ownership of the contained C object pointer + /// The underlying object is not destroyed + contained_type* release() { + T* p = p_; + p_ = nullptr; + return p; + } + + protected: + contained_type* p_{}; +}; + +// Undefined. For const types use Base> +template +struct Base; + +/// +/// Covers unowned pointers owned by either the ORT +/// or some other instance of CPP wrappers. +/// Used for ConstXXX and UnownedXXXX types that are copyable. +/// Also convenient to wrap raw OrtXX pointers . +/// +/// +template +struct Base> { + using contained_type = typename Unowned::Type; + + constexpr Base() = default; + constexpr explicit Base(contained_type* p) noexcept : p_{p} {} + + ~Base() = default; + + Base(const Base&) = default; + Base& operator=(const Base&) = default; + + Base(Base&& v) noexcept : p_{v.p_} { v.p_ = nullptr; } + Base& operator=(Base&& v) noexcept { + p_ = nullptr; + std::swap(p_, v.p_); + return *this; + } + + constexpr operator contained_type*() const noexcept { return p_; } + + protected: + contained_type* p_{}; +}; + +// Light functor to release memory with OrtAllocator +struct AllocatedFree { + OrtAllocator* allocator_; + explicit AllocatedFree(OrtAllocator* allocator) + : allocator_(allocator) {} + void operator()(void* ptr) const { + if (ptr) allocator_->Free(allocator_, ptr); + } +}; + +} // namespace detail + +struct AllocatorWithDefaultOptions; +struct Env; +struct TypeInfo; +struct Value; +struct ModelMetadata; + +/** \brief unique_ptr typedef used to own strings allocated by OrtAllocators + * and release them at the end of the scope. The lifespan of the given allocator + * must eclipse the lifespan of AllocatedStringPtr instance + */ +using AllocatedStringPtr = std::unique_ptr; + +/** \brief The Status that holds ownership of OrtStatus received from C API + * Use it to safely destroy OrtStatus* returned from the C API. Use appropriate + * constructors to construct an instance of a Status object from exceptions. + */ +struct Status : detail::Base { + explicit Status(std::nullptr_t) noexcept {} ///< Create an empty object, must be assigned a valid one to be used + explicit Status(OrtStatus* status) noexcept; ///< Takes ownership of OrtStatus instance returned from the C API. + explicit Status(const Exception&) noexcept; ///< Creates status instance out of exception + explicit Status(const std::exception&) noexcept; ///< Creates status instance out of exception + Status(const char* message, OrtErrorCode code) noexcept; ///< Creates status instance out of null-terminated string message. + std::string GetErrorMessage() const; + OrtErrorCode GetErrorCode() const; + bool IsOK() const noexcept; ///< Returns true if instance represents an OK (non-error) status. +}; + +/** \brief The ThreadingOptions + * + * The ThreadingOptions used for set global threadpools' options of The Env. + */ +struct ThreadingOptions : detail::Base { + /// \brief Wraps OrtApi::CreateThreadingOptions + ThreadingOptions(); + + /// \brief Wraps OrtApi::SetGlobalIntraOpNumThreads + ThreadingOptions& SetGlobalIntraOpNumThreads(int intra_op_num_threads); + + /// \brief Wraps OrtApi::SetGlobalInterOpNumThreads + ThreadingOptions& SetGlobalInterOpNumThreads(int inter_op_num_threads); + + /// \brief Wraps OrtApi::SetGlobalSpinControl + ThreadingOptions& SetGlobalSpinControl(int allow_spinning); + + /// \brief Wraps OrtApi::SetGlobalDenormalAsZero + ThreadingOptions& SetGlobalDenormalAsZero(); + + /// \brief Wraps OrtApi::SetGlobalCustomCreateThreadFn + ThreadingOptions& SetGlobalCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn); + + /// \brief Wraps OrtApi::SetGlobalCustomThreadCreationOptions + ThreadingOptions& SetGlobalCustomThreadCreationOptions(void* ort_custom_thread_creation_options); + + /// \brief Wraps OrtApi::SetGlobalCustomJoinThreadFn + ThreadingOptions& SetGlobalCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn); +}; + +/** \brief The Env (Environment) + * + * The Env holds the logging state used by all other objects. + * Note: One Env must be created before using any other Onnxruntime functionality + */ +struct Env : detail::Base { + explicit Env(std::nullptr_t) {} ///< Create an empty Env object, must be assigned a valid one to be used + + /// \brief Wraps OrtApi::CreateEnv + Env(OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief Wraps OrtApi::CreateEnvWithCustomLogger + Env(OrtLoggingLevel logging_level, const char* logid, OrtLoggingFunction logging_function, void* logger_param); + + /// \brief Wraps OrtApi::CreateEnvWithGlobalThreadPools + Env(const OrtThreadingOptions* tp_options, OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief Wraps OrtApi::CreateEnvWithCustomLoggerAndGlobalThreadPools + Env(const OrtThreadingOptions* tp_options, OrtLoggingFunction logging_function, void* logger_param, + OrtLoggingLevel logging_level = ORT_LOGGING_LEVEL_WARNING, _In_ const char* logid = ""); + + /// \brief C Interop Helper + explicit Env(OrtEnv* p) : Base{p} {} + + Env& EnableTelemetryEvents(); ///< Wraps OrtApi::EnableTelemetryEvents + Env& DisableTelemetryEvents(); ///< Wraps OrtApi::DisableTelemetryEvents + + Env& UpdateEnvWithCustomLogLevel(OrtLoggingLevel log_severity_level); ///< Wraps OrtApi::UpdateEnvWithCustomLogLevel + + Env& CreateAndRegisterAllocator(const OrtMemoryInfo* mem_info, const OrtArenaCfg* arena_cfg); ///< Wraps OrtApi::CreateAndRegisterAllocator + + Env& CreateAndRegisterAllocatorV2(const std::string& provider_type, const OrtMemoryInfo* mem_info, const std::unordered_map& options, const OrtArenaCfg* arena_cfg); ///< Wraps OrtApi::CreateAndRegisterAllocatorV2 +}; + +/** \brief Custom Op Domain + * + */ +struct CustomOpDomain : detail::Base { + explicit CustomOpDomain(std::nullptr_t) {} ///< Create an empty CustomOpDomain object, must be assigned a valid one to be used + + /// \brief Wraps OrtApi::CreateCustomOpDomain + explicit CustomOpDomain(const char* domain); + + // This does not take ownership of the op, simply registers it. + void Add(const OrtCustomOp* op); ///< Wraps CustomOpDomain_Add +}; + +/// \brief LoraAdapter holds a set of Lora Parameters loaded from a single file +struct LoraAdapter : detail::Base { + using Base = detail::Base; + using Base::Base; + + explicit LoraAdapter(std::nullptr_t) {} ///< Create an empty LoraAdapter object, must be assigned a valid one to be used + /// \brief Wraps OrtApi::CreateLoraAdapter + /// + /// The function attempts to load the adapter from the specified file + /// \param adapter_path The path to the Lora adapter + /// \param allocator optional pointer to a device allocator. If nullptr, the data stays on CPU. It would still + /// be copied to device if required by the model at inference time. + static LoraAdapter CreateLoraAdapter(const std::basic_string& adapter_path, + OrtAllocator* allocator); + + /// \brief Wraps OrtApi::CreateLoraAdapterFromArray + /// + /// The function attempts to load the adapter from the specified byte array. + /// \param bytes The byte array containing file LoraAdapter format + /// \param num_bytes The number of bytes in the byte array + /// \param allocator optional pointer to a device allocator. If nullptr, the data stays on CPU. It would still + /// be copied to device if required by the model at inference time. + static LoraAdapter CreateLoraAdapterFromArray(const void* bytes, size_t num_bytes, + OrtAllocator* allocator); +}; + +/** \brief RunOptions + * + */ +struct RunOptions : detail::Base { + explicit RunOptions(std::nullptr_t) {} ///< Create an empty RunOptions object, must be assigned a valid one to be used + RunOptions(); ///< Wraps OrtApi::CreateRunOptions + + RunOptions& SetRunLogVerbosityLevel(int); ///< Wraps OrtApi::RunOptionsSetRunLogVerbosityLevel + int GetRunLogVerbosityLevel() const; ///< Wraps OrtApi::RunOptionsGetRunLogVerbosityLevel + + RunOptions& SetRunLogSeverityLevel(int); ///< Wraps OrtApi::RunOptionsSetRunLogSeverityLevel + int GetRunLogSeverityLevel() const; ///< Wraps OrtApi::RunOptionsGetRunLogSeverityLevel + + RunOptions& SetRunTag(const char* run_tag); ///< wraps OrtApi::RunOptionsSetRunTag + const char* GetRunTag() const; ///< Wraps OrtApi::RunOptionsGetRunTag + + RunOptions& AddConfigEntry(const char* config_key, const char* config_value); ///< Wraps OrtApi::AddRunConfigEntry + + /** \brief Terminates all currently executing Session::Run calls that were made using this RunOptions instance + * + * If a currently executing session needs to be force terminated, this can be called from another thread to force it to fail with an error + * Wraps OrtApi::RunOptionsSetTerminate + */ + RunOptions& SetTerminate(); + + /** \brief Clears the terminate flag so this RunOptions instance can be used in a new Session::Run call without it instantly terminating + * + * Wraps OrtApi::RunOptionsUnsetTerminate + */ + RunOptions& UnsetTerminate(); + + /** \brief Add the LoraAdapter to the list of active adapters. + * The setting does not affect RunWithBinding() calls. + * + * Wraps OrtApi::RunOptionsAddActiveLoraAdapter + * \param adapter The LoraAdapter to be used as the active adapter + */ + RunOptions& AddActiveLoraAdapter(const LoraAdapter& adapter); +}; + +namespace detail { +// Utility function that returns a SessionOption config entry key for a specific custom operator. +// Ex: custom_op.[custom_op_name].[config] +std::string MakeCustomOpConfigEntryKey(const char* custom_op_name, const char* config); +} // namespace detail + +/// +/// Class that represents session configuration entries for one or more custom operators. +/// +/// Example: +/// Ort::CustomOpConfigs op_configs; +/// op_configs.AddConfig("my_custom_op", "device_type", "CPU"); +/// +/// Passed to Ort::SessionOptions::RegisterCustomOpsLibrary. +/// +struct CustomOpConfigs { + CustomOpConfigs() = default; + ~CustomOpConfigs() = default; + CustomOpConfigs(const CustomOpConfigs&) = default; + CustomOpConfigs& operator=(const CustomOpConfigs&) = default; + CustomOpConfigs(CustomOpConfigs&& o) = default; + CustomOpConfigs& operator=(CustomOpConfigs&& o) = default; + + /** \brief Adds a session configuration entry/value for a specific custom operator. + * + * \param custom_op_name The name of the custom operator for which to add a configuration entry. + * Must match the name returned by the CustomOp's GetName() method. + * \param config_key The name of the configuration entry. + * \param config_value The value of the configuration entry. + * \return A reference to this object to enable call chaining. + */ + CustomOpConfigs& AddConfig(const char* custom_op_name, const char* config_key, const char* config_value); + + /** \brief Returns a flattened map of custom operator configuration entries and their values. + * + * The keys has been flattened to include both the custom operator name and the configuration entry key name. + * For example, a prior call to AddConfig("my_op", "key", "value") corresponds to the flattened key/value pair + * {"my_op.key", "value"}. + * + * \return An unordered map of flattened configurations. + */ + const std::unordered_map& GetFlattenedConfigs() const; + + private: + std::unordered_map flat_configs_; +}; + +/** \brief Options object used when creating a new Session object + * + * Wraps ::OrtSessionOptions object and methods + */ + +struct SessionOptions; + +namespace detail { +// we separate const-only methods because passing const ptr to non-const methods +// is only discovered when inline methods are compiled which is counter-intuitive +template +struct ConstSessionOptionsImpl : Base { + using B = Base; + using B::B; + + SessionOptions Clone() const; ///< Creates and returns a copy of this SessionOptions object. Wraps OrtApi::CloneSessionOptions + + std::string GetConfigEntry(const char* config_key) const; ///< Wraps OrtApi::GetSessionConfigEntry + bool HasConfigEntry(const char* config_key) const; ///< Wraps OrtApi::HasSessionConfigEntry + std::string GetConfigEntryOrDefault(const char* config_key, const std::string& def); +}; + +template +struct SessionOptionsImpl : ConstSessionOptionsImpl { + using B = ConstSessionOptionsImpl; + using B::B; + + SessionOptionsImpl& SetIntraOpNumThreads(int intra_op_num_threads); ///< Wraps OrtApi::SetIntraOpNumThreads + SessionOptionsImpl& SetInterOpNumThreads(int inter_op_num_threads); ///< Wraps OrtApi::SetInterOpNumThreads + SessionOptionsImpl& SetGraphOptimizationLevel(GraphOptimizationLevel graph_optimization_level); ///< Wraps OrtApi::SetSessionGraphOptimizationLevel + SessionOptionsImpl& SetDeterministicCompute(bool value); ///< Wraps OrtApi::SetDeterministicCompute + + SessionOptionsImpl& EnableCpuMemArena(); ///< Wraps OrtApi::EnableCpuMemArena + SessionOptionsImpl& DisableCpuMemArena(); ///< Wraps OrtApi::DisableCpuMemArena + + SessionOptionsImpl& SetOptimizedModelFilePath(const ORTCHAR_T* optimized_model_file); ///< Wraps OrtApi::SetOptimizedModelFilePath + + SessionOptionsImpl& EnableProfiling(const ORTCHAR_T* profile_file_prefix); ///< Wraps OrtApi::EnableProfiling + SessionOptionsImpl& DisableProfiling(); ///< Wraps OrtApi::DisableProfiling + + SessionOptionsImpl& EnableOrtCustomOps(); ///< Wraps OrtApi::EnableOrtCustomOps + + SessionOptionsImpl& EnableMemPattern(); ///< Wraps OrtApi::EnableMemPattern + SessionOptionsImpl& DisableMemPattern(); ///< Wraps OrtApi::DisableMemPattern + + SessionOptionsImpl& SetExecutionMode(ExecutionMode execution_mode); ///< Wraps OrtApi::SetSessionExecutionMode + + SessionOptionsImpl& SetLogId(const char* logid); ///< Wraps OrtApi::SetSessionLogId + SessionOptionsImpl& SetLogSeverityLevel(int level); ///< Wraps OrtApi::SetSessionLogSeverityLevel + + SessionOptionsImpl& Add(OrtCustomOpDomain* custom_op_domain); ///< Wraps OrtApi::AddCustomOpDomain + + SessionOptionsImpl& DisablePerSessionThreads(); ///< Wraps OrtApi::DisablePerSessionThreads + + SessionOptionsImpl& AddConfigEntry(const char* config_key, const char* config_value); ///< Wraps OrtApi::AddSessionConfigEntry + + SessionOptionsImpl& AddInitializer(const char* name, const OrtValue* ort_val); ///< Wraps OrtApi::AddInitializer + SessionOptionsImpl& AddExternalInitializers(const std::vector& names, const std::vector& ort_values); ///< Wraps OrtApi::AddExternalInitializers + SessionOptionsImpl& AddExternalInitializersFromFilesInMemory(const std::vector>& external_initializer_file_names, + const std::vector& external_initializer_file_buffer_array, + const std::vector& external_initializer_file_lengths); ///< Wraps OrtApi::AddExternalInitializersFromFilesInMemory + + SessionOptionsImpl& AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA + SessionOptionsImpl& AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CUDA_V2 + SessionOptionsImpl& AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_ROCM + SessionOptionsImpl& AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_OpenVINO_V2 + SessionOptionsImpl& AppendExecutionProvider_OpenVINO_V2(const std::unordered_map& provider_options = {}); + SessionOptionsImpl& AppendExecutionProvider_TensorRT(const OrtTensorRTProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + SessionOptionsImpl& AppendExecutionProvider_TensorRT_V2(const OrtTensorRTProviderOptionsV2& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_TensorRT + SessionOptionsImpl& AppendExecutionProvider_MIGraphX(const OrtMIGraphXProviderOptions& provider_options); ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_MIGraphX + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_CANN + SessionOptionsImpl& AppendExecutionProvider_CANN(const OrtCANNProviderOptions& provider_options); + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_Dnnl + SessionOptionsImpl& AppendExecutionProvider_Dnnl(const OrtDnnlProviderOptions& provider_options); + /// Wraps OrtApi::SessionOptionsAppendExecutionProvider. Currently supports QNN, SNPE and XNNPACK. + SessionOptionsImpl& AppendExecutionProvider(const std::string& provider_name, + const std::unordered_map& provider_options = {}); + + SessionOptionsImpl& SetCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn); ///< Wraps OrtApi::SessionOptionsSetCustomCreateThreadFn + SessionOptionsImpl& SetCustomThreadCreationOptions(void* ort_custom_thread_creation_options); ///< Wraps OrtApi::SessionOptionsSetCustomThreadCreationOptions + SessionOptionsImpl& SetCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn); ///< Wraps OrtApi::SessionOptionsSetCustomJoinThreadFn + + ///< Registers the custom operator from the specified shared library via OrtApi::RegisterCustomOpsLibrary_V2. + ///< The custom operator configurations are optional. If provided, custom operator configs are set via + ///< OrtApi::AddSessionConfigEntry. + SessionOptionsImpl& RegisterCustomOpsLibrary(const ORTCHAR_T* library_name, const CustomOpConfigs& custom_op_configs = {}); + + SessionOptionsImpl& RegisterCustomOpsUsingFunction(const char* function_name); ///< Wraps OrtApi::RegisterCustomOpsUsingFunction + + ///< Wraps OrtApi::SessionOptionsAppendExecutionProvider_VitisAI + SessionOptionsImpl& AppendExecutionProvider_VitisAI(const std::unordered_map& provider_options = {}); +}; +} // namespace detail + +using UnownedSessionOptions = detail::SessionOptionsImpl>; +using ConstSessionOptions = detail::ConstSessionOptionsImpl>; + +/** \brief Wrapper around ::OrtSessionOptions + * + */ +struct SessionOptions : detail::SessionOptionsImpl { + explicit SessionOptions(std::nullptr_t) {} ///< Create an empty SessionOptions object, must be assigned a valid one to be used + SessionOptions(); ///< Wraps OrtApi::CreateSessionOptions + explicit SessionOptions(OrtSessionOptions* p) : SessionOptionsImpl{p} {} ///< Used for interop with the C API + UnownedSessionOptions GetUnowned() const { return UnownedSessionOptions{this->p_}; } + ConstSessionOptions GetConst() const { return ConstSessionOptions{this->p_}; } +}; + +/** \brief Wrapper around ::OrtModelMetadata + * + */ +struct ModelMetadata : detail::Base { + explicit ModelMetadata(std::nullptr_t) {} ///< Create an empty ModelMetadata object, must be assigned a valid one to be used + explicit ModelMetadata(OrtModelMetadata* p) : Base{p} {} ///< Used for interop with the C API + + /** \brief Returns a copy of the producer name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetProducerNameAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetProducerName + + /** \brief Returns a copy of the graph name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetGraphNameAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetGraphName + + /** \brief Returns a copy of the domain name. + * + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetDomainAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetDomain + + /** \brief Returns a copy of the description. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetDescriptionAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetDescription + + /** \brief Returns a copy of the graph description. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetGraphDescriptionAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetGraphDescription + + /** \brief Returns a vector of copies of the custom metadata keys. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance std::vector of smart pointers that would deallocate the buffers when out of scope. + * The OrtAllocator instance must be valid at the point of memory release. + */ + std::vector GetCustomMetadataMapKeysAllocated(OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataGetCustomMetadataMapKeys + + /** \brief Looks up a value by a key in the Custom Metadata map + * + * \param key zero terminated string key to lookup + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * maybe nullptr if key is not found. + * + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr LookupCustomMetadataMapAllocated(const char* key, OrtAllocator* allocator) const; ///< Wraps OrtApi::ModelMetadataLookupCustomMetadataMap + + int64_t GetVersion() const; ///< Wraps OrtApi::ModelMetadataGetVersion +}; + +struct IoBinding; + +namespace detail { + +// we separate const-only methods because passing const ptr to non-const methods +// is only discovered when inline methods are compiled which is counter-intuitive +template +struct ConstSessionImpl : Base { + using B = Base; + using B::B; + + size_t GetInputCount() const; ///< Returns the number of model inputs + size_t GetOutputCount() const; ///< Returns the number of model outputs + size_t GetOverridableInitializerCount() const; ///< Returns the number of inputs that have defaults that can be overridden + + /** \brief Returns a copy of input name at the specified index. + * + * \param index must less than the value returned by GetInputCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetInputNameAllocated(size_t index, OrtAllocator* allocator) const; + + /** \brief Returns a copy of output name at then specified index. + * + * \param index must less than the value returned by GetOutputCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetOutputNameAllocated(size_t index, OrtAllocator* allocator) const; + + /** \brief Returns a copy of the overridable initializer name at then specified index. + * + * \param index must less than the value returned by GetOverridableInitializerCount() + * \param allocator to allocate memory for the copy of the name returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr GetOverridableInitializerNameAllocated(size_t index, OrtAllocator* allocator) const; ///< Wraps OrtApi::SessionGetOverridableInitializerName + + uint64_t GetProfilingStartTimeNs() const; ///< Wraps OrtApi::SessionGetProfilingStartTimeNs + ModelMetadata GetModelMetadata() const; ///< Wraps OrtApi::SessionGetModelMetadata + + TypeInfo GetInputTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetInputTypeInfo + TypeInfo GetOutputTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetOutputTypeInfo + TypeInfo GetOverridableInitializerTypeInfo(size_t index) const; ///< Wraps OrtApi::SessionGetOverridableInitializerTypeInfo +}; + +template +struct SessionImpl : ConstSessionImpl { + using B = ConstSessionImpl; + using B::B; + + /** \brief Run the model returning results in an Ort allocated vector. + * + * Wraps OrtApi::Run + * + * The caller provides a list of inputs and a list of the desired outputs to return. + * + * See the output logs for more information on warnings/errors that occur while processing the model. + * Common errors are.. (TODO) + * + * \param[in] run_options + * \param[in] input_names Array of null terminated strings of length input_count that is the list of input names + * \param[in] input_values Array of Value objects of length input_count that is the list of input values + * \param[in] input_count Number of inputs (the size of the input_names & input_values arrays) + * \param[in] output_names Array of C style strings of length output_count that is the list of output names + * \param[in] output_count Number of outputs (the size of the output_names array) + * \return A std::vector of Value objects that directly maps to the output_names array (eg. output_name[0] is the first entry of the returned vector) + */ + std::vector Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, size_t output_count); + + /** \brief Run the model returning results in user provided outputs + * Same as Run(const RunOptions&, const char* const*, const Value*, size_t,const char* const*, size_t) + */ + void Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count); + + void Run(const RunOptions& run_options, const IoBinding&); ///< Wraps OrtApi::RunWithBinding + + /** \brief Run the model asynchronously in a thread owned by intra op thread pool + * + * Wraps OrtApi::RunAsync + * + * \param[in] run_options + * \param[in] input_names Array of null terminated UTF8 encoded strings of the input names + * \param[in] input_values Array of Value objects of length input_count + * \param[in] input_count Number of elements in the input_names and inputs arrays + * \param[in] output_names Array of null terminated UTF8 encoded strings of the output names + * \param[out] output_values Array of provided Values to be filled with outputs. + * On calling RunAsync, output_values[i] could either be initialized by a null pointer or a preallocated OrtValue*. + * Later, on invoking the callback, each output_values[i] of null will be filled with an OrtValue* allocated by onnxruntime. + * Then, an OrtValue** pointer will be casted from output_values, and pass to the callback. + * NOTE: it is customer's duty to finally release output_values and each of its member, + * regardless of whether the member (Ort::Value) is allocated by onnxruntime or preallocated by the customer. + * \param[in] output_count Number of elements in the output_names and outputs array + * \param[in] callback Callback function on model run completion + * \param[in] user_data User data that pass back to the callback + */ + void RunAsync(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count, RunAsyncCallbackFn callback, void* user_data); + + /** \brief End profiling and return a copy of the profiling file name. + * + * \param allocator to allocate memory for the copy of the string returned + * \return a instance of smart pointer that would deallocate the buffer when out of scope. + * The OrtAllocator instances must be valid at the point of memory release. + */ + AllocatedStringPtr EndProfilingAllocated(OrtAllocator* allocator); ///< Wraps OrtApi::SessionEndProfiling + + /** \brief Set DynamicOptions for EPs (Execution Providers) + * + * Wraps OrtApi::SetEpDynamicOptions + * + * Valid options can be found in `include\onnxruntime\core\session\onnxruntime_session_options_config_keys.h` + * Look for `kOrtEpDynamicOptions` + * + * \param[in] keys Array of null terminated UTF8 encoded strings of EP dynamic option keys + * \param[in] values Array of null terminated UTF8 encoded string of EP dynamic option values + * \param[in] kv_len Number of elements in the keys and values arrays + */ + void SetEpDynamicOptions(const char* const* keys, const char* const* values, size_t kv_len); +}; + +} // namespace detail + +using ConstSession = detail::ConstSessionImpl>; +using UnownedSession = detail::SessionImpl>; + +/** \brief Wrapper around ::OrtSession + * + */ +struct Session : detail::SessionImpl { + explicit Session(std::nullptr_t) {} ///< Create an empty Session object, must be assigned a valid one to be used + Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options); ///< Wraps OrtApi::CreateSession + Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container); ///< Wraps OrtApi::CreateSessionWithPrepackedWeightsContainer + Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options); ///< Wraps OrtApi::CreateSessionFromArray + Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container); ///< Wraps OrtApi::CreateSessionFromArrayWithPrepackedWeightsContainer + + ConstSession GetConst() const { return ConstSession{this->p_}; } + UnownedSession GetUnowned() const { return UnownedSession{this->p_}; } +}; + +namespace detail { +template +struct MemoryInfoImpl : Base { + using B = Base; + using B::B; + + std::string GetAllocatorName() const; + OrtAllocatorType GetAllocatorType() const; + int GetDeviceId() const; + OrtMemoryInfoDeviceType GetDeviceType() const; + OrtMemType GetMemoryType() const; + + template + bool operator==(const MemoryInfoImpl& o) const; +}; +} // namespace detail + +// Const object holder that does not own the underlying object +using ConstMemoryInfo = detail::MemoryInfoImpl>; + +/** \brief Wrapper around ::OrtMemoryInfo + * + */ +struct MemoryInfo : detail::MemoryInfoImpl { + static MemoryInfo CreateCpu(OrtAllocatorType type, OrtMemType mem_type1); + explicit MemoryInfo(std::nullptr_t) {} ///< No instance is created + explicit MemoryInfo(OrtMemoryInfo* p) : MemoryInfoImpl{p} {} ///< Take ownership of a pointer created by C Api + MemoryInfo(const char* name, OrtAllocatorType type, int id, OrtMemType mem_type); + ConstMemoryInfo GetConst() const { return ConstMemoryInfo{this->p_}; } +}; + +namespace detail { +template +struct TensorTypeAndShapeInfoImpl : Base { + using B = Base; + using B::B; + + ONNXTensorElementDataType GetElementType() const; ///< Wraps OrtApi::GetTensorElementType + size_t GetElementCount() const; ///< Wraps OrtApi::GetTensorShapeElementCount + + size_t GetDimensionsCount() const; ///< Wraps OrtApi::GetDimensionsCount + + /** \deprecated use GetShape() returning std::vector + * [[deprecated]] + * This interface is unsafe to use + */ + [[deprecated("use GetShape()")]] void GetDimensions(int64_t* values, size_t values_count) const; ///< Wraps OrtApi::GetDimensions + + void GetSymbolicDimensions(const char** values, size_t values_count) const; ///< Wraps OrtApi::GetSymbolicDimensions + + std::vector GetShape() const; ///< Uses GetDimensionsCount & GetDimensions to return a std::vector of the shape +}; + +} // namespace detail + +using ConstTensorTypeAndShapeInfo = detail::TensorTypeAndShapeInfoImpl>; + +/** \brief Wrapper around ::OrtTensorTypeAndShapeInfo + * + */ +struct TensorTypeAndShapeInfo : detail::TensorTypeAndShapeInfoImpl { + explicit TensorTypeAndShapeInfo(std::nullptr_t) {} ///< Create an empty TensorTypeAndShapeInfo object, must be assigned a valid one to be used + explicit TensorTypeAndShapeInfo(OrtTensorTypeAndShapeInfo* p) : TensorTypeAndShapeInfoImpl{p} {} ///< Used for interop with the C API + ConstTensorTypeAndShapeInfo GetConst() const { return ConstTensorTypeAndShapeInfo{this->p_}; } +}; + +namespace detail { +template +struct SequenceTypeInfoImpl : Base { + using B = Base; + using B::B; + TypeInfo GetSequenceElementType() const; ///< Wraps OrtApi::GetSequenceElementType +}; + +} // namespace detail + +using ConstSequenceTypeInfo = detail::SequenceTypeInfoImpl>; + +/** \brief Wrapper around ::OrtSequenceTypeInfo + * + */ +struct SequenceTypeInfo : detail::SequenceTypeInfoImpl { + explicit SequenceTypeInfo(std::nullptr_t) {} ///< Create an empty SequenceTypeInfo object, must be assigned a valid one to be used + explicit SequenceTypeInfo(OrtSequenceTypeInfo* p) : SequenceTypeInfoImpl{p} {} ///< Used for interop with the C API + ConstSequenceTypeInfo GetConst() const { return ConstSequenceTypeInfo{this->p_}; } +}; + +namespace detail { +template +struct OptionalTypeInfoImpl : Base { + using B = Base; + using B::B; + TypeInfo GetOptionalElementType() const; ///< Wraps OrtApi::CastOptionalTypeToContainedTypeInfo +}; + +} // namespace detail + +// This is always owned by the TypeInfo and can only be obtained from it. +using ConstOptionalTypeInfo = detail::OptionalTypeInfoImpl>; + +namespace detail { +template +struct MapTypeInfoImpl : detail::Base { + using B = Base; + using B::B; + ONNXTensorElementDataType GetMapKeyType() const; ///< Wraps OrtApi::GetMapKeyType + TypeInfo GetMapValueType() const; ///< Wraps OrtApi::GetMapValueType +}; + +} // namespace detail + +using ConstMapTypeInfo = detail::MapTypeInfoImpl>; + +/** \brief Wrapper around ::OrtMapTypeInfo + * + */ +struct MapTypeInfo : detail::MapTypeInfoImpl { + explicit MapTypeInfo(std::nullptr_t) {} ///< Create an empty MapTypeInfo object, must be assigned a valid one to be used + explicit MapTypeInfo(OrtMapTypeInfo* p) : MapTypeInfoImpl{p} {} ///< Used for interop with the C API + ConstMapTypeInfo GetConst() const { return ConstMapTypeInfo{this->p_}; } +}; + +namespace detail { +template +struct TypeInfoImpl : detail::Base { + using B = Base; + using B::B; + + ConstTensorTypeAndShapeInfo GetTensorTypeAndShapeInfo() const; ///< Wraps OrtApi::CastTypeInfoToTensorInfo + ConstSequenceTypeInfo GetSequenceTypeInfo() const; ///< Wraps OrtApi::CastTypeInfoToSequenceTypeInfo + ConstMapTypeInfo GetMapTypeInfo() const; ///< Wraps OrtApi::CastTypeInfoToMapTypeInfo + ConstOptionalTypeInfo GetOptionalTypeInfo() const; ///< wraps OrtApi::CastTypeInfoToOptionalTypeInfo + + ONNXType GetONNXType() const; +}; +} // namespace detail + +/// +/// Contains a constant, unowned OrtTypeInfo that can be copied and passed around by value. +/// Provides access to const OrtTypeInfo APIs. +/// +using ConstTypeInfo = detail::TypeInfoImpl>; + +/// +/// Type information that may contain either TensorTypeAndShapeInfo or +/// the information about contained sequence or map depending on the ONNXType. +/// +struct TypeInfo : detail::TypeInfoImpl { + explicit TypeInfo(std::nullptr_t) {} ///< Create an empty TypeInfo object, must be assigned a valid one to be used + explicit TypeInfo(OrtTypeInfo* p) : TypeInfoImpl{p} {} ///< C API Interop + + ConstTypeInfo GetConst() const { return ConstTypeInfo{this->p_}; } +}; + +namespace detail { +// This structure is used to feed sparse tensor values +// information for use with FillSparseTensor() API +// if the data type for the sparse tensor values is numeric +// use data.p_data, otherwise, use data.str pointer to feed +// values. data.str is an array of const char* that are zero terminated. +// number of strings in the array must match shape size. +// For fully sparse tensors use shape {0} and set p_data/str +// to nullptr. +struct OrtSparseValuesParam { + const int64_t* values_shape; + size_t values_shape_len; + union { + const void* p_data; + const char** str; + } data; +}; + +// Provides a way to pass shape in a single +// argument +struct Shape { + const int64_t* shape; + size_t shape_len; +}; + +template +struct ConstValueImpl : Base { + using B = Base; + using B::B; + + /// + /// Obtains a pointer to a user defined data for experimental purposes + /// + template + void GetOpaqueData(const char* domain, const char* type_name, R&) const; ///< Wraps OrtApi::GetOpaqueValue + + bool IsTensor() const; ///< Returns true if Value is a tensor, false for other types like map/sequence/etc + bool HasValue() const; /// < Return true if OrtValue contains data and returns false if the OrtValue is a None + + size_t GetCount() const; // If a non tensor, returns 2 for map and N for sequence, where N is the number of elements + Value GetValue(int index, OrtAllocator* allocator) const; + + /// + /// This API returns a full length of string data contained within either a tensor or a sparse Tensor. + /// For sparse tensor it returns a full length of stored non-empty strings (values). The API is useful + /// for allocating necessary memory and calling GetStringTensorContent(). + /// + /// total length of UTF-8 encoded bytes contained. No zero terminators counted. + size_t GetStringTensorDataLength() const; + + /// + /// The API copies all of the UTF-8 encoded string data contained within a tensor or a sparse tensor + /// into a supplied buffer. Use GetStringTensorDataLength() to find out the length of the buffer to allocate. + /// The user must also allocate offsets buffer with the number of entries equal to that of the contained + /// strings. + /// + /// Strings are always assumed to be on CPU, no X-device copy. + /// + /// user allocated buffer + /// length in bytes of the allocated buffer + /// a pointer to the offsets user allocated buffer + /// count of offsets, must be equal to the number of strings contained. + /// that can be obtained from the shape of the tensor or from GetSparseTensorValuesTypeAndShapeInfo() + /// for sparse tensors + void GetStringTensorContent(void* buffer, size_t buffer_length, size_t* offsets, size_t offsets_count) const; + + /// + /// Returns a const typed pointer to the tensor contained data. + /// No type checking is performed, the caller must ensure the type matches the tensor type. + /// + /// + /// const pointer to data, no copies made + template + const R* GetTensorData() const; ///< Wraps OrtApi::GetTensorMutableData /// + + /// + /// Returns a non-typed pointer to a tensor contained data. + /// + /// const pointer to data, no copies made + const void* GetTensorRawData() const; + + /// + /// The API returns type information for data contained in a tensor. For sparse + /// tensors it returns type information for contained non-zero values. + /// It returns dense shape for sparse tensors. + /// + /// TypeInfo + TypeInfo GetTypeInfo() const; + + /// + /// The API returns type information for data contained in a tensor. For sparse + /// tensors it returns type information for contained non-zero values. + /// It returns dense shape for sparse tensors. + /// + /// TensorTypeAndShapeInfo + TensorTypeAndShapeInfo GetTensorTypeAndShapeInfo() const; + + /// + /// This API returns information about the memory allocation used to hold data. + /// + /// Non owning instance of MemoryInfo + ConstMemoryInfo GetTensorMemoryInfo() const; + + /// + /// The API copies UTF-8 encoded bytes for the requested string element + /// contained within a tensor or a sparse tensor into a provided buffer. + /// Use GetStringTensorElementLength() to obtain the length of the buffer to allocate. + /// + /// + /// + /// + void GetStringTensorElement(size_t buffer_length, size_t element_index, void* buffer) const; + + /// + /// Returns string tensor UTF-8 encoded string element. + /// Use of this API is recommended over GetStringTensorElement() that takes void* buffer pointer. + /// + /// + /// std::string + std::string GetStringTensorElement(size_t element_index) const; + + /// + /// The API returns a byte length of UTF-8 encoded string element + /// contained in either a tensor or a spare tensor values. + /// + /// + /// byte length for the specified string element + size_t GetStringTensorElementLength(size_t element_index) const; + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// The API returns the sparse data format this OrtValue holds in a sparse tensor. + /// If the sparse tensor was not fully constructed, i.e. Use*() or Fill*() API were not used + /// the value returned is ORT_SPARSE_UNDEFINED. + /// + /// Format enum + OrtSparseFormat GetSparseFormat() const; + + /// + /// The API returns type and shape information for stored non-zero values of the + /// sparse tensor. Use GetSparseTensorValues() to obtain values buffer pointer. + /// + /// TensorTypeAndShapeInfo values information + TensorTypeAndShapeInfo GetSparseTensorValuesTypeAndShapeInfo() const; + + /// + /// The API returns type and shape information for the specified indices. Each supported + /// indices have their own enum values even if a give format has more than one kind of indices. + /// Use GetSparseTensorIndicesData() to obtain pointer to indices buffer. + /// + /// enum requested + /// type and shape information + TensorTypeAndShapeInfo GetSparseTensorIndicesTypeShapeInfo(OrtSparseIndicesFormat format) const; + + /// + /// The API retrieves a pointer to the internal indices buffer. The API merely performs + /// a convenience data type casting on the return type pointer. Make sure you are requesting + /// the right type, use GetSparseTensorIndicesTypeShapeInfo(); + /// + /// type to cast to + /// requested indices kind + /// number of indices entries + /// Pinter to the internal sparse tensor buffer containing indices. Do not free this pointer. + template + const R* GetSparseTensorIndicesData(OrtSparseIndicesFormat indices_format, size_t& num_indices) const; + + /// + /// Returns true if the OrtValue contains a sparse tensor + /// + /// + bool IsSparseTensor() const; + + /// + /// The API returns a pointer to an internal buffer of the sparse tensor + /// containing non-zero values. The API merely does casting. Make sure you + /// are requesting the right data type by calling GetSparseTensorValuesTypeAndShapeInfo() + /// first. + /// + /// numeric data types only. Use GetStringTensor*() to retrieve strings. + /// a pointer to the internal values buffer. Do not free this pointer. + template + const R* GetSparseTensorValues() const; + +#endif +}; + +template +struct ValueImpl : ConstValueImpl { + using B = ConstValueImpl; + using B::B; + + /// + /// Returns a non-const typed pointer to an OrtValue/Tensor contained buffer + /// No type checking is performed, the caller must ensure the type matches the tensor type. + /// + /// non-const pointer to data, no copies made + template + R* GetTensorMutableData(); + + /// + /// Returns a non-typed non-const pointer to a tensor contained data. + /// + /// pointer to data, no copies made + void* GetTensorMutableRawData(); + + /// + // Obtain a reference to an element of data at the location specified + /// by the vector of dims. + /// + /// + /// [in] expressed by a vecotr of dimensions offsets + /// + template + R& At(const std::vector& location); + + /// + /// Set all strings at once in a string tensor + /// + /// [in] An array of strings. Each string in this array must be null terminated. + /// [in] Count of strings in s (Must match the size of \p value's tensor shape) + void FillStringTensor(const char* const* s, size_t s_len); + + /// + /// Set a single string in a string tensor + /// + /// [in] A null terminated UTF-8 encoded string + /// [in] Index of the string in the tensor to set + void FillStringTensorElement(const char* s, size_t index); + + /// + /// Allocate if necessary and obtain a pointer to a UTF-8 + /// encoded string element buffer indexed by the flat element index, + /// of the specified length. + /// + /// This API is for advanced usage. It avoids a need to construct + /// an auxiliary array of string pointers, and allows to write data directly + /// (do not zero terminate). + /// + /// + /// + /// a pointer to a writable buffer + char* GetResizedStringTensorElementBuffer(size_t index, size_t buffer_length); + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// Supplies COO format specific indices and marks the contained sparse tensor as being a COO format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// pointer to the user allocated buffer with indices. Use nullptr for fully sparse tensors. + /// number of indices entries. Use 0 for fully sparse tensors + void UseCooIndices(int64_t* indices_data, size_t indices_num); + + /// + /// Supplies CSR format specific indices and marks the contained sparse tensor as being a CSR format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// pointer to the user allocated buffer with inner indices or nullptr for fully sparse tensors + /// number of csr inner indices or 0 for fully sparse tensors + /// pointer to the user allocated buffer with outer indices or nullptr for fully sparse tensors + /// number of csr outer indices or 0 for fully sparse tensors + void UseCsrIndices(int64_t* inner_data, size_t inner_num, int64_t* outer_data, size_t outer_num); + + /// + /// Supplies BlockSparse format specific indices and marks the contained sparse tensor as being a BlockSparse format tensor. + /// Values are supplied with a CreateSparseTensor() API. The supplied indices are not copied and the user + /// allocated buffers lifespan must eclipse that of the OrtValue. + /// The location of the indices is assumed to be the same as specified by OrtMemoryInfo argument at the creation time. + /// + /// indices shape or a {0} for fully sparse + /// user allocated buffer with indices or nullptr for fully spare tensors + void UseBlockSparseIndices(const Shape& indices_shape, int32_t* indices_data); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and COO indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information. + /// coo indices buffer or nullptr for fully sparse data + /// number of COO indices or 0 for fully sparse data + void FillSparseTensorCoo(const OrtMemoryInfo* data_mem_info, const OrtSparseValuesParam& values_param, + const int64_t* indices_data, size_t indices_num); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and CSR indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information + /// csr inner indices pointer or nullptr for fully sparse tensors + /// number of csr inner indices or 0 for fully sparse tensors + /// pointer to csr indices data or nullptr for fully sparse tensors + /// number of csr outer indices or 0 + void FillSparseTensorCsr(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const int64_t* inner_indices_data, size_t inner_indices_num, + const int64_t* outer_indices_data, size_t outer_indices_num); + + /// + /// The API will allocate memory using the allocator instance supplied to the CreateSparseTensor() API + /// and copy the values and BlockSparse indices into it. If data_mem_info specifies that the data is located + /// at difference device than the allocator, a X-device copy will be performed if possible. + /// + /// specified buffer memory description + /// values buffer information + /// indices shape. use {0} for fully sparse tensors + /// pointer to indices data or nullptr for fully sparse tensors + void FillSparseTensorBlockSparse(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const Shape& indices_shape, + const int32_t* indices_data); + +#endif +}; + +} // namespace detail + +using ConstValue = detail::ConstValueImpl>; +using UnownedValue = detail::ValueImpl>; + +/** \brief Wrapper around ::OrtValue + * + */ +struct Value : detail::ValueImpl { + using Base = detail::ValueImpl; + using OrtSparseValuesParam = detail::OrtSparseValuesParam; + using Shape = detail::Shape; + + explicit Value(std::nullptr_t) {} ///< Create an empty Value object, must be assigned a valid one to be used + explicit Value(OrtValue* p) : Base{p} {} ///< Used for interop with the C API + Value(Value&&) = default; + Value& operator=(Value&&) = default; + + ConstValue GetConst() const { return ConstValue{this->p_}; } + UnownedValue GetUnowned() const { return UnownedValue{this->p_}; } + + /** \brief Creates a tensor with a user supplied buffer. Wraps OrtApi::CreateTensorWithDataAsOrtValue. + * \tparam T The numeric datatype. This API is not suitable for strings. + * \param info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param p_data Pointer to the data buffer. + * \param p_data_element_count The number of elements in the data buffer. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + */ + template + static Value CreateTensor(const OrtMemoryInfo* info, T* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len); + + /** \brief Creates a tensor with a user supplied buffer. Wraps OrtApi::CreateTensorWithDataAsOrtValue. + * + * \param info Memory description of where the p_data buffer resides (CPU vs GPU etc). + * \param p_data Pointer to the data buffer. + * \param p_data_byte_count The number of bytes in the data buffer. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + * \param type The data type. + */ + static Value CreateTensor(const OrtMemoryInfo* info, void* p_data, size_t p_data_byte_count, const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type); + + /** \brief Creates an OrtValue with a tensor using a supplied OrtAllocator. Wraps OrtApi::CreateTensorAsOrtValue. + * This overload will allocate the buffer for the tensor according to the supplied shape and data type. + * The allocated buffer will be owned by the returned OrtValue and will be freed when the OrtValue is released. + * The input data would need to be copied into the allocated buffer. + * This API is not suitable for strings. + * + * \tparam T The numeric datatype. This API is not suitable for strings. + * \param allocator The allocator to use. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + */ + template + static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len); + + /** \brief Creates an OrtValue with a tensor using the supplied OrtAllocator. + * Wraps OrtApi::CreateTensorAsOrtValue. + * The allocated buffer will be owned by the returned OrtValue and will be freed when the OrtValue is released. + * The input data would need to be copied into the allocated buffer. + * This API is not suitable for strings. + * + * \param allocator The allocator to use. + * \param shape Pointer to the tensor shape dimensions. + * \param shape_len The number of tensor shape dimensions. + * \param type The data type. + */ + static Value CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type); + + /** \brief Creates an OrtValue with a Map Onnx type representation. + * The API would ref-count the supplied OrtValues and they will be released + * when the returned OrtValue is released. The caller may release keys and values after the call + * returns. + * + * \param keys an OrtValue containing a tensor with primitive data type keys. + * \param values an OrtValue that may contain a tensor. Ort currently supports only primitive data type values. + */ + static Value CreateMap(const Value& keys, const Value& values); ///< Wraps OrtApi::CreateValue + + /** \brief Creates an OrtValue with a Sequence Onnx type representation. + * The API would ref-count the supplied OrtValues and they will be released + * when the returned OrtValue is released. The caller may release the values after the call + * returns. + * + * \param values a vector of OrtValues that must have the same Onnx value type. + */ + static Value CreateSequence(const std::vector& values); ///< Wraps OrtApi::CreateValue + + /** \brief Creates an OrtValue wrapping an Opaque type. + * This is used for experimental support of non-tensor types. + * + * \tparam T - the type of the value. + * \param domain - zero terminated utf-8 string. Domain of the type. + * \param type_name - zero terminated utf-8 string. Name of the type. + * \param value - the value to be wrapped. + */ + template + static Value CreateOpaque(const char* domain, const char* type_name, const T& value); ///< Wraps OrtApi::CreateOpaqueValue + +#if !defined(DISABLE_SPARSE_TENSORS) + /// + /// This is a simple forwarding method to the other overload that helps deducing + /// data type enum value from the type of the buffer. + /// + /// numeric datatype. This API is not suitable for strings. + /// Memory description where the user buffers reside (CPU vs GPU etc) + /// pointer to the user supplied buffer, use nullptr for fully sparse tensors + /// a would be dense shape of the tensor + /// non zero values shape. Use a single 0 shape for fully sparse tensors. + /// + template + static Value CreateSparseTensor(const OrtMemoryInfo* info, T* p_data, const Shape& dense_shape, + const Shape& values_shape); + + /// + /// Creates an OrtValue instance containing SparseTensor. This constructs + /// a sparse tensor that makes use of user allocated buffers. It does not make copies + /// of the user provided data and does not modify it. The lifespan of user provided buffers should + /// eclipse the life span of the resulting OrtValue. This call constructs an instance that only contain + /// a pointer to non-zero values. To fully populate the sparse tensor call UseIndices() API below + /// to supply a sparse format specific indices. + /// This API is not suitable for string data. Use CreateSparseTensor() with allocator specified so strings + /// can be properly copied into the allocated buffer. + /// + /// Memory description where the user buffers reside (CPU vs GPU etc) + /// pointer to the user supplied buffer, use nullptr for fully sparse tensors + /// a would be dense shape of the tensor + /// non zero values shape. Use a single 0 shape for fully sparse tensors. + /// data type + /// Ort::Value instance containing SparseTensor + static Value CreateSparseTensor(const OrtMemoryInfo* info, void* p_data, const Shape& dense_shape, + const Shape& values_shape, ONNXTensorElementDataType type); + + /// + /// This is a simple forwarding method to the below CreateSparseTensor. + /// This helps to specify data type enum in terms of C++ data type. + /// Use CreateSparseTensor + /// + /// numeric data type only. String data enum must be specified explicitly. + /// allocator to use + /// a would be dense shape of the tensor + /// Ort::Value + template + static Value CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape); + + /// + /// Creates an instance of OrtValue containing sparse tensor. The created instance has no data. + /// The data must be supplied by on of the FillSparseTensor() methods that take both non-zero values + /// and indices. The data will be copied into a buffer that would be allocated using the supplied allocator. + /// Use this API to create OrtValues that contain sparse tensors with all supported data types including + /// strings. + /// + /// allocator to use. The allocator lifespan must eclipse that of the resulting OrtValue + /// a would be dense shape of the tensor + /// data type + /// an instance of Ort::Value + static Value CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape, ONNXTensorElementDataType type); + +#endif // !defined(DISABLE_SPARSE_TENSORS) +}; + +/// +/// Represents native memory allocation coming from one of the +/// OrtAllocators registered with OnnxRuntime. +/// Use it to wrap an allocation made by an allocator +/// so it can be automatically released when no longer needed. +/// +struct MemoryAllocation { + MemoryAllocation(OrtAllocator* allocator, void* p, size_t size); + ~MemoryAllocation(); + MemoryAllocation(const MemoryAllocation&) = delete; + MemoryAllocation& operator=(const MemoryAllocation&) = delete; + MemoryAllocation(MemoryAllocation&&) noexcept; + MemoryAllocation& operator=(MemoryAllocation&&) noexcept; + + void* get() { return p_; } + size_t size() const { return size_; } + + private: + OrtAllocator* allocator_; + void* p_; + size_t size_; +}; + +namespace detail { +template +struct AllocatorImpl : Base { + using B = Base; + using B::B; + + void* Alloc(size_t size); + MemoryAllocation GetAllocation(size_t size); + void Free(void* p); + ConstMemoryInfo GetInfo() const; +}; + +} // namespace detail + +/** \brief Wrapper around ::OrtAllocator default instance that is owned by Onnxruntime + * + */ +struct AllocatorWithDefaultOptions : detail::AllocatorImpl> { + explicit AllocatorWithDefaultOptions(std::nullptr_t) {} ///< Convenience to create a class member and then replace with an instance + AllocatorWithDefaultOptions(); +}; + +/** \brief Wrapper around ::OrtAllocator + * + */ +struct Allocator : detail::AllocatorImpl { + explicit Allocator(std::nullptr_t) {} ///< Convenience to create a class member and then replace with an instance + Allocator(const Session& session, const OrtMemoryInfo*); +}; + +using UnownedAllocator = detail::AllocatorImpl>; + +namespace detail { +namespace binding_utils { +// Bring these out of template +std::vector GetOutputNamesHelper(const OrtIoBinding* binding, OrtAllocator*); +std::vector GetOutputValuesHelper(const OrtIoBinding* binding, OrtAllocator*); +} // namespace binding_utils + +template +struct ConstIoBindingImpl : Base { + using B = Base; + using B::B; + + std::vector GetOutputNames() const; + std::vector GetOutputNames(OrtAllocator*) const; + std::vector GetOutputValues() const; + std::vector GetOutputValues(OrtAllocator*) const; +}; + +template +struct IoBindingImpl : ConstIoBindingImpl { + using B = ConstIoBindingImpl; + using B::B; + + void BindInput(const char* name, const Value&); + void BindOutput(const char* name, const Value&); + void BindOutput(const char* name, const OrtMemoryInfo*); + void ClearBoundInputs(); + void ClearBoundOutputs(); + void SynchronizeInputs(); + void SynchronizeOutputs(); +}; + +} // namespace detail + +using ConstIoBinding = detail::ConstIoBindingImpl>; +using UnownedIoBinding = detail::IoBindingImpl>; + +/** \brief Wrapper around ::OrtIoBinding + * + */ +struct IoBinding : detail::IoBindingImpl { + explicit IoBinding(std::nullptr_t) {} ///< Create an empty object for convenience. Sometimes, we want to initialize members later. + explicit IoBinding(Session& session); + ConstIoBinding GetConst() const { return ConstIoBinding{this->p_}; } + UnownedIoBinding GetUnowned() const { return UnownedIoBinding{this->p_}; } +}; + +/*! \struct Ort::ArenaCfg + * \brief it is a structure that represents the configuration of an arena based allocator + * \details Please see docs/C_API.md for details + */ +struct ArenaCfg : detail::Base { + explicit ArenaCfg(std::nullptr_t) {} ///< Create an empty ArenaCfg object, must be assigned a valid one to be used + /** + * Wraps OrtApi::CreateArenaCfg + * \param max_mem - use 0 to allow ORT to choose the default + * \param arena_extend_strategy - use -1 to allow ORT to choose the default, 0 = kNextPowerOfTwo, 1 = kSameAsRequested + * \param initial_chunk_size_bytes - use -1 to allow ORT to choose the default + * \param max_dead_bytes_per_chunk - use -1 to allow ORT to choose the default + * See docs/C_API.md for details on what the following parameters mean and how to choose these values + */ + ArenaCfg(size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, int max_dead_bytes_per_chunk); +}; + +// +// Custom OPs (only needed to implement custom OPs) +// + +/// +/// This struct provides life time management for custom op attribute +/// +struct OpAttr : detail::Base { + OpAttr(const char* name, const void* data, int len, OrtOpAttrType type); +}; + +/** + * Macro that logs a message using the provided logger. Throws an exception if OrtApi::Logger_LogMessage fails. + * Example: ORT_CXX_LOG(logger, ORT_LOGGING_LEVEL_INFO, "Log a message"); + * + * \param logger The Ort::Logger instance to use. Must be a value or reference. + * \param message_severity The logging severity level of the message. + * \param message A null-terminated UTF-8 message to log. + */ +#define ORT_CXX_LOG(logger, message_severity, message) \ + do { \ + if (message_severity >= logger.GetLoggingSeverityLevel()) { \ + Ort::ThrowOnError(logger.LogMessage(message_severity, ORT_FILE, __LINE__, \ + static_cast(__FUNCTION__), message)); \ + } \ + } while (false) + +/** + * Macro that logs a message using the provided logger. Can be used in noexcept code since errors are silently ignored. + * Example: ORT_CXX_LOG_NOEXCEPT(logger, ORT_LOGGING_LEVEL_INFO, "Log a message"); + * + * \param logger The Ort::Logger instance to use. Must be a value or reference. + * \param message_severity The logging severity level of the message. + * \param message A null-terminated UTF-8 message to log. + */ +#define ORT_CXX_LOG_NOEXCEPT(logger, message_severity, message) \ + do { \ + if (message_severity >= logger.GetLoggingSeverityLevel()) { \ + static_cast(logger.LogMessage(message_severity, ORT_FILE, __LINE__, \ + static_cast(__FUNCTION__), message)); \ + } \ + } while (false) + +/** + * Macro that logs a printf-like formatted message using the provided logger. Throws an exception if + * OrtApi::Logger_LogMessage fails or if a formatting error occurs. + * Example: ORT_CXX_LOGF(logger, ORT_LOGGING_LEVEL_INFO, "Log an int: %d", 12); + * + * \param logger The Ort::Logger instance to use. Must be a value or reference. + * \param message_severity The logging severity level of the message. + * \param format A null-terminated UTF-8 format string forwarded to a printf-like function. + * Refer to https://en.cppreference.com/w/cpp/io/c/fprintf for information on valid formats. + * \param ... Zero or more variadic arguments referenced by the format string. + */ +#define ORT_CXX_LOGF(logger, message_severity, /*format,*/...) \ + do { \ + if (message_severity >= logger.GetLoggingSeverityLevel()) { \ + Ort::ThrowOnError(logger.LogFormattedMessage(message_severity, ORT_FILE, __LINE__, \ + static_cast(__FUNCTION__), __VA_ARGS__)); \ + } \ + } while (false) + +/** + * Macro that logs a printf-like formatted message using the provided logger. Can be used in noexcept code since errors + * are silently ignored. + * Example: ORT_CXX_LOGF_NOEXCEPT(logger, ORT_LOGGING_LEVEL_INFO, "Log an int: %d", 12); + * + * \param logger The Ort::Logger instance to use. Must be a value or reference. + * \param message_severity The logging severity level of the message. + * \param format A null-terminated UTF-8 format string forwarded to a printf-like function. + * Refer to https://en.cppreference.com/w/cpp/io/c/fprintf for information on valid formats. + * \param ... Zero or more variadic arguments referenced by the format string. + */ +#define ORT_CXX_LOGF_NOEXCEPT(logger, message_severity, /*format,*/...) \ + do { \ + if (message_severity >= logger.GetLoggingSeverityLevel()) { \ + static_cast(logger.LogFormattedMessage(message_severity, ORT_FILE, __LINE__, \ + static_cast(__FUNCTION__), __VA_ARGS__)); \ + } \ + } while (false) + +/// +/// This class represents an ONNX Runtime logger that can be used to log information with an +/// associated severity level and source code location (file path, line number, function name). +/// +/// A Logger can be obtained from within custom operators by calling Ort::KernelInfo::GetLogger(). +/// Instances of Ort::Logger are the size of two pointers and can be passed by value. +/// +/// Use the ORT_CXX_LOG macros to ensure the source code location is set properly from the callsite +/// and to take advantage of a cached logging severity level that can bypass calls to the underlying C API. +/// +struct Logger { + /** + * Creates an empty Ort::Logger. Must be initialized from a valid Ort::Logger before use. + */ + Logger() = default; + + /** + * Creates an empty Ort::Logger. Must be initialized from a valid Ort::Logger before use. + */ + explicit Logger(std::nullptr_t) {} + + /** + * Creates a logger from an ::OrtLogger instance. Caches the logger's current severity level by calling + * OrtApi::Logger_GetLoggingSeverityLevel. Throws an exception if OrtApi::Logger_GetLoggingSeverityLevel fails. + * + * \param logger The ::OrtLogger to wrap. + */ + explicit Logger(const OrtLogger* logger); + + ~Logger() = default; + + Logger(const Logger&) = default; + Logger& operator=(const Logger&) = default; + + Logger(Logger&& v) noexcept = default; + Logger& operator=(Logger&& v) noexcept = default; + + /** + * Returns the logger's current severity level from the cached member. + * + * \return The current ::OrtLoggingLevel. + */ + OrtLoggingLevel GetLoggingSeverityLevel() const noexcept; + + /** + * Logs the provided message via OrtApi::Logger_LogMessage. Use the ORT_CXX_LOG or ORT_CXX_LOG_NOEXCEPT + * macros to properly set the source code location and to use the cached severity level to potentially bypass + * calls to the underlying C API. + * + * \param log_severity_level The message's logging severity level. + * \param file_path The filepath of the file in which the message is logged. Usually the value of ORT_FILE. + * \param line_number The file line number in which the message is logged. Usually the value of __LINE__. + * \param func_name The name of the function in which the message is logged. Usually the value of __FUNCTION__. + * \param message The message to log. + * \return A Ort::Status value to indicate error or success. + */ + Status LogMessage(OrtLoggingLevel log_severity_level, const ORTCHAR_T* file_path, int line_number, + const char* func_name, const char* message) const noexcept; + + /** + * Logs a printf-like formatted message via OrtApi::Logger_LogMessage. Use the ORT_CXX_LOGF or ORT_CXX_LOGF_NOEXCEPT + * macros to properly set the source code location and to use the cached severity level to potentially bypass + * calls to the underlying C API. Returns an error status if a formatting error occurs. + * + * \param log_severity_level The message's logging severity level. + * \param file_path The filepath of the file in which the message is logged. Usually the value of ORT_FILE. + * \param line_number The file line number in which the message is logged. Usually the value of __LINE__. + * \param func_name The name of the function in which the message is logged. Usually the value of __FUNCTION__. + * \param format A null-terminated UTF-8 format string forwarded to a printf-like function. + * Refer to https://en.cppreference.com/w/cpp/io/c/fprintf for information on valid formats. + * \param args Zero or more variadic arguments referenced by the format string. + * \return A Ort::Status value to indicate error or success. + */ + template + Status LogFormattedMessage(OrtLoggingLevel log_severity_level, const ORTCHAR_T* file_path, int line_number, + const char* func_name, const char* format, Args&&... args) const noexcept; + + private: + const OrtLogger* logger_{}; + OrtLoggingLevel cached_severity_level_{}; +}; + +/// +/// This class wraps a raw pointer OrtKernelContext* that is being passed +/// to the custom kernel Compute() method. Use it to safely access context +/// attributes, input and output parameters with exception safety guarantees. +/// See usage example in onnxruntime/test/testdata/custom_op_library/custom_op_library.cc +/// +struct KernelContext { + explicit KernelContext(OrtKernelContext* context); + size_t GetInputCount() const; + size_t GetOutputCount() const; + // If input is optional and is not present, the method returns en empty ConstValue + // which can be compared to nullptr. + ConstValue GetInput(size_t index) const; + // If outout is optional and is not present, the method returns en empty UnownedValue + // which can be compared to nullptr. + UnownedValue GetOutput(size_t index, const int64_t* dim_values, size_t dim_count) const; + UnownedValue GetOutput(size_t index, const std::vector& dims) const; + void* GetGPUComputeStream() const; + Logger GetLogger() const; + OrtAllocator* GetAllocator(const OrtMemoryInfo& memory_info) const; + OrtKernelContext* GetOrtKernelContext() const { return ctx_; } + void ParallelFor(void (*fn)(void*, size_t), size_t total, size_t num_batch, void* usr_data) const; + + private: + OrtKernelContext* ctx_; +}; + +struct KernelInfo; + +namespace detail { +namespace attr_utils { +void GetAttr(const OrtKernelInfo* p, const char* name, float&); +void GetAttr(const OrtKernelInfo* p, const char* name, int64_t&); +void GetAttr(const OrtKernelInfo* p, const char* name, std::string&); +void GetAttrs(const OrtKernelInfo* p, const char* name, std::vector&); +void GetAttrs(const OrtKernelInfo* p, const char* name, std::vector&); +} // namespace attr_utils + +template +struct KernelInfoImpl : Base { + using B = Base; + using B::B; + + KernelInfo Copy() const; + + template // R is only implemented for float, int64_t, and string + R GetAttribute(const char* name) const { + R val; + attr_utils::GetAttr(this->p_, name, val); + return val; + } + + template // R is only implemented for std::vector, std::vector + std::vector GetAttributes(const char* name) const { + std::vector result; + attr_utils::GetAttrs(this->p_, name, result); + return result; + } + + Value GetTensorAttribute(const char* name, OrtAllocator* allocator) const; + + size_t GetInputCount() const; + size_t GetOutputCount() const; + + std::string GetInputName(size_t index) const; + std::string GetOutputName(size_t index) const; + + TypeInfo GetInputTypeInfo(size_t index) const; + TypeInfo GetOutputTypeInfo(size_t index) const; + + ConstValue GetTensorConstantInput(size_t index, int* is_constant) const; + + std::string GetNodeName() const; + Logger GetLogger() const; +}; + +} // namespace detail + +using ConstKernelInfo = detail::KernelInfoImpl>; + +/// +/// This struct owns the OrtKernInfo* pointer when a copy is made. +/// For convenient wrapping of OrtKernelInfo* passed to kernel constructor +/// and query attributes, warp the pointer with Ort::Unowned instance +/// so it does not destroy the pointer the kernel does not own. +/// +struct KernelInfo : detail::KernelInfoImpl { + explicit KernelInfo(std::nullptr_t) {} ///< Create an empty instance to initialize later + explicit KernelInfo(OrtKernelInfo* info); ///< Take ownership of the instance + ConstKernelInfo GetConst() const { return ConstKernelInfo{this->p_}; } +}; + +/// +/// Create and own custom defined operation. +/// +struct Op : detail::Base { + explicit Op(std::nullptr_t) {} ///< Create an empty Operator object, must be assigned a valid one to be used + + explicit Op(OrtOp*); ///< Take ownership of the OrtOp + + static Op Create(const OrtKernelInfo* info, const char* op_name, const char* domain, + int version, const char** type_constraint_names, + const ONNXTensorElementDataType* type_constraint_values, + size_t type_constraint_count, + const OpAttr* attr_values, + size_t attr_count, + size_t input_count, size_t output_count); + + void Invoke(const OrtKernelContext* context, + const Value* input_values, + size_t input_count, + Value* output_values, + size_t output_count); + + // For easier refactoring + void Invoke(const OrtKernelContext* context, + const OrtValue* const* input_values, + size_t input_count, + OrtValue* const* output_values, + size_t output_count); +}; + +/// +/// Provide access to per-node attributes and input shapes, so one could compute and set output shapes. +/// +struct ShapeInferContext { + struct SymbolicInteger { + SymbolicInteger(int64_t i) : i_(i), is_int_(true) {}; + SymbolicInteger(const char* s) : s_(s), is_int_(false) {}; + SymbolicInteger(const SymbolicInteger&) = default; + SymbolicInteger(SymbolicInteger&&) = default; + + SymbolicInteger& operator=(const SymbolicInteger&) = default; + SymbolicInteger& operator=(SymbolicInteger&&) = default; + + bool operator==(const SymbolicInteger& dim) const { + if (is_int_ == dim.is_int_) { + if (is_int_) { + return i_ == dim.i_; + } else { + return std::string{s_} == std::string{dim.s_}; + } + } + return false; + } + + bool IsInt() const { return is_int_; } + int64_t AsInt() const { return i_; } + const char* AsSym() const { return s_; } + + static constexpr int INVALID_INT_DIM = -2; + + private: + union { + int64_t i_; + const char* s_; + }; + bool is_int_; + }; + + using Shape = std::vector; + + ShapeInferContext(const OrtApi* ort_api, OrtShapeInferContext* ctx); + + const Shape& GetInputShape(size_t indice) const { return input_shapes_.at(indice); } + + size_t GetInputCount() const { return input_shapes_.size(); } + + Status SetOutputShape(size_t indice, const Shape& shape, ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT); + + int64_t GetAttrInt(const char* attr_name); + + using Ints = std::vector; + Ints GetAttrInts(const char* attr_name); + + float GetAttrFloat(const char* attr_name); + + using Floats = std::vector; + Floats GetAttrFloats(const char* attr_name); + + std::string GetAttrString(const char* attr_name); + + using Strings = std::vector; + Strings GetAttrStrings(const char* attr_name); + + private: + const OrtOpAttr* GetAttrHdl(const char* attr_name) const; + const OrtApi* ort_api_; + OrtShapeInferContext* ctx_; + std::vector input_shapes_; +}; + +using ShapeInferFn = Ort::Status (*)(Ort::ShapeInferContext&); + +#define MAX_CUSTOM_OP_END_VER (1UL << 31) - 1 + +template +struct CustomOpBase : OrtCustomOp { + CustomOpBase() { + OrtCustomOp::version = ORT_API_VERSION; + OrtCustomOp::GetName = [](const OrtCustomOp* this_) { return static_cast(this_)->GetName(); }; + + OrtCustomOp::GetExecutionProviderType = [](const OrtCustomOp* this_) { return static_cast(this_)->GetExecutionProviderType(); }; + + OrtCustomOp::GetInputTypeCount = [](const OrtCustomOp* this_) { return static_cast(this_)->GetInputTypeCount(); }; + OrtCustomOp::GetInputType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputType(index); }; + OrtCustomOp::GetInputMemoryType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputMemoryType(index); }; + + OrtCustomOp::GetOutputTypeCount = [](const OrtCustomOp* this_) { return static_cast(this_)->GetOutputTypeCount(); }; + OrtCustomOp::GetOutputType = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetOutputType(index); }; + +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(push) +#pragma warning(disable : 26409) +#endif + OrtCustomOp::KernelDestroy = [](void* op_kernel) { delete static_cast(op_kernel); }; +#if defined(_MSC_VER) && !defined(__clang__) +#pragma warning(pop) +#endif + OrtCustomOp::GetInputCharacteristic = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetInputCharacteristic(index); }; + OrtCustomOp::GetOutputCharacteristic = [](const OrtCustomOp* this_, size_t index) { return static_cast(this_)->GetOutputCharacteristic(index); }; + + OrtCustomOp::GetVariadicInputMinArity = [](const OrtCustomOp* this_) { return static_cast(this_)->GetVariadicInputMinArity(); }; + OrtCustomOp::GetVariadicInputHomogeneity = [](const OrtCustomOp* this_) { return static_cast(static_cast(this_)->GetVariadicInputHomogeneity()); }; + OrtCustomOp::GetVariadicOutputMinArity = [](const OrtCustomOp* this_) { return static_cast(this_)->GetVariadicOutputMinArity(); }; + OrtCustomOp::GetVariadicOutputHomogeneity = [](const OrtCustomOp* this_) { return static_cast(static_cast(this_)->GetVariadicOutputHomogeneity()); }; +#ifdef __cpp_if_constexpr + if constexpr (WithStatus) { +#else + if (WithStatus) { +#endif + OrtCustomOp::CreateKernelV2 = [](const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info, void** op_kernel) -> OrtStatusPtr { + return static_cast(this_)->CreateKernelV2(*api, info, op_kernel); + }; + OrtCustomOp::KernelComputeV2 = [](void* op_kernel, OrtKernelContext* context) -> OrtStatusPtr { + return static_cast(op_kernel)->ComputeV2(context); + }; + } else { + OrtCustomOp::CreateKernelV2 = nullptr; + OrtCustomOp::KernelComputeV2 = nullptr; + + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* api, const OrtKernelInfo* info) { return static_cast(this_)->CreateKernel(*api, info); }; + OrtCustomOp::KernelCompute = [](void* op_kernel, OrtKernelContext* context) { + static_cast(op_kernel)->Compute(context); + }; + } + + SetShapeInferFn(0); + + OrtCustomOp::GetStartVersion = [](const OrtCustomOp* this_) { + return static_cast(this_)->start_ver_; + }; + + OrtCustomOp::GetEndVersion = [](const OrtCustomOp* this_) { + return static_cast(this_)->end_ver_; + }; + + OrtCustomOp::GetMayInplace = nullptr; + OrtCustomOp::ReleaseMayInplace = nullptr; + OrtCustomOp::GetAliasMap = nullptr; + OrtCustomOp::ReleaseAliasMap = nullptr; + } + + // Default implementation of GetExecutionProviderType that returns nullptr to default to the CPU provider + const char* GetExecutionProviderType() const { return nullptr; } + + // Default implementations of GetInputCharacteristic() and GetOutputCharacteristic() below + // (inputs and outputs are required by default) + OrtCustomOpInputOutputCharacteristic GetInputCharacteristic(size_t /*index*/) const { + return OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_REQUIRED; + } + + OrtCustomOpInputOutputCharacteristic GetOutputCharacteristic(size_t /*index*/) const { + return OrtCustomOpInputOutputCharacteristic::INPUT_OUTPUT_REQUIRED; + } + + // Default implemention of GetInputMemoryType() that returns OrtMemTypeDefault + OrtMemType GetInputMemoryType(size_t /*index*/) const { + return OrtMemTypeDefault; + } + + // Default implementation of GetVariadicInputMinArity() returns 1 to specify that a variadic input + // should expect at least 1 argument. + int GetVariadicInputMinArity() const { + return 1; + } + + // Default implementation of GetVariadicInputHomegeneity() returns true to specify that all arguments + // to a variadic input should be of the same type. + bool GetVariadicInputHomogeneity() const { + return true; + } + + // Default implementation of GetVariadicOutputMinArity() returns 1 to specify that a variadic output + // should produce at least 1 output value. + int GetVariadicOutputMinArity() const { + return 1; + } + + // Default implementation of GetVariadicOutputHomegeneity() returns true to specify that all output values + // produced by a variadic output should be of the same type. + bool GetVariadicOutputHomogeneity() const { + return true; + } + + // Declare list of session config entries used by this Custom Op. + // Implement this function in order to get configs from CustomOpBase::GetSessionConfigs(). + // This default implementation returns an empty vector of config entries. + std::vector GetSessionConfigKeys() const { + return std::vector{}; + } + + template + decltype(&C::InferOutputShape) SetShapeInferFn(decltype(&C::InferOutputShape)) { + OrtCustomOp::InferOutputShapeFn = [](const OrtCustomOp*, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr { + ShapeInferContext ctx(&GetApi(), ort_ctx); + return C::InferOutputShape(ctx); + }; + return {}; + } + + template + void SetShapeInferFn(...) { + OrtCustomOp::InferOutputShapeFn = {}; + } + + protected: + // Helper function that returns a map of session config entries specified by CustomOpBase::GetSessionConfigKeys. + void GetSessionConfigs(std::unordered_map& out, ConstSessionOptions options) const; + + int start_ver_ = 1; + int end_ver_ = MAX_CUSTOM_OP_END_VER; +}; + +} // namespace Ort + +#include "onnxruntime_cxx_inline.h" diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_cxx_inline.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_cxx_inline.h new file mode 100644 index 0000000..c38da3e --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_cxx_inline.h @@ -0,0 +1,2170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// Do not include this file directly. Please include "onnxruntime_cxx_api.h" instead. +// If interested in trying out features of the new experimental C++ API, include "experimental_onnxruntime_cxx_api.h" instead. +// +// These are the inline implementations of the C++ header APIs. They're in this separate file as to not clutter +// the main C++ file with implementation details. + +#include +#include +#include +#include + +// Convert OrtStatus to Ort::Status and return +// instead of throwing +#define ORT_CXX_RETURN_ON_API_FAIL(expression) \ + { \ + auto ort_status = (expression); \ + if (ort_status) { \ + return Ort::Status(ort_status); \ + } \ + } + +#ifdef __cpp_if_constexpr +#define ORT_CXX_IF_CONSTEXPR if constexpr +#else +#define ORT_CXX_IF_CONSTEXPR if +#endif + +namespace Ort { + +namespace detail { +inline void ThrowStatus(const Status& st) { + std::string error_message = st.GetErrorMessage(); + OrtErrorCode error_code = st.GetErrorCode(); + ORT_CXX_API_THROW(std::move(error_message), error_code); +} +} // namespace detail + +inline void ThrowOnError(OrtStatus* ort_status) { + if (ort_status) { + Ort::Status st(ort_status); + detail::ThrowStatus(st); + } +} + +inline void ThrowOnError(const Status& st) { + if (st) { + detail::ThrowStatus(st); + } +} + +inline Status::Status(OrtStatus* status) noexcept : Base{status} { +} + +inline Status::Status(const std::exception& e) noexcept { + p_ = GetApi().CreateStatus(ORT_FAIL, e.what()); +} + +inline Status::Status(const Exception& e) noexcept { + p_ = GetApi().CreateStatus(e.GetOrtErrorCode(), e.what()); +} + +inline Status::Status(const char* message, OrtErrorCode code) noexcept { + p_ = GetApi().CreateStatus(code, message); +} + +inline std::string Status::GetErrorMessage() const { + std::string message(GetApi().GetErrorMessage(p_)); + return message; +} + +inline OrtErrorCode Status::GetErrorCode() const { + return GetApi().GetErrorCode(p_); +} + +inline bool Status::IsOK() const noexcept { + return (p_ == nullptr); +} + +// This template converts a C++ type into it's ONNXTensorElementDataType +template +struct TypeToTensorType; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL; +}; + +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2; +}; +template <> +struct TypeToTensorType { + static constexpr ONNXTensorElementDataType type = ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ; +}; + +inline bool BFloat16_t::operator==(const BFloat16_t& rhs) const noexcept { + if (IsNaN() || rhs.IsNaN()) { + // IEEE defines that NaN is not equal to anything, including itself. + return false; + } + return val == rhs.val; +} + +inline bool BFloat16_t::operator<(const BFloat16_t& rhs) const noexcept { + if (IsNaN() || rhs.IsNaN()) { + // IEEE defines that NaN is unordered with respect to everything, including itself. + return false; + } + + const bool left_is_negative = IsNegative(); + if (left_is_negative != rhs.IsNegative()) { + // When the signs of left and right differ, we know that left is less than right if it is + // the negative value. The exception to this is if both values are zero, in which case IEEE + // says they should be equal, even if the signs differ. + return left_is_negative && !AreZero(*this, rhs); + } + return (val != rhs.val) && ((val < rhs.val) ^ left_is_negative); +} + +inline MemoryAllocation::MemoryAllocation(OrtAllocator* allocator, void* p, size_t size) + : allocator_(allocator), p_(p), size_(size) { +} + +inline MemoryAllocation::~MemoryAllocation() { + if (p_ != nullptr) { + // We do not throw out of destructor + auto ret = GetApi().AllocatorFree(allocator_, p_); + static_cast(ret); + } +} + +inline MemoryAllocation::MemoryAllocation(MemoryAllocation&& o) noexcept : allocator_(nullptr), p_(nullptr), size_(0) { + *this = std::move(o); +} + +inline MemoryAllocation& MemoryAllocation::operator=(MemoryAllocation&& o) noexcept { + OrtAllocator* alloc = nullptr; + void* p = nullptr; + size_t sz = 0; + + // Swap out this + std::swap(alloc, allocator_); + std::swap(p, p_); + std::swap(sz, size_); + + // Swap with incoming + std::swap(allocator_, o.allocator_); + std::swap(p_, o.p_); + std::swap(size_, o.size_); + + // Destroy this instance if needed + MemoryAllocation this_alloc(alloc, p, sz); + return *this; +} + +namespace detail { + +template +inline void* AllocatorImpl::Alloc(size_t size) { + void* out; + ThrowOnError(GetApi().AllocatorAlloc(this->p_, size, &out)); + return out; +} + +template +inline MemoryAllocation AllocatorImpl::GetAllocation(size_t size) { + void* out; + ThrowOnError(GetApi().AllocatorAlloc(this->p_, size, &out)); + MemoryAllocation result(this->p_, out, size); + return result; +} + +template +inline void AllocatorImpl::Free(void* p) { + ThrowOnError(GetApi().AllocatorFree(this->p_, p)); +} + +template +inline ConstMemoryInfo AllocatorImpl::GetInfo() const { + const OrtMemoryInfo* out; + ThrowOnError(GetApi().AllocatorGetInfo(this->p_, &out)); + return ConstMemoryInfo{out}; +} + +} // namespace detail + +inline AllocatorWithDefaultOptions::AllocatorWithDefaultOptions() { + ThrowOnError(GetApi().GetAllocatorWithDefaultOptions(&this->p_)); +} + +inline Allocator::Allocator(const Session& sess, const OrtMemoryInfo* mem_info) { + ThrowOnError(GetApi().CreateAllocator(sess, mem_info, &this->p_)); +} + +namespace detail { + +template +inline std::string MemoryInfoImpl::GetAllocatorName() const { + const char* name = nullptr; + ThrowOnError(GetApi().MemoryInfoGetName(this->p_, &name)); + return std::string(name); +} + +template +inline OrtAllocatorType MemoryInfoImpl::GetAllocatorType() const { + OrtAllocatorType type; + ThrowOnError(GetApi().MemoryInfoGetType(this->p_, &type)); + return type; +} + +template +inline int MemoryInfoImpl::GetDeviceId() const { + int id = 0; + ThrowOnError(GetApi().MemoryInfoGetId(this->p_, &id)); + return id; +} + +template +inline OrtMemoryInfoDeviceType MemoryInfoImpl::GetDeviceType() const { + OrtMemoryInfoDeviceType type; + GetApi().MemoryInfoGetDeviceType(this->p_, &type); + return type; +} + +template +inline OrtMemType MemoryInfoImpl::GetMemoryType() const { + OrtMemType type; + ThrowOnError(GetApi().MemoryInfoGetMemType(this->p_, &type)); + return type; +} + +template +template +inline bool MemoryInfoImpl::operator==(const MemoryInfoImpl& o) const { + int comp_result = 0; + ThrowOnError(Ort::GetApi().CompareMemoryInfo(this->p_, o, &comp_result)); + return comp_result == 0; +} + +} // namespace detail + +inline MemoryInfo MemoryInfo::CreateCpu(OrtAllocatorType type, OrtMemType mem_type) { + OrtMemoryInfo* p; + ThrowOnError(GetApi().CreateCpuMemoryInfo(type, mem_type, &p)); + return MemoryInfo(p); +} + +inline MemoryInfo::MemoryInfo(const char* name, OrtAllocatorType type, int id, OrtMemType mem_type) { + ThrowOnError(GetApi().CreateMemoryInfo(name, type, id, mem_type, &this->p_)); +} + +namespace detail { +template +inline std::vector ConstIoBindingImpl::GetOutputNames() const { + AllocatorWithDefaultOptions allocator; + return binding_utils::GetOutputNamesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputNames(OrtAllocator* allocator) const { + return binding_utils::GetOutputNamesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputValues() const { + AllocatorWithDefaultOptions allocator; + return binding_utils::GetOutputValuesHelper(this->p_, allocator); +} + +template +inline std::vector ConstIoBindingImpl::GetOutputValues(OrtAllocator* allocator) const { + return binding_utils::GetOutputValuesHelper(this->p_, allocator); +} + +template +inline void IoBindingImpl::BindInput(const char* name, const Value& value) { + ThrowOnError(GetApi().BindInput(this->p_, name, value)); +} + +template +inline void IoBindingImpl::BindOutput(const char* name, const Value& value) { + ThrowOnError(GetApi().BindOutput(this->p_, name, value)); +} + +template +inline void IoBindingImpl::BindOutput(const char* name, const OrtMemoryInfo* mem_info) { + ThrowOnError(GetApi().BindOutputToDevice(this->p_, name, mem_info)); +} + +template +inline void IoBindingImpl::ClearBoundInputs() { + GetApi().ClearBoundInputs(this->p_); +} + +template +inline void IoBindingImpl::ClearBoundOutputs() { + GetApi().ClearBoundOutputs(this->p_); +} + +template +inline void IoBindingImpl::SynchronizeInputs() { + ThrowOnError(GetApi().SynchronizeBoundInputs(this->p_)); +} + +template +inline void IoBindingImpl::SynchronizeOutputs() { + ThrowOnError(GetApi().SynchronizeBoundOutputs(this->p_)); +} + +namespace binding_utils { +inline std::vector GetOutputNamesHelper(const OrtIoBinding* binding, OrtAllocator* allocator) { + std::vector result; + auto free_fn = detail::AllocatedFree(allocator); + using Ptr = std::unique_ptr; + + char* buffer = nullptr; + size_t* lengths = nullptr; + size_t count = 0; + ThrowOnError(GetApi().GetBoundOutputNames(binding, allocator, &buffer, &lengths, &count)); + + if (count == 0) { + return result; + } + + Ptr buffer_g(buffer, free_fn); + Ptr lengths_g(lengths, free_fn); + + result.reserve(count); + for (size_t i = 0; i < count; ++i) { + auto sz = *lengths; + result.emplace_back(buffer, sz); + buffer += sz; + ++lengths; + } + return result; +} + +inline std::vector GetOutputValuesHelper(const OrtIoBinding* binding, OrtAllocator* allocator) { + std::vector result; + size_t owned = 0; + size_t output_count = 0; + // Lambda to release the buffer when no longer needed and + // make sure that we destroy all instances on exception + auto free_fn = [&owned, &output_count, allocator](OrtValue** buffer) { + if (buffer) { + while (owned < output_count) { + auto* p = buffer + owned++; + GetApi().ReleaseValue(*p); + } + allocator->Free(allocator, buffer); + } + }; + using Ptr = std::unique_ptr; + + OrtValue** output_buffer = nullptr; + ThrowOnError(GetApi().GetBoundOutputValues(binding, allocator, &output_buffer, &output_count)); + if (output_count == 0) { + return result; + } + + Ptr buffer_g(output_buffer, free_fn); + + result.reserve(output_count); + for (size_t i = 0; i < output_count; ++i) { + result.emplace_back(output_buffer[i]); + ++owned; + } + return result; +} + +} // namespace binding_utils +} // namespace detail + +inline IoBinding::IoBinding(Session& session) { + ThrowOnError(GetApi().CreateIoBinding(session, &this->p_)); +} + +inline ArenaCfg::ArenaCfg(size_t max_mem, int arena_extend_strategy, int initial_chunk_size_bytes, int max_dead_bytes_per_chunk) { + ThrowOnError(GetApi().CreateArenaCfg(max_mem, arena_extend_strategy, initial_chunk_size_bytes, max_dead_bytes_per_chunk, &p_)); +} + +inline ThreadingOptions::ThreadingOptions() { + ThrowOnError(GetApi().CreateThreadingOptions(&p_)); +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalIntraOpNumThreads(int intra_op_num_threads) { + ThrowOnError(GetApi().SetGlobalIntraOpNumThreads(p_, intra_op_num_threads)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalInterOpNumThreads(int inter_op_num_threads) { + ThrowOnError(GetApi().SetGlobalInterOpNumThreads(p_, inter_op_num_threads)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalSpinControl(int allow_spinning) { + ThrowOnError(GetApi().SetGlobalSpinControl(p_, allow_spinning)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalDenormalAsZero() { + ThrowOnError(GetApi().SetGlobalDenormalAsZero(p_)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn) { + ThrowOnError(GetApi().SetGlobalCustomCreateThreadFn(p_, ort_custom_create_thread_fn)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomThreadCreationOptions(void* ort_custom_thread_creation_options) { + ThrowOnError(GetApi().SetGlobalCustomThreadCreationOptions(p_, ort_custom_thread_creation_options)); + return *this; +} + +inline ThreadingOptions& ThreadingOptions::SetGlobalCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn) { + ThrowOnError(GetApi().SetGlobalCustomJoinThreadFn(p_, ort_custom_join_thread_fn)); + return *this; +} + +inline Env::Env(OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnv(logging_level, logid, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(OrtLoggingLevel logging_level, const char* logid, OrtLoggingFunction logging_function, void* logger_param) { + ThrowOnError(GetApi().CreateEnvWithCustomLogger(logging_function, logger_param, logging_level, logid, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(const OrtThreadingOptions* tp_options, OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnvWithGlobalThreadPools(logging_level, logid, tp_options, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env::Env(const OrtThreadingOptions* tp_options, OrtLoggingFunction logging_function, void* logger_param, + OrtLoggingLevel logging_level, _In_ const char* logid) { + ThrowOnError(GetApi().CreateEnvWithCustomLoggerAndGlobalThreadPools(logging_function, logger_param, logging_level, logid, tp_options, &p_)); + if (strcmp(logid, "onnxruntime-node") == 0) { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_NODEJS)); + } else { + ThrowOnError(GetApi().SetLanguageProjection(p_, OrtLanguageProjection::ORT_PROJECTION_CPLUSPLUS)); + } +} + +inline Env& Env::EnableTelemetryEvents() { + ThrowOnError(GetApi().EnableTelemetryEvents(p_)); + return *this; +} + +inline Env& Env::DisableTelemetryEvents() { + ThrowOnError(GetApi().DisableTelemetryEvents(p_)); + return *this; +} + +inline Env& Env::UpdateEnvWithCustomLogLevel(OrtLoggingLevel log_severity_level) { + ThrowOnError(GetApi().UpdateEnvWithCustomLogLevel(p_, log_severity_level)); + return *this; +} + +inline Env& Env::CreateAndRegisterAllocator(const OrtMemoryInfo* mem_info, const OrtArenaCfg* arena_cfg) { + ThrowOnError(GetApi().CreateAndRegisterAllocator(p_, mem_info, arena_cfg)); + return *this; +} + +inline Env& Env::CreateAndRegisterAllocatorV2(const std::string& provider_type, const OrtMemoryInfo* mem_info, const std::unordered_map& options, const OrtArenaCfg* arena_cfg) { + std::vector keys, values; + auto num_entries = options.size(); + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + for (const auto& entry : options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + ThrowOnError(GetApi().CreateAndRegisterAllocatorV2(p_, provider_type.c_str(), mem_info, arena_cfg, keys.data(), values.data(), num_entries)); + return *this; +} + +inline CustomOpDomain::CustomOpDomain(const char* domain) { + ThrowOnError(GetApi().CreateCustomOpDomain(domain, &p_)); +} + +inline void CustomOpDomain::Add(const OrtCustomOp* op) { + ThrowOnError(GetApi().CustomOpDomain_Add(p_, op)); +} + +inline LoraAdapter LoraAdapter::CreateLoraAdapter(const std::basic_string& adapter_path, + OrtAllocator* allocator) { + OrtLoraAdapter* p; + ThrowOnError(GetApi().CreateLoraAdapter(adapter_path.c_str(), allocator, &p)); + return LoraAdapter{p}; +} + +inline LoraAdapter LoraAdapter::CreateLoraAdapterFromArray(const void* bytes, size_t num_bytes, + OrtAllocator* allocator) { + OrtLoraAdapter* p; + ThrowOnError(GetApi().CreateLoraAdapterFromArray(bytes, num_bytes, allocator, &p)); + return LoraAdapter{p}; +} + +inline RunOptions::RunOptions() { + ThrowOnError(GetApi().CreateRunOptions(&p_)); +} + +inline RunOptions& RunOptions::SetRunLogVerbosityLevel(int level) { + ThrowOnError(GetApi().RunOptionsSetRunLogVerbosityLevel(p_, level)); + return *this; +} + +inline RunOptions& RunOptions::SetRunLogSeverityLevel(int level) { + ThrowOnError(GetApi().RunOptionsSetRunLogSeverityLevel(p_, level)); + return *this; +} + +inline int RunOptions::GetRunLogVerbosityLevel() const { + int out; + ThrowOnError(GetApi().RunOptionsGetRunLogVerbosityLevel(p_, &out)); + return out; +} + +inline int RunOptions::GetRunLogSeverityLevel() const { + int out; + ThrowOnError(GetApi().RunOptionsGetRunLogSeverityLevel(p_, &out)); + return out; +} + +inline RunOptions& RunOptions::SetRunTag(const char* run_tag) { + ThrowOnError(GetApi().RunOptionsSetRunTag(p_, run_tag)); + return *this; +} + +inline const char* RunOptions::GetRunTag() const { + const char* out; + ThrowOnError(GetApi().RunOptionsGetRunTag(p_, &out)); + return out; +} + +inline RunOptions& RunOptions::AddConfigEntry(const char* config_key, const char* config_value) { + ThrowOnError(GetApi().AddRunConfigEntry(p_, config_key, config_value)); + return *this; +} + +inline RunOptions& RunOptions::SetTerminate() { + ThrowOnError(GetApi().RunOptionsSetTerminate(p_)); + return *this; +} + +inline RunOptions& RunOptions::UnsetTerminate() { + ThrowOnError(GetApi().RunOptionsUnsetTerminate(p_)); + return *this; +} + +inline RunOptions& RunOptions::AddActiveLoraAdapter(const LoraAdapter& adapter) { + ThrowOnError(GetApi().RunOptionsAddActiveLoraAdapter(p_, adapter)); + return *this; +} + +namespace detail { + +template +inline Ort::SessionOptions ConstSessionOptionsImpl::Clone() const { + OrtSessionOptions* out; + ThrowOnError(GetApi().CloneSessionOptions(this->p_, &out)); + return SessionOptions{out}; +} + +template +inline std::string ConstSessionOptionsImpl::GetConfigEntry(const char* config_key) const { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().GetSessionConfigEntry(this->p_, config_key, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().GetSessionConfigEntry(this->p_, config_key, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline bool ConstSessionOptionsImpl::HasConfigEntry(const char* config_key) const { + int out = 0; + Ort::ThrowOnError(GetApi().HasSessionConfigEntry(this->p_, config_key, &out)); + return static_cast(out); +} + +template +inline std::string ConstSessionOptionsImpl::GetConfigEntryOrDefault(const char* config_key, const std::string& def) { + if (!this->HasConfigEntry(config_key)) { + return def; + } + + return this->GetConfigEntry(config_key); +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetIntraOpNumThreads(int intra_op_num_threads) { + ThrowOnError(GetApi().SetIntraOpNumThreads(this->p_, intra_op_num_threads)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetInterOpNumThreads(int inter_op_num_threads) { + ThrowOnError(GetApi().SetInterOpNumThreads(this->p_, inter_op_num_threads)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetGraphOptimizationLevel(GraphOptimizationLevel graph_optimization_level) { + ThrowOnError(GetApi().SetSessionGraphOptimizationLevel(this->p_, graph_optimization_level)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetDeterministicCompute(bool value) { + ThrowOnError(GetApi().SetDeterministicCompute(this->p_, value)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetOptimizedModelFilePath(const ORTCHAR_T* optimized_model_filepath) { + ThrowOnError(GetApi().SetOptimizedModelFilePath(this->p_, optimized_model_filepath)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableProfiling(const ORTCHAR_T* profile_file_prefix) { + ThrowOnError(GetApi().EnableProfiling(this->p_, profile_file_prefix)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableProfiling() { + ThrowOnError(GetApi().DisableProfiling(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableOrtCustomOps() { + ThrowOnError(GetApi().EnableOrtCustomOps(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableMemPattern() { + ThrowOnError(GetApi().EnableMemPattern(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableMemPattern() { + ThrowOnError(GetApi().DisableMemPattern(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::EnableCpuMemArena() { + ThrowOnError(GetApi().EnableCpuMemArena(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisableCpuMemArena() { + ThrowOnError(GetApi().DisableCpuMemArena(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetExecutionMode(ExecutionMode execution_mode) { + ThrowOnError(GetApi().SetSessionExecutionMode(this->p_, execution_mode)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetLogId(const char* logid) { + ThrowOnError(GetApi().SetSessionLogId(this->p_, logid)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetLogSeverityLevel(int level) { + ThrowOnError(GetApi().SetSessionLogSeverityLevel(this->p_, level)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::Add(OrtCustomOpDomain* custom_op_domain) { + ThrowOnError(GetApi().AddCustomOpDomain(this->p_, custom_op_domain)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddConfigEntry(const char* config_key, const char* config_value) { + ThrowOnError(GetApi().AddSessionConfigEntry(this->p_, config_key, config_value)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddInitializer(const char* name, const OrtValue* ort_val) { + ThrowOnError(GetApi().AddInitializer(this->p_, name, ort_val)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::DisablePerSessionThreads() { + ThrowOnError(GetApi().DisablePerSessionThreads(this->p_)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddExternalInitializers(const std::vector& names, + const std::vector& ort_values) { + const size_t inputs_num = names.size(); + if (inputs_num != ort_values.size()) { + ORT_CXX_API_THROW("Expecting names and ort_values to have the same length", ORT_INVALID_ARGUMENT); + } + std::vector names_ptr; + std::vector ort_values_ptrs; + names_ptr.reserve(inputs_num); + ort_values_ptrs.reserve(inputs_num); + for (size_t i = 0; i < inputs_num; ++i) { + names_ptr.push_back(names[i].c_str()); + ort_values_ptrs.push_back(ort_values[i]); + } + ThrowOnError(GetApi().AddExternalInitializers(this->p_, names_ptr.data(), ort_values_ptrs.data(), inputs_num)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AddExternalInitializersFromFilesInMemory(const std::vector>& file_names, + const std::vector& buffer_array, + const std::vector& file_lengths) { + const size_t inputs_num = file_names.size(); + if (inputs_num != buffer_array.size()) { + ORT_CXX_API_THROW("Expecting names and buffer_array to have the same length", ORT_INVALID_ARGUMENT); + } + if (inputs_num != file_lengths.size()) { + ORT_CXX_API_THROW("Expecting names and file_lengths to have the same length", ORT_INVALID_ARGUMENT); + } + std::vector names_ptr; + names_ptr.reserve(inputs_num); + for (size_t i = 0; i < inputs_num; ++i) { + names_ptr.push_back(file_names[i].c_str()); + } + ThrowOnError(GetApi().AddExternalInitializersFromFilesInMemory(this->p_, names_ptr.data(), buffer_array.data(), + file_lengths.data(), inputs_num)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CUDA(const OrtCUDAProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CUDA(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CUDA_V2(const OrtCUDAProviderOptionsV2& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CUDA_V2(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_ROCM(const OrtROCMProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_ROCM(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_TensorRT(const OrtTensorRTProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_TensorRT(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_TensorRT_V2(const OrtTensorRTProviderOptionsV2& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_TensorRT_V2(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_MIGraphX(const OrtMIGraphXProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_MIGraphX(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_CANN(const OrtCANNProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_CANN(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_Dnnl(const OrtDnnlProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_Dnnl(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider( + const std::string& provider_name, + const std::unordered_map& provider_options) { + auto num_entries = provider_options.size(); + std::vector keys, values; + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + + for (const auto& entry : provider_options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider(this->p_, provider_name.c_str(), + keys.data(), values.data(), num_entries)); + + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomCreateThreadFn(OrtCustomCreateThreadFn ort_custom_create_thread_fn) { + ThrowOnError(GetApi().SessionOptionsSetCustomCreateThreadFn(this->p_, ort_custom_create_thread_fn)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomThreadCreationOptions(void* ort_custom_thread_creation_options) { + ThrowOnError(GetApi().SessionOptionsSetCustomThreadCreationOptions(this->p_, ort_custom_thread_creation_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::SetCustomJoinThreadFn(OrtCustomJoinThreadFn ort_custom_join_thread_fn) { + ThrowOnError(GetApi().SessionOptionsSetCustomJoinThreadFn(this->p_, ort_custom_join_thread_fn)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_OpenVINO(const OrtOpenVINOProviderOptions& provider_options) { + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_OpenVINO(this->p_, &provider_options)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_OpenVINO_V2(const std::unordered_map& provider_options) { + auto num_entries = provider_options.size(); + std::vector keys, values; + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + + for (const auto& entry : provider_options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_OpenVINO_V2(this->p_, + keys.data(), values.data(), num_entries)); + + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::AppendExecutionProvider_VitisAI(const std::unordered_map& provider_options) { + auto num_entries = provider_options.size(); + std::vector keys, values; + if (num_entries > 0) { + keys.reserve(num_entries); + values.reserve(num_entries); + + for (const auto& entry : provider_options) { + keys.push_back(entry.first.c_str()); + values.push_back(entry.second.c_str()); + } + } + + ThrowOnError(GetApi().SessionOptionsAppendExecutionProvider_VitisAI(this->p_, keys.data(), values.data(), num_entries)); + + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::RegisterCustomOpsLibrary(const ORTCHAR_T* library_name, + const CustomOpConfigs& custom_op_configs) { + // Add custom op config entries before registering the custom op library. Otherwise, the config entries _may_ be ignored by + // the custom op library. + for (const auto& config_iter : custom_op_configs.GetFlattenedConfigs()) { + AddConfigEntry(config_iter.first.c_str(), config_iter.second.c_str()); + } + + ThrowOnError(GetApi().RegisterCustomOpsLibrary_V2(this->p_, library_name)); + return *this; +} + +template +inline SessionOptionsImpl& SessionOptionsImpl::RegisterCustomOpsUsingFunction(const char* registration_function_name) { + ThrowOnError(GetApi().RegisterCustomOpsUsingFunction(this->p_, registration_function_name)); + return *this; +} + +/// Session +template +inline size_t ConstSessionImpl::GetInputCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetInputCount(this->p_, &out)); + return out; +} + +template +inline size_t ConstSessionImpl::GetOutputCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetOutputCount(this->p_, &out)); + return out; +} + +template +inline size_t ConstSessionImpl::GetOverridableInitializerCount() const { + size_t out; + ThrowOnError(GetApi().SessionGetOverridableInitializerCount(this->p_, &out)); + return out; +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetInputNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetInputName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetOutputNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetOutputName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline AllocatedStringPtr ConstSessionImpl::GetOverridableInitializerNameAllocated(size_t index, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().SessionGetOverridableInitializerName(this->p_, index, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline uint64_t ConstSessionImpl::GetProfilingStartTimeNs() const { + uint64_t out; + ThrowOnError(GetApi().SessionGetProfilingStartTimeNs(this->p_, &out)); + return out; +} + +template +inline ModelMetadata ConstSessionImpl::GetModelMetadata() const { + OrtModelMetadata* out; + ThrowOnError(GetApi().SessionGetModelMetadata(this->p_, &out)); + return ModelMetadata{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetInputTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetInputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetOutputTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetOutputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo ConstSessionImpl::GetOverridableInitializerTypeInfo(size_t index) const { + OrtTypeInfo* out; + ThrowOnError(GetApi().SessionGetOverridableInitializerTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline std::vector SessionImpl::Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, size_t output_count) { + std::vector output_values; + output_values.reserve(output_count); + for (size_t i = 0; i < output_count; i++) + output_values.emplace_back(nullptr); + Run(run_options, input_names, input_values, input_count, output_names, output_values.data(), output_count); + return output_values; +} + +template +inline void SessionImpl::Run(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count) { + static_assert(sizeof(Value) == sizeof(OrtValue*), "Value is really just an array of OrtValue* in memory, so we can reinterpret_cast safely"); + auto ort_input_values = reinterpret_cast(input_values); + auto ort_output_values = reinterpret_cast(output_values); + ThrowOnError(GetApi().Run(this->p_, run_options, input_names, ort_input_values, input_count, output_names, output_count, ort_output_values)); +} + +template +inline void SessionImpl::Run(const RunOptions& run_options, const IoBinding& io_binding) { + ThrowOnError(GetApi().RunWithBinding(this->p_, run_options, io_binding)); +} + +template +inline void SessionImpl::RunAsync(const RunOptions& run_options, const char* const* input_names, const Value* input_values, size_t input_count, + const char* const* output_names, Value* output_values, size_t output_count, RunAsyncCallbackFn callback, void* user_data) { + auto ort_input_values = reinterpret_cast(input_values); + auto ort_output_values = reinterpret_cast(output_values); + ThrowOnError(GetApi().RunAsync(this->p_, run_options, input_names, + ort_input_values, input_count, output_names, output_count, + ort_output_values, callback, user_data)); +} + +template +inline AllocatedStringPtr SessionImpl::EndProfilingAllocated(OrtAllocator* allocator) { + char* out = nullptr; + ThrowOnError(GetApi().SessionEndProfiling(this->p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +template +inline void SessionImpl::SetEpDynamicOptions(const char* const* keys, const char* const* values, size_t kv_len) { + ThrowOnError(GetApi().SetEpDynamicOptions(this->p_, keys, values, kv_len)); +} + +} // namespace detail + +inline SessionOptions::SessionOptions() { + ThrowOnError(GetApi().CreateSessionOptions(&this->p_)); +} + +/// CustomOpConfigs +inline std::string detail::MakeCustomOpConfigEntryKey(const char* custom_op_name, const char* config) { + std::string config_key = "custom_op."; + + config_key += custom_op_name; + config_key += "."; + config_key += config; + + return config_key; +} + +inline CustomOpConfigs& CustomOpConfigs::AddConfig(const char* custom_op_name, const char* config_key, const char* config_value) { + const std::string full_flat_key = detail::MakeCustomOpConfigEntryKey(custom_op_name, config_key); + flat_configs_[full_flat_key] = config_value; + return *this; +} + +inline const std::unordered_map& CustomOpConfigs::GetFlattenedConfigs() const { + return flat_configs_; +} + +inline Session::Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options) { + ThrowOnError(GetApi().CreateSession(env, model_path, options, &this->p_)); +} + +inline Session::Session(const Env& env, const ORTCHAR_T* model_path, const SessionOptions& options, + OrtPrepackedWeightsContainer* prepacked_weights_container) { + ThrowOnError(GetApi().CreateSessionWithPrepackedWeightsContainer(env, model_path, options, prepacked_weights_container, &this->p_)); +} + +inline Session::Session(const Env& env, const void* model_data, size_t model_data_length, const SessionOptions& options) { + ThrowOnError(GetApi().CreateSessionFromArray(env, model_data, model_data_length, options, &this->p_)); +} + +inline Session::Session(const Env& env, const void* model_data, size_t model_data_length, + const SessionOptions& options, OrtPrepackedWeightsContainer* prepacked_weights_container) { + ThrowOnError(GetApi().CreateSessionFromArrayWithPrepackedWeightsContainer(env, model_data, model_data_length, options, + prepacked_weights_container, &this->p_)); +} + +inline AllocatedStringPtr ModelMetadata::GetProducerNameAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetProducerName(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetGraphNameAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetGraphName(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetDomainAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetDomain(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr Ort::ModelMetadata::GetDescriptionAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetDescription(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::GetGraphDescriptionAllocated(OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataGetGraphDescription(p_, allocator, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline AllocatedStringPtr ModelMetadata::LookupCustomMetadataMapAllocated(const char* key, OrtAllocator* allocator) const { + char* out; + ThrowOnError(GetApi().ModelMetadataLookupCustomMetadataMap(p_, allocator, key, &out)); + return AllocatedStringPtr(out, detail::AllocatedFree(allocator)); +} + +inline std::vector ModelMetadata::GetCustomMetadataMapKeysAllocated(OrtAllocator* allocator) const { + auto deletor = detail::AllocatedFree(allocator); + std::vector result; + + char** out = nullptr; + int64_t num_keys = 0; + ThrowOnError(GetApi().ModelMetadataGetCustomMetadataMapKeys(p_, allocator, &out, &num_keys)); + if (num_keys <= 0) { + return result; + } + + // array of pointers will be freed + std::unique_ptr array_guard(out, deletor); + // reserve may throw + auto strings_deletor = [&deletor, num_keys](char** out) { for(int64_t i = 0; i < num_keys; ++i) deletor(out[i]); }; + std::unique_ptr strings_guard(out, strings_deletor); + result.reserve(static_cast(num_keys)); + strings_guard.release(); + for (int64_t i = 0; i < num_keys; ++i) { + result.push_back(AllocatedStringPtr(out[i], deletor)); + } + + return result; +} + +inline int64_t ModelMetadata::GetVersion() const { + int64_t out; + ThrowOnError(GetApi().ModelMetadataGetVersion(p_, &out)); + return out; +} + +namespace detail { + +template +inline ONNXTensorElementDataType TensorTypeAndShapeInfoImpl::GetElementType() const { + ONNXTensorElementDataType out; + ThrowOnError(GetApi().GetTensorElementType(this->p_, &out)); + return out; +} + +template +inline size_t TensorTypeAndShapeInfoImpl::GetElementCount() const { + size_t out; + ThrowOnError(GetApi().GetTensorShapeElementCount(this->p_, &out)); + return static_cast(out); +} + +template +inline size_t TensorTypeAndShapeInfoImpl::GetDimensionsCount() const { + size_t out; + ThrowOnError(GetApi().GetDimensionsCount(this->p_, &out)); + return out; +} + +template +inline void TensorTypeAndShapeInfoImpl::GetDimensions(int64_t* values, size_t values_count) const { + ThrowOnError(GetApi().GetDimensions(this->p_, values, values_count)); +} + +template +inline void TensorTypeAndShapeInfoImpl::GetSymbolicDimensions(const char** values, size_t values_count) const { + ThrowOnError(GetApi().GetSymbolicDimensions(this->p_, values, values_count)); +} + +template +inline std::vector TensorTypeAndShapeInfoImpl::GetShape() const { + std::vector out(GetDimensionsCount(), 0); + ThrowOnError(GetApi().GetDimensions(this->p_, out.data(), out.size())); + return out; +} + +template +inline ConstTensorTypeAndShapeInfo TypeInfoImpl::GetTensorTypeAndShapeInfo() const { + const OrtTensorTypeAndShapeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToTensorInfo(this->p_, &out)); + return ConstTensorTypeAndShapeInfo{out}; +} + +template +inline ConstSequenceTypeInfo TypeInfoImpl::GetSequenceTypeInfo() const { + const OrtSequenceTypeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToSequenceTypeInfo(this->p_, &out)); + return ConstSequenceTypeInfo{out}; +} + +template +inline ConstMapTypeInfo TypeInfoImpl::GetMapTypeInfo() const { + const OrtMapTypeInfo* out; + ThrowOnError(GetApi().CastTypeInfoToMapTypeInfo(this->p_, &out)); + return ConstMapTypeInfo{out}; +} + +template +inline ONNXType TypeInfoImpl::GetONNXType() const { + ONNXType out; + ThrowOnError(GetApi().GetOnnxTypeFromTypeInfo(this->p_, &out)); + return out; +} + +template +inline TypeInfo SequenceTypeInfoImpl::GetSequenceElementType() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetSequenceElementType(this->p_, &output)); + return TypeInfo{output}; +} + +template +inline TypeInfo OptionalTypeInfoImpl::GetOptionalElementType() const { + OrtTypeInfo* info; + ThrowOnError(GetApi().GetOptionalContainedTypeInfo(this->p_, &info)); + return TypeInfo{info}; +} + +template +inline ONNXTensorElementDataType MapTypeInfoImpl::GetMapKeyType() const { + ONNXTensorElementDataType out; + ThrowOnError(GetApi().GetMapKeyType(this->p_, &out)); + return out; +} + +template +inline TypeInfo MapTypeInfoImpl::GetMapValueType() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetMapValueType(this->p_, &output)); + return TypeInfo{output}; +} + +template +inline ConstOptionalTypeInfo TypeInfoImpl::GetOptionalTypeInfo() const { + const OrtOptionalTypeInfo* info; + ThrowOnError(GetApi().CastTypeInfoToOptionalTypeInfo(this->p_, &info)); + return ConstOptionalTypeInfo{info}; +} + +} // namespace detail + +namespace detail { + +template +template +inline void ConstValueImpl::GetOpaqueData(const char* domain, const char* type_name, R& out) const { + ThrowOnError(GetApi().GetOpaqueValue(domain, type_name, this->p_, &out, sizeof(R))); +} + +template +inline bool ConstValueImpl::IsTensor() const { + int out; + ThrowOnError(GetApi().IsTensor(this->p_, &out)); + return out != 0; +} + +template +inline bool ConstValueImpl::HasValue() const { + int out; + ThrowOnError(GetApi().HasValue(this->p_, &out)); + return out != 0; +} + +template +inline size_t ConstValueImpl::GetCount() const { + size_t out; + ThrowOnError(GetApi().GetValueCount(this->p_, &out)); + return out; +} + +template +inline Value ConstValueImpl::GetValue(int index, OrtAllocator* allocator) const { + OrtValue* out; + ThrowOnError(GetApi().GetValue(this->p_, index, allocator, &out)); + return Value{out}; +} + +template +inline size_t ConstValueImpl::GetStringTensorDataLength() const { + size_t out; + ThrowOnError(GetApi().GetStringTensorDataLength(this->p_, &out)); + return out; +} + +template +inline size_t ConstValueImpl::GetStringTensorElementLength(size_t element_index) const { + size_t out; + ThrowOnError(GetApi().GetStringTensorElementLength(this->p_, element_index, &out)); + return out; +} + +template +template +inline const R* ConstValueImpl::GetTensorData() const { + R* out; + ThrowOnError(GetApi().GetTensorMutableData(const_cast(this->p_), (void**)&out)); + return out; +} + +template +inline const void* ConstValueImpl::GetTensorRawData() const { + void* out; + ThrowOnError(GetApi().GetTensorMutableData(const_cast(this->p_), &out)); + return out; +} + +template +inline TypeInfo ConstValueImpl::GetTypeInfo() const { + OrtTypeInfo* output; + ThrowOnError(GetApi().GetTypeInfo(this->p_, &output)); + return TypeInfo{output}; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetTensorTypeAndShapeInfo() const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetTensorTypeAndShape(this->p_, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +inline ConstMemoryInfo ConstValueImpl::GetTensorMemoryInfo() const { + const OrtMemoryInfo* mem_info; + ThrowOnError(GetApi().GetTensorMemoryInfo(this->p_, &mem_info)); + return ConstMemoryInfo(mem_info); +} + +template +inline void ConstValueImpl::GetStringTensorElement(size_t buffer_length, size_t element_index, void* buffer) const { + ThrowOnError(GetApi().GetStringTensorElement(this->p_, buffer_length, element_index, buffer)); +} + +template +inline std::string ConstValueImpl::GetStringTensorElement(size_t element_index) const { + size_t buffer_length; + ThrowOnError(GetApi().GetStringTensorElementLength(this->p_, element_index, &buffer_length)); + + std::string s; + s.resize(buffer_length); + ThrowOnError(GetApi().GetStringTensorElement(this->p_, buffer_length, element_index, &s[0])); + return s; +} + +template +inline void ConstValueImpl::GetStringTensorContent(void* buffer, size_t buffer_length, size_t* offsets, size_t offsets_count) const { + ThrowOnError(GetApi().GetStringTensorContent(this->p_, buffer, buffer_length, offsets, offsets_count)); +} + +#if !defined(DISABLE_SPARSE_TENSORS) +template +inline OrtSparseFormat ConstValueImpl::GetSparseFormat() const { + OrtSparseFormat format; + ThrowOnError(GetApi().GetSparseTensorFormat(this->p_, &format)); + return format; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetSparseTensorValuesTypeAndShapeInfo() const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetSparseTensorValuesTypeAndShape(this->p_, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +inline TensorTypeAndShapeInfo ConstValueImpl::GetSparseTensorIndicesTypeShapeInfo(OrtSparseIndicesFormat indices_format) const { + OrtTensorTypeAndShapeInfo* output; + ThrowOnError(GetApi().GetSparseTensorIndicesTypeShape(this->p_, indices_format, &output)); + return TensorTypeAndShapeInfo{output}; +} + +template +template +inline const R* ConstValueImpl::GetSparseTensorIndicesData(OrtSparseIndicesFormat indices_format, size_t& num_indices) const { + const void* out; + ThrowOnError(GetApi().GetSparseTensorIndices(this->p_, indices_format, &num_indices, &out)); + return reinterpret_cast(out); +} + +template +inline bool ConstValueImpl::IsSparseTensor() const { + int out; + ThrowOnError(GetApi().IsSparseTensor(this->p_, &out)); + return out != 0; +} + +template +template +inline const R* ConstValueImpl::GetSparseTensorValues() const { + const void* out; + ThrowOnError(GetApi().GetSparseTensorValues(this->p_, &out)); + return reinterpret_cast(out); +} + +#endif + +template +void ValueImpl::FillStringTensor(const char* const* s, size_t s_len) { + ThrowOnError(GetApi().FillStringTensor(this->p_, s, s_len)); +} + +template +void ValueImpl::FillStringTensorElement(const char* s, size_t index) { + ThrowOnError(GetApi().FillStringTensorElement(this->p_, s, index)); +} + +template +inline char* ValueImpl::GetResizedStringTensorElementBuffer(size_t index, size_t buffer_length) { + char* result; + ThrowOnError(GetApi().GetResizedStringTensorElementBuffer(this->p_, index, buffer_length, &result)); + return result; +} + +template +void* ValueImpl::GetTensorMutableRawData() { + void* out; + ThrowOnError(GetApi().GetTensorMutableData(this->p_, &out)); + return out; +} + +template +template +R* ValueImpl::GetTensorMutableData() { + R* out; + ThrowOnError(GetApi().GetTensorMutableData(this->p_, (void**)&out)); + return out; +} + +template +template +R& ValueImpl::At(const std::vector& location) { + static_assert(!std::is_same::value, "this api does not support std::string"); + R* out; + ThrowOnError(GetApi().TensorAt(this->p_, location.data(), location.size(), (void**)&out)); + return *out; +} + +#if !defined(DISABLE_SPARSE_TENSORS) +template +void ValueImpl::UseCooIndices(int64_t* indices_data, size_t indices_num) { + ThrowOnError(GetApi().UseCooIndices(this->p_, indices_data, indices_num)); +} + +template +void ValueImpl::UseCsrIndices(int64_t* inner_data, size_t inner_num, int64_t* outer_data, size_t outer_num) { + ThrowOnError(GetApi().UseCsrIndices(this->p_, inner_data, inner_num, outer_data, outer_num)); +} + +template +void ValueImpl::UseBlockSparseIndices(const Shape& indices_shape, int32_t* indices_data) { + ThrowOnError(GetApi().UseBlockSparseIndices(this->p_, indices_shape.shape, indices_shape.shape_len, indices_data)); +} + +template +void ValueImpl::FillSparseTensorCoo(const OrtMemoryInfo* mem_info, const OrtSparseValuesParam& values_param, + const int64_t* indices_data, size_t indices_num) { + ThrowOnError(GetApi().FillSparseTensorCoo(this->p_, mem_info, values_param.values_shape, + values_param.values_shape_len, values_param.data.p_data, + indices_data, indices_num)); +} + +template +void ValueImpl::FillSparseTensorCsr(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const int64_t* inner_indices_data, size_t inner_indices_num, + const int64_t* outer_indices_data, size_t outer_indices_num) { + ThrowOnError(GetApi().FillSparseTensorCsr(this->p_, data_mem_info, values.values_shape, values.values_shape_len, values.data.p_data, + inner_indices_data, inner_indices_num, + outer_indices_data, outer_indices_num)); +} + +template +void ValueImpl::FillSparseTensorBlockSparse(const OrtMemoryInfo* data_mem_info, + const OrtSparseValuesParam& values, + const Shape& indices_shape, + const int32_t* indices_data) { + ThrowOnError(GetApi().FillSparseTensorBlockSparse(this->p_, data_mem_info, values.values_shape, values.values_shape_len, values.data.p_data, + indices_shape.shape, indices_shape.shape_len, + indices_data)); +} + +#endif // !defined(DISABLE_SPARSE_TENSORS) + +} // namespace detail + +template +inline Value Value::CreateTensor(const OrtMemoryInfo* info, T* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len) { + return CreateTensor(info, p_data, p_data_element_count * sizeof(T), shape, shape_len, TypeToTensorType::type); +} + +inline Value Value::CreateTensor(const OrtMemoryInfo* info, void* p_data, size_t p_data_byte_count, const int64_t* shape, size_t shape_len, + ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateTensorWithDataAsOrtValue(info, p_data, p_data_byte_count, shape, shape_len, type, &out)); + return Value{out}; +} + +template +inline Value Value::CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len) { + return CreateTensor(allocator, shape, shape_len, TypeToTensorType::type); +} + +inline Value Value::CreateTensor(OrtAllocator* allocator, const int64_t* shape, size_t shape_len, ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateTensorAsOrtValue(allocator, shape, shape_len, type, &out)); + return Value{out}; +} + +#if !defined(DISABLE_SPARSE_TENSORS) + +template +inline Value Value::CreateSparseTensor(const OrtMemoryInfo* info, T* p_data, const Shape& dense_shape, + const Shape& values_shape) { + return CreateSparseTensor(info, p_data, dense_shape, values_shape, TypeToTensorType::type); +} + +inline Value Value::CreateSparseTensor(const OrtMemoryInfo* info, void* p_data, const Shape& dense_shape, + const Shape& values_shape, ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateSparseTensorWithValuesAsOrtValue(info, p_data, dense_shape.shape, dense_shape.shape_len, + values_shape.shape, values_shape.shape_len, type, &out)); + return Value{out}; +} + +template +inline Value Value::CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape) { + return CreateSparseTensor(allocator, dense_shape, TypeToTensorType::type); +} + +inline Value Value::CreateSparseTensor(OrtAllocator* allocator, const Shape& dense_shape, + ONNXTensorElementDataType type) { + OrtValue* out; + ThrowOnError(GetApi().CreateSparseTensorAsOrtValue(allocator, dense_shape.shape, dense_shape.shape_len, type, &out)); + return Value{out}; +} +#endif // !defined(DISABLE_SPARSE_TENSORS) + +inline Value Value::CreateMap(const Value& keys, const Value& values) { + OrtValue* out; + const OrtValue* inputs[2] = {keys, values}; + ThrowOnError(GetApi().CreateValue(inputs, 2, ONNX_TYPE_MAP, &out)); + return Value{out}; +} + +inline Value Value::CreateSequence(const std::vector& values) { + OrtValue* out; + std::vector values_ort{values.data(), values.data() + values.size()}; + ThrowOnError(GetApi().CreateValue(values_ort.data(), values_ort.size(), ONNX_TYPE_SEQUENCE, &out)); + return Value{out}; +} + +template +inline Value Value::CreateOpaque(const char* domain, const char* type_name, const T& data_container) { + OrtValue* out; + ThrowOnError(GetApi().CreateOpaqueValue(domain, type_name, &data_container, sizeof(T), &out)); + return Value{out}; +} + +// +// Custom OP Inlines +// +inline Logger::Logger(const OrtLogger* logger) : logger_(logger) { + Ort::ThrowOnError(GetApi().Logger_GetLoggingSeverityLevel(this->logger_, &this->cached_severity_level_)); +} + +inline OrtLoggingLevel Logger::GetLoggingSeverityLevel() const noexcept { + return cached_severity_level_; +} + +inline Status Logger::LogMessage(OrtLoggingLevel log_severity_level, const ORTCHAR_T* file_path, int line_number, + const char* func_name, const char* message) const noexcept { + OrtStatus* status = GetApi().Logger_LogMessage(logger_, log_severity_level, message, file_path, line_number, + func_name); + return Status{status}; +} + +// Disable warnings about the format string not being a literal (-Wformat-nonliteral and -Wformat-security) +// for gcc and clang. The alternative is to use actual C-style variadic parameters and apply +// __attribute__(format(printf...)), which does not work with variadic templates. +#if defined(__GNUC__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat-nonliteral" +#pragma GCC diagnostic ignored "-Wformat-security" +#elif defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wformat-nonliteral" +#pragma clang diagnostic ignored "-Wformat-security" +#endif +template +inline Status Logger::LogFormattedMessage(OrtLoggingLevel log_severity_level, const ORTCHAR_T* file_path, + int line_number, const char* func_name, const char* format, + Args&&... args) const noexcept { + int msg_len = std::snprintf(nullptr, 0U, format, std::forward(args)...); + + if (msg_len < 0) { // Formatting error + return Status("Failed to log message due to formatting error", OrtErrorCode::ORT_FAIL); + } + + OrtStatus* status = nullptr; + const size_t buffer_size = static_cast(msg_len) + 1U; + + constexpr size_t kStackBufferSize = 1024; + + if (buffer_size < kStackBufferSize) { + char buffer[kStackBufferSize]; + snprintf(buffer, kStackBufferSize, format, std::forward(args)...); + status = GetApi().Logger_LogMessage(logger_, log_severity_level, buffer, file_path, line_number, func_name); + } else { + // std::make_unique is only supported starting at C++14. +#if (__cplusplus >= 201402L) || (_MSC_VER >= 1900) + auto buffer = std::make_unique(buffer_size); +#else + std::unique_ptr buffer(new char[buffer_size]); +#endif + std::snprintf(buffer.get(), buffer_size, format, std::forward(args)...); + status = GetApi().Logger_LogMessage(logger_, log_severity_level, buffer.get(), file_path, line_number, func_name); + } + + return Status{status}; +} +// Re-enable -Wformat-nonliteral and -Wformat-security +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#elif defined(__clang__) +#pragma clang diagnostic pop +#endif + +inline KernelContext::KernelContext(OrtKernelContext* context) : ctx_(context) { +} + +inline size_t KernelContext::GetInputCount() const { + size_t out = 0; + Ort::ThrowOnError(GetApi().KernelContext_GetInputCount(ctx_, &out)); + return out; +} + +inline size_t KernelContext::GetOutputCount() const { + size_t out = 0; + Ort::ThrowOnError(GetApi().KernelContext_GetOutputCount(ctx_, &out)); + return out; +} + +inline ConstValue KernelContext::GetInput(size_t index) const { + const OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetInput(ctx_, index, &out)); + return ConstValue{out}; +} + +inline UnownedValue KernelContext::GetOutput(size_t index, const int64_t* dim_values, size_t dim_count) const { + OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetOutput(ctx_, index, dim_values, dim_count, &out)); + return UnownedValue(out); +} + +inline UnownedValue KernelContext::GetOutput(size_t index, const std::vector& dims) const { + OrtValue* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetOutput(ctx_, index, dims.data(), dims.size(), &out)); + return UnownedValue(out); +} + +inline void* KernelContext::GetGPUComputeStream() const { + void* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetGPUComputeStream(ctx_, &out)); + return out; +} + +inline OrtAllocator* KernelContext::GetAllocator(const OrtMemoryInfo& memory_info) const { + OrtAllocator* out = nullptr; + Ort::ThrowOnError(GetApi().KernelContext_GetAllocator(ctx_, &memory_info, &out)); + return out; +} + +inline Logger KernelContext::GetLogger() const { + const OrtLogger* out = nullptr; + ThrowOnError(GetApi().KernelContext_GetLogger(this->ctx_, &out)); + return Logger{out}; +} + +inline void KernelContext::ParallelFor(void (*fn)(void*, size_t), size_t total, size_t num_batch, void* usr_data) const { + ThrowOnError(GetApi().KernelContext_ParallelFor(ctx_, fn, total, num_batch, usr_data)); +} + +inline OpAttr::OpAttr(const char* name, const void* data, int len, OrtOpAttrType type) { + Ort::ThrowOnError(GetApi().CreateOpAttr(name, data, len, type, &p_)); +} + +namespace detail { +template +inline KernelInfo KernelInfoImpl::Copy() const { + OrtKernelInfo* info_copy = nullptr; + Ort::ThrowOnError(GetApi().CopyKernelInfo(this->p_, &info_copy)); + return KernelInfo{info_copy}; +} + +template +inline size_t KernelInfoImpl::GetInputCount() const { + size_t out = 0; + ThrowOnError(GetApi().KernelInfo_GetInputCount(this->p_, &out)); + return out; +} + +template +inline size_t KernelInfoImpl::GetOutputCount() const { + size_t out = 0; + ThrowOnError(GetApi().KernelInfo_GetOutputCount(this->p_, &out)); + return out; +} + +template +inline std::string KernelInfoImpl::GetInputName(size_t index) const { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().KernelInfo_GetInputName(this->p_, index, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfo_GetInputName(this->p_, index, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline std::string KernelInfoImpl::GetOutputName(size_t index) const { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().KernelInfo_GetOutputName(this->p_, index, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfo_GetOutputName(this->p_, index, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline TypeInfo KernelInfoImpl::GetInputTypeInfo(size_t index) const { + OrtTypeInfo* out = nullptr; + ThrowOnError(GetApi().KernelInfo_GetInputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline TypeInfo KernelInfoImpl::GetOutputTypeInfo(size_t index) const { + OrtTypeInfo* out = nullptr; + ThrowOnError(GetApi().KernelInfo_GetOutputTypeInfo(this->p_, index, &out)); + return TypeInfo{out}; +} + +template +inline Value KernelInfoImpl::GetTensorAttribute(const char* name, OrtAllocator* allocator) const { + OrtValue* out = nullptr; + ThrowOnError(GetApi().KernelInfoGetAttribute_tensor(this->p_, name, allocator, &out)); + return Value{out}; +} + +template +inline ConstValue KernelInfoImpl::GetTensorConstantInput(size_t index, int* is_constant) const { + const OrtValue* out = nullptr; + ThrowOnError(GetApi().KernelInfoGetConstantInput_tensor(this->p_, index, is_constant, &out)); + return ConstValue{out}; +} + +template +inline std::string KernelInfoImpl::GetNodeName() const { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the string value + Ort::ThrowOnError(GetApi().KernelInfo_GetNodeName(this->p_, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfo_GetNodeName(this->p_, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + + return out; +} + +template +inline Logger KernelInfoImpl::GetLogger() const { + const OrtLogger* out = nullptr; + ThrowOnError(GetApi().KernelInfo_GetLogger(this->p_, &out)); + return Logger{out}; +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, float& out) { + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_float(p, name, &out)); +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, int64_t& out) { + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_int64(p, name, &out)); +} + +inline void attr_utils::GetAttr(const OrtKernelInfo* p, const char* name, std::string& result) { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the string attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_string(p, name, nullptr, &size)); + + std::string out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttribute_string(p, name, &out[0], &size)); + out.resize(size - 1); // remove the terminating character '\0' + out.swap(result); +} + +inline void attr_utils::GetAttrs(const OrtKernelInfo* p, const char* name, std::vector& result) { + size_t size = 0; + // Feed nullptr for the data buffer to query the true size of the attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_float(p, name, nullptr, &size)); + + std::vector out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_float(p, name, out.data(), &size)); + out.swap(result); +} + +inline void attr_utils::GetAttrs(const OrtKernelInfo* p, const char* name, std::vector& result) { + size_t size = 0; + + // Feed nullptr for the data buffer to query the true size of the attribute + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_int64(p, name, nullptr, &size)); + + std::vector out; + out.resize(size); + Ort::ThrowOnError(GetApi().KernelInfoGetAttributeArray_int64(p, name, out.data(), &size)); + out.swap(result); +} +} // namespace detail + +inline KernelInfo::KernelInfo(OrtKernelInfo* info) : detail::KernelInfoImpl{info} {} + +inline Op::Op(OrtOp* p) : Base(p) {} + +inline Op Op::Create(const OrtKernelInfo* info, const char* op_name, const char* domain, int version, + const char** type_constraint_names, + const ONNXTensorElementDataType* type_constraint_values, + size_t type_constraint_count, + const OpAttr* attr_values, size_t attr_count, + size_t input_count, size_t output_count) { + static_assert(sizeof(OpAttr) == sizeof(OrtOpAttr*), + "OpAttr's is expected to be just an array of OrtOpAttr in memory so we can reinterpret safely"); + auto attr_input_values = reinterpret_cast(attr_values); + OrtOp* op; + Ort::ThrowOnError(GetApi().CreateOp(info, op_name, domain, version, type_constraint_names, type_constraint_values, + static_cast(type_constraint_count), + attr_input_values, + static_cast(attr_count), + static_cast(input_count), + static_cast(output_count), &op)); + return Op{op}; +} + +inline void Op::Invoke(const OrtKernelContext* context, + const Value* input_values, + size_t input_count, + Value* output_values, + size_t output_count) { + static_assert(sizeof(Value) == sizeof(OrtValue*), + "Value is really just an array of OrtValue* in memory, so we can reinterpret_cast safely"); + auto ort_input_values = reinterpret_cast(input_values); + auto ort_output_values = reinterpret_cast(output_values); + Ort::ThrowOnError(GetApi().InvokeOp(context, p_, ort_input_values, static_cast(input_count), + ort_output_values, static_cast(output_count))); +} + +inline void Op::Invoke(const OrtKernelContext* context, + const OrtValue* const* input_values, + size_t input_count, + OrtValue* const* output_values, + size_t output_count) { + Ort::ThrowOnError(GetApi().InvokeOp(context, p_, input_values, static_cast(input_count), + output_values, static_cast(output_count))); +} + +inline std::string GetVersionString() { + return OrtGetApiBase()->GetVersionString(); +} + +inline std::string GetBuildInfoString() { + return GetApi().GetBuildInfoString(); +} + +inline std::vector GetAvailableProviders() { + char** providers; + int len; + + auto release_fn = [&len](char** providers) { + // This should always return nullptr. + ThrowOnError(GetApi().ReleaseAvailableProviders(providers, len)); + }; + + ThrowOnError(GetApi().GetAvailableProviders(&providers, &len)); + std::unique_ptr guard(providers, release_fn); + std::vector available_providers; + available_providers.reserve(static_cast(len)); + for (int i = 0; i < len; ++i) { + available_providers.emplace_back(providers[i]); + } + return available_providers; +} + +template +void CustomOpBase::GetSessionConfigs(std::unordered_map& out, + ConstSessionOptions options) const { + const TOp* derived = static_cast(this); + std::vector keys = derived->GetSessionConfigKeys(); + + out.reserve(keys.size()); + + std::string config_entry_key = detail::MakeCustomOpConfigEntryKey(derived->GetName(), ""); + const size_t prefix_size = config_entry_key.length(); + + for (const auto& key : keys) { + config_entry_key.resize(prefix_size); + config_entry_key.append(key); + out[key] = options.GetConfigEntryOrDefault(config_entry_key.c_str(), ""); + } +} + +inline ShapeInferContext::ShapeInferContext(const OrtApi* ort_api, + OrtShapeInferContext* ctx) : ort_api_(ort_api), ctx_(ctx) { + size_t input_count = 0; + Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputCount(ctx_, &input_count)); + for (size_t ith_input = 0; ith_input < input_count; ++ith_input) { + OrtTensorTypeAndShapeInfo* info{}; + Ort::ThrowOnError(ort_api_->ShapeInferContext_GetInputTypeShape(ctx, ith_input, &info)); + TensorTypeAndShapeInfo type_shape_info(info); + auto integer_shape = type_shape_info.GetShape(); + std::vector symbolic_shape(integer_shape.size(), {}); + if (!integer_shape.empty()) { + type_shape_info.GetSymbolicDimensions(&symbolic_shape[0], integer_shape.size()); + } + Shape shape; + for (size_t ith = 0; ith < integer_shape.size(); ++ith) { + if (symbolic_shape[ith] && std::string{symbolic_shape[ith]}.size() > 0) { + shape.emplace_back(symbolic_shape[ith]); + } else { + shape.emplace_back(integer_shape[ith]); + } + } + input_shapes_.push_back(std::move(shape)); + type_shape_info.release(); + } +} + +inline Status ShapeInferContext::SetOutputShape(size_t indice, const Shape& shape, ONNXTensorElementDataType type) { + OrtTensorTypeAndShapeInfo* info = {}; + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->CreateTensorTypeAndShapeInfo(&info)); + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->SetTensorElementType(info, type)); + + using InfoPtr = std::unique_ptr>; + + InfoPtr info_ptr(info, [this](OrtTensorTypeAndShapeInfo* obj) { + ort_api_->ReleaseTensorTypeAndShapeInfo(obj); + }); + + std::vector integer_dims; + std::vector symbolic_dims; + + for (const auto dim : shape) { + if (dim.IsInt()) { + integer_dims.push_back(dim.AsInt()); + symbolic_dims.push_back(""); + } else { + if (!dim.AsSym() || std::string{dim.AsSym()}.empty()) { + ORT_CXX_API_THROW("Symbolic dim must not be an empty string", ORT_INVALID_ARGUMENT); + } + integer_dims.push_back(SymbolicInteger::INVALID_INT_DIM); + symbolic_dims.push_back(dim.AsSym()); + } + } + + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->SetDimensions(info, integer_dims.data(), integer_dims.size())); + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->SetSymbolicDimensions(info, symbolic_dims.data(), symbolic_dims.size())); + ORT_CXX_RETURN_ON_API_FAIL(ort_api_->ShapeInferContext_SetOutputTypeShape(ctx_, indice, info)); + return Status{nullptr}; +} + +inline int64_t ShapeInferContext::GetAttrInt(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + int64_t i = {}; + size_t out = {}; + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INT, &i, sizeof(i), &out)); + return i; +} + +inline ShapeInferContext::Ints ShapeInferContext::GetAttrInts(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + int64_t i = {}; + size_t out = {}; + // first call to get the bytes needed + // 1. A status == nullptr means that ReadOpAttr was successful. A status != nullptr means failure. + // 2. The ReadOpAttr function should normally be called twice: once to get the needed buffer size (returns a status != nullptr), and a second time to actually read the ints (returns status == null on success). + // 3. This code tries a subtle optimization in the first call to ReadOpAttr. It passes in a buffer (&i) of size 1 just in case there is only 1 int. In this case, status == nullptr and we need to return {i}. + auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INTS, &i, sizeof(i), &out); + if (status) { + size_t num_i = out / sizeof(int64_t); + ShapeInferContext::Ints ints(num_i, 0); + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_INTS, ints.data(), out, &out)); + return ints; + } else { + if (out == 0u) { + return {}; + } + return {i}; + } +} + +inline float ShapeInferContext::GetAttrFloat(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + float f = {}; + size_t out = {}; + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOAT, &f, sizeof(f), &out)); + return f; +} + +inline ShapeInferContext::Floats ShapeInferContext::GetAttrFloats(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + float f = {}; + size_t out = {}; + // first call to get the bytes needed + // 1. A status == nullptr means that ReadOpAttr was successful. A status != nullptr means failure. + // 2. The ReadOpAttr function should normally be called twice: once to get the needed buffer size (returns a status != nullptr), and a second time to actually read the ints (returns status == null on success). + // 3. This code tries a subtle optimization in the first call to ReadOpAttr. It passes in a buffer (&i) of size 1 just in case there is only 1 int. In this case, status == nullptr and we need to return {i}. + auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOATS, &f, sizeof(f), &out); + if (status) { + size_t num_f = out / sizeof(float); + ShapeInferContext::Floats floats(num_f, 0); + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_FLOATS, floats.data(), out, &out)); + return floats; + } else { + if (out == 0u) { + return {}; + } + return {f}; + } +} + +inline std::string ShapeInferContext::GetAttrString(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + char c = {}; + size_t out = {}; + // first call to get the bytes needed + auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRING, &c, sizeof(char), &out); + if (status) { + std::vector chars(out, '\0'); + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRING, chars.data(), out, &out)); + return {chars.data()}; + } else { + return {c}; + } +} + +inline ShapeInferContext::Strings ShapeInferContext::GetAttrStrings(const char* attr_name) { + const auto* attr = GetAttrHdl(attr_name); + char c = {}; + size_t out = {}; + // first call to get the bytes needed + // 1. A status == nullptr means that ReadOpAttr was successful. A status != nullptr means failure. + // 2. The ReadOpAttr function should normally be called twice: once to get the needed buffer size (returns a status != nullptr), and a second time to actually read the ints (returns status == null on success). + // 3. This code tries a subtle optimization in the first call to ReadOpAttr. It passes in a buffer (&i) of size 1 just in case there is only 1 int. In this case, status == nullptr and we need to return {i}. + auto status = ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRINGS, &c, sizeof(char), &out); + if (status) { + std::vector chars(out, '\0'); + Ort::ThrowOnError(ort_api_->ReadOpAttr(attr, ORT_OP_ATTR_STRINGS, chars.data(), out, &out)); + ShapeInferContext::Strings strings; + char* char_st = chars.data(); + char* char_ed = char_st + out; + while (char_st < char_ed) { + strings.emplace_back(char_st); + while (*char_st != '\0') { + char_st++; + } + char_st++; + } + return strings; + } else { + if (out == 0u) { + return {}; + } + return {std::string{c}}; + } +} + +inline const OrtOpAttr* ShapeInferContext::GetAttrHdl(const char* attr_name) const { + const OrtOpAttr* attr_hdl = {}; + Ort::ThrowOnError(ort_api_->ShapeInferContext_GetAttribute(ctx_, attr_name, &attr_hdl)); + return attr_hdl; +} + +} // namespace Ort diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_float16.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_float16.h new file mode 100644 index 0000000..408d3cc --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_float16.h @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include +#include +#include +#include + +namespace onnxruntime_float16 { + +namespace detail { + +enum class endian { +#if defined(_WIN32) + little = 0, + big = 1, + native = little, +#elif defined(__GNUC__) || defined(__clang__) + little = __ORDER_LITTLE_ENDIAN__, + big = __ORDER_BIG_ENDIAN__, + native = __BYTE_ORDER__, +#else +#error onnxruntime_float16::detail::endian is not implemented in this environment. +#endif +}; + +static_assert( + endian::native == endian::little || endian::native == endian::big, + "Only little-endian or big-endian native byte orders are supported."); + +} // namespace detail + +/// +/// Shared implementation between public and internal classes. CRTP pattern. +/// +template +struct Float16Impl { + protected: + /// + /// Converts from float to uint16_t float16 representation + /// + /// + /// + constexpr static uint16_t ToUint16Impl(float v) noexcept; + + /// + /// Converts float16 to float + /// + /// float representation of float16 value + float ToFloatImpl() const noexcept; + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + uint16_t AbsImpl() const noexcept { + return static_cast(val & ~kSignMask); + } + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + uint16_t NegateImpl() const noexcept { + return IsNaN() ? val : static_cast(val ^ kSignMask); + } + + public: + // uint16_t special values + static constexpr uint16_t kSignMask = 0x8000U; + static constexpr uint16_t kBiasedExponentMask = 0x7C00U; + static constexpr uint16_t kPositiveInfinityBits = 0x7C00U; + static constexpr uint16_t kNegativeInfinityBits = 0xFC00U; + static constexpr uint16_t kPositiveQNaNBits = 0x7E00U; + static constexpr uint16_t kNegativeQNaNBits = 0xFE00U; + static constexpr uint16_t kMaxValueBits = 0x7BFFU; // Largest normal number + static constexpr uint16_t kOneBits = 0x3C00U; + static constexpr uint16_t kMinusOneBits = 0xBC00U; + + uint16_t val{0}; + + Float16Impl() = default; + + /// + /// Checks if the value is negative + /// + /// true if negative + bool IsNegative() const noexcept { + return static_cast(val) < 0; + } + + /// + /// Tests if the value is NaN + /// + /// true if NaN + bool IsNaN() const noexcept { + return AbsImpl() > kPositiveInfinityBits; + } + + /// + /// Tests if the value is finite + /// + /// true if finite + bool IsFinite() const noexcept { + return AbsImpl() < kPositiveInfinityBits; + } + + /// + /// Tests if the value represents positive infinity. + /// + /// true if positive infinity + bool IsPositiveInfinity() const noexcept { + return val == kPositiveInfinityBits; + } + + /// + /// Tests if the value represents negative infinity + /// + /// true if negative infinity + bool IsNegativeInfinity() const noexcept { + return val == kNegativeInfinityBits; + } + + /// + /// Tests if the value is either positive or negative infinity. + /// + /// True if absolute value is infinity + bool IsInfinity() const noexcept { + return AbsImpl() == kPositiveInfinityBits; + } + + /// + /// Tests if the value is NaN or zero. Useful for comparisons. + /// + /// True if NaN or zero. + bool IsNaNOrZero() const noexcept { + auto abs = AbsImpl(); + return (abs == 0 || abs > kPositiveInfinityBits); + } + + /// + /// Tests if the value is normal (not zero, subnormal, infinite, or NaN). + /// + /// True if so + bool IsNormal() const noexcept { + auto abs = AbsImpl(); + return (abs < kPositiveInfinityBits) // is finite + && (abs != 0) // is not zero + && ((abs & kBiasedExponentMask) != 0); // is not subnormal (has a non-zero exponent) + } + + /// + /// Tests if the value is subnormal (denormal). + /// + /// True if so + bool IsSubnormal() const noexcept { + auto abs = AbsImpl(); + return (abs < kPositiveInfinityBits) // is finite + && (abs != 0) // is not zero + && ((abs & kBiasedExponentMask) == 0); // is subnormal (has a zero exponent) + } + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + Derived Abs() const noexcept { return Derived::FromBits(AbsImpl()); } + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + Derived Negate() const noexcept { return Derived::FromBits(NegateImpl()); } + + /// + /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check + /// for two values by or'ing the private bits together and stripping the sign. They are both zero, + /// and therefore equivalent, if the resulting value is still zero. + /// + /// first value + /// second value + /// True if both arguments represent zero + static bool AreZero(const Float16Impl& lhs, const Float16Impl& rhs) noexcept { + return static_cast((lhs.val | rhs.val) & ~kSignMask) == 0; + } + + bool operator==(const Float16Impl& rhs) const noexcept { + if (IsNaN() || rhs.IsNaN()) { + // IEEE defines that NaN is not equal to anything, including itself. + return false; + } + return val == rhs.val; + } + + bool operator!=(const Float16Impl& rhs) const noexcept { return !(*this == rhs); } + + bool operator<(const Float16Impl& rhs) const noexcept { + if (IsNaN() || rhs.IsNaN()) { + // IEEE defines that NaN is unordered with respect to everything, including itself. + return false; + } + + const bool left_is_negative = IsNegative(); + if (left_is_negative != rhs.IsNegative()) { + // When the signs of left and right differ, we know that left is less than right if it is + // the negative value. The exception to this is if both values are zero, in which case IEEE + // says they should be equal, even if the signs differ. + return left_is_negative && !AreZero(*this, rhs); + } + return (val != rhs.val) && ((val < rhs.val) ^ left_is_negative); + } +}; + +// The following Float16_t conversions are based on the code from +// Eigen library. + +// The conversion routines are Copyright (c) Fabian Giesen, 2016. +// The original license follows: +// +// Copyright (c) Fabian Giesen, 2016 +// All rights reserved. +// Redistribution and use in source and binary forms, with or without +// modification, are permitted. +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +namespace detail { +union float32_bits { + unsigned int u; + float f; +}; +} // namespace detail + +template +inline constexpr uint16_t Float16Impl::ToUint16Impl(float v) noexcept { + detail::float32_bits f{}; + f.f = v; + + constexpr detail::float32_bits f32infty = {255 << 23}; + constexpr detail::float32_bits f16max = {(127 + 16) << 23}; + constexpr detail::float32_bits denorm_magic = {((127 - 15) + (23 - 10) + 1) << 23}; + constexpr unsigned int sign_mask = 0x80000000u; + uint16_t val = static_cast(0x0u); + + unsigned int sign = f.u & sign_mask; + f.u ^= sign; + + // NOTE all the integer compares in this function can be safely + // compiled into signed compares since all operands are below + // 0x80000000. Important if you want fast straight SSE2 code + // (since there's no unsigned PCMPGTD). + + if (f.u >= f16max.u) { // result is Inf or NaN (all exponent bits set) + val = (f.u > f32infty.u) ? 0x7e00 : 0x7c00; // NaN->qNaN and Inf->Inf + } else { // (De)normalized number or zero + if (f.u < (113 << 23)) { // resulting FP16 is subnormal or zero + // use a magic value to align our 10 mantissa bits at the bottom of + // the float. as long as FP addition is round-to-nearest-even this + // just works. + f.f += denorm_magic.f; + + // and one integer subtract of the bias later, we have our final float! + val = static_cast(f.u - denorm_magic.u); + } else { + unsigned int mant_odd = (f.u >> 13) & 1; // resulting mantissa is odd + + // update exponent, rounding bias part 1 + // Equivalent to `f.u += ((unsigned int)(15 - 127) << 23) + 0xfff`, but + // without arithmetic overflow. + f.u += 0xc8000fffU; + // rounding bias part 2 + f.u += mant_odd; + // take the bits! + val = static_cast(f.u >> 13); + } + } + + val |= static_cast(sign >> 16); + return val; +} + +template +inline float Float16Impl::ToFloatImpl() const noexcept { + constexpr detail::float32_bits magic = {113 << 23}; + constexpr unsigned int shifted_exp = 0x7c00 << 13; // exponent mask after shift + detail::float32_bits o{}; + + o.u = (val & 0x7fff) << 13; // exponent/mantissa bits + unsigned int exp = shifted_exp & o.u; // just the exponent + o.u += (127 - 15) << 23; // exponent adjust + + // handle exponent special cases + if (exp == shifted_exp) { // Inf/NaN? + o.u += (128 - 16) << 23; // extra exp adjust + } else if (exp == 0) { // Zero/Denormal? + o.u += 1 << 23; // extra exp adjust + o.f -= magic.f; // re-normalize + } + + // Attempt to workaround the Internal Compiler Error on ARM64 + // for bitwise | operator, including std::bitset +#if (defined _MSC_VER) && (defined _M_ARM || defined _M_ARM64 || defined _M_ARM64EC) + if (IsNegative()) { + return -o.f; + } +#else + // original code: + o.u |= (val & 0x8000U) << 16U; // sign bit +#endif + return o.f; +} + +/// Shared implementation between public and internal classes. CRTP pattern. +template +struct BFloat16Impl { + protected: + /// + /// Converts from float to uint16_t float16 representation + /// + /// + /// + static uint16_t ToUint16Impl(float v) noexcept; + + /// + /// Converts bfloat16 to float + /// + /// float representation of bfloat16 value + float ToFloatImpl() const noexcept; + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + uint16_t AbsImpl() const noexcept { + return static_cast(val & ~kSignMask); + } + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + uint16_t NegateImpl() const noexcept { + return IsNaN() ? val : static_cast(val ^ kSignMask); + } + + public: + // uint16_t special values + static constexpr uint16_t kSignMask = 0x8000U; + static constexpr uint16_t kBiasedExponentMask = 0x7F80U; + static constexpr uint16_t kPositiveInfinityBits = 0x7F80U; + static constexpr uint16_t kNegativeInfinityBits = 0xFF80U; + static constexpr uint16_t kPositiveQNaNBits = 0x7FC1U; + static constexpr uint16_t kNegativeQNaNBits = 0xFFC1U; + static constexpr uint16_t kMaxValueBits = 0x7F7FU; + static constexpr uint16_t kRoundToNearest = 0x7FFFU; + static constexpr uint16_t kOneBits = 0x3F80U; + static constexpr uint16_t kMinusOneBits = 0xBF80U; + + uint16_t val{0}; + + BFloat16Impl() = default; + + /// + /// Checks if the value is negative + /// + /// true if negative + bool IsNegative() const noexcept { + return static_cast(val) < 0; + } + + /// + /// Tests if the value is NaN + /// + /// true if NaN + bool IsNaN() const noexcept { + return AbsImpl() > kPositiveInfinityBits; + } + + /// + /// Tests if the value is finite + /// + /// true if finite + bool IsFinite() const noexcept { + return AbsImpl() < kPositiveInfinityBits; + } + + /// + /// Tests if the value represents positive infinity. + /// + /// true if positive infinity + bool IsPositiveInfinity() const noexcept { + return val == kPositiveInfinityBits; + } + + /// + /// Tests if the value represents negative infinity + /// + /// true if negative infinity + bool IsNegativeInfinity() const noexcept { + return val == kNegativeInfinityBits; + } + + /// + /// Tests if the value is either positive or negative infinity. + /// + /// True if absolute value is infinity + bool IsInfinity() const noexcept { + return AbsImpl() == kPositiveInfinityBits; + } + + /// + /// Tests if the value is NaN or zero. Useful for comparisons. + /// + /// True if NaN or zero. + bool IsNaNOrZero() const noexcept { + auto abs = AbsImpl(); + return (abs == 0 || abs > kPositiveInfinityBits); + } + + /// + /// Tests if the value is normal (not zero, subnormal, infinite, or NaN). + /// + /// True if so + bool IsNormal() const noexcept { + auto abs = AbsImpl(); + return (abs < kPositiveInfinityBits) // is finite + && (abs != 0) // is not zero + && ((abs & kBiasedExponentMask) != 0); // is not subnormal (has a non-zero exponent) + } + + /// + /// Tests if the value is subnormal (denormal). + /// + /// True if so + bool IsSubnormal() const noexcept { + auto abs = AbsImpl(); + return (abs < kPositiveInfinityBits) // is finite + && (abs != 0) // is not zero + && ((abs & kBiasedExponentMask) == 0); // is subnormal (has a zero exponent) + } + + /// + /// Creates an instance that represents absolute value. + /// + /// Absolute value + Derived Abs() const noexcept { return Derived::FromBits(AbsImpl()); } + + /// + /// Creates a new instance with the sign flipped. + /// + /// Flipped sign instance + Derived Negate() const noexcept { return Derived::FromBits(NegateImpl()); } + + /// + /// IEEE defines that positive and negative zero are equal, this gives us a quick equality check + /// for two values by or'ing the private bits together and stripping the sign. They are both zero, + /// and therefore equivalent, if the resulting value is still zero. + /// + /// first value + /// second value + /// True if both arguments represent zero + static bool AreZero(const BFloat16Impl& lhs, const BFloat16Impl& rhs) noexcept { + // IEEE defines that positive and negative zero are equal, this gives us a quick equality check + // for two values by or'ing the private bits together and stripping the sign. They are both zero, + // and therefore equivalent, if the resulting value is still zero. + return static_cast((lhs.val | rhs.val) & ~kSignMask) == 0; + } +}; + +template +inline uint16_t BFloat16Impl::ToUint16Impl(float v) noexcept { + uint16_t result; + if (std::isnan(v)) { + result = kPositiveQNaNBits; + } else { + auto get_msb_half = [](float fl) { + uint16_t result; +#ifdef __cpp_if_constexpr + if constexpr (detail::endian::native == detail::endian::little) { +#else + if (detail::endian::native == detail::endian::little) { +#endif + std::memcpy(&result, reinterpret_cast(&fl) + sizeof(uint16_t), sizeof(uint16_t)); + } else { + std::memcpy(&result, &fl, sizeof(uint16_t)); + } + return result; + }; + + uint16_t upper_bits = get_msb_half(v); + union { + uint32_t U32; + float F32; + }; + F32 = v; + U32 += (upper_bits & 1) + kRoundToNearest; + result = get_msb_half(F32); + } + return result; +} + +template +inline float BFloat16Impl::ToFloatImpl() const noexcept { + if (IsNaN()) { + return std::numeric_limits::quiet_NaN(); + } + float result; + char* const first = reinterpret_cast(&result); + char* const second = first + sizeof(uint16_t); +#ifdef __cpp_if_constexpr + if constexpr (detail::endian::native == detail::endian::little) { +#else + if (detail::endian::native == detail::endian::little) { +#endif + std::memset(first, 0, sizeof(uint16_t)); + std::memcpy(second, &val, sizeof(uint16_t)); + } else { + std::memcpy(first, &val, sizeof(uint16_t)); + std::memset(second, 0, sizeof(uint16_t)); + } + return result; +} + +} // namespace onnxruntime_float16 diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_lite_custom_op.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_lite_custom_op.h new file mode 100644 index 0000000..ce87d8c --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_lite_custom_op.h @@ -0,0 +1,1119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// Summary +// The header has APIs to save custom op authors the trouble of defining schemas, +// which will be inferred by functions' signature, as long as their argument list has types supported here. +// Input could be: +// 1. Tensor of onnx data types. +// 2. Span of onnx data types. +// 3. Scalar of onnx data types. +// A input could be optional if indicated as std::optional<...>. +// For an output, it must be a tensor of onnx data types. +// Further, the header also has utility for a simple custom struct, where resources could be kept, to be registered as a custom op. +// For concrete examples, please search keyword "LiteCustomOpTest" under "/onnxruntime/test/". +// Note - all APIs in this header are ABI. + +#pragma once +#include "onnxruntime_cxx_api.h" +#include +#include +#include +#include + +namespace Ort { +namespace Custom { + +class ArgBase { + public: + ArgBase(OrtKernelContext* ctx, + size_t indice, + bool is_input) : ctx_(ctx), indice_(indice), is_input_(is_input) {} + virtual ~ArgBase() {}; + + protected: + struct KernelContext ctx_; + size_t indice_; + bool is_input_; +}; + +using ArgPtr = std::unique_ptr; +using ArgPtrs = std::vector; + +class TensorBase : public ArgBase { + public: + TensorBase(OrtKernelContext* ctx, + size_t indice, + bool is_input) : ArgBase(ctx, indice, is_input) {} + + operator bool() const { + return shape_.has_value(); + } + + const std::vector& Shape() const { + if (!shape_.has_value()) { + ORT_CXX_API_THROW("tensor shape is not yet initialized", OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + return shape_.value(); + } + + ONNXTensorElementDataType Type() const { + return type_; + } + + int64_t NumberOfElement() const { + if (shape_.has_value()) { + return std::accumulate(shape_->begin(), shape_->end(), 1LL, std::multiplies()); + } else { + return 0; + } + } + + std::string Shape2Str() const { + if (shape_.has_value()) { + std::string shape_str; + for (const auto& dim : *shape_) { + shape_str.append(std::to_string(dim)); + shape_str.append(", "); + } + return shape_str; + } else { + return "empty"; + } + } + + bool IsCpuTensor() const { + return strcmp("Cpu", mem_type_) == 0; + } + + virtual const void* DataRaw() const = 0; + virtual size_t SizeInBytes() const = 0; + + protected: + std::optional> shape_; + ONNXTensorElementDataType type_ = ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED; + const char* mem_type_ = "Cpu"; +}; + +template +struct Span { + const T* data_ = {}; + size_t size_ = {}; + void Assign(const T* data, size_t size) { + data_ = data; + size_ = size; + } + size_t size() const { return size_; } + T operator[](size_t indice) const { + return data_[indice]; + } + const T* data() const { return data_; } +}; + +template +class Tensor : public TensorBase { + public: + using TT = typename std::remove_reference::type; + Tensor(OrtKernelContext* ctx, size_t indice, bool is_input) : TensorBase(ctx, indice, is_input) { + if (is_input_) { + if (indice >= ctx_.GetInputCount()) { + ORT_CXX_API_THROW("invalid indice for Ort::Custom::Tensor", OrtErrorCode::ORT_INVALID_ARGUMENT); + } + const_value_ = ctx_.GetInput(indice); + auto type_shape_info = const_value_.GetTensorTypeAndShapeInfo(); + shape_ = type_shape_info.GetShape(); + } + } + const TT* Data() const { + return reinterpret_cast(const_value_.GetTensorRawData()); + } + TT* Allocate(const std::vector& shape) { + shape_ = shape; + if (!data_) { + shape_ = shape; + data_ = ctx_.GetOutput(indice_, shape).template GetTensorMutableData(); + } + return data_; + } + static TT GetT() { return (TT)0; } + const Span& AsSpan() { + if (!shape_.has_value() || shape_->size() != 1) { + ORT_CXX_API_THROW("invalid shape while trying to get a span out of Ort::Custom::Tensor", + OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + span_.Assign(Data(), static_cast((*shape_)[0])); + return span_; + } + const T& AsScalar() { + if (!shape_.has_value() || shape_->size() != 1 || (*shape_)[0] != 1) { + ORT_CXX_API_THROW("invalid shape while trying to get a scalar from Ort::Custom::Tensor", + OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + return *Data(); + } + const void* DataRaw() const override { + return reinterpret_cast(Data()); + } + + size_t SizeInBytes() const override { + return sizeof(TT) * static_cast(NumberOfElement()); + } + + private: + ConstValue const_value_; // for input + TT* data_{}; // for output + Span span_; +}; + +template <> +class Tensor : public TensorBase { + public: + using strings = std::vector; + + Tensor(OrtKernelContext* ctx, size_t indice, bool is_input) : TensorBase(ctx, indice, is_input) { + if (is_input_) { + if (indice >= ctx_.GetInputCount()) { + ORT_CXX_API_THROW("invalid indice for Ort::Custom::Tensor", OrtErrorCode::ORT_INVALID_ARGUMENT); + } + auto const_value = ctx_.GetInput(indice); + auto type_shape_info = const_value.GetTensorTypeAndShapeInfo(); + shape_ = type_shape_info.GetShape(); + auto num_chars = const_value.GetStringTensorDataLength(); + // note - there will be copy ... + auto num_strings = static_cast(NumberOfElement()); + if (num_strings) { + std::vector chars(num_chars + 1, '\0'); + std::vector offsets(num_strings); + const_value.GetStringTensorContent(static_cast(chars.data()), num_chars, offsets.data(), offsets.size()); + auto upper_bound = num_strings - 1; + input_strings_.resize(num_strings); + for (size_t i = upper_bound;; --i) { + if (i < upper_bound) { + chars[offsets[i + 1]] = '\0'; + } + input_strings_[i] = chars.data() + offsets[i]; + if (0 == i) { + break; + } + } + } + } + } + const strings& Data() const { + return input_strings_; + } + const void* DataRaw() const override { + if (input_strings_.size() != 1) { + ORT_CXX_API_THROW("DataRaw() only applies to string scalar", ORT_RUNTIME_EXCEPTION); + } + return reinterpret_cast(input_strings_[0].c_str()); + } + size_t SizeInBytes() const override { + if (input_strings_.size() != 1) { + ORT_CXX_API_THROW("SizeInBytes() only applies to string scalar", ORT_RUNTIME_EXCEPTION); + } + return input_strings_[0].size(); + } + void SetStringOutput(const strings& ss, const std::vector& dims) { + shape_ = dims; + std::vector raw; + for (const auto& s : ss) { + raw.push_back(s.data()); + } + auto output = ctx_.GetOutput(indice_, dims.data(), dims.size()); + // note - there will be copy ... + output.FillStringTensor(raw.data(), raw.size()); + } + const Span& AsSpan() { + ORT_CXX_API_THROW("span for TensorT of string not implemented", OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + const std::string& AsScalar() { + if (input_strings_.size() != 1) { + ORT_CXX_API_THROW("invalid shape while trying to get a scalar string from Ort::Custom::Tensor", + OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + return input_strings_[0]; + } + + private: + std::vector input_strings_; // for input +}; + +template <> +class Tensor : public TensorBase { + public: + using strings = std::vector; + using string_views = std::vector; + + Tensor(OrtKernelContext* ctx, size_t indice, bool is_input) : TensorBase(ctx, indice, is_input) { + if (is_input_) { + if (indice >= ctx_.GetInputCount()) { + ORT_CXX_API_THROW("invalid indice for Ort::Custom::Tensor", OrtErrorCode::ORT_INVALID_ARGUMENT); + } + auto const_value = ctx_.GetInput(indice); + auto type_shape_info = const_value.GetTensorTypeAndShapeInfo(); + shape_ = type_shape_info.GetShape(); + auto num_chars = const_value.GetStringTensorDataLength(); + chars_.resize(num_chars + 1, '\0'); + auto num_strings = static_cast(NumberOfElement()); + if (num_strings) { + std::vector offsets(num_strings); + const_value.GetStringTensorContent(static_cast(chars_.data()), num_chars, offsets.data(), offsets.size()); + offsets.push_back(num_chars); + for (size_t i = 0; i < num_strings; ++i) { + input_string_views_.emplace_back(chars_.data() + offsets[i], offsets[i + 1] - offsets[i]); + } + } + } + } + const string_views& Data() const { + return input_string_views_; + } + const void* DataRaw() const override { + if (input_string_views_.size() != 1) { + ORT_CXX_API_THROW("DataRaw() only applies to string scalar", ORT_RUNTIME_EXCEPTION); + } + return reinterpret_cast(input_string_views_[0].data()); + } + size_t SizeInBytes() const override { + if (input_string_views_.size() != 1) { + ORT_CXX_API_THROW("SizeInBytes() only applies to string scalar", ORT_RUNTIME_EXCEPTION); + } + return input_string_views_[0].size(); + } + void SetStringOutput(const strings& ss, const std::vector& dims) { + shape_ = dims; + std::vector raw; + for (const auto& s : ss) { + raw.push_back(s.data()); + } + auto output = ctx_.GetOutput(indice_, dims.data(), dims.size()); + // note - there will be copy ... + output.FillStringTensor(raw.data(), raw.size()); + } + const Span& AsSpan() { + ORT_CXX_API_THROW("span for TensorT of string view not implemented", OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + std::string_view AsScalar() { + if (input_string_views_.size() != 1) { + ORT_CXX_API_THROW("invalid shape while trying to get a scalar string view from Ort::Custom::Tensor", + OrtErrorCode::ORT_RUNTIME_EXCEPTION); + } + return input_string_views_[0]; + } + + private: + std::vector chars_; // for input + std::vector input_string_views_; // for input +}; + +using TensorPtr = std::unique_ptr; +using TensorPtrs = std::vector; + +struct TensorArray : public ArgBase { + TensorArray(OrtKernelContext* ctx, + size_t start_indice, + bool is_input) : ArgBase(ctx, + start_indice, + is_input) { + if (is_input) { + auto input_count = ctx_.GetInputCount(); + for (size_t ith_input = start_indice; ith_input < input_count; ++ith_input) { + auto const_value = ctx_.GetInput(start_indice); + auto type_shape_info = const_value.GetTensorTypeAndShapeInfo(); + auto type = type_shape_info.GetElementType(); + TensorPtr tensor; + switch (type) { + case ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64: + tensor = std::make_unique>(ctx, ith_input, true); + break; + case ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING: + tensor = std::make_unique>(ctx, ith_input, true); + break; + default: + ORT_CXX_API_THROW("unknow input type", ORT_RUNTIME_EXCEPTION); + break; + } + tensors_.emplace_back(tensor.release()); + } // for + } + } + template + T* AllocateOutput(size_t ith_output, const std::vector& shape) { + // ith_output is the indice of output relative to the tensor array + // indice_ + ith_output is the indice relative to context + auto tensor = std::make_unique>(ctx_.GetOrtKernelContext(), indice_ + ith_output, false); + auto raw_output = tensor.get()->Allocate(shape); + tensors_.emplace_back(tensor.release()); + return raw_output; + } + Tensor& AllocateStringTensor(size_t ith_output) { + // ith_output is the indice of output relative to the tensor array + // indice_ + ith_output is the indice relative to context + auto tensor = std::make_unique>(ctx_.GetOrtKernelContext(), indice_ + ith_output, false); + Tensor& output = *tensor; + tensors_.emplace_back(tensor.release()); + return output; + } + size_t Size() const { + return tensors_.size(); + } + const TensorPtr& operator[](size_t ith_input) const { + // ith_input is the indice of output relative to the tensor array + return tensors_.at(ith_input); + } + + private: + TensorPtrs tensors_; +}; + +using Variadic = TensorArray; + +/* +Note: +OrtLiteCustomOp inherits from OrtCustomOp to bridge tween a custom func/struct and ort core. +The lifetime of an OrtLiteCustomOp instance is managed by customer code, not ort, so: +1. DO NOT cast OrtLiteCustomOp to OrtCustomOp and release since there is no virtual destructor in the hierarchy. +2. OrtLiteCustomFunc and OrtLiteCustomStruct, as two sub-structs, can be released in form of OrtLiteCustomOp since all members are kept in the OrtLiteCustomOp, + hence memory could still be recycled properly. +Further, OrtCustomOp is a c struct bearing no v-table, so offspring structs are by design to be of zero virtual functions to maintain cast safety. +*/ +struct OrtLiteCustomOp : public OrtCustomOp { + using ConstOptionalFloatTensor = std::optional&>; + using OptionalFloatTensor = std::optional>; + + // CreateTuple + template + static typename std::enable_if>::type + CreateTuple(OrtKernelContext*, ArgPtrs&, size_t, size_t, const std::string&) { + return std::make_tuple(); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + std::tuple current = std::tuple{context}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + std::tuple current = std::tuple{*context}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + +#ifdef ORT_CUDA_CTX + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + thread_local CudaContext cuda_context; + cuda_context.Init(*context); + std::tuple current = std::tuple{cuda_context}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } +#endif + +#ifdef ORT_ROCM_CTX + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + thread_local RocmContext rocm_context; + rocm_context.Init(*context); + std::tuple current = std::tuple{rocm_context}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } +#endif + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + args.push_back(std::make_unique(context, ith_input, true)); + std::tuple current = std::tuple{reinterpret_cast(args.back().get())}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + args.push_back(std::make_unique(context, ith_input, true)); + std::tuple current = std::tuple{reinterpret_cast(*args.back().get())}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + args.push_back(std::make_unique(context, ith_output, false)); + std::tuple current = std::tuple{reinterpret_cast(args.back().get())}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + + template + static typename std::enable_if::value, std::tuple>::type + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { + args.push_back(std::make_unique(context, ith_output, false)); + std::tuple current = std::tuple{reinterpret_cast(*args.back().get())}; + auto next = CreateTuple(context, args, num_input, num_output, ep); + return std::tuple_cat(current, next); + } + +#define CREATE_TUPLE_INPUT(data_type) \ + template \ + static typename std::enable_if*>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast(args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if&>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast(*args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if*>>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if (ith_input < num_input) { \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } else { \ + std::tuple current = std::tuple{}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + } \ + template \ + static typename std::enable_if*>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("span input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{&reinterpret_cast*>(args.back().get())->AsSpan()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if&>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("span input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())->AsSpan()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if*>>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if (ith_input < num_input) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("span input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{&reinterpret_cast*>(args.back().get())->AsSpan()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } else { \ + std::tuple current = std::tuple{}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + } \ + template \ + static typename std::enable_if::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("scalar input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())->AsScalar()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if (ith_input < num_input) { \ + if ("CPUExecutionProvider" != ep) { \ + ORT_CXX_API_THROW("scalar input could only be applied to CPU EP", OrtErrorCode::ORT_RUNTIME_EXCEPTION); \ + } \ + args.push_back(std::make_unique>(context, ith_input, true)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())->AsScalar()}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } else { \ + std::tuple current = std::tuple{}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + } +#define CREATE_TUPLE_OUTPUT(data_type) \ + template \ + static typename std::enable_if*>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + args.push_back(std::make_unique>(context, ith_output, false)); \ + std::tuple current = std::tuple{reinterpret_cast(args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if&>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + args.push_back(std::make_unique>(context, ith_output, false)); \ + std::tuple current = std::tuple{reinterpret_cast(*args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + template \ + static typename std::enable_if*>>::value, std::tuple>::type \ + CreateTuple(OrtKernelContext* context, ArgPtrs& args, size_t num_input, size_t num_output, const std::string& ep) { \ + if (ith_output < num_output) { \ + args.push_back(std::make_unique>(context, ith_output, false)); \ + std::tuple current = std::tuple{reinterpret_cast*>(args.back().get())}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } else { \ + std::tuple current = std::tuple{}; \ + auto next = CreateTuple(context, args, num_input, num_output, ep); \ + return std::tuple_cat(current, next); \ + } \ + } +#define CREATE_TUPLE(data_type) \ + CREATE_TUPLE_INPUT(data_type) \ + CREATE_TUPLE_OUTPUT(data_type) + + CREATE_TUPLE(bool) + CREATE_TUPLE(float) + CREATE_TUPLE(Ort::Float16_t) + CREATE_TUPLE(Ort::BFloat16_t) + CREATE_TUPLE(double) + CREATE_TUPLE(int8_t) + CREATE_TUPLE(int16_t) + CREATE_TUPLE(int32_t) + CREATE_TUPLE(int64_t) + CREATE_TUPLE(uint8_t) + CREATE_TUPLE(uint16_t) + CREATE_TUPLE(uint32_t) + CREATE_TUPLE(uint64_t) + CREATE_TUPLE(std::string) + CREATE_TUPLE_INPUT(std::string_view) + CREATE_TUPLE(Ort::Float8E4M3FN_t) + CREATE_TUPLE(Ort::Float8E4M3FNUZ_t) + CREATE_TUPLE(Ort::Float8E5M2_t) + CREATE_TUPLE(Ort::Float8E5M2FNUZ_t) + + // ParseArgs ... + template + static typename std::enable_if<0 == sizeof...(Ts)>::type + ParseArgs(std::vector&, std::vector&) { + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + ParseArgs(input_types, output_types); + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + ParseArgs(input_types, output_types); + } + +#ifdef ORT_CUDA_CTX + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + ParseArgs(input_types, output_types); + } +#endif + +#ifdef ORT_ROCM_CTX + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + ParseArgs(input_types, output_types); + } +#endif + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + input_types.push_back(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); + ParseArgs(input_types, output_types); + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + input_types.push_back(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); + ParseArgs(input_types, output_types); + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + output_types.push_back(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); + ParseArgs(input_types, output_types); + } + + template + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type + ParseArgs(std::vector& input_types, std::vector& output_types) { + output_types.push_back(ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED); + ParseArgs(input_types, output_types); + } + +#define PARSE_INPUT_BASE(pack_type, onnx_type) \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + input_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + input_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + input_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } + +#define PARSE_INPUT(data_type, onnx_type) \ + PARSE_INPUT_BASE(const Custom::Tensor*, onnx_type) \ + PARSE_INPUT_BASE(const Custom::Tensor&, onnx_type) \ + PARSE_INPUT_BASE(const Custom::Span*, onnx_type) \ + PARSE_INPUT_BASE(const Custom::Span&, onnx_type) \ + PARSE_INPUT_BASE(data_type, onnx_type) + +#define PARSE_OUTPUT(data_type, onnx_type) \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same*>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + output_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same&>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + output_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } \ + template \ + static typename std::enable_if<0 <= sizeof...(Ts) && std::is_same*>>::value>::type \ + ParseArgs(std::vector& input_types, std::vector& output_types) { \ + output_types.push_back(onnx_type); \ + ParseArgs(input_types, output_types); \ + } + +#define PARSE_ARGS(data_type, onnx_type) \ + PARSE_INPUT(data_type, onnx_type) \ + PARSE_OUTPUT(data_type, onnx_type) + + PARSE_ARGS(bool, ONNX_TENSOR_ELEMENT_DATA_TYPE_BOOL) + PARSE_ARGS(float, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT) + PARSE_ARGS(Ort::Float16_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16) + PARSE_ARGS(Ort::BFloat16_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_BFLOAT16) + PARSE_ARGS(double, ONNX_TENSOR_ELEMENT_DATA_TYPE_DOUBLE) + PARSE_ARGS(int8_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT8) + PARSE_ARGS(int16_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT16) + PARSE_ARGS(int32_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT32) + PARSE_ARGS(int64_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_INT64) + PARSE_ARGS(uint8_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT8) + PARSE_ARGS(uint16_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT16) + PARSE_ARGS(uint32_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT32) + PARSE_ARGS(uint64_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_UINT64) + PARSE_ARGS(std::string, ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING) + PARSE_ARGS(std::string_view, ONNX_TENSOR_ELEMENT_DATA_TYPE_STRING) // todo - remove string_view output + PARSE_ARGS(Ort::Float8E4M3FN_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FN) + PARSE_ARGS(Ort::Float8E4M3FNUZ_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E4M3FNUZ) + PARSE_ARGS(Ort::Float8E5M2_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2) + PARSE_ARGS(Ort::Float8E5M2FNUZ_t, ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT8E5M2FNUZ) + + OrtLiteCustomOp(const char* op_name, + const char* execution_provider, + ShapeInferFn shape_infer_fn, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) : op_name_(op_name), + execution_provider_(execution_provider), + shape_infer_fn_(shape_infer_fn), + start_ver_(start_ver), + end_ver_(end_ver) { + OrtCustomOp::version = ORT_API_VERSION; + + OrtCustomOp::GetName = [](const OrtCustomOp* op) { return static_cast(op)->op_name_.c_str(); }; + OrtCustomOp::GetExecutionProviderType = [](const OrtCustomOp* op) { return ((OrtLiteCustomOp*)op)->execution_provider_.c_str(); }; + OrtCustomOp::GetInputMemoryType = [](const OrtCustomOp*, size_t) { return OrtMemTypeDefault; }; + + OrtCustomOp::GetInputTypeCount = [](const OrtCustomOp* op) { + auto self = reinterpret_cast(op); + return self->input_types_.size(); + }; + + OrtCustomOp::GetInputType = [](const OrtCustomOp* op, size_t indice) { + auto self = reinterpret_cast(op); + return self->input_types_[indice]; + }; + + OrtCustomOp::GetOutputTypeCount = [](const OrtCustomOp* op) { + auto self = reinterpret_cast(op); + return self->output_types_.size(); + }; + + OrtCustomOp::GetOutputType = [](const OrtCustomOp* op, size_t indice) { + auto self = reinterpret_cast(op); + return self->output_types_[indice]; + }; + + OrtCustomOp::GetInputCharacteristic = [](const OrtCustomOp* op, size_t indice) { + auto self = reinterpret_cast(op); + return self->input_types_[indice] == ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED ? INPUT_OUTPUT_VARIADIC : INPUT_OUTPUT_OPTIONAL; + }; + + OrtCustomOp::GetOutputCharacteristic = [](const OrtCustomOp* op, size_t indice) { + auto self = reinterpret_cast(op); + return self->output_types_[indice] == ONNX_TENSOR_ELEMENT_DATA_TYPE_UNDEFINED ? INPUT_OUTPUT_VARIADIC : INPUT_OUTPUT_OPTIONAL; + }; + + OrtCustomOp::GetVariadicInputMinArity = [](const OrtCustomOp*) { + return 1; + }; + + OrtCustomOp::GetVariadicInputHomogeneity = [](const OrtCustomOp*) { + return 0; + }; + + OrtCustomOp::GetVariadicOutputMinArity = [](const OrtCustomOp*) { + return 1; + }; + + OrtCustomOp::GetVariadicOutputHomogeneity = [](const OrtCustomOp*) { + return 0; + }; + + OrtCustomOp::GetVariadicInputMinArity = [](const OrtCustomOp*) { return 0; }; + OrtCustomOp::GetVariadicInputHomogeneity = [](const OrtCustomOp*) { return 0; }; + OrtCustomOp::GetVariadicOutputMinArity = [](const OrtCustomOp*) { return 0; }; + OrtCustomOp::GetVariadicOutputHomogeneity = [](const OrtCustomOp*) { return 0; }; + + OrtCustomOp::CreateKernelV2 = {}; + OrtCustomOp::KernelComputeV2 = {}; + OrtCustomOp::KernelCompute = {}; + + OrtCustomOp::InferOutputShapeFn = {}; + + OrtCustomOp::GetStartVersion = [](const OrtCustomOp* op) { + auto self = reinterpret_cast(op); + return self->start_ver_; + }; + + OrtCustomOp::GetEndVersion = [](const OrtCustomOp* op) { + auto self = reinterpret_cast(op); + return self->end_ver_; + }; + + OrtCustomOp::GetMayInplace = {}; + OrtCustomOp::ReleaseMayInplace = {}; + OrtCustomOp::GetAliasMap = {}; + OrtCustomOp::ReleaseAliasMap = {}; + } + + const std::string op_name_; + const std::string execution_provider_; + + std::vector input_types_; + std::vector output_types_; + + ShapeInferFn shape_infer_fn_ = {}; + + int start_ver_ = 1; + int end_ver_ = MAX_CUSTOM_OP_END_VER; + + void* compute_fn_ = {}; + void* compute_fn_return_status_ = {}; +}; + +//////////////////////////// OrtLiteCustomFunc //////////////////////////////// +// The struct is to implement function-as-op. +// E.g. a function might be defined as: +// void Filter(const Ort::Custom::Tensor& floats_in, Ort::Custom::Tensor& floats_out) { ... } +// It could be registered this way: +// Ort::CustomOpDomain v2_domain{"v2"}; +// std::unique_ptr fil_op_ptr{Ort::Custom::CreateLiteCustomOp("Filter", "CPUExecutionProvider", Filter)}; +// v2_domain.Add(fil_op_ptr.get()); +// session_options.Add(v2_domain); +// For the complete example, please search keyword "LiteCustomOpTest" under "/onnxruntime/test/". +template +struct OrtLiteCustomFunc : public OrtLiteCustomOp { + using ComputeFn = void (*)(Args...); + using ComputeFnReturnStatus = Status (*)(Args...); + using MyType = OrtLiteCustomFunc; + + struct Kernel { + size_t num_input_{}; + size_t num_output_{}; + ComputeFn compute_fn_{}; + ComputeFnReturnStatus compute_fn_return_status_{}; + std::string ep_{}; + }; + + OrtLiteCustomFunc(const char* op_name, + const char* execution_provider, + ComputeFn compute_fn, + ShapeInferFn shape_infer_fn = {}, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) : OrtLiteCustomOp(op_name, execution_provider, shape_infer_fn, start_ver, end_ver) { + compute_fn_ = reinterpret_cast(compute_fn); + ParseArgs(input_types_, output_types_); + + OrtCustomOp::KernelCompute = [](void* op_kernel, OrtKernelContext* context) { + auto kernel = reinterpret_cast(op_kernel); + std::vector args; + auto t = CreateTuple<0, 0, Args...>(context, args, kernel->num_input_, kernel->num_output_, kernel->ep_); + std::apply([kernel](Args const&... t_args) { kernel->compute_fn_(t_args...); }, t); + }; + + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* ort_api, const OrtKernelInfo* info) { + auto kernel = std::make_unique(); + auto me = static_cast(this_); + kernel->compute_fn_ = reinterpret_cast(me->compute_fn_); + Ort::ThrowOnError(ort_api->KernelInfo_GetInputCount(info, &kernel->num_input_)); + Ort::ThrowOnError(ort_api->KernelInfo_GetOutputCount(info, &kernel->num_output_)); + auto self = static_cast(this_); + kernel->ep_ = self->execution_provider_; + return reinterpret_cast(kernel.release()); + }; + + OrtCustomOp::KernelDestroy = [](void* op_kernel) { + delete reinterpret_cast(op_kernel); + }; + + if (shape_infer_fn_) { + OrtCustomOp::InferOutputShapeFn = [](const OrtCustomOp* op, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr { + auto shape_info_fn = static_cast(op)->shape_infer_fn_; + ShapeInferContext ctx(&GetApi(), ort_ctx); + return shape_info_fn(ctx); + }; + } + } + + OrtLiteCustomFunc(const char* op_name, + const char* execution_provider, + ComputeFnReturnStatus compute_fn_return_status, + ShapeInferFn shape_infer_fn = {}, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) : OrtLiteCustomOp(op_name, execution_provider, shape_infer_fn, start_ver, end_ver) { + compute_fn_return_status_ = reinterpret_cast(compute_fn_return_status); + ParseArgs(input_types_, output_types_); + + OrtCustomOp::KernelComputeV2 = [](void* op_kernel, OrtKernelContext* context) -> OrtStatusPtr { + auto kernel = reinterpret_cast(op_kernel); + std::vector args; + auto t = CreateTuple<0, 0, Args...>(context, args, kernel->num_input_, kernel->num_output_, kernel->ep_); + return std::apply([kernel](Args const&... t_args) { Status status = kernel->compute_fn_return_status_(t_args...); return status.release(); }, t); + }; + + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* ort_api, const OrtKernelInfo* info) { + auto kernel = std::make_unique(); + auto me = static_cast(this_); + kernel->compute_fn_return_status_ = reinterpret_cast(me->compute_fn_return_status_); + Ort::ThrowOnError(ort_api->KernelInfo_GetInputCount(info, &kernel->num_input_)); + Ort::ThrowOnError(ort_api->KernelInfo_GetOutputCount(info, &kernel->num_output_)); + auto self = static_cast(this_); + kernel->ep_ = self->execution_provider_; + return reinterpret_cast(kernel.release()); + }; + + OrtCustomOp::KernelDestroy = [](void* op_kernel) { + delete reinterpret_cast(op_kernel); + }; + + if (shape_infer_fn_) { + OrtCustomOp::InferOutputShapeFn = [](const OrtCustomOp* op, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr { + auto shape_info_fn = static_cast(op)->shape_infer_fn_; + ShapeInferContext ctx(&GetApi(), ort_ctx); + return shape_info_fn(ctx); + }; + } + } +}; // struct OrtLiteCustomFunc + +/////////////////////////// OrtLiteCustomStruct /////////////////////////// +// The struct is to implement struct-as-op. +// E.g. a struct might be defined as: +// struct Merge { +// Merge(const OrtApi* ort_api, const OrtKernelInfo* info) {...} +// void Compute(const Ort::Custom::Tensor& strings_in, +// std::string_view string_in, +// Ort::Custom::Tensor* strings_out) {...} +// bool reverse_ = false; +// }; +// It could be registered this way: +// Ort::CustomOpDomain v2_domain{"v2"}; +// std::unique_ptr mrg_op_ptr{Ort::Custom::CreateLiteCustomOp("Merge", "CPUExecutionProvider")}; +// v2_domain.Add(mrg_op_ptr.get()); +// session_options.Add(v2_domain); +// For the complete example, please search keyword "LiteCustomOpTest" under "/onnxruntime/test/". +template +struct OrtLiteCustomStruct : public OrtLiteCustomOp { + template + using CustomComputeFn = void (CustomOp::*)(Args...); + + template + using CustomComputeFnReturnStatus = Status (CustomOp::*)(Args...); + + using MyType = OrtLiteCustomStruct; + + struct Kernel { + size_t num_input_{}; + size_t num_output_{}; + std::unique_ptr custom_op_; + std::string ep_{}; + }; + + OrtLiteCustomStruct(const char* op_name, + const char* execution_provider, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) : OrtLiteCustomOp(op_name, execution_provider, {}, start_ver, end_ver) { + SetCompute(&CustomOp::Compute); + + OrtCustomOp::CreateKernel = [](const OrtCustomOp* this_, const OrtApi* ort_api, const OrtKernelInfo* info) { + auto kernel = std::make_unique(); + Ort::ThrowOnError(ort_api->KernelInfo_GetInputCount(info, &kernel->num_input_)); + Ort::ThrowOnError(ort_api->KernelInfo_GetOutputCount(info, &kernel->num_output_)); + kernel->custom_op_ = std::make_unique(ort_api, info); + auto self = static_cast(this_); + kernel->ep_ = self->execution_provider_; + return reinterpret_cast(kernel.release()); + }; + + OrtCustomOp::KernelDestroy = [](void* op_kernel) { + delete reinterpret_cast(op_kernel); + }; + + SetShapeInfer(0); + } + + template + void SetCompute(CustomComputeFn) { + ParseArgs(input_types_, output_types_); + OrtCustomOp::KernelCompute = [](void* op_kernel, OrtKernelContext* context) { + auto kernel = reinterpret_cast(op_kernel); + ArgPtrs args; + auto t = CreateTuple<0, 0, Args...>(context, args, kernel->num_input_, kernel->num_output_, kernel->ep_); + std::apply([kernel](Args const&... t_args) { kernel->custom_op_->Compute(t_args...); }, t); + }; + } + + template + void SetCompute(CustomComputeFnReturnStatus) { + ParseArgs(input_types_, output_types_); + OrtCustomOp::KernelComputeV2 = [](void* op_kernel, OrtKernelContext* context) -> OrtStatusPtr { + auto kernel = reinterpret_cast(op_kernel); + ArgPtrs args; + auto t = CreateTuple<0, 0, Args...>(context, args, kernel->num_input_, kernel->num_output_, kernel->ep_); + return std::apply([kernel](Args const&... t_args) { Status status = kernel->custom_op_->Compute(t_args...); return status.release(); }, t); + }; + } + + template + decltype(&C::InferOutputShape) SetShapeInfer(decltype(&C::InferOutputShape)) { + OrtCustomOp::InferOutputShapeFn = [](const OrtCustomOp*, OrtShapeInferContext* ort_ctx) -> OrtStatusPtr { + ShapeInferContext ctx(&GetApi(), ort_ctx); + return C::InferOutputShape(ctx); + }; + return {}; + } + + template + void SetShapeInfer(...) { + OrtCustomOp::InferOutputShapeFn = {}; + } +}; // struct OrtLiteCustomStruct + +/////////////////////////// CreateLiteCustomOp //////////////////////////// + +template +OrtLiteCustomOp* CreateLiteCustomOp(const char* op_name, + const char* execution_provider, + void (*custom_compute_fn)(Args...), + Status (*shape_infer_fn)(ShapeInferContext&) = {}, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) { + using LiteOp = OrtLiteCustomFunc; + return std::make_unique(op_name, execution_provider, custom_compute_fn, shape_infer_fn, start_ver, end_ver).release(); +} + +template +OrtLiteCustomOp* CreateLiteCustomOp(const char* op_name, + const char* execution_provider, + Status (*custom_compute_fn_v2)(Args...), + Status (*shape_infer_fn)(ShapeInferContext&) = {}, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) { + using LiteOp = OrtLiteCustomFunc; + return std::make_unique(op_name, execution_provider, custom_compute_fn_v2, shape_infer_fn, start_ver, end_ver).release(); +} + +template +OrtLiteCustomOp* CreateLiteCustomOp(const char* op_name, + const char* execution_provider, + int start_ver = 1, + int end_ver = MAX_CUSTOM_OP_END_VER) { + using LiteOp = OrtLiteCustomStruct; + return std::make_unique(op_name, execution_provider, start_ver, end_ver).release(); +} + +} // namespace Custom +} // namespace Ort diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_run_options_config_keys.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_run_options_config_keys.h new file mode 100644 index 0000000..c80b8c0 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_run_options_config_keys.h @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +/* + * This file defines RunOptions Config Keys and format of the Config Values. + * + * The Naming Convention for a RunOptions Config Key, + * "[Area][.[SubArea1].[SubArea2]...].[Keyname]" + * Such as "ep.cuda.use_arena" + * The Config Key cannot be empty + * The maximum length of the Config Key is 128 + * + * The string format of a RunOptions Config Value is defined individually for each Config. + * The maximum length of the Config Value is 1024 + */ + +// Key for enabling shrinkages of user listed device memory arenas. +// Expects a list of semi-colon separated key value pairs separated by colon in the following format: +// "device_0:device_id_0;device_1:device_id_1" +// No white-spaces allowed in the provided list string. +// Currently, the only supported devices are : "cpu", "gpu" (case sensitive). +// If "cpu" is included in the list, DisableCpuMemArena() API must not be called (i.e.) arena for cpu should be enabled. +// Example usage: "cpu:0;gpu:0" (or) "gpu:0" +// By default, the value for this key is empty (i.e.) no memory arenas are shrunk +static const char* const kOrtRunOptionsConfigEnableMemoryArenaShrinkage = "memory.enable_memory_arena_shrinkage"; + +// Set to '1' to not synchronize execution providers with CPU at the end of session run. +// Per default it will be set to '0' +// Taking CUDA EP as an example, it omit triggering cudaStreamSynchronize on the compute stream. +static const char* const kOrtRunOptionsConfigDisableSynchronizeExecutionProviders = "disable_synchronize_execution_providers"; + +// Set HTP performance mode for QNN HTP backend before session run. +// options for HTP performance mode: "burst", "balanced", "default", "high_performance", +// "high_power_saver", "low_balanced", "extreme_power_saver", "low_power_saver", "power_saver", +// "sustained_high_performance". Default to "default". +static const char* const kOrtRunOptionsConfigQnnPerfMode = "qnn.htp_perf_mode"; + +// Set HTP performance mode for QNN HTP backend post session run. +static const char* const kOrtRunOptionsConfigQnnPerfModePostRun = "qnn.htp_perf_mode_post_run"; + +// Set RPC control latency for QNN HTP backend +static const char* const kOrtRunOptionsConfigQnnRpcControlLatency = "qnn.rpc_control_latency"; + +// Set graph annotation id for CUDA EP. Use with enable_cuda_graph=true. +// The value should be an integer. If the value is not set, the default value is 0 and +// ORT session only captures one cuda graph before another capture is requested. +// If the value is set to -1, cuda graph capture/replay is disabled in that run. +// User are not expected to set the value to 0 as it is reserved for internal use. +static const char* const kOrtRunOptionsConfigCudaGraphAnnotation = "gpu_graph_id"; diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_session_options_config_keys.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_session_options_config_keys.h new file mode 100644 index 0000000..6a01602 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/onnxruntime_session_options_config_keys.h @@ -0,0 +1,291 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +/* + * This file defines SessionOptions Config Keys and format of the Config Values. + * + * The Naming Convention for a SessionOptions Config Key, + * "[Area][.[SubArea1].[SubArea2]...].[Keyname]" + * Such as "ep.cuda.use_arena" + * The Config Key cannot be empty + * The maximum length of the Config Key is 128 + * + * The string format of a SessionOptions Config Value is defined individually for each Config. + * The maximum length of the Config Value is 1024 + */ + +// Key for disable PrePacking, +// If the config value is set to "1" then the prepacking is disabled, otherwise prepacking is enabled (default value) +static const char* const kOrtSessionOptionsConfigDisablePrepacking = "session.disable_prepacking"; + +// A value of "1" means allocators registered in the env will be used. "0" means the allocators created in the session +// will be used. Use this to override the usage of env allocators on a per session level. +static const char* const kOrtSessionOptionsConfigUseEnvAllocators = "session.use_env_allocators"; + +// Set to 'ORT' (case sensitive) to load an ORT format model. +// If unset, model type will default to ONNX unless inferred from filename ('.ort' == ORT format) or bytes to be ORT +static const char* const kOrtSessionOptionsConfigLoadModelFormat = "session.load_model_format"; + +// Set to 'ORT' (case sensitive) to save optimized model in ORT format when SessionOptions.optimized_model_path is set. +// If unset, format will default to ONNX unless optimized_model_filepath ends in '.ort'. +static const char* const kOrtSessionOptionsConfigSaveModelFormat = "session.save_model_format"; + +// If a value is "1", flush-to-zero and denormal-as-zero are applied. The default is "0". +// When multiple sessions are created, a main thread doesn't override changes from succeeding session options, +// but threads in session thread pools follow option changes. +// When ORT runs with OpenMP, the same rule is applied, i.e. the first session option to flush-to-zero and +// denormal-as-zero is only applied to global OpenMP thread pool, which doesn't support per-session thread pool. +// Note that an alternative way not using this option at runtime is to train and export a model without denormals +// and that's recommended because turning this option on may hurt model accuracy. +static const char* const kOrtSessionOptionsConfigSetDenormalAsZero = "session.set_denormal_as_zero"; + +// It controls to run quantization model in QDQ (QuantizelinearDeQuantizelinear) format or not. +// "0": enable. ORT does fusion logic for QDQ format. +// "1": disable. ORT doesn't do fusion logic for QDQ format. +// Its default value is "0" unless the DirectML execution provider is registered, in which case it defaults to "1". +static const char* const kOrtSessionOptionsDisableQuantQDQ = "session.disable_quant_qdq"; + +// It controls whether to enable Double QDQ remover and Identical Children Consolidation +// "0": not to disable. ORT does remove the middle 2 Nodes from a Q->(QD->Q)->QD pairs +// "1": disable. ORT doesn't remove the middle 2 Nodes from a Q->(QD->Q)->QD pairs +// Its default value is "0" +static const char* const kOrtSessionOptionsDisableDoubleQDQRemover = "session.disable_double_qdq_remover"; + +// If set to "1", enables the removal of QuantizeLinear/DequantizeLinear node pairs once all QDQ handling has been +// completed. e.g. If after all QDQ handling has completed and we have -> FloatOp -> Q -> DQ -> FloatOp -> the +// Q -> DQ could potentially be removed. This will provide a performance benefit by avoiding going from float to +// 8-bit and back to float, but could impact accuracy. The impact on accuracy will be model specific and depend on +// other factors like whether the model was created using Quantization Aware Training or Post Training Quantization. +// As such, it's best to test to determine if enabling this works well for your scenario. +// The default value is "0" +// Available since version 1.11. +static const char* const kOrtSessionOptionsEnableQuantQDQCleanup = "session.enable_quant_qdq_cleanup"; + +// Enable or disable gelu approximation in graph optimization. "0": disable; "1": enable. The default is "0". +// GeluApproximation has side effects which may change the inference results. It is disabled by default due to this. +static const char* const kOrtSessionOptionsEnableGeluApproximation = "optimization.enable_gelu_approximation"; + +// This setting controls whether to enable AheadOfTime function inlining. +// AOT function inlining examines the graph and attempts to inline as many locally defined functions in the model +// as possible with the help of enabled execution providers. +// This can reduce the number of function calls and improve performance because it is done before +// Level1 optimizers and constant folding. However, under some circumstances, when the EPs are not available, +// one can disable the AOT inlining, produce an optimized model and postpone AOT until run time. +// "0": enable; "1": disable. +// Its default value is "0". +static const char* const kOrtSessionOptionsDisableAheadOfTimeFunctionInlining = "session.disable_aot_function_inlining"; + +#ifdef ENABLE_TRAINING +// Specifies a path of the file containing a list of memory optimization configurations. +// The value should be a string indicating the file path of the config file. +// The content of the config file is a JSON struct like this: +// [ +// "Gelu+Cast+:1:0", +// "Dropout+:1:1" +// ] +// Taking the example of "Gelu+Cast+:1:0", +// > "Gelu+Cast+" is the subgraph string, a valid "subgraph string" should be one subgraph representation +// output by ORT graph transformations. +// > "1" is "optimization strategy", valid values: 0 - disabled, 1 - recompute. +// > "0" is "number of subgraph to apply" which is used to control how many subgraphs to apply optimization, +// to avoid "oversaving" the memory. +static const char* const kOrtSessionOptionsMemoryOptimizerApplyConfig = "optimization.memory_optimizer_config"; + +// Specifies the config for detecting subgraphs for memory footprint reduction. +// The value should be a string contains int separated using commas. The default value is "0:0". +static const char* const kOrtSessionOptionsMemoryOptimizerProbeConfig = "optimization.enable_memory_probe_recompute_config"; +#endif + +// This setting if set should contain a comma separated list of optimizers names that should be disabled. +// Optimizers may take time to execute and affect model loading time. If you feel that a specific optimizer +// does not provider runtime benefits, but affects your model loading time you may disable it using this config +// entry. This option is not enabled in ORT_MINIMAL_BUILD build. +// A list of optimizes is available in onnxruntime/core/optimizer/graph_transformer_utils.cc +// +// Default is an empty string which means no optimizers are disabled. +static const char* const kOrtSessionOptionsDisableSpecifiedOptimizers = "optimization.disable_specified_optimizers"; + +// Enable or disable using device allocator for allocating initialized tensor memory. "1": enable; "0": disable. The default is "0". +// Using device allocators means the memory allocation is made using malloc/new. +static const char* const kOrtSessionOptionsUseDeviceAllocatorForInitializers = "session.use_device_allocator_for_initializers"; + +// Configure whether to allow the inter_op/intra_op threads spinning a number of times before blocking +// "0": thread will block if found no job to run +// "1": default, thread will spin a number of times before blocking +static const char* const kOrtSessionOptionsConfigAllowInterOpSpinning = "session.inter_op.allow_spinning"; +static const char* const kOrtSessionOptionsConfigAllowIntraOpSpinning = "session.intra_op.allow_spinning"; + +// Key for using model bytes directly for ORT format +// If a session is created using an input byte array contains the ORT format model data, +// By default we will copy the model bytes at the time of session creation to ensure the model bytes +// buffer is valid. +// Setting this option to "1" will disable copy the model bytes, and use the model bytes directly. The caller +// has to guarantee that the model bytes are valid until the ORT session using the model bytes is destroyed. +static const char* const kOrtSessionOptionsConfigUseORTModelBytesDirectly = "session.use_ort_model_bytes_directly"; + +/// +/// Key for using the ORT format model flatbuffer bytes directly for initializers. +/// This avoids copying the bytes and reduces peak memory usage during model loading and initialization. +/// Requires `session.use_ort_model_bytes_directly` to be true. +/// If set, the flatbuffer bytes provided when creating the InferenceSession MUST remain valid for the entire +/// duration of the InferenceSession. +/// +static const char* const kOrtSessionOptionsConfigUseORTModelBytesForInitializers = + "session.use_ort_model_bytes_for_initializers"; + +// This should only be specified when exporting an ORT format model for use on a different platform. +// If the ORT format model will be used on ARM platforms set to "1". For other platforms set to "0" +// Available since version 1.11. +static const char* const kOrtSessionOptionsQDQIsInt8Allowed = "session.qdqisint8allowed"; + +// x64 SSE4.1/AVX2/AVX512(with no VNNI) has overflow problem with quantizied matrix multiplication with U8S8. +// To avoid this we need to use slower U8U8 matrix multiplication instead. This option, if +// turned on, use slower U8U8 matrix multiplications. Only effective with AVX2 or AVX512 +// platforms. +static const char* const kOrtSessionOptionsAvx2PrecisionMode = "session.x64quantprecision"; + +// Specifies how minimal build graph optimizations are handled in a full build. +// These optimizations are at the extended level or higher. +// Possible values and their effects are: +// "save": Save runtime optimizations when saving an ORT format model. +// "apply": Only apply optimizations available in a minimal build. +// ""/: Apply optimizations available in a full build. +// Available since version 1.11. +static const char* const kOrtSessionOptionsConfigMinimalBuildOptimizations = + "optimization.minimal_build_optimizations"; + +// Note: The options specific to an EP should be specified prior to appending that EP to the session options object in +// order for them to take effect. + +// Specifies a list of stop op types. Nodes of a type in the stop op types and nodes downstream from them will not be +// run by the NNAPI EP. +// The value should be a ","-delimited list of op types. For example, "Add,Sub". +// If not specified, the default set of stop ops is used. To specify an empty stop ops types list and disable stop op +// exclusion, set the value to "". +static const char* const kOrtSessionOptionsConfigNnapiEpPartitioningStopOps = "ep.nnapi.partitioning_stop_ops"; + +// Enabling dynamic block-sizing for multithreading. +// With a positive value, thread pool will split a task of N iterations to blocks of size starting from: +// N / (num_of_threads * dynamic_block_base) +// As execution progresses, the size will decrease according to the diminishing residual of N, +// meaning the task will be distributed in smaller granularity for better parallelism. +// For some models, it helps to reduce the variance of E2E inference latency and boost performance. +// The feature will not function by default, specify any positive integer, e.g. "4", to enable it. +// Available since version 1.11. +static const char* const kOrtSessionOptionsConfigDynamicBlockBase = "session.dynamic_block_base"; + +// This option allows to decrease CPU usage between infrequent +// requests and forces any TP threads spinning stop immediately when the last of +// concurrent Run() call returns. +// Spinning is restarted on the next Run() call. +// Applies only to internal thread-pools +static const char* const kOrtSessionOptionsConfigForceSpinningStop = "session.force_spinning_stop"; + +// "1": all inconsistencies encountered during shape and type inference +// will result in failures. +// "0": in some cases warnings will be logged but processing will continue. The default. +// May be useful to expose bugs in models. +static const char* const kOrtSessionOptionsConfigStrictShapeTypeInference = "session.strict_shape_type_inference"; + +// "1": every model using a more recent opset than the latest released one will fail +// "0": the model may or may not work if onnxruntime cannot find an implementation, this option +// is used for development purpose. +static const char* const kOrtSessionOptionsConfigStrictAllowReleasedOpsetsOnly = "session.allow_released_opsets_only"; + +// The file saves configuration for partitioning node among logic streams +static const char* const kNodePartitionConfigFile = "session.node_partition_config_file"; + +// This Option allows setting affinities for intra op threads. +// Affinity string follows format: +// logical_processor_id,logical_processor_id;logical_processor_id,logical_processor_id +// Semicolon isolates configurations among threads, while comma split processors where ith thread expected to attach to. +// e.g.1,2,3;4,5 +// specifies affinities for two threads, with the 1st thread attach to the 1st, 2nd, and 3rd processor, and 2nd thread to the 4th and 5th. +// To ease the configuration, an "interval" is also allowed: +// e.g. 1-8;8-16;17-24 +// orders that the 1st thread runs on first eight processors, 2nd thread runs on next eight processors, and so forth. +// Note: +// 1. Once set, the number of thread affinities must equal to intra_op_num_threads - 1, since ort does not set affinity on the main thread which +// is started and managed by the calling app; +// 2. For windows, ort will infer the group id from a logical processor id, for example, assuming there are two groups with each has 64 logical processors, +// an id of 64 will be inferred as the last processor of the 1st group, while 65 will be interpreted as the 1st processor of the second group. +// Hence 64-65 is an invalid configuration, because a windows thread cannot be attached to processors across group boundary. +static const char* const kOrtSessionOptionsConfigIntraOpThreadAffinities = "session.intra_op_thread_affinities"; + +// This option will dump out the model to assist debugging any issues with layout transformation, +// and is primarily intended for developer usage. It is only relevant if an execution provider that requests +// NHWC layout is enabled such as NNAPI, XNNPACK or QNN. +// +// Default is off. Set to "1" to enable. +// +// If modified by layout transformation the model will be dumped after these steps: +// 1) insertion of the layout transformation Transpose nodes +// 2) after those are optimized using the transpose optimizer, +// 3) after the L1 transformers are applied to the updated graph. +// The model will be saved to filename post_layout_transform_step_.onnx. +static const char* const kDebugLayoutTransformation = "session.debug_layout_transformation"; + +// Graph nodes that are not supported by the execution providers (EPs) explicitly added to the session are +// assigned (i.e., "fallback") to the CPU EP by default. +// +// This option allows the user to disable the fallback of unsupported graph nodes to the CPU EP. +// If this option is set to "1", session creation will fail if the execution providers other than the CPU EP cannot +// fully support all of the nodes in the graph. +// +// It is invalid to set this option and explicitly add the CPU EP to the session. In this case, session creation +// will also fail with an error. +// +// Option values: +// - "0": CPU EP fallback is not disabled. [DEFAULT] +// - "1": CPU EP fallback is disabled. +static const char* const kOrtSessionOptionsDisableCPUEPFallback = "session.disable_cpu_ep_fallback"; + +// Use this config when serializing a large model after optimization to specify an external initializers file +static const char* const kOrtSessionOptionsOptimizedModelExternalInitializersFileName = + "session.optimized_model_external_initializers_file_name"; + +// Use this config to control the minimum size of the initializer when externalizing it during serialization +static const char* const kOrtSessionOptionsOptimizedModelExternalInitializersMinSizeInBytes = + "session.optimized_model_external_initializers_min_size_in_bytes"; + +// Enable EP context feature to dump the partitioned graph which includes the EP context into Onnx file. +// The dumped Onnx model with EP context can be used for future inference to avoid the EP graph partitioning/compile overhead. +// "0": disable. (default) +// "1": enable. +static const char* const kOrtSessionOptionEpContextEnable = "ep.context_enable"; + +// Specify the file path for the Onnx model which has EP context. +// Default to original_file_name_ctx.onnx if not specified +static const char* const kOrtSessionOptionEpContextFilePath = "ep.context_file_path"; + +// Flag to specify whether to dump the EP context into the Onnx model. +// "0": dump the EP context into separate file, keep the file name in the Onnx model. +// "1": dump the EP context into the Onnx model. (default). +static const char* const kOrtSessionOptionEpContextEmbedMode = "ep.context_embed_mode"; + +// Specify the EPContext node name prefix to make it unique +// in case user need to merge/connect multiple EPContext nodes in one model +static const char* const kOrtSessionOptionEpContextNodeNamePrefix = "ep.context_node_name_prefix"; + +// Share EP related resources across EPs +static const char* const kOrtSessionOptionShareEpContexts = "ep.share_ep_contexts"; + +// Gemm fastmath mode provides fp32 gemm acceleration with bfloat16 based matmul. +// Option values: +// - "0": Gemm FastMath mode is not enabled. [DEFAULT] +// - "1": Gemm FastMath mode is enabled. +static const char* const kOrtSessionOptionsMlasGemmFastMathArm64Bfloat16 = "mlas.enable_gemm_fastmath_arm64_bfloat16"; + +// When converting DQ + MatMul -> MatMulNBits, the accuracy level of the MatMulNBits is controlled by this option. +// Refer to MatMulNBits op schema for more details. +// If not provided, default is 4. +static const char* const kOrtSessionOptionsQDQMatMulNBitsAccuracyLevel = "session.qdq_matmulnbits_accuracy_level"; + +// THIS OPTION IS NOT A REGULAR SESSION OPTION SINCE IT CAN BE MODIFIED AT ANY TIME +// Meant to be used with SetEpDynamicOptions +// Specify the type of workload for this session. +// “Default”: OS determines the scheduling priority and processor performance to service this workload. [Default] +// “Efficient”: OS treats this workload is efficiency oriented with low scheduling priority and efficient processor performance. +static const char* const kOrtEpDynamicOptionsWorkloadType = "ep.dynamic.workload_type"; diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/provider_options.h b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/provider_options.h new file mode 100644 index 0000000..aab13e8 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/include/provider_options.h @@ -0,0 +1,18 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#pragma once + +#include +#include +#include + +namespace onnxruntime { + +// data types for execution provider options + +using ProviderOptions = std::unordered_map; +using ProviderOptionsVector = std::vector; +using ProviderOptionsMap = std::unordered_map; + +} // namespace onnxruntime diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeConfig.cmake b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeConfig.cmake new file mode 100644 index 0000000..7d52998 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeConfig.cmake @@ -0,0 +1,26 @@ + +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was PROJECT_CONFIG_FILE ######## + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +#################################################################################### +include("${CMAKE_CURRENT_LIST_DIR}/onnxruntimeTargets.cmake") diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeConfigVersion.cmake b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeConfigVersion.cmake new file mode 100644 index 0000000..7a5a614 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeConfigVersion.cmake @@ -0,0 +1,65 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version, +# but only if the requested major version is the same as the current one. +# The variable CVF_VERSION must be set before calling configure_file(). + + +set(PACKAGE_VERSION "1.20.1") + +if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + + if("1.20.1" MATCHES "^([0-9]+)\\.") + set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") + if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0) + string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}") + endif() + else() + set(CVF_VERSION_MAJOR "1.20.1") + endif() + + if(PACKAGE_FIND_VERSION_RANGE) + # both endpoints of the range must have the expected major version + math (EXPR CVF_VERSION_MAJOR_NEXT "${CVF_VERSION_MAJOR} + 1") + if (NOT PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX_MAJOR STREQUAL CVF_VERSION_MAJOR) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND NOT PACKAGE_FIND_VERSION_MAX VERSION_LESS_EQUAL CVF_VERSION_MAJOR_NEXT))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + elseif(PACKAGE_FIND_VERSION_MIN_MAJOR STREQUAL CVF_VERSION_MAJOR + AND ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS_EQUAL PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + else() + if(PACKAGE_FIND_VERSION_MAJOR STREQUAL CVF_VERSION_MAJOR) + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) + endif() + + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") + math(EXPR installedBits "8 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeTargets-release.cmake b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeTargets-release.cmake new file mode 100644 index 0000000..25eb51e --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeTargets-release.cmake @@ -0,0 +1,19 @@ +#---------------------------------------------------------------- +# Generated CMake target import file for configuration "Release". +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Import target "onnxruntime::onnxruntime" for configuration "Release" +set_property(TARGET onnxruntime::onnxruntime APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(onnxruntime::onnxruntime PROPERTIES + IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib64/libonnxruntime.so.1.20.1" + IMPORTED_SONAME_RELEASE "libonnxruntime.so.1" + ) + +list(APPEND _cmake_import_check_targets onnxruntime::onnxruntime ) +list(APPEND _cmake_import_check_files_for_onnxruntime::onnxruntime "${_IMPORT_PREFIX}/lib64/libonnxruntime.so.1.20.1" ) + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeTargets.cmake b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeTargets.cmake new file mode 100644 index 0000000..54150a0 --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/cmake/onnxruntime/onnxruntimeTargets.cmake @@ -0,0 +1,107 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.29) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS onnxruntime::onnxruntime) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Compute the installation prefix relative to this file. +get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) +if(_IMPORT_PREFIX STREQUAL "/") + set(_IMPORT_PREFIX "") +endif() + +# Create imported target onnxruntime::onnxruntime +add_library(onnxruntime::onnxruntime SHARED IMPORTED) + +set_target_properties(onnxruntime::onnxruntime PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "NSYNC_ATOMIC_CPP11" + INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/onnxruntime" +) + +# Load information for each installed configuration. +file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/onnxruntimeTargets-*.cmake") +foreach(_cmake_config_file IN LISTS _cmake_config_files) + include("${_cmake_config_file}") +endforeach() +unset(_cmake_config_file) +unset(_cmake_config_files) + +# Cleanup temporary variables. +set(_IMPORT_PREFIX) + +# Loop over all imported files and verify that they actually exist +foreach(_cmake_target IN LISTS _cmake_import_check_targets) + if(CMAKE_VERSION VERSION_LESS "3.28" + OR NOT DEFINED _cmake_import_check_xcframework_for_${_cmake_target} + OR NOT IS_DIRECTORY "${_cmake_import_check_xcframework_for_${_cmake_target}}") + foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}") + if(NOT EXISTS "${_cmake_file}") + message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file + \"${_cmake_file}\" +but this file does not exist. Possible reasons include: +* The file was deleted, renamed, or moved to another location. +* An install or uninstall procedure did not complete successfully. +* The installation package was faulty and contained + \"${CMAKE_CURRENT_LIST_FILE}\" +but not all the files it references. +") + endif() + endforeach() + endif() + unset(_cmake_file) + unset("_cmake_import_check_files_for_${_cmake_target}") +endforeach() +unset(_cmake_target) +unset(_cmake_import_check_targets) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so new file mode 100755 index 0000000..1a5a2db Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so differ diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so.1 b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so.1 new file mode 100755 index 0000000..1a5a2db Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so.1 differ diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so.1.20.1 b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so.1.20.1 new file mode 100755 index 0000000..1a5a2db Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime.so.1.20.1 differ diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime_providers_shared.so b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime_providers_shared.so new file mode 100755 index 0000000..eae1332 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/libonnxruntime_providers_shared.so differ diff --git a/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/pkgconfig/libonnxruntime.pc b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/pkgconfig/libonnxruntime.pc new file mode 100644 index 0000000..031825f --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/third_party/onnxruntime/lib/pkgconfig/libonnxruntime.pc @@ -0,0 +1,13 @@ +prefix=/usr/local +bindir=${prefix}/bin +mandir=${prefix}/share/man +docdir=${prefix}/share/doc/onnxruntime +libdir=${prefix}/lib64 +includedir=${prefix}/include/onnxruntime + +Name: onnxruntime +Description: ONNX runtime +URL: https://github.com/microsoft/onnxruntime +Version: 1.20.1 +Libs: -L${libdir} -lonnxruntime +Cflags: -I${includedir} diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/out_onnx.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/out_onnx.png new file mode 100644 index 0000000..f046bca Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/out_onnx.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/out_onnx_test.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/out_onnx_test.png new file mode 100644 index 0000000..08477e2 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/out_onnx_test.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue.png new file mode 100644 index 0000000..da23770 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue1.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue1.png new file mode 100644 index 0000000..f046bca Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue1.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue2.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue2.png new file mode 100644 index 0000000..f046bca Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue2.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue888.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue888.png new file mode 100644 index 0000000..4618031 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue888.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue_trt.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue_trt.png new file mode 100644 index 0000000..4618031 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_blue_trt.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_0.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_0.png new file mode 100644 index 0000000..f046bca Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_0.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_blue.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_blue.png new file mode 100644 index 0000000..f046bca Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_blue.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_blue777.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_blue777.png new file mode 100644 index 0000000..08477e2 Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_blue777.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_m1.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_m1.png new file mode 100644 index 0000000..f046bca Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/output_test_onnx_m1.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/run_inference.sh b/src/rm_auto_aim/armor_yolo_detect/trt_inference/run_inference.sh new file mode 100755 index 0000000..dfedece --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/trt_inference/run_inference.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [[ $# -lt 3 ]]; then + echo "Usage: $0 [detect_color] [conf] [nms]" + exit 1 +fi + +MODEL_PATH="$1" +INPUT_IMAGE="$2" +OUTPUT_IMAGE="$3" +DETECT_COLOR="${4:-1}" +CONF_THRESHOLD="${5:-0.68}" +NMS_THRESHOLD="${6:-0.5}" + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +WORKSPACE_ROOT="$(cd "${SCRIPT_DIR}/../../../../.." && pwd)" + +cd "${WORKSPACE_ROOT}" +source ./install/setup.bash + +ros2 run armor_yolo_detect trt_inference_test \ + "${MODEL_PATH}" \ + "${INPUT_IMAGE}" \ + "${OUTPUT_IMAGE}" \ + "${DETECT_COLOR}" \ + "${CONF_THRESHOLD}" \ + "${NMS_THRESHOLD}" diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/stdout_shape.png b/src/rm_auto_aim/armor_yolo_detect/trt_inference/stdout_shape.png new file mode 100644 index 0000000..f046bca Binary files /dev/null and b/src/rm_auto_aim/armor_yolo_detect/trt_inference/stdout_shape.png differ diff --git a/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp b/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp new file mode 100644 index 0000000..55a17ac --- /dev/null +++ b/src/rm_auto_aim/armor_yolo_detect/trt_inference/trt_inference_test.cpp @@ -0,0 +1,396 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include "armor_yolo_detect/armor_yolo_detector.hpp" +#include "armor_yolo_detect/types.hpp" + +namespace fs = std::filesystem; + +namespace { + +inline uint16_t floatToHalf(float f) { + uint32_t x; + std::memcpy(&x, &f, sizeof(float)); + uint32_t sign = (x >> 16) & 0x8000; + uint32_t exp = (x & 0x7f800000) >> 23; + uint32_t mant = x & 0x007fffff; + if (exp == 0) return sign; + if (exp == 255) return sign | 0x7c00 | (mant ? 1 : 0); + int new_exp = static_cast(exp) - 127 + 15; + if (new_exp <= 0) return sign; + if (new_exp >= 31) return sign | 0x7c00; + return sign | (static_cast(new_exp) << 10) | (mant >> 13); +} + +float sigmoid(float x) { + if (x > 0) { + return 1.0f / (1.0f + std::exp(-x)); + } + return std::exp(x) / (1.0f + std::exp(x)); +} + +std::vector preprocessToCHW(const cv::Mat& bgr_image) { + cv::Mat resized; + cv::resize(bgr_image, resized, cv::Size(640, 640)); + + cv::Mat rgb; + // Disable BGR2RGB. The model natively tracks blue on channel 0, meaning it implies a BGR layout. + // cv::cvtColor(resized, rgb, cv::COLOR_BGR2RGB); + rgb = resized; + + cv::Mat normalized; + rgb.convertTo(normalized, CV_32FC3, 1.0 / 255.0); + + std::vector chw(3 * 640 * 640); + std::array channels = { + cv::Mat(640, 640, CV_32F, chw.data() + 0 * 640 * 640), + cv::Mat(640, 640, CV_32F, chw.data() + 1 * 640 * 640), + cv::Mat(640, 640, CV_32F, chw.data() + 2 * 640 * 640)}; + cv::split(normalized, channels.data()); + return chw; +} + +std::vector detectByOnnx( + const std::string& onnx_path, + const cv::Mat& image, + int detect_color, + float conf_threshold) { + static Ort::Env env(ORT_LOGGING_LEVEL_WARNING, "trt_inference_test"); + + Ort::SessionOptions session_options; + session_options.SetIntraOpNumThreads(1); + session_options.SetGraphOptimizationLevel(GraphOptimizationLevel::ORT_ENABLE_EXTENDED); + + Ort::Session session(env, onnx_path.c_str(), session_options); + Ort::AllocatorWithDefaultOptions allocator; + + auto input_name_alloc = session.GetInputNameAllocated(0, allocator); + auto output_name_alloc = session.GetOutputNameAllocated(0, allocator); + const char* input_name = input_name_alloc.get(); + const char* output_name = output_name_alloc.get(); + + Ort::TypeInfo input_type_info = session.GetInputTypeInfo(0); + auto input_tensor_info = input_type_info.GetTensorTypeAndShapeInfo(); + auto input_elem_type = input_tensor_info.GetElementType(); + auto input_shape = input_tensor_info.GetShape(); + if (input_shape.size() != 4) { + throw std::runtime_error("Unexpected ONNX input shape rank"); + } + input_shape[0] = 1; + input_shape[1] = 3; + input_shape[2] = 640; + input_shape[3] = 640; + + std::vector chw = preprocessToCHW(image); + + Ort::MemoryInfo memory_info = Ort::MemoryInfo::CreateCpu(OrtArenaAllocator, OrtMemTypeDefault); + + std::vector input_tensors; + input_tensors.reserve(1); + std::vector input_half; + + if (input_elem_type == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16) { + input_half.resize(chw.size()); + for (size_t i = 0; i < chw.size(); ++i) { + input_half[i] = Ort::Float16_t::FromBits(floatToHalf(chw[i])); + } + input_tensors.emplace_back(Ort::Value::CreateTensor( + memory_info, input_half.data(), input_half.size(), input_shape.data(), input_shape.size())); + } else { + input_tensors.emplace_back(Ort::Value::CreateTensor( + memory_info, chw.data(), chw.size(), input_shape.data(), input_shape.size())); + } + + const char* input_names[] = {input_name}; + const char* output_names[] = {output_name}; + + auto output_tensors = session.Run( + Ort::RunOptions{nullptr}, input_names, input_tensors.data(), 1, output_names, 1); + + if (output_tensors.empty() || !output_tensors[0].IsTensor()) { + throw std::runtime_error("ONNX output tensor is empty"); + } + + auto output_info = output_tensors[0].GetTensorTypeAndShapeInfo(); + auto output_shape = output_info.GetShape(); + auto output_elem_type = output_info.GetElementType(); + const size_t output_count = output_info.GetElementCount(); + + int rows = 0; + int cols = 0; + std::cout << "ONNX output shape: "; + for (auto s : output_shape) std::cout << s << " "; + std::cout << std::endl; + if (output_shape.size() >= 3) { + rows = static_cast(output_shape[output_shape.size() - 2]); + cols = static_cast(output_shape[output_shape.size() - 1]); + } else if (output_shape.size() == 2) { + rows = static_cast(output_shape[0]); + cols = static_cast(output_shape[1]); + } + if (rows <= 0 || cols <= 0) { + throw std::runtime_error("Unexpected ONNX output shape"); + } + + std::vector output_data(output_count); + if (output_elem_type == ONNX_TENSOR_ELEMENT_DATA_TYPE_FLOAT16) { + const Ort::Float16_t* output_half = output_tensors[0].GetTensorData(); + for (size_t i = 0; i < output_count; ++i) { + output_data[i] = output_half[i].ToFloat(); + } + } else { + const float* output_float = output_tensors[0].GetTensorData(); + std::copy(output_float, output_float + output_count, output_data.begin()); + } + + std::vector armors; + armors.reserve(static_cast(rows)); + + for (int i = 0; i < rows; ++i) { + const float* row = output_data.data() + static_cast(i) * static_cast(cols); + // if (cols < 23) { + // continue; + // } + + const float conf = sigmoid(row[8]); + if (conf < conf_threshold) { + continue; + } + + int color_id = 0; + float max_color_score = sigmoid(row[9]); + for (int c = 1; c < 4; ++c) { + const float score = sigmoid(row[9 + c]); + if (score > max_color_score) { + max_color_score = score; + color_id = c; + } + } + + if (color_id == 2 || color_id == 3) { + continue; + } + if (detect_color == 0 && color_id == 1) { + continue; + } + if (detect_color == 1 && color_id == 0) { + continue; + } + + int num_id = 0; + float max_num_score = sigmoid(row[13]); + for (int c = 1; c < 10; ++c) { + const float score = sigmoid(row[13 + c]); + if (score > max_num_score) { + max_num_score = score; + num_id = c; + } + } + + armor_yolo_detect::YoloObject obj; + obj.label = num_id; + obj.prob = conf; + obj.color = static_cast(color_id); + for (int k = 0; k < 8; ++k) { + obj.landmarks[k] = row[k]; + } + + const float scale_x = static_cast(image.cols) / 640.0f; + const float scale_y = static_cast(image.rows) / 640.0f; + const float max_x = static_cast(std::max(0, image.cols - 1)); + const float max_y = static_cast(std::max(0, image.rows - 1)); + + for (int k = 0; k < 4; ++k) { + const int x_idx = k * 2; + const int y_idx = x_idx + 1; + obj.landmarks[x_idx] = std::clamp(obj.landmarks[x_idx] * scale_x, 0.0f, max_x); + obj.landmarks[y_idx] = std::clamp(obj.landmarks[y_idx] * scale_y, 0.0f, max_y); + } + + cv::Point2f center( + (obj.landmarks[0] + obj.landmarks[2] + obj.landmarks[4] + obj.landmarks[6]) / 4.0f, + (obj.landmarks[1] + obj.landmarks[3] + obj.landmarks[5] + obj.landmarks[7]) / 4.0f); + + armor_yolo_detect::Armor armor(obj, center); + armor.number_class = static_cast(obj.label); + armor.confidence = obj.prob; + armors.push_back(armor); + } +std::vector keep_idx; + std::vector scores; + std::vector bboxes; + for (const auto& armor : armors) { + scores.push_back(armor.confidence); + cv::Rect bbox = cv::boundingRect(armor.landmark_points); + bboxes.push_back(bbox); + } + cv::dnn::NMSBoxes(bboxes, scores, conf_threshold, 0.1f, keep_idx); + + std::vector nms_armors; + for (int idx : keep_idx) { + nms_armors.push_back(armors[idx]); + } + return nms_armors; + +} + +std::vector detectByTrt( + const std::string& engine_path, + const cv::Mat& image, + int detect_color, + float conf_threshold, + float nms_threshold) { + armor_yolo_detect::Detector detector; + armor_yolo_detect::Detector::Params params; + params.detect_color = detect_color; + params.conf_threshold = conf_threshold; + params.nms_threshold = nms_threshold; + + if (!detector.init(engine_path, params)) { + throw std::runtime_error("Failed to initialize detector with engine: " + engine_path); + } + + auto yolo_objs = detector.detectRaw(image); + std::vector armors; + for (const auto& obj : yolo_objs) { + cv::Point2f center( + (obj.landmarks[0] + obj.landmarks[2] + obj.landmarks[4] + obj.landmarks[6]) / 4.0f, + (obj.landmarks[1] + obj.landmarks[3] + obj.landmarks[5] + obj.landmarks[7]) / 4.0f); + armor_yolo_detect::Armor armor(obj, center); + armor.number_class = static_cast(obj.label); + armors.push_back(armor); + } + return armors; +} + +} // namespace + +int main(int argc, char** argv) { + if (argc < 4) { + std::cerr << "Usage: trt_inference_test [detect_color] [conf] [nms]\n"; + return 1; + } + + const std::string model_path = argv[1]; + const std::string input_image_path = argv[2]; + const std::string output_arg = argv[3]; + + fs::path workspace_root; + const char* colcon_prefix = std::getenv("COLCON_CURRENT_PREFIX"); + if (colcon_prefix != nullptr) { + fs::path prefix_path(colcon_prefix); + workspace_root = prefix_path.parent_path().parent_path(); + } else { + workspace_root = fs::current_path(); + } + + fs::path default_output_dir = + workspace_root / "src/rm_auto_aim/armor_yolo_detect/trt_inference"; + fs::create_directories(default_output_dir); + + fs::path output_path(output_arg); + if (output_path.is_relative() && output_path.parent_path().empty()) { + output_path = default_output_dir / output_path; + } + + int detect_color = 1; + float conf_threshold = 0.68f; + float nms_threshold = 0.5f; + + if (argc >= 5) { + detect_color = std::stoi(argv[4]); + } + if (argc >= 6) { + conf_threshold = std::stof(argv[5]); + } + if (argc >= 7) { + nms_threshold = std::stof(argv[6]); + } + + if (!fs::exists(model_path)) { + std::cerr << "Model not found: " << model_path << std::endl; + return 2; + } + if (!fs::exists(input_image_path)) { + std::cerr << "Input image not found: " << input_image_path << std::endl; + return 3; + } + + cv::Mat image = cv::imread(input_image_path, cv::IMREAD_COLOR); + if (image.empty()) { + std::cerr << "Failed to read image: " << input_image_path << std::endl; + return 4; + } + + std::vector armors; + try { + std::string model_ext = fs::path(model_path).extension().string(); + std::transform(model_ext.begin(), model_ext.end(), model_ext.begin(), + [](unsigned char c) { return static_cast(std::tolower(c)); }); + + if (model_ext == ".onnx") { + armors = detectByOnnx(model_path, image, detect_color, conf_threshold); + } else { + armors = detectByTrt(model_path, image, detect_color, conf_threshold, nms_threshold); + } + } catch (const std::exception& e) { + std::cerr << "Inference failed: " << e.what() << std::endl; + return 5; + } + + cv::Mat vis = image.clone(); + cv::putText(vis, + "det=" + std::to_string(armors.size()), + cv::Point(20, 40), + cv::FONT_HERSHEY_SIMPLEX, + 1.0, + cv::Scalar(0, 255, 255), + 2); + + for (const auto& armor : armors) { + std::vector pts; + pts.reserve(armor.landmark_points.size()); + for (const auto& p : armor.landmark_points) { + pts.emplace_back(static_cast(p.x), static_cast(p.y)); + cv::circle(vis, cv::Point(static_cast(p.x), static_cast(p.y)), 3, cv::Scalar(255, 0, 0), -1); + } + + const cv::Point* pts_ptr = pts.data(); + int npts = static_cast(pts.size()); + cv::polylines(vis, &pts_ptr, &npts, 1, true, cv::Scalar(0, 255, 0), 2); + + std::ostringstream label; + label << armor_yolo_detect::numberClassToString(armor.number_class) << " " + << std::fixed << std::setprecision(2) << armor.confidence; + + cv::putText(vis, + label.str(), + cv::Point(static_cast(armor.center.x), static_cast(armor.center.y)), + cv::FONT_HERSHEY_SIMPLEX, + 0.6, + cv::Scalar(0, 255, 255), + 2); + } + + if (!cv::imwrite(output_path.string(), vis)) { + std::cerr << "Failed to write output image: " << output_path.string() << std::endl; + return 6; + } + + std::cout << "Inference done. model=" << model_path + << " detections=" << armors.size() + << " output=" << output_path.string() << std::endl; + + return 0; +} diff --git a/src/rm_auto_aim/rm_auto_aim/CMakeLists.txt b/src/rm_auto_aim/rm_auto_aim/CMakeLists.txt new file mode 100644 index 0000000..1ec501e --- /dev/null +++ b/src/rm_auto_aim/rm_auto_aim/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.8) +project(rm_auto_aim) + +find_package(ament_cmake_auto REQUIRED) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + set(ament_cmake_copyright_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package() diff --git a/src/rm_auto_aim/rm_auto_aim/package.xml b/src/rm_auto_aim/rm_auto_aim/package.xml new file mode 100644 index 0000000..e9d705b --- /dev/null +++ b/src/rm_auto_aim/rm_auto_aim/package.xml @@ -0,0 +1,23 @@ + + + + rm_auto_aim + 0.0.0 + TODO: Package description + chenjun + TODO: License declaration + + ament_cmake + + rm_interfaces + armor_detector + armor_yolo_detect + armor_solver + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/src/rm_bringup/CMakeLists.txt b/src/rm_bringup/CMakeLists.txt new file mode 100644 index 0000000..1442249 --- /dev/null +++ b/src/rm_bringup/CMakeLists.txt @@ -0,0 +1,16 @@ +cmake_minimum_required(VERSION 3.8) +project(rm_bringup) + +find_package(ament_cmake_auto REQUIRED) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + set(ament_cmake_copyright_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package( + INSTALL_TO_SHARE + launch + config +) diff --git a/src/rm_bringup/config/camera_info.yaml b/src/rm_bringup/config/camera_info.yaml new file mode 100644 index 0000000..44aa440 --- /dev/null +++ b/src/rm_bringup/config/camera_info.yaml @@ -0,0 +1,20 @@ +image_width: 1440 +image_height: 1080 +camera_name: hik +camera_matrix: + rows: 3 + cols: 3 + data: [1762.08104, 0.000000, 713.40561, 0.000000, 1770.76313, 555.02238, 0.000000, 0.000000, 1.000000] +distortion_model: plumb_bob +distortion_coefficients: + rows: 1 + cols: 5 + data: [-0.062731, 0.093291, -0.003401, 0.001370, 0.000000] +rectification_matrix: + rows: 3 + cols: 3 + data: [1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000] +projection_matrix: + rows: 3 + cols: 4 + data: [1747.58521, 0.000000, 714.12243, 0.000000, 0.000000, 1760.43799, 552.92865, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000] \ No newline at end of file diff --git a/src/rm_bringup/config/launch_params.yaml b/src/rm_bringup/config/launch_params.yaml new file mode 100644 index 0000000..ab9da58 --- /dev/null +++ b/src/rm_bringup/config/launch_params.yaml @@ -0,0 +1,48 @@ +odom2camera: + xyz: "\"0.1536 -0.061325 0.0097\"" + rpy: "\"0.0 0.0 0.0\"" #p越大越低,,,y越大偏左 + #pitch_diff为负,偏上,yaw_diff为负,偏左 + + + +# 0.0148,,,0.003 +# 枪管相对于pitch_link的偏移 [x=向前, y=向左, z=向上] 单位:米 +barrel: + xyz: "\"0.18025 0.0 0.0\"" + rpy: "\"0.0 0.0 0.0\"" +#176 +# 云台轴间距偏移 [x, y, z] (单位: 米) +# pitch轴相对于yaw轴的偏移 +yaw_to_pitch_offset: [0.0, 0.0, 0.0] +# yaw->pitch 半径 (单位: 米),用于角度驱动的 x/z 偏移 +yaw_to_pitch_radius: 0.128 +# 是否使用电控下发的 yaw->pitch 夹角 +use_yaw_to_pitch_angle: true +# use_yaw_to_pitch_angle 为 true 时接收 20 字节;为 false 时接收 16 字节 + +# 是否启用枪管坐标系进行更精确的弹道解算 +use_barrel_frame: true + +# 设置启动参数 +# 命名空间 所有节点、话题都会以这个命名空间开头,如 some_namespace/image_raw +namespace: '' +# true: 读取视频 false: 读取相机 +video_play: false +# 相机类型: hik(海康) - 仅当video_play为false时生效 +camera_type: hik +# true: 虚拟下位机 false: 实车 +virtual_serial: false +# true: 英雄解算 false: 传统解算 +hero_solver: false +# 装甲板识别方法切换(仅改这里) +# detect: 传统cv装甲板 +# yolo_detect: YOLO装甲板 +armor_detector_method: yolo_detect + +# 兼容保留项(由 bringup.launch.py 读取)。 +# 当前重新拉取版 armor_yolo_detect 节点本身不使用该参数,保留 false 即可。 +yolo_require_tf: false +# true: 开启打符 false: 关闭打符 +rune: false +# true: 启动导航tf false: 不启动导航tf +navigation: false diff --git a/src/rm_bringup/config/node_params/armor_detector_params.yaml b/src/rm_bringup/config/node_params/armor_detector_params.yaml new file mode 100644 index 0000000..9217426 --- /dev/null +++ b/src/rm_bringup/config/node_params/armor_detector_params.yaml @@ -0,0 +1,36 @@ +/**: + ros__parameters: + debug: true + debug_log_interval_frames: 60 + debug.enable_terminal_log: false + debug.enable_markers: false + debug.enable_lights_msg: false + debug.enable_armors_msg: false + debug.enable_binary_img: true + debug.enable_number_img: false + debug.enable_result_img: true + tf_error_log_interval_ms: 1000 + max_queue_size: 1 + process_every_n_frames: 2 + target_frame: odom + detect_color: 1 + binary_thres: 170 + + use_pca: true # 使用PCA算法矫正灯条的角点 + use_ba: false # 使用BA优化算法求解装甲板的Yaw角 + + light.use_fit_line: true # 使用最小二乘直线拟合(cv::fitLine)矫正灯条上下端点 + + light.min_ratio: 0.0001 + light.max_ratio: 1.0 + light.max_angle: 40.0 + light.color_diff_thresh: 20 + armor.min_light_ratio: 0.8 + armor.min_small_center_distance: 0.8 + armor.max_small_center_distance: 3.5 + armor.min_large_center_distance: 3.5 + armor.max_large_center_distance: 8.0 + armor.max_angle: 35.0 + + classifier_threshold: 0.7 + ignore_classes: ["negative"] diff --git a/src/rm_bringup/config/node_params/armor_solver_params.yaml b/src/rm_bringup/config/node_params/armor_solver_params.yaml new file mode 100644 index 0000000..b64abe4 --- /dev/null +++ b/src/rm_bringup/config/node_params/armor_solver_params.yaml @@ -0,0 +1,58 @@ +/**: + ros__parameters: + debug: true + bullet_speed_debug: true #测试弹速 + target_frame: odom + max_armor_distance: 10.0 + + ekf: + # Adaptive Q matrix parameters + # Q noise varies based on velocity: high angular vel -> lower position noise, high linear vel -> lower yaw noise + # Formula: s2q = exp(-vel) * (max - min) + min + sigma2_q_xyz_max: 0.50 # Position noise upper bound (when target moves slowly) + sigma2_q_xyz_min: 0.01 # Position noise lower bound (when target spins fast) + sigma2_q_yaw_max: 0.50 # Yaw noise upper bound (when target moves slowly) + sigma2_q_yaw_min: 0.01 # Yaw noise lower bound (when target moves fast) + sigma2_q_r: 4.0 # Radius noise (fixed) + sigma2_q_d_zc: 8.0 # Height offset noise (fixed) + + # R matrix parameters (measurement noise, scaled by distance) + r_x: 2e-3 + r_y: 2e-3 + r_z: 50e-3 + r_yaw: 2e-3 + + tracker: + max_match_distance: 0.3 + max_match_yaw_diff: 0.3 + + tracking_thres: 1 + lost_time_thres: 1.0 + + solver: + shoot_rate: 3 + bullet_speed: 20.5 + shooting_range_width: 0.10 #射击范围 + shooting_range_height: 0.10 #射击范围 + prediction_delay: 0.02 # 预测装甲板位置的延时,单位秒,+飞行时间 + controller_delay: 0.01 + max_tracking_v_yaw: 60.1 #转速(rad/s)大于这个值时瞄准机器人中心 + side_angle: 15.0 + compenstator_type: "resistance" + gravity: 9.792 + resistance: 0.038 + iteration_times: 20 # 补偿的迭代次数 + + # ["距离下限, 距离上限, 高度下限, 高度下限, pitch轴补偿值"] + # [dist_low, dist_high, height_low, height_high, pitch_offset_deg, yaw_offset_deg] + angle_offset: [ + "2.5 3.5 -1.0 0.4 0.0 0.0", + "5.0 6.0 0.4 0.8 0.0 0.0", + "5.0 6.0 0.8 1.2 0.0 0.0", + "6.0 7.0 -1.0 0.4 0.0 0.0", + "6.0 7.0 0.4 0.8 0.0 0.0", + "6.0 7.0 0.8 1.2 0.0 0.0", + "7.0 8.0 -1.0 0.4 0.0 0.0", + "7.0 8.0 0.4 0.8 0.0 0.0", + "7.0 8.0 0.8 1.2 0.0 0.0", + ] diff --git a/src/rm_bringup/config/node_params/armor_yolo_detect_params.yaml b/src/rm_bringup/config/node_params/armor_yolo_detect_params.yaml new file mode 100644 index 0000000..4390402 --- /dev/null +++ b/src/rm_bringup/config/node_params/armor_yolo_detect_params.yaml @@ -0,0 +1,44 @@ +/**: + ros__parameters: + # Detection mode: 0=HYBRID_SYNC every picture, 1=HYBRID_ROI_CACHE + detector_mode: 1 + roi_update_interval: 3 + + # YOLO params + conf_threshold: 0.75 + nms_threshold: 0.50 + detect_color: 1 + + # ROI expansion (pixels) + roi_expand_pixel: 80 + + # Binary threshold for light detection + binary_thres: 100 + + # Light detection params + light.use_fit_line: true + light.min_ratio: 0.08 + light.max_ratio: 0.4 + light.max_angle: 40.0 + light.color_diff_thresh: 25 + + # Armor matching params + armor.min_light_ratio: 0.6 + armor.min_small_center_distance: 0.8 + armor.max_small_center_distance: 3.2 + armor.min_large_center_distance: 3.2 + armor.max_large_center_distance: 5.0 + armor.max_angle: 35.0 + + # Queue and processing + max_queue_size: 1 + process_every_n_frames: 2 + use_ba: false + target_frame: odom + + # Debug + debug: true + debug_log_interval_frames: 60 + debug.enable_terminal_log: true + debug.enable_markers: false + debug.enable_result_img: true diff --git a/src/rm_bringup/config/node_params/camera_driver_params.yaml b/src/rm_bringup/config/node_params/camera_driver_params.yaml new file mode 100644 index 0000000..8953963 --- /dev/null +++ b/src/rm_bringup/config/node_params/camera_driver_params.yaml @@ -0,0 +1,11 @@ +/**: + ros__parameters: + camera_info_url: package://rm_bringup/config/camera_info.yaml + exposure_time: 1000 + gain: 18.3 + resolution_width: 1440 + resolution_height: 1080 + offsetX: 0 + offsetY: 0 + camera_name: "hik" + recording: false #是否录制 diff --git a/src/rm_bringup/config/node_params/rune_detector_params.yaml b/src/rm_bringup/config/node_params/rune_detector_params.yaml new file mode 100644 index 0000000..685337d --- /dev/null +++ b/src/rm_bringup/config/node_params/rune_detector_params.yaml @@ -0,0 +1,10 @@ +/**: + ros__parameters: + debug: true + requests_limit: 5 + detect_r_tag: true # 是否使用传统方法识别R标 + min_lightness: 100 # 二值化亮度阈值 (R标识别) + detector: + model: "package://rune_detector/model/yolox_rune_3.6m.onnx" # GPU模式下请用xml文件 + device_type: "CPU" + diff --git a/src/rm_bringup/config/node_params/rune_solver_params.yaml b/src/rm_bringup/config/node_params/rune_solver_params.yaml new file mode 100644 index 0000000..7c92315 --- /dev/null +++ b/src/rm_bringup/config/node_params/rune_solver_params.yaml @@ -0,0 +1,12 @@ +/**: + ros__parameters: + debug: true + auto_type_determined: true + predict_time: 0.0 + compensator_type: resistance + gravity: 9.8 + bullet_speet: 28.0 + lost_time_thres: 0.5 + ekf: + q: [4e-4, 1e-4, 1e-4, 1e-4] + r: [4e-2, 1e-2, 1e-2, 1e-2] \ No newline at end of file diff --git a/src/rm_bringup/config/node_params/serial_driver_params.yaml b/src/rm_bringup/config/node_params/serial_driver_params.yaml new file mode 100644 index 0000000..5da1ec9 --- /dev/null +++ b/src/rm_bringup/config/node_params/serial_driver_params.yaml @@ -0,0 +1,8 @@ +/**: + ros__parameters: + target_frame: odom + timestamp_offset: 0.001 + port_name: "/dev/ttyACM0" + protocol: "air" + enable_data_print: false # Print parsed receive data when true + enable_send_print: false # Print parsed send data when true diff --git a/src/rm_bringup/config/node_params/video_player_params.yaml b/src/rm_bringup/config/node_params/video_player_params.yaml new file mode 100644 index 0000000..2a345d6 --- /dev/null +++ b/src/rm_bringup/config/node_params/video_player_params.yaml @@ -0,0 +1,8 @@ +/**: + ros__parameters: + camera_info_url: package://rm_bringup/config/camera_info.yaml + path: "/home/zcf/csurm/csurm-RMUC2022/red.avi" + frame_rate: 10 + start_frame: 0 + frame_id: "camera_optical_frame" + keep_looping: true #是否循环播放 diff --git a/src/rm_bringup/config/node_params/virtual_serial_params.yaml b/src/rm_bringup/config/node_params/virtual_serial_params.yaml new file mode 100644 index 0000000..acb7179 --- /dev/null +++ b/src/rm_bringup/config/node_params/virtual_serial_params.yaml @@ -0,0 +1,7 @@ +/**: + ros__parameters: + roll: 0.0 + pitch: 0.0 + yaw: 180.0 + vision_mode: 1 + bullet_speed: 25.0 diff --git a/src/rm_bringup/launch/__pycache__/bringup.launch.cpython-313.pyc b/src/rm_bringup/launch/__pycache__/bringup.launch.cpython-313.pyc new file mode 100644 index 0000000..9ff2a79 Binary files /dev/null and b/src/rm_bringup/launch/__pycache__/bringup.launch.cpython-313.pyc differ diff --git a/src/rm_bringup/launch/bringup.launch.py b/src/rm_bringup/launch/bringup.launch.py new file mode 100644 index 0000000..0d71459 --- /dev/null +++ b/src/rm_bringup/launch/bringup.launch.py @@ -0,0 +1,287 @@ +import os +import sys +import yaml +from ament_index_python.packages import get_package_share_directory +from launch.substitutions import Command +from launch_ros.parameter_descriptions import ParameterValue + +sys.path.append(os.path.join(get_package_share_directory("rm_bringup"), "launch")) + + +def generate_launch_description(): + + from launch_ros.descriptions import ComposableNode + from launch_ros.actions import ( + ComposableNodeContainer, + Node, + SetParameter, + PushRosNamespace, + ) + from launch.actions import TimerAction, Shutdown + from launch import LaunchDescription + + launch_params = yaml.safe_load( + open( + os.path.join( + get_package_share_directory("rm_bringup"), + "config", + "launch_params.yaml", + ) + ) + ) + + SetParameter(name="rune", value=launch_params["rune"]), + robot_gimbal_description = ParameterValue( + Command( + [ + "xacro ", + os.path.join( + get_package_share_directory("rm_robot_description"), + "urdf", + "rm_gimbal.urdf.xacro", + ), + " xyz:=", + launch_params["odom2camera"]["xyz"], + " rpy:=", + launch_params["odom2camera"]["rpy"], + " barrel_xyz:=", + launch_params["barrel"]["xyz"], + " barrel_rpy:=", + launch_params["barrel"]["rpy"], + ] + ), + value_type=str, + ) + + robot_navigation_description = ParameterValue( + Command( + [ + "xacro ", + os.path.join( + get_package_share_directory("rm_robot_description"), + "urdf", + "sentry.urdf.xacro", + ), + ] + ), + value_type=str, + ) + + robot_gimbal_publisher = Node( + package="robot_state_publisher", + executable="robot_state_publisher", + parameters=[ + {"robot_description": robot_gimbal_description, "publish_frequency": 1000.0} + ], + ) + + robot_navigation_publisher = Node( + package="robot_state_publisher", + executable="robot_state_publisher", + parameters=[ + { + "robot_description": robot_navigation_description, + } + ], + # 'publish_frequency': 1000.0}] + ) + + def get_params(name): + return os.path.join( + get_package_share_directory("rm_bringup"), + "config", + "node_params", + "{}_params.yaml".format(name), + ) + + # 图像 + if launch_params["video_play"]: + image_node = ComposableNode( + package="hik_camera", + plugin="fyt::camera_driver::VideoPlayerNode", + name="video_player", + parameters=[get_params("video_player")], + extra_arguments=[{"use_intra_process_comms": True}], + ) + else: + # 仅使用海康相机节点(替换原大恒相机节点) + image_node = ComposableNode( + package="hik_camera", + plugin="fyt::camera_driver::HikCameraNode", + name="hik_camera", + parameters=[get_params("camera_driver")], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + # 串口 + if launch_params["virtual_serial"]: + serial_driver_node = Node( + package="rm_serial_driver", + executable="virtual_serial_node", + name="virtual_serial", + output="both", + emulate_tty=True, + parameters=[ + get_params("virtual_serial"), + {"yaw_to_pitch_offset": launch_params["yaw_to_pitch_offset"]}, + {"yaw_to_pitch_radius": launch_params["yaw_to_pitch_radius"]}, + {"use_yaw_to_pitch_angle": launch_params["use_yaw_to_pitch_angle"]}, + ], + ros_arguments=[ + "--ros-args", + "-p", + "has_rune:=true" if launch_params["rune"] else "has_rune:=false", + ], + ) + else: + serial_driver_node = Node( + package="rm_serial_driver", + executable="rm_serial_driver_node", + name="serial_driver", + output="both", + emulate_tty=True, + parameters=[ + get_params("serial_driver"), + {"yaw_to_pitch_offset": launch_params["yaw_to_pitch_offset"]}, + {"yaw_to_pitch_radius": launch_params["yaw_to_pitch_radius"]}, + {"use_yaw_to_pitch_angle": launch_params["use_yaw_to_pitch_angle"]}, + ], + ros_arguments=[ + "--ros-args", + ], + ) + + # 装甲板识别(支持传统检测 / YOLO 检测切换) + armor_detector_method = launch_params.get("armor_detector_method", "detect") + yolo_require_tf = launch_params.get("yolo_require_tf", False) + if armor_detector_method == "yolo_detect": + armor_detector_node = ComposableNode( + package="armor_yolo_detect", + plugin="armor_yolo_detect::ArmorYoloDetectorNode", + name="armor_detector", + parameters=[get_params("armor_yolo_detect"), {"require_tf": yolo_require_tf}], + extra_arguments=[{"use_intra_process_comms": True}], + ) + else: + armor_detector_node = ComposableNode( + package="armor_detector", + plugin="fyt::auto_aim::ArmorDetectorNode", + name="armor_detector", + parameters=[get_params("armor_detector")], + extra_arguments=[{"use_intra_process_comms": True}], + ) + + # 装甲板解算 + if launch_params["hero_solver"]: + armor_solver_node = Node( + package="hero_armor_solver", + executable="hero_armor_solver_node", + name="armor_solver", + output="both", + emulate_tty=True, + parameters=[ + get_params("armor_solver"), + {"solver.use_barrel_frame": launch_params["use_barrel_frame"]}, + ], + ros_arguments=[], + ) + else: + armor_solver_node = Node( + package="armor_solver", + executable="armor_solver_node", + name="armor_solver", + output="both", + emulate_tty=True, + parameters=[ + get_params("armor_solver"), + {"solver.use_barrel_frame": launch_params["use_barrel_frame"]}, + ], + ros_arguments=[], + ) + + # 打符 + rune_detector_node = ComposableNode( + package="rune_detector", + plugin="fyt::rune::RuneDetectorNode", + name="rune_detector", + parameters=[get_params("rune_detector")], + extra_arguments=[{"use_intra_process_comms": True}], + ) + rune_solver_node = Node( + package="rune_solver", + executable="rune_solver_node", + name="rune_solver", + output="both", + emulate_tty=True, + parameters=[get_params("rune_solver")], + arguments=[ + "--ros-args", + ], + ) + + # 使用intra cmmunication提高图像的传输速度 + def get_camera_detector_container(*detector_nodes): + nodes_list = list(detector_nodes) + nodes_list.append(image_node) + container = ComposableNodeContainer( + name="camera_detector_container", + namespace="", + package="rclcpp_components", + executable="component_container_mt", + composable_node_descriptions=nodes_list, + output="both", + emulate_tty=True, + ros_arguments=[ + "--ros-args", + ], + ) + return TimerAction( + period=2.0, + actions=[container], + ) + + # 延迟启动 + delay_serial_node = TimerAction( + period=1.5, + actions=[serial_driver_node], + ) + + delay_armor_solver_node = TimerAction( + period=2.0, + actions=[armor_solver_node], + ) + + delay_rune_solver_node = TimerAction( + period=2.0, + actions=[rune_solver_node], + ) + + if launch_params["rune"]: + cam_detector_node = get_camera_detector_container( + armor_detector_node, rune_detector_node + ) + else: + cam_detector_node = get_camera_detector_container(armor_detector_node) + + delay_cam_detector_node = TimerAction( + period=2.0, + actions=[cam_detector_node], + ) + + push_namespace = PushRosNamespace(launch_params["namespace"]) + + launch_description_list = [ + robot_gimbal_publisher, + push_namespace, + delay_serial_node, + delay_cam_detector_node, + delay_armor_solver_node, + ] + + if launch_params["rune"]: + launch_description_list.append(delay_rune_solver_node) + + if launch_params["navigation"]: + launch_description_list.append(robot_navigation_publisher) + + return LaunchDescription(launch_description_list) diff --git a/src/rm_bringup/launch/bringup_navigation.launch.py b/src/rm_bringup/launch/bringup_navigation.launch.py new file mode 100644 index 0000000..cdbbaf8 --- /dev/null +++ b/src/rm_bringup/launch/bringup_navigation.launch.py @@ -0,0 +1,84 @@ +import os + +from ament_index_python.packages import get_package_share_directory + +from launch import LaunchDescription +from launch.actions import IncludeLaunchDescription, TimerAction +from launch.launch_description_sources import PythonLaunchDescriptionSource + +def generate_launch_description(): + livox_bringup_dir = get_package_share_directory('livox_ros_driver2') + segmentation_bringup_dir = get_package_share_directory('linefit_ground_segmentation_ros') + fast_lio_bringup_dir = get_package_share_directory('fast_lio') + laserscan_conversion_bringup_dir = get_package_share_directory('pointcloud_to_laserscan') + icp_bringup_dir = get_package_share_directory('icp_registration') + navigation_bringup_dir = get_package_share_directory('rm_navigation') + rm_decision_bringup_dir = get_package_share_directory('rm_decision') + + livox_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(livox_bringup_dir, 'launch', 'msg_MID360_launch.py')) + ) + + segmentation_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(segmentation_bringup_dir, 'launch', 'segmentation.launch.py')) + ) + + fast_lio_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(fast_lio_bringup_dir, 'launch', 'mapping.launch.py')) + ) + + laserscan_conversion_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(laserscan_conversion_bringup_dir, 'launch', 'pointcloud_to_laserscan_launch.py')) + ) + + icp_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(icp_bringup_dir, 'launch', 'icp.launch.py')) + ) + + bringup_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(navigation_bringup_dir, 'launch', 'bringup_launch.py')) + ) + + decision_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(rm_decision_bringup_dir, 'launch', 'rm_decision_launch.py'))) + + + delay_segmentation_launch = TimerAction( + period=3.5, + actions=[segmentation_launch] + ) + + delay_fast_lio_launch = TimerAction( + period=3.0, + actions=[fast_lio_launch] + ) + + delay_laserscan_conversion_launch = TimerAction( + period=4.0, + actions=[laserscan_conversion_launch] + ) + + delay_icp_launch = TimerAction( + period=4.5, + actions=[icp_launch] + ) + + delay_bringup_launch = TimerAction( + period=5.5, + actions=[bringup_launch] + ) + + delay_decision_launch = TimerAction( + period=7.0, + actions=[decision_launch] + ) + + return LaunchDescription([ + livox_launch, + delay_segmentation_launch, + delay_fast_lio_launch, + delay_laserscan_conversion_launch, + delay_icp_launch, + delay_bringup_launch, + delay_decision_launch + ]) \ No newline at end of file diff --git a/src/rm_bringup/package.xml b/src/rm_bringup/package.xml new file mode 100644 index 0000000..6f05142 --- /dev/null +++ b/src/rm_bringup/package.xml @@ -0,0 +1,20 @@ + + + + rm_bringup + 0.0.0 + TODO: Package description + chenjun + TODO: License declaration + + ament_cmake + + rm_auto_aim + armor_yolo_detect + rm_serial_driver + rm_rune + + + ament_cmake + + diff --git a/src/rm_hardware_driver/rm_serial_driver/CMakeLists.txt b/src/rm_hardware_driver/rm_serial_driver/CMakeLists.txt new file mode 100644 index 0000000..1d8629a --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/CMakeLists.txt @@ -0,0 +1,66 @@ +cmake_minimum_required(VERSION 3.10) +project(rm_serial_driver) + +## Use C++17 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +## By adding -Wall and -Werror, the compiler does not ignore warnings anymore, +## enforcing cleaner code. +add_definitions(-Wall -Werror -O3) + +## Export compile commands for clangd +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +####################### +## Find dependencies ## +####################### + +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() + +########### +## Build ## +########### + +ament_auto_add_library(${PROJECT_NAME} SHARED +DIRECTORY src +) + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN fyt::serial_driver::SerialDriverNode + EXECUTABLE ${PROJECT_NAME}_node +) + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN fyt::serial_driver::VirtualSerialNode + EXECUTABLE virtual_serial_node +) + +target_include_directories(${PROJECT_NAME}_node PUBLIC include) + +############# +## Testing ## +############# + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + list(APPEND AMENT_LINT_AUTO_EXCLUDE + ament_cmake_copyright + ament_cmake_uncrustify + ament_cmake_cpplint + ) + ament_lint_auto_find_test_dependencies() + find_package(ament_cmake_gtest) + + ament_add_gtest(test_fixed_packet_tool test/test_fixed_packet_tool.cpp) + target_link_libraries(test_fixed_packet_tool ${PROJECT_NAME}) +endif() + +############# +## Install ## +############# + +ament_auto_package( + INSTALL_TO_SHARE +) diff --git a/src/rm_hardware_driver/rm_serial_driver/README.md b/src/rm_hardware_driver/rm_serial_driver/README.md new file mode 100644 index 0000000..174c455 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/README.md @@ -0,0 +1,40 @@ +# rm_serial_driver + +FYT视觉24赛季串口通信模块 + +## fyt::SerialDriverNode + +串口驱动节点 + +### 发布话题 + +* `serial/receive` (`rm_interfaces/msg/SerialReceiveData`) - 下位机发送到上位机的数据 +* `tf` (`geometry_msgs/msg/TransformStamped`) - 云台的tf变换 + +### Subscribed Topics + +* `cmd_gimbal` (`rm_interfaces/msg/GimbalCmd`) - 云台控制信息 +* `cmd_chassis` (`rm_interfaces/msg/ChassisCmd`) - 底盘控制信息 + +### 参数 + +* `target_frame` (string, default: "odom") - 下位机欧拉角的相对坐标系 +* `timestamp_offset` (double, default: 0.0) - tf数据的时间戳补偿 +* `port_name` (string, default: "/dev/ttyUART") - 串口设备对应的文件名 +* `protocol` (string, default: "infantry") - 协议类型 +* `enable_data_print` (bool, default: false) - 是否打印串口读出的原始数据 + +## fyt::VirtualSerial + +仿真串口驱动节点 + +### 发布话题 + +* `serial/receive` (`rm_interfaces/msg/SerialReceiveData`) - 下位机发送到上位机的数据(固定数据) +* `tf` (`geometry_msgs/msg/TransformStamped`) - 云台的tf变换(固定数据) + +### 参数 + +* `pitch` (double, default: 0.0) - 固定的pitch角度 +* `yaw` (double, default: 0.0) - 固定的yaw角度 +* `vision_mode` (int, default: 0) - 视觉模式 diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/crc8.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/crc8.hpp new file mode 100644 index 0000000..3c584d9 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/crc8.hpp @@ -0,0 +1,19 @@ +// Copyright (C) FYT Vision Group. All rights reserved. + +#ifndef RM_SERIAL_DRIVER_CRC8_HPP_ +#define RM_SERIAL_DRIVER_CRC8_HPP_ + +#include +#include + +namespace fyt::serial_driver { + +constexpr uint8_t kCrc8Init = 0xff; + +uint8_t GetCrc8(const uint8_t *data, size_t len, uint8_t init = kCrc8Init); +bool VerifyCrc8(const uint8_t *data, size_t len); +void AppendCrc8(uint8_t *data, size_t len); + +} // namespace fyt::serial_driver + +#endif // RM_SERIAL_DRIVER_CRC8_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/fixed_packet.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/fixed_packet.hpp new file mode 100644 index 0000000..1177171 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/fixed_packet.hpp @@ -0,0 +1,85 @@ +// Copyright (C) 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Additional modifications and features by Chengfu Zou, 2023. +// +// Copyright (C) FYT Vision Group. All rights reserved. + +#ifndef SERIAL_DRIVER_FIXED_PACKET_HPP_ +#define SERIAL_DRIVER_FIXED_PACKET_HPP_ + +// std +#include +#include +#include + +namespace fyt::serial_driver { + +// Fixed-length data packet: +// [head_byte(0xff), ...(data_bytes)..., crc8_byte] +template +class FixedPacket { + public: + using SharedPtr = std::shared_ptr; + FixedPacket() { + memset(buffer_, 0, capacity); + buffer_[0] = 0xff; // frame head + } + + public: + // Clear payload and crc. + void clear() { memset(buffer_ + 1, 0, capacity - 1); } + // Set crc8 byte (last byte). + void setCrc8(uint8_t crc) { buffer_[capacity - 1] = crc; } + // Backward-compatible alias. + void setCheckByte(uint8_t check_byte) { setCrc8(check_byte); } + // Copy data to internal buffer. + void copyFrom(const void* src) { memcpy(buffer_, src, capacity); } + // Get internal buffer (read-only). + const uint8_t* buffer() const { return buffer_; } + + // Load custom data to buffer. + template + bool loadData(T const &data, int index) { + // Bounds check + if (index > 0 && ((index + data_len) < (capacity))) { + memcpy(buffer_ + index, &data, data_len); + return true; + } + return false; + } + + // Unload data from buffer. + template + bool unloadData(T &data, int index) { + // Bounds check + if (index > 0 && ((index + data_len) < (capacity))) { + memcpy(&data, buffer_ + index, data_len); + return true; + } + return false; + } + + private: + // Packet buffer + uint8_t buffer_[capacity]; // NOLINT +}; + +using FixedPacket16 = FixedPacket<16>; +using FixedPacket32 = FixedPacket<32>; +using FixedPacket64 = FixedPacket<64>; + +} // namespace fyt::serial_driver + +#endif // SERIAL_DRIVER_FIXED_PACKET_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/fixed_packet_tool.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/fixed_packet_tool.hpp new file mode 100644 index 0000000..b4e0ae2 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/fixed_packet_tool.hpp @@ -0,0 +1,214 @@ +// Copyright (C) 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Additional modifications and features by Chengfu Zou, 2023. +// +// Copyright (C) FYT Vision Group. All rights reserved. + +#ifndef SERIAL_DRIVER_FIXED_PACKET_TOOL_HPP_ +#define SERIAL_DRIVER_FIXED_PACKET_TOOL_HPP_ + +// std +#include +#include +#include +#include +#include +#include +#include +#include +#include +// project +#include "rm_serial_driver/crc8.hpp" +#include "rm_serial_driver/fixed_packet.hpp" +#include "rm_serial_driver/transporter_interface.hpp" +#include "rm_utils/logger/log.hpp" + +namespace fyt::serial_driver { + +template +class FixedPacketTool { +public: + using SharedPtr = std::shared_ptr; + FixedPacketTool() = delete; + explicit FixedPacketTool(std::shared_ptr transporter) + : transporter_(transporter) { + if (!transporter) { + throw std::invalid_argument("transporter is nullptr"); + } + FYT_REGISTER_LOGGER("serial_driver", "~/fyt2024-log", INFO); + } + + ~FixedPacketTool() { enbaleRealtimeSend(false); } + + bool isOpen() { return transporter_->isOpen(); } + void enbaleRealtimeSend(bool enable); + void setRequiredLength(int required_len) { required_len_ = required_len; } + bool sendPacket(const FixedPacket &packet); + bool recvPacket(FixedPacket &packet); + + std::string getErrorMessage() { return transporter_->errorMessage(); } + +private: + bool checkPacket(uint8_t *tmp_buffer, int recv_len); + bool simpleSendPacket(const FixedPacket &packet); + +private: + std::shared_ptr transporter_; + // data + uint8_t tmp_buffer_[capacity]; // NOLINT + uint8_t recv_buffer_[capacity * 2]; // NOLINT + int recv_buf_len_{0}; + int required_len_{0}; + // for realtime sending + bool use_realtime_send_{false}; + std::mutex realtime_send_mut_; + std::unique_ptr realtime_send_thread_; + std::queue> realtime_packets_; +}; + +template +bool FixedPacketTool::checkPacket(uint8_t *buffer, int recv_len) { + // Check length + if (required_len_ > 0 && recv_len != required_len_) { + return false; + } + if (required_len_ <= 0 && recv_len != capacity) { + return false; + } + // Check frame head + if (buffer[0] != 0xff) { + return false; + } + // Check CRC8 (last byte) + return VerifyCrc8(buffer, static_cast(recv_len)); +} + +template +bool FixedPacketTool::simpleSendPacket(const FixedPacket &packet) { + uint8_t send_buffer[capacity]; + memcpy(send_buffer, packet.buffer(), capacity); + AppendCrc8(send_buffer, capacity); + if (transporter_->write(send_buffer, capacity) == capacity) { + return true; + } else { + // reconnect + FYT_ERROR("serial_driver", "transporter_->write() failed"); + transporter_->close(); + transporter_->open(); + return false; + } +} + +template +void FixedPacketTool::enbaleRealtimeSend(bool enable) { + if (enable == use_realtime_send_) { + return; + } + if (enable) { + use_realtime_send_ = true; + realtime_send_thread_ = std::make_unique([&]() { + FixedPacket packet; + while (use_realtime_send_) { + bool empty = true; + { + std::lock_guard lock(realtime_send_mut_); + empty = realtime_packets_.empty(); + if (!empty) { + packet = realtime_packets_.front(); + realtime_packets_.pop(); + } + } + if (!empty) { + simpleSendPacket(packet); + } else { + std::this_thread::sleep_for(std::chrono::milliseconds(1)); + } + } + }); + } else { + use_realtime_send_ = false; + realtime_send_thread_->join(); + realtime_send_thread_.reset(); + } +} + +template +bool FixedPacketTool::sendPacket(const FixedPacket &packet) { + if (use_realtime_send_) { + std::lock_guard lock(realtime_send_mut_); + realtime_packets_.push(packet); + return true; + } else { + return simpleSendPacket(packet); + } +} + +template +bool FixedPacketTool::recvPacket(FixedPacket &packet) { + memset(tmp_buffer_, 0, capacity); + int recv_len = transporter_->read(tmp_buffer_, capacity); + if (recv_len > 0) { + // check packet + if (checkPacket(tmp_buffer_, recv_len)) { + packet.copyFrom(tmp_buffer_); + return true; + } else { + // Try to recover broken frames by concatenating and scanning. + FYT_INFO("serial_driver", "checkPacket() failed, check if it is a broken frame"); + if (recv_buf_len_ + recv_len > capacity * 2) { + recv_buf_len_ = 0; + } + // Concatenate buffer + memcpy(recv_buffer_ + recv_buf_len_, tmp_buffer_, recv_len); + recv_buf_len_ = recv_buf_len_ + recv_len; + // Scan for valid frame + int primary_len = required_len_ > 0 ? required_len_ : capacity; + for (int i = 0; (i + primary_len) <= recv_buf_len_; i++) { + if (checkPacket(recv_buffer_ + i, primary_len)) { + packet.copyFrom(recv_buffer_ + i); + // Update receive buffer after extracting one frame + int k = 0; + for (int j = i + primary_len; j < recv_buf_len_; j++, k++) { + recv_buffer_[k] = recv_buffer_[j]; + } + recv_buf_len_ = k; + return true; + } + } + // Broken frame or invalid data + FYT_WARN("serial_driver", + "checkPacket() failed with recv_len:{}, frame head:{}, crc:{}", + recv_len, + tmp_buffer_[0], + tmp_buffer_[recv_len - 1]); + return false; + } + } else { + FYT_ERROR("serial_driver", "transporter_->read() failed"); + // reconnect + transporter_->close(); + transporter_->open(); + // serial port error + return false; + } +} + +using FixedPacketTool16 = FixedPacketTool<16>; +using FixedPacketTool32 = FixedPacketTool<32>; +using FixedPacketTool64 = FixedPacketTool<64>; + +} // namespace fyt::serial_driver + +#endif // SERIAL_DRIVER_FIXED_PACKET_TOOL_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol.hpp new file mode 100644 index 0000000..46040d9 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol.hpp @@ -0,0 +1,68 @@ +// Created by Chengfu Zou on 2023.7.6 +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SERIAL_DRIVER_PROTOCOL_HPP_ +#define SERIAL_DRIVER_PROTOCOL_HPP_ + +// std +#include +#include +#include +// ros2 +#include +#include +// project +#include "rm_interfaces/msg/chassis_cmd.hpp" +#include "rm_interfaces/msg/gimbal_cmd.hpp" +#include "rm_interfaces/msg/serial_receive_data.hpp" +#include "rm_interfaces/srv/set_mode.hpp" +#include "rm_serial_driver/fixed_packet.hpp" +#include "rm_serial_driver/fixed_packet_tool.hpp" +#include "rm_serial_driver/uart_transporter.hpp" + +namespace fyt::serial_driver { +namespace protocol { +typedef enum : unsigned char { Fire = 0x01, NotFire = 0x00 } FireState; + +// Protocol interface +class Protocol { +public: + virtual ~Protocol() = default; + + // Send gimbal command + virtual void send(const rm_interfaces::msg::GimbalCmd &data) = 0; + + // Receive data from serial port + virtual bool receive(rm_interfaces::msg::SerialReceiveData &data) = 0; + + // Optional: force RX packet length (e.g., 16 or 20) + virtual void setRxPacketLength(int required_len) { (void)required_len; } + + // Create subscriptions for SerialDriverNode + virtual std::vector getSubscriptions( + rclcpp::Node::SharedPtr node) = 0; + + // Cretate setMode client for SerialDriverNode + virtual std::vector::SharedPtr> getClients( + rclcpp::Node::SharedPtr node) const = 0; + + virtual std::string getErrorMessage() = 0; + +private: +}; + +} // namespace protocol +} // namespace fyt::serial_driver +#endif // SERIAL_DRIVER_PROTOCOLS_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/default_protocol.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/default_protocol.hpp new file mode 100644 index 0000000..814f790 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/default_protocol.hpp @@ -0,0 +1,52 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SERIAL_DRIVER_DEFAULT_PROTOCOL_HPP_ +#define SERIAL_DRIVER_DEFAULT_PROTOCOL_HPP_ + +#include "rm_serial_driver/protocol.hpp" + +namespace fyt::serial_driver::protocol { +// 默认 +class DefaultProtocol : public Protocol { +public: + explicit DefaultProtocol(std::string_view port_name, + bool enable_data_print, + bool enable_send_print); + + ~DefaultProtocol() = default; + + void send(const rm_interfaces::msg::GimbalCmd &data) override; + + bool receive(rm_interfaces::msg::SerialReceiveData &data) override; + void setRxPacketLength(int required_len) override; + + std::vector getSubscriptions(rclcpp::Node::SharedPtr node) override; + + std::vector::SharedPtr> getClients( + rclcpp::Node::SharedPtr node) const override; + + std::string getErrorMessage() override { return rx_packet_tool_->getErrorMessage(); } + +private: + int rx_packet_length_{20}; + FixedPacketTool<20>::SharedPtr rx_packet_tool_; + FixedPacketTool<16>::SharedPtr tx_packet_tool_; + bool enable_data_print_{false}; + bool enable_send_print_{false}; +}; +} // namespace fyt::serial_driver::protocol + +#endif // SERIAL_DRIVER_DEFAULT_PROTOCOL_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/infantry_protocol.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/infantry_protocol.hpp new file mode 100644 index 0000000..41dd52a --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/infantry_protocol.hpp @@ -0,0 +1,53 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SERIAL_DRIVER_INFANTRY_PROTOCOL_HPP_ +#define SERIAL_DRIVER_INFANTRY_PROTOCOL_HPP_ + +#include "rm_serial_driver/protocol.hpp" + +namespace fyt::serial_driver::protocol { +// 步兵通信协议 +class ProtocolInfantry : public Protocol { +public: + explicit ProtocolInfantry(std::string_view port_name, + bool enable_data_print, + bool enable_send_print); + + ~ProtocolInfantry() = default; + + void send(const rm_interfaces::msg::GimbalCmd &data) override; + + bool receive(rm_interfaces::msg::SerialReceiveData &data) override; + void setRxPacketLength(int required_len) override; + + std::vector getSubscriptions( + rclcpp::Node::SharedPtr node) override; + + std::vector::SharedPtr> getClients( + rclcpp::Node::SharedPtr node) const override; + + std::string getErrorMessage() override { return rx_packet_tool_->getErrorMessage(); } + +private: + int rx_packet_length_{20}; + FixedPacketTool<20>::SharedPtr rx_packet_tool_; + FixedPacketTool<16>::SharedPtr tx_packet_tool_; + bool enable_data_print_{false}; + bool enable_send_print_{false}; +}; +} // namespace fyt::serial_driver::protocol + +#endif // SERIAL_DRIVER_INFANTRY_PROTOCOL_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/sentry_protocol.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/sentry_protocol.hpp new file mode 100644 index 0000000..0fce766 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol/sentry_protocol.hpp @@ -0,0 +1,58 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SERIAL_DRIVER__SENTRY_PROTOCOL_HPP_ +#define SERIAL_DRIVER__SENTRY_PROTOCOL_HPP_ + +// project +#include "rm_interfaces/msg/chassis_cmd.hpp" +#include "rm_serial_driver/protocol.hpp" + +namespace fyt::serial_driver::protocol { +// 哨兵通信协议 +class ProtocolSentry : public Protocol { +public: + explicit ProtocolSentry(std::string_view port_name, + bool enable_data_print, + bool enable_send_print); + + ~ProtocolSentry() = default; + + void send(const rm_interfaces::msg::GimbalCmd &data) override; + + void send(const rm_interfaces::msg::ChassisCmd &data); + + bool receive(rm_interfaces::msg::SerialReceiveData &data) override; + void setRxPacketLength(int required_len) override; + + std::vector getSubscriptions(rclcpp::Node::SharedPtr node) override; + + std::vector::SharedPtr> getClients( + rclcpp::Node::SharedPtr node) const override; + + std::string getErrorMessage() override { return packet_tool_->getErrorMessage(); } + +private: + enum GameStatus { NOT_START = 0x00, ENEMY_RED = 0x01, ENEMY_BLUE = 0x02 }; + int rx_packet_length_{32}; + FixedPacketTool<32>::SharedPtr packet_tool_; + FixedPacket<32> packet_; + rm_interfaces::msg::ChassisCmd chassis_cmd_; + bool enable_data_print_{false}; + bool enable_send_print_{false}; +}; +} // namespace fyt::serial_driver::protocol + +#endif // SERIAL_DRIVER_SENTRY_PROTOCOL_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol_factory.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol_factory.hpp new file mode 100644 index 0000000..03de4fa --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/protocol_factory.hpp @@ -0,0 +1,59 @@ +// Created by Chengfu Zou on 2023.7.6 +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SERIAL_DRIVER_PROTOCOL_FACTORY_HPP_ +#define SERIAL_DRIVER_PROTOCOL_FACTORY_HPP_ + +#include +#include + +#include "rm_serial_driver/protocol.hpp" +#include "rm_serial_driver/protocol/default_protocol.hpp" +#include "rm_serial_driver/protocol/infantry_protocol.hpp" +#include "rm_serial_driver/protocol/sentry_protocol.hpp" + +namespace fyt::serial_driver { + +class ProtocolFactory { +public: + ProtocolFactory() = delete; + // Factory method to create a protocol + static std::unique_ptr createProtocol(std::string_view protocol_type, + std::string_view port_name, + bool enable_data_print, + bool enable_send_print) { + if (protocol_type == "infantry") { + return std::make_unique( + port_name, enable_data_print, enable_send_print); + } + if (protocol_type == "hero") { + return std::make_unique( + port_name, enable_data_print, enable_send_print); + } + if (protocol_type == "air") { + return std::make_unique( + port_name, enable_data_print, enable_send_print); + } + if (protocol_type == "sentry") { + return std::make_unique( + port_name, enable_data_print, enable_send_print); + } + + return nullptr; + } +}; + +}; // namespace fyt::serial_driver +#endif // SERIAL_DRIVER_PROTOCOL_FACTORY_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/serial_driver_node.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/serial_driver_node.hpp new file mode 100644 index 0000000..c4e1f2a --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/serial_driver_node.hpp @@ -0,0 +1,90 @@ +// Created by Chengfu Zou on 2023.7.1 +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef SERIAL_DRIVER_SERIAL_DRIVER_NODE_HPP_ +#define SERIAL_DRIVER_SERIAL_DRIVER_NODE_HPP_ + +// std +#include +#include +// ros2 +#include + +#include +#include +#include +#include +// project +#include "rm_utils/heartbeat.hpp" +#include "rm_interfaces/msg/gimbal_cmd.hpp" +#include "rm_interfaces/msg/serial_receive_data.hpp" +#include "rm_interfaces/srv/set_mode.hpp" +#include "rm_serial_driver/fixed_packet_tool.hpp" +#include "rm_serial_driver/protocol.hpp" +#include "rm_serial_driver/protocol_factory.hpp" +#include "rm_serial_driver/transporter_interface.hpp" + +namespace fyt::serial_driver { + +// Node wrapper for SerialDriver +// Implementing secondary development through the Protocol class +class SerialDriverNode : public rclcpp::Node { +public: + explicit SerialDriverNode(const rclcpp::NodeOptions &options); + + ~SerialDriverNode(); + + void listenLoop(); + + void init(); + + // Param client to set detect_color + struct SetModeClient { + SetModeClient(rclcpp::Client::SharedPtr p) : ptr(p) {} + std::atomic on_waiting = false; + std::atomic mode = 0; + rclcpp::Client::SharedPtr ptr; + }; + std::unordered_map set_mode_clients_; + void setMode(SetModeClient &client, const uint8_t mode); + +private: + // Heartbeat + HeartBeatPublisher::SharedPtr heartbeat_; + + std::unique_ptr listen_thread_; + // Protocol + std::unique_ptr protocol_; + + std::string target_frame_; + + // Subscriptions + std::vector subscriptions_; + // Publisher + rclcpp::Publisher::SharedPtr serial_receive_data_pub_; + + // Broadcast tf from odom to pitch_link + double timestamp_offset_ = 0; + std::unique_ptr tf_broadcaster_; + + std::vector yaw_to_pitch_offset_ = {0.0, 0.0, 0.0}; + double yaw_to_pitch_radius_ = 0.0; + bool use_yaw_to_pitch_angle_ = true; +}; + +} // namespace fyt::serial_driver + +#endif // SERIAL_DRIVER_SERIAL_DRIVER_NODE_HPP_ + diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/transporter_interface.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/transporter_interface.hpp new file mode 100644 index 0000000..f907d7f --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/transporter_interface.hpp @@ -0,0 +1,47 @@ +// Copyright (C) 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Additional modifications and features by Chengfu Zou, 2023. +// +// Copyright (C) FYT Vision Group. All rights reserved. + +#ifndef SERIAL_DRIVER_TRANSPORTER_INTERFACE_HPP_ +#define SERIAL_DRIVER_TRANSPORTER_INTERFACE_HPP_ + +// std +#include +#include + +namespace fyt::serial_driver { + +// Transporter device interface to transport data between embedded systems +// (stm32,c51) and PC +class TransporterInterface { +public: + using SharedPtr = std::shared_ptr; + virtual ~TransporterInterface() = default; + virtual bool open() = 0; + virtual void close() = 0; + virtual bool isOpen() = 0; + // return recv len>0, return <0 if error + virtual int read(void *buffer, size_t len) = 0; + // return send len>0, return <0 if error + virtual int write(const void *buffer, size_t len) = 0; + // get error message when open() return false. + virtual std::string errorMessage() = 0; +}; + +} // namespace fyt::serial_driver + +#endif // SERIAL_DRIVER_TRANSPORTER_INTERFACE_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/uart_transporter.hpp b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/uart_transporter.hpp new file mode 100644 index 0000000..1e70462 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/include/rm_serial_driver/uart_transporter.hpp @@ -0,0 +1,73 @@ +// Copyright (C) 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Additional modifications and features by Chengfu Zou, 2023. +// +// Copyright (C) FYT Vision Group. All rights reserved. + +#ifndef SERIAL_DRIVER_UART_TRANSPORTER_HPP_ +#define SERIAL_DRIVER_UART_TRANSPORTER_HPP_ + +// std +#include +// project +#include "rm_serial_driver/transporter_interface.hpp" + +namespace fyt::serial_driver { + +// 串口数据传输设备,符合通用传输接口。 +class UartTransporter : public TransporterInterface { +public: + UartTransporter(const std::string &device_path = "/dev/ttyUSB0", + int speed = 115200, + int flow_ctrl = 0, + int databits = 8, + int stopbits = 1, + int parity = 'N') + : device_path_(device_path) + , speed_(speed) + , flow_ctrl_(flow_ctrl) + , databits_(databits) + , stopbits_(stopbits) + , parity_(parity) {} + + bool open() override; + void close() override; + bool isOpen() override; + int read(void *buffer, size_t len) override; + int write(const void *buffer, size_t len) override; + std::string errorMessage() override { return error_message_; } + +private: + bool setParam( + int speed = 115200, int flow_ctrl = 0, int databits = 0, int stopbits = 1, int parity = 'N'); + +private: + // 设备文件描述符 + int fd_{-1}; + // 设备状态 + bool is_open_{false}; + std::string error_message_; + // 设备参数 + std::string device_path_; + int speed_; + int flow_ctrl_; + int databits_; + int stopbits_; + int parity_; +}; + +} // namespace fyt::serial_driver + +#endif // SERIAL_DRIVER_UART_TRANSPORTER_HPP_ diff --git a/src/rm_hardware_driver/rm_serial_driver/package.xml b/src/rm_hardware_driver/rm_serial_driver/package.xml new file mode 100644 index 0000000..6a0de00 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/package.xml @@ -0,0 +1,37 @@ + + + + rm_serial_driver + 0.1.0 + A template for ROS packages. + Chen Jun + MIT + https://github.com/chenjunnn/ros2_mindvision_camera + https://github.com/chenjunnn/ros2_mindvision_camera/issues + Chen Jun + + + ament_cmake + + + rclcpp + rclcpp_components + serial_driver + geometry_msgs + tf2_ros + tf2_geometry_msgs + visualization_msgs + rm_interfaces + rm_utils + std_srvs + + ament_lint_auto + ament_lint_common + ament_cmake_clang_format + + + ament_cmake + + diff --git a/src/rm_hardware_driver/rm_serial_driver/src/crc8.cpp b/src/rm_hardware_driver/rm_serial_driver/src/crc8.cpp new file mode 100644 index 0000000..684649c --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/src/crc8.cpp @@ -0,0 +1,52 @@ +// Copyright (C) FYT Vision Group. All rights reserved. + +#include "rm_serial_driver/crc8.hpp" + +namespace fyt::serial_driver { +namespace { +const uint8_t kCrc8Table[256] = { + 0x00, 0x5e, 0xbc, 0xe2, 0x61, 0x3f, 0xdd, 0x83, 0xc2, 0x9c, 0x7e, 0x20, 0xa3, 0xfd, 0x1f, 0x41, + 0x9d, 0xc3, 0x21, 0x7f, 0xfc, 0xa2, 0x40, 0x1e, 0x5f, 0x01, 0xe3, 0xbd, 0x3e, 0x60, 0x82, 0xdc, + 0x23, 0x7d, 0x9f, 0xc1, 0x42, 0x1c, 0xfe, 0xa0, 0xe1, 0xbf, 0x5d, 0x03, 0x80, 0xde, 0x3c, 0x62, + 0xbe, 0xe0, 0x02, 0x5c, 0xdf, 0x81, 0x63, 0x3d, 0x7c, 0x22, 0xc0, 0x9e, 0x1d, 0x43, 0xa1, 0xff, + 0x46, 0x18, 0xfa, 0xa4, 0x27, 0x79, 0x9b, 0xc5, 0x84, 0xda, 0x38, 0x66, 0xe5, 0xbb, 0x59, 0x07, + 0xdb, 0x85, 0x67, 0x39, 0xba, 0xe4, 0x06, 0x58, 0x19, 0x47, 0xa5, 0xfb, 0x78, 0x26, 0xc4, 0x9a, + 0x65, 0x3b, 0xd9, 0x87, 0x04, 0x5a, 0xb8, 0xe6, 0xa7, 0xf9, 0x1b, 0x45, 0xc6, 0x98, 0x7a, 0x24, + 0xf8, 0xa6, 0x44, 0x1a, 0x99, 0xc7, 0x25, 0x7b, 0x3a, 0x64, 0x86, 0xd8, 0x5b, 0x05, 0xe7, 0xb9, + 0x8c, 0xd2, 0x30, 0x6e, 0xed, 0xb3, 0x51, 0x0f, 0x4e, 0x10, 0xf2, 0xac, 0x2f, 0x71, 0x93, 0xcd, + 0x11, 0x4f, 0xad, 0xf3, 0x70, 0x2e, 0xcc, 0x92, 0xd3, 0x8d, 0x6f, 0x31, 0xb2, 0xec, 0x0e, 0x50, + 0xaf, 0xf1, 0x13, 0x4d, 0xce, 0x90, 0x72, 0x2c, 0x6d, 0x33, 0xd1, 0x8f, 0x0c, 0x52, 0xb0, 0xee, + 0x32, 0x6c, 0x8e, 0xd0, 0x53, 0x0d, 0xef, 0xb1, 0xf0, 0xae, 0x4c, 0x12, 0x91, 0xcf, 0x2d, 0x73, + 0xca, 0x94, 0x76, 0x28, 0xab, 0xf5, 0x17, 0x49, 0x08, 0x56, 0xb4, 0xea, 0x69, 0x37, 0xd5, 0x8b, + 0x57, 0x09, 0xeb, 0xb5, 0x36, 0x68, 0x8a, 0xd4, 0x95, 0xcb, 0x29, 0x77, 0xf4, 0xaa, 0x48, 0x16, + 0xe9, 0xb7, 0x55, 0x0b, 0x88, 0xd6, 0x34, 0x6a, 0x2b, 0x75, 0x97, 0xc9, 0x4a, 0x14, 0xf6, 0xa8, + 0x74, 0x2a, 0xc8, 0x96, 0x15, 0x4b, 0xa9, 0xf7, 0xb6, 0xe8, 0x0a, 0x54, 0xd7, 0x89, 0x6b, 0x35, +}; +} // namespace + +uint8_t GetCrc8(const uint8_t *data, size_t len, uint8_t init) { + if (!data) { + return init; + } + uint8_t crc = init; + while (len--) { + crc = kCrc8Table[crc ^ (*data++)]; + } + return crc; +} + +bool VerifyCrc8(const uint8_t *data, size_t len) { + if (!data || len < 2) { + return false; + } + return GetCrc8(data, len - 1, kCrc8Init) == data[len - 1]; +} + +void AppendCrc8(uint8_t *data, size_t len) { + if (!data || len < 2) { + return; + } + data[len - 1] = GetCrc8(data, len - 1, kCrc8Init); +} + +} // namespace fyt::serial_driver diff --git a/src/rm_hardware_driver/rm_serial_driver/src/protocol/default_protocol.cpp b/src/rm_hardware_driver/rm_serial_driver/src/protocol/default_protocol.cpp new file mode 100644 index 0000000..71a1b01 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/src/protocol/default_protocol.cpp @@ -0,0 +1,107 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_serial_driver/protocol/default_protocol.hpp" + +#include "rm_utils/logger/log.hpp" + +namespace fyt::serial_driver::protocol { + +DefaultProtocol::DefaultProtocol(std::string_view port_name, + bool enable_data_print, + bool enable_send_print) { + auto uart_transporter = std::make_shared(std::string(port_name)); + rx_packet_tool_ = std::make_shared>(uart_transporter); + tx_packet_tool_ = std::make_shared>(uart_transporter); + enable_data_print_ = enable_data_print; + enable_send_print_ = enable_send_print; +} + +std::vector DefaultProtocol::getSubscriptions( + rclcpp::Node::SharedPtr node) { + return {node->create_subscription( + "armor_solver/cmd_gimbal", + rclcpp::SensorDataQoS(), + [this](const rm_interfaces::msg::GimbalCmd::SharedPtr msg) { this->send(*msg); }) + + }; +} + +std::vector::SharedPtr> DefaultProtocol::getClients( + rclcpp::Node::SharedPtr node) const { + return {node->create_client("armor_detector/set_mode", + rmw_qos_profile_services_default)}; +} + +void DefaultProtocol::send(const rm_interfaces::msg::GimbalCmd &data) { + if (enable_send_print_) { + FYT_INFO("serial_driver", + "tx gimbal fire_advice:{} pitch:{} yaw:{} distance:{} shoot_rate:{}", + data.fire_advice, + data.pitch, + data.yaw, + data.distance, + data.shoot_rate); + } + FixedPacket<16> packet; + packet.loadData(data.fire_advice ? FireState::Fire : FireState::NotFire, 1); + packet.loadData(static_cast(data.pitch), 2); + packet.loadData(static_cast(data.yaw), 6); + packet.loadData(static_cast(data.distance), 10); + packet.loadData(data.shoot_rate, 14); + tx_packet_tool_->sendPacket(packet); +} + +bool DefaultProtocol::receive(rm_interfaces::msg::SerialReceiveData &data) { + FixedPacket<20> packet; + if (rx_packet_tool_->recvPacket(packet)) { + packet.unloadData(data.mode, 1); + packet.unloadData(data.roll, 2); + packet.unloadData(data.pitch, 6); + packet.unloadData(data.yaw, 10); + if (rx_packet_length_ >= 20) { + packet.unloadData(data.yaw_to_pitch_angle, 14); + } else { + data.yaw_to_pitch_angle = 0.0f; + } + int speed_index = (rx_packet_length_ > 0 ? rx_packet_length_ : 20) - 2; + uint8_t speed_raw = 0; + if (speed_index > 0 && speed_index < 20 && packet.unloadData(speed_raw, speed_index)) { + data.bullet_speed = static_cast(speed_raw) / 10.0f; + } else { + data.bullet_speed = 0.0f; + } + if (enable_data_print_) { + FYT_INFO("serial_driver", + "rx mode:{} roll:{} pitch:{} yaw:{} yaw_to_pitch_angle:{} bullet_speed:{}", + data.mode, + data.roll, + data.pitch, + data.yaw, + data.yaw_to_pitch_angle, + data.bullet_speed); + } + return true; + } else { + return false; + } +} + +void DefaultProtocol::setRxPacketLength(int required_len) { + rx_packet_length_ = required_len > 0 ? required_len : 20; + rx_packet_tool_->setRequiredLength(required_len); +} + +} // namespace fyt::serial_driver::protocol diff --git a/src/rm_hardware_driver/rm_serial_driver/src/protocol/infantry_protocol.cpp b/src/rm_hardware_driver/rm_serial_driver/src/protocol/infantry_protocol.cpp new file mode 100644 index 0000000..095c35e --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/src/protocol/infantry_protocol.cpp @@ -0,0 +1,114 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_serial_driver/protocol/infantry_protocol.hpp" + +#include "rm_utils/logger/log.hpp" + +namespace fyt::serial_driver::protocol { +ProtocolInfantry::ProtocolInfantry(std::string_view port_name, + bool enable_data_print, + bool enable_send_print) { + auto uart_transporter = std::make_shared(std::string(port_name)); + rx_packet_tool_ = std::make_shared>(uart_transporter); + tx_packet_tool_ = std::make_shared>(uart_transporter); + enable_data_print_ = enable_data_print; + enable_send_print_ = enable_send_print; +} + +void ProtocolInfantry::send(const rm_interfaces::msg::GimbalCmd &data) { + if (enable_send_print_) { + FYT_INFO("serial_driver", + "tx gimbal fire_advice:{} pitch:{} yaw:{} distance:{}", + data.fire_advice, + data.pitch, + data.yaw, + data.distance); + } + FixedPacket<16> packet; + packet.loadData(data.fire_advice ? FireState::Fire : FireState::NotFire, 1); + packet.loadData(static_cast(data.pitch), 2); + packet.loadData(static_cast(data.yaw), 6); + packet.loadData(static_cast(data.distance), 10); + tx_packet_tool_->sendPacket(packet); +} + +bool ProtocolInfantry::receive(rm_interfaces::msg::SerialReceiveData &data) { + FixedPacket<20> packet; + if (rx_packet_tool_->recvPacket(packet)) { + packet.unloadData(data.mode, 1); + packet.unloadData(data.roll, 2); + packet.unloadData(data.pitch, 6); + packet.unloadData(data.yaw, 10); + if (rx_packet_length_ >= 20) { + packet.unloadData(data.yaw_to_pitch_angle, 14); + } else { + data.yaw_to_pitch_angle = 0.0f; + } + int speed_index = (rx_packet_length_ > 0 ? rx_packet_length_ : 20) - 2; + uint8_t speed_raw = 0; + if (speed_index > 0 && speed_index < 20 && packet.unloadData(speed_raw, speed_index)) { + data.bullet_speed = static_cast(speed_raw) / 10.0f; + } else { + data.bullet_speed = 0.0f; + } + if (enable_data_print_) { + FYT_INFO("serial_driver", + "rx mode:{} roll:{} pitch:{} yaw:{} yaw_to_pitch_angle:{} bullet_speed:{}", + data.mode, + data.roll, + data.pitch, + data.yaw, + data.yaw_to_pitch_angle, + data.bullet_speed); + } + return true; + } else { + return false; + } +} + +void ProtocolInfantry::setRxPacketLength(int required_len) { + rx_packet_length_ = required_len > 0 ? required_len : 20; + rx_packet_tool_->setRequiredLength(required_len); +} + +std::vector ProtocolInfantry::getSubscriptions( + rclcpp::Node::SharedPtr node) { + auto sub1 = node->create_subscription( + "armor_solver/cmd_gimbal", + rclcpp::SensorDataQoS(), + [this](const rm_interfaces::msg::GimbalCmd::SharedPtr msg) { this->send(*msg); }); + auto sub2 = node->create_subscription( + "rune_solver/cmd_gimbal", + rclcpp::SensorDataQoS(), + [this](const rm_interfaces::msg::GimbalCmd::SharedPtr msg) { this->send(*msg); }); + return {sub1, sub2}; +} + +std::vector::SharedPtr> ProtocolInfantry::getClients( + rclcpp::Node::SharedPtr node) const { + auto client1 = node->create_client("armor_detector/set_mode", + rmw_qos_profile_services_default); + auto client2 = node->create_client("armor_solver/set_mode", + rmw_qos_profile_services_default); + auto client3 = node->create_client("rune_detector/set_mode", + rmw_qos_profile_services_default); + auto client4 = node->create_client("rune_solver/set_mode", + rmw_qos_profile_services_default); + return {client1, client2, client3, client4}; +} + +} // namespace fyt::serial_driver::protocol diff --git a/src/rm_hardware_driver/rm_serial_driver/src/protocol/sentry_protocol.cpp b/src/rm_hardware_driver/rm_serial_driver/src/protocol/sentry_protocol.cpp new file mode 100644 index 0000000..0b7d7d6 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/src/protocol/sentry_protocol.cpp @@ -0,0 +1,177 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_serial_driver/protocol/sentry_protocol.hpp" +// ros2 +#include + +#include "rm_utils/logger/log.hpp" + +namespace fyt::serial_driver::protocol { +ProtocolSentry::ProtocolSentry(std::string_view port_name, + bool enable_data_print, + bool enable_send_print) { + auto uart_transporter = std::make_shared(std::string(port_name)); + packet_tool_ = std::make_shared>(uart_transporter); + enable_data_print_ = enable_data_print; + enable_send_print_ = enable_send_print; +} + +void ProtocolSentry::send(const rm_interfaces::msg::GimbalCmd &data) { + if (enable_send_print_) { + FYT_INFO("serial_driver", + "tx gimbal fire_advice:{} pitch:{} yaw:{} distance:{}", + data.fire_advice, + data.pitch, + data.yaw, + data.distance); + } + packet_.loadData(data.fire_advice ? FireState::Fire : FireState::NotFire, 1); + // is_spin + // packet_.loadData(0x00, 2); + // gimbal control + packet_.loadData(static_cast(data.pitch), 4); + packet_.loadData(static_cast(data.yaw), 8); + packet_.loadData(static_cast(data.distance), 12); + // // chassis control + // // linear x + // packet_.loadData(0, 16); + // // linear y + // packet_.loadData(0, 20); + // // angular z + // packet_.loadData(0, 24); + // // useless data + // packet_.loadData(0, 28); + packet_tool_->sendPacket(packet_); +} + +void ProtocolSentry::send(const rm_interfaces::msg::ChassisCmd &data) { + if (enable_send_print_) { + FYT_INFO("serial_driver", + "tx chassis spin:{} navigating:{} linear_x:{} linear_y:{} angular_z:{}", + data.is_spining, + data.is_navigating, + data.twist.linear.x, + data.twist.linear.y, + data.twist.angular.z); + } + // packet_.loadData(0x00, 1); + // is_spin + packet_.loadData(data.is_spining ? 0x01 : 0x00, 2); + packet_.loadData(data.is_navigating ? 0x01 : 0x00, 3); + // gimbal control + // packet_.loadData(0, 4); + // packet_.loadData(0, 8); + // packet_.loadData(0, 12); + // chassis control + // linear x + packet_.loadData(data.twist.linear.x, 16); + // linear y + packet_.loadData(data.twist.linear.y, 20); + // angular z + packet_.loadData(data.twist.angular.z, 24); + // useless data + // packet_.loadData(0, 28); + packet_tool_->sendPacket(packet_); +} + +bool ProtocolSentry::receive(rm_interfaces::msg::SerialReceiveData &data) { + FixedPacket<32> packet; + if (packet_tool_->recvPacket(packet)) { + // game status + uint8_t enemy_color; + packet.unloadData(enemy_color, 1); + data.mode = (enemy_color == ENEMY_BLUE ? 1 : 0); + + packet.unloadData(data.pitch, 2); + packet.unloadData(data.yaw, 6); + packet.unloadData(data.yaw_to_pitch_angle, 10); + // 实际上是底盘角度 + // packet.unloadData(data.chassis_yaw, 10); + // blood + packet.unloadData(data.judge_system_data.blood, 14); + // remaining time + packet.unloadData(data.judge_system_data.remaining_time, 16); + // outpost hp + packet.unloadData(data.judge_system_data.outpost_hp, 20); + // operator control message + packet.unloadData(data.judge_system_data.operator_command.is_outpost_attacking, 22); + packet.unloadData(data.judge_system_data.operator_command.is_retreating, 23); + packet.unloadData(data.judge_system_data.operator_command.is_drone_avoiding, 24); + + packet.unloadData(data.judge_system_data.game_status, 25); + + int speed_index = (rx_packet_length_ > 0 ? rx_packet_length_ : 32) - 2; + uint8_t speed_raw = 0; + if (speed_index > 0 && speed_index < 32 && packet.unloadData(speed_raw, speed_index)) { + data.bullet_speed = static_cast(speed_raw) / 10.0f; + } else { + data.bullet_speed = 0.0f; + } + if (enable_data_print_) { + FYT_INFO("serial_driver", + "rx mode:{} pitch:{} yaw:{} yaw_to_pitch_angle:{} blood:{} remaining:{} outpost_hp:{} " + "operator(outpost_attacking:{} retreating:{} drone_avoiding:{}) game_status:{} " + "bullet_speed:{}", + data.mode, + data.pitch, + data.yaw, + data.yaw_to_pitch_angle, + data.judge_system_data.blood, + data.judge_system_data.remaining_time, + data.judge_system_data.outpost_hp, + data.judge_system_data.operator_command.is_outpost_attacking, + data.judge_system_data.operator_command.is_retreating, + data.judge_system_data.operator_command.is_drone_avoiding, + data.judge_system_data.game_status, + data.bullet_speed); + } + return true; + } else { + return false; + } +} + +void ProtocolSentry::setRxPacketLength(int required_len) { + rx_packet_length_ = required_len > 0 ? required_len : 32; + packet_tool_->setRequiredLength(required_len); +} + +std::vector ProtocolSentry::getSubscriptions( + rclcpp::Node::SharedPtr node) { + auto sub1 = node->create_subscription( + "armor_solver/cmd_gimbal", + rclcpp::SensorDataQoS(), + [this](const rm_interfaces::msg::GimbalCmd::SharedPtr msg) { this->send(*msg); }); + auto sub2 = node->create_subscription( + "rune_solver/cmd_gimbal", + rclcpp::SensorDataQoS(), + [this](const rm_interfaces::msg::GimbalCmd::SharedPtr msg) { this->send(*msg); }); + auto sub3 = node->create_subscription( + "/cmd_chassis", + rclcpp::SensorDataQoS(), + [this](const rm_interfaces::msg::ChassisCmd::SharedPtr msg) { this->send(*msg); }); + return {sub1, sub2, sub3}; +} + +std::vector::SharedPtr> ProtocolSentry::getClients( + rclcpp::Node::SharedPtr node) const { + auto client1 = node->create_client("armor_detector/set_mode", + rmw_qos_profile_services_default); + auto client2 = node->create_client("armor_solver/set_mode", + rmw_qos_profile_services_default); + return {client1, client2}; +} +} // namespace fyt::serial_driver::protocol diff --git a/src/rm_hardware_driver/rm_serial_driver/src/serial_driver_node.cpp b/src/rm_hardware_driver/rm_serial_driver/src/serial_driver_node.cpp new file mode 100644 index 0000000..629ff6c --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/src/serial_driver_node.cpp @@ -0,0 +1,213 @@ +// Created by Chengfu Zou on 2023.7.1 +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_serial_driver/serial_driver_node.hpp" + +#include +// std +#include +#include +#include +#include +#include +// ros2 +#include +#include +// project +#include "rm_serial_driver/uart_transporter.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/utils.hpp" + +namespace fyt::serial_driver { +SerialDriverNode::SerialDriverNode(const rclcpp::NodeOptions &options) +: Node("serial_driver", options) { + FYT_REGISTER_LOGGER("serial_driver", "~/fyt2024-log", INFO); + + // Task thread + listen_thread_ = std::make_unique(&SerialDriverNode::listenLoop, this); +} + +void SerialDriverNode::init() { + FYT_INFO("serial_driver", "Initializing SerialDriverNode!"); + // Init + target_frame_ = this->declare_parameter("target_frame", "odom"); + std::string port_name = this->declare_parameter("port_name", "/dev/ttyUSB0"); + std::string protocol_type = this->declare_parameter("protocol", "infantry"); + bool enable_data_print = this->declare_parameter("enable_data_print", false); + bool enable_send_print = this->declare_parameter("enable_send_print", false); + // Create Protocol + protocol_ = + ProtocolFactory::createProtocol(protocol_type, port_name, enable_data_print, enable_send_print); + if (protocol_ == nullptr) { + FYT_FATAL("serial_driver", "Failed to create protocol with type: {}", protocol_type); + rclcpp::shutdown(); + return; + } + FYT_INFO( + "serial_driver", "Protocol has been created with type: {}, port: {}", protocol_type, port_name); + + // Subscriptions + subscriptions_ = protocol_->getSubscriptions(this->shared_from_this()); + for (auto sub : subscriptions_) { + FYT_INFO("serial_driver", "Subscribe to topic: {}", sub->get_topic_name()); + } + // Publisher + serial_receive_data_pub_ = this->create_publisher( + "serial/receive", rclcpp::SensorDataQoS()); + + // TF broadcaster + timestamp_offset_ = this->declare_parameter("timestamp_offset", 0.0); + tf_broadcaster_ = std::make_unique(*this); + + // yaw轴到pitch轴的偏移量 [x, y, z] (单位: 米) + // x: 前后方向 (正值表示pitch轴在yaw轴前方) + // y: 左右方向 (正值表示pitch轴在yaw轴左方) + // z: 上下方向 (正值表示pitch轴在yaw轴上方) + yaw_to_pitch_offset_ = + this->declare_parameter>("yaw_to_pitch_offset", {0.0, 0.0, 0.0}); + yaw_to_pitch_radius_ = this->declare_parameter( + "yaw_to_pitch_radius", std::hypot(yaw_to_pitch_offset_[0], yaw_to_pitch_offset_[2])); + use_yaw_to_pitch_angle_ = this->declare_parameter("use_yaw_to_pitch_angle", true); + protocol_->setRxPacketLength(use_yaw_to_pitch_angle_ ? 20 : 16); + + // Param client + for (auto client : protocol_->getClients(this->shared_from_this())) { + std::string name = client->get_service_name(); + set_mode_clients_.emplace(name, client); + FYT_INFO("serial_driver", "Create client for service: {}", name); + } + + // Heartbeat + heartbeat_ = HeartBeatPublisher::create(this); + + FYT_INFO("serial_driver", "SerialDriverNode has been initialized!"); +} + +SerialDriverNode::~SerialDriverNode() { + FYT_INFO("serial_driver", "Destroy SerialDriverNode!"); + rclcpp::shutdown(); + if (listen_thread_ != nullptr) { + listen_thread_->join(); + } +} + +void SerialDriverNode::listenLoop() { + if (protocol_ == nullptr) { + // Lazy init because shared_from_this() is not available in constructor + init(); + } + + rm_interfaces::msg::SerialReceiveData receive_data; + while (rclcpp::ok()) { + if (protocol_->receive(receive_data)) { + receive_data.header.stamp = this->now() + rclcpp::Duration::from_seconds(timestamp_offset_); + receive_data.header.frame_id = target_frame_; + serial_receive_data_pub_->publish(receive_data); + + for (auto &[service_name, client] : set_mode_clients_) { + if (client.mode.load() != receive_data.mode && !client.on_waiting.load()) { + setMode(client, receive_data.mode); + } + } + + geometry_msgs::msg::TransformStamped t; + timestamp_offset_ = this->get_parameter("timestamp_offset").as_double(); + auto stamp = this->now() + rclcpp::Duration::from_seconds(timestamp_offset_); + + auto pitch = -receive_data.pitch * M_PI / 180.0; + auto yaw = receive_data.yaw * M_PI / 180.0; + + // 发布 odom -> yaw_link 变换 (只有yaw旋转) + t.header.stamp = stamp; + t.header.frame_id = target_frame_; + t.child_frame_id = "yaw_link"; + tf2::Quaternion q_yaw; + q_yaw.setRPY(0, 0, yaw); + t.transform.rotation = tf2::toMsg(q_yaw); + t.transform.translation.x = 0; + t.transform.translation.y = 0; + t.transform.translation.z = 0; + tf_broadcaster_->sendTransform(t); + + // 发布 yaw_link -> gimbal_link 变换 (只有pitch旋转 + yaw-pitch轴偏移) + // yaw_to_pitch_offset: yaw轴到pitch轴的偏移量 [x, y, z] + // 需要在参数文件中配置: yaw_to_pitch_offset: [0.0, 0.0, 0.05] + t.header.stamp = stamp; + t.header.frame_id = "yaw_link"; + t.child_frame_id = "pitch_link"; + tf2::Quaternion q_pitch; + q_pitch.setRPY(0, pitch, 0); // 只有pitch + t.transform.rotation = tf2::toMsg(q_pitch); + // 从参数获取yaw到pitch轴的偏移 + if (use_yaw_to_pitch_angle_ && yaw_to_pitch_radius_ > 0.0 && + std::isfinite(receive_data.yaw_to_pitch_angle)) { + double yaw_to_pitch_angle = receive_data.yaw_to_pitch_angle * M_PI / 180.0; + t.transform.translation.x = -yaw_to_pitch_radius_ * std::sin(yaw_to_pitch_angle); + t.transform.translation.y = yaw_to_pitch_offset_[1]; + t.transform.translation.z = yaw_to_pitch_radius_ * std::cos(yaw_to_pitch_angle); + } else { + // Fallback to fixed offset when angle data is unavailable. + t.transform.translation.x = yaw_to_pitch_offset_[0]; + t.transform.translation.y = yaw_to_pitch_offset_[1]; + t.transform.translation.z = yaw_to_pitch_offset_[2]; + } + tf_broadcaster_->sendTransform(t); + } else { + auto error_message = protocol_->getErrorMessage(); + error_message = error_message.empty() ? "unknown" : error_message; + FYT_WARN("serial_driver", "Failed to reveive packet! error message :{}", error_message); + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + } + } +} + +void SerialDriverNode::setMode(SetModeClient &client, const uint8_t mode) { + using namespace std::chrono_literals; + + std::string service_name = client.ptr->get_service_name(); + // Wait for service + while (!client.ptr->wait_for_service(1s)) { + if (!rclcpp::ok()) { + FYT_ERROR( + "serial_driver", "Interrupted while waiting for the service {}. Exiting.", service_name); + return; + } + FYT_INFO("serial_driver", "Service {} not available, waiting again...", service_name); + } + if (!client.ptr->service_is_ready()) { + FYT_WARN("serial_driver", "Service: {} is not available!", service_name); + return; + } + // Send request + auto req = std::make_shared(); + req->mode = mode; + + client.on_waiting.store(true); + auto result = client.ptr->async_send_request( + req, [mode, &client](rclcpp::Client::SharedFuture result) { + client.on_waiting.store(false); + if (result.get()->success) { + client.mode.store(mode); + } + }); +} + +} // namespace fyt::serial_driver + +#include "rclcpp_components/register_node_macro.hpp" +// Register the component with class_loader. +// This acts as a sort of entry point, allowing the component to be discoverable when its library +// is being loaded into a running process. +RCLCPP_COMPONENTS_REGISTER_NODE(fyt::serial_driver::SerialDriverNode) diff --git a/src/rm_hardware_driver/rm_serial_driver/src/transporter_driver/uart_transporter.cpp b/src/rm_hardware_driver/rm_serial_driver/src/transporter_driver/uart_transporter.cpp new file mode 100644 index 0000000..d086797 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/src/transporter_driver/uart_transporter.cpp @@ -0,0 +1,196 @@ +// Copyright (C) 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Additional modifications and features by Chengfu Zou, 2023. +// +// Copyright (C) FYT Vision Group. All rights reserved. + +#include "rm_serial_driver/uart_transporter.hpp" +// System +#include /*错误号定义*/ +#include /*文件控制定义*/ +#include /*标准输入输出定义*/ +#include /*标准函数库定义*/ +#include +#include +#include +#include /*PPSIX 终端控制定义*/ +#include /*Unix 标准函数定义*/ + +namespace fyt::serial_driver { + +bool UartTransporter::setParam(int speed, int flow_ctrl, int databits, int stopbits, int parity) { + // 设置串口数据帧格式 + int speed_arr[] = {B115200, B19200, B9600, B4800, B2400, B1200, B300}; + int name_arr[] = {115200, 19200, 9600, 4800, 2400, 1200, 300}; + struct termios options; + // tcgetattr(fd,&options)得到与fd指向对象的相关参数,并将它们保存于options,该函数还可以测试配置是否正确, + // 该串口是否可用等。若调用成功,函数返回值为0,若调用失败,函数返回值为1. + if (tcgetattr(fd_, &options) != 0) { + error_message_ = "Setup Serial err"; + return false; + } + // 设置串口输入波特率和输出波特率 + for (size_t i = 0; i < sizeof(speed_arr) / sizeof(int); i++) { + if (speed == name_arr[i]) { + cfsetispeed(&options, speed_arr[i]); + cfsetospeed(&options, speed_arr[i]); + } + } + // 修改控制模式,保证程序不会占用串口 + options.c_cflag |= CLOCAL; + // 修改控制模式,使得能够从串口中读取输入数据 + options.c_cflag |= CREAD; + // 设置数据流控制 + switch (flow_ctrl) { + case 0: // 不使用流控制 + options.c_cflag &= ~CRTSCTS; + break; + case 1: // 使用硬件流控制 + options.c_cflag |= CRTSCTS; + break; + case 2: // 使用软件流控制 + options.c_cflag |= IXON | IXOFF | IXANY; + break; + } + // 设置数据位 + // 屏蔽其他标志位 + options.c_cflag &= ~CSIZE; + switch (databits) { + case 5: + options.c_cflag |= CS5; + break; + case 6: + options.c_cflag |= CS6; + break; + case 7: + options.c_cflag |= CS7; + break; + case 8: + options.c_cflag |= CS8; + break; + default: + error_message_ = "Unsupported data size"; + return false; + } + // 设置校验位 + switch (parity) { + case 'n': + case 'N': // 无奇偶校验位。 + options.c_cflag &= ~PARENB; + options.c_iflag &= ~INPCK; + break; + case 'o': + case 'O': // 设置为奇校验 + options.c_cflag |= (PARODD | PARENB); + options.c_iflag |= INPCK; + break; + case 'e': + case 'E': // 设置为偶校验 + options.c_cflag |= PARENB; + options.c_cflag &= ~PARODD; + options.c_iflag |= INPCK; + break; + case 's': + case 'S': // 设置为空格 + options.c_cflag &= ~PARENB; + options.c_cflag &= ~CSTOPB; + break; + default: + error_message_ = "Unsupported parity"; + return false; + } + // 设置停止位 + switch (stopbits) { + case 1: + options.c_cflag &= ~CSTOPB; + break; + case 2: + options.c_cflag |= CSTOPB; + break; + default: + error_message_ = "Unsupported stop bits"; + return false; + } + + // 修改输出模式,原始数据输出 + options.c_oflag &= ~OPOST; + options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); + // 传输特殊字符,否则特殊字符0x0d,0x11,0x13会被屏蔽或映射。 + options.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON); + + // 设置等待时间和最小接收字符 + options.c_cc[VTIME] = 1; // 读取一个字符等待1*(1/10)s + options.c_cc[VMIN] = 1; // 读取字符的最少个数为1 + tcflush(fd_, TCIFLUSH); + + // 激活配置 (将修改后的termios数据设置到串口中) + if (tcsetattr(fd_, TCSANOW, &options) != 0) { + error_message_ = "com set error"; + return false; + } + return true; +} + +bool UartTransporter::open() { + if (is_open_) { + return true; + } + fd_ = ::open(device_path_.c_str(), O_RDWR | O_NOCTTY | O_NDELAY); + if (-1 == fd_) { + error_message_ = "can't open uart device: " + device_path_; + return false; + } + // 恢复串口为阻塞状态 + if (fcntl(fd_, F_SETFL, 0) < 0) { + error_message_ = "fcntl failed"; + return false; + } + // 测试是否为终端设备 + // 避免自启动无法读取数据 + // if (0 == isatty(STDIN_FILENO)) { + // error_message_ = "standard input is not a terminal device"; + // return false; + // } + // 设置串口数据帧格式 + if (!setParam(speed_, flow_ctrl_, databits_, stopbits_, parity_)) { + return false; + } + is_open_ = true; + return true; +} + +void UartTransporter::close() { + if (!is_open_) { + return; + } + ::close(fd_); + fd_ = -1; + is_open_ = false; +} + +bool UartTransporter::isOpen() { return is_open_; } + +int UartTransporter::read(void *buffer, size_t len) { + int ret = ::read(fd_, buffer, len); + // tcflush(fd_, TCIFLUSH); + return ret; +} + +int UartTransporter::write(const void *buffer, size_t len) { + int ret = ::write(fd_, buffer, len); + return ret; +} + +} // namespace fyt::serial_driver diff --git a/src/rm_hardware_driver/rm_serial_driver/src/virtual_serial_node.cpp b/src/rm_hardware_driver/rm_serial_driver/src/virtual_serial_node.cpp new file mode 100644 index 0000000..df27458 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/src/virtual_serial_node.cpp @@ -0,0 +1,210 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. + +// std +#include +#include +#include +#include +#include +#include +#include +#include +// ros2 +#include + +#include +#include +#include +#include +#include +// project +#include "rm_interfaces/msg/serial_receive_data.hpp" +#include "rm_interfaces/srv/set_mode.hpp" +#include "rm_utils/heartbeat.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/utils.hpp" + +namespace fyt::serial_driver { +class VirtualSerialNode : public rclcpp::Node { + struct SetModeClient { + SetModeClient(rclcpp::Client::SharedPtr p) : ptr(p) {} + std::atomic on_waiting = false; + std::atomic mode = 0; + rclcpp::Client::SharedPtr ptr; + }; + +public: + explicit VirtualSerialNode(const rclcpp::NodeOptions &options) : Node("serial_driver", options) { + FYT_REGISTER_LOGGER("serial_driver", "~/fyt2024-log", INFO); + FYT_INFO("serial_driver", "Starting VirtualSerialNode!"); + + // 设置关闭标志 + is_running_.store(true); + + serial_receive_data_pub_ = + this->create_publisher("serial/receive", 10); + + tf_broadcaster_ = std::make_unique(*this); + + this->declare_parameter("vision_mode", static_cast(0)); + + has_rune_ = this->declare_parameter("has_rune", true); + + serial_receive_data_msg_.header.frame_id = "odom"; + serial_receive_data_msg_.bullet_speed = this->declare_parameter("bullet_speed", 25.0); + transform_stamped_.header.frame_id = "odom"; + transform_stamped_.child_frame_id = "yaw_link"; + serial_receive_data_msg_.mode = 0; + serial_receive_data_msg_.roll = this->declare_parameter("roll", 0.0); + serial_receive_data_msg_.pitch = this->declare_parameter("pitch", 0.0); + serial_receive_data_msg_.yaw = this->declare_parameter("yaw", 0.0); + serial_receive_data_msg_.yaw_to_pitch_angle = + this->declare_parameter("yaw_to_pitch_angle", 0.0); + + // yaw轴到pitch轴的偏移量 [x, y, z] (单位: 米) + yaw_to_pitch_offset_ = + this->declare_parameter>("yaw_to_pitch_offset", {0.0, 0.0, 0.0}); + yaw_to_pitch_radius_ = this->declare_parameter( + "yaw_to_pitch_radius", std::hypot(yaw_to_pitch_offset_[0], yaw_to_pitch_offset_[2])); + use_yaw_to_pitch_angle_ = this->declare_parameter("use_yaw_to_pitch_angle", true); + + // Heartbeat + heartbeat_ = HeartBeatPublisher::create(this); + + // Param client + auto autoaim_set_mode_client_1 = + this->create_client("armor_detector/set_mode"); + set_mode_clients_.emplace(autoaim_set_mode_client_1->get_service_name(), + autoaim_set_mode_client_1); + auto autoaim_set_mode_client_2 = + this->create_client("armor_solver/set_mode"); + set_mode_clients_.emplace(autoaim_set_mode_client_2->get_service_name(), + autoaim_set_mode_client_2); + if (has_rune_) { + auto client1 = this->create_client("rune_detector/set_mode"); + set_mode_clients_.emplace(client1->get_service_name(), client1); + auto client2 = this->create_client("rune_solver/set_mode"); + set_mode_clients_.emplace(client2->get_service_name(), client2); + } + + timer_ = this->create_wall_timer(std::chrono::milliseconds(1), [this]() { + serial_receive_data_msg_.header.stamp = this->now(); + int mode = this->get_parameter("vision_mode").as_int(); + [[maybe_unused]] double roll = this->get_parameter("roll").as_double(); + double pitch = this->get_parameter("pitch").as_double(); + double yaw = this->get_parameter("yaw").as_double(); + double yaw_to_pitch_angle = this->get_parameter("yaw_to_pitch_angle").as_double(); + double bullet_speed = this->get_parameter("bullet_speed").as_double(); + serial_receive_data_msg_.mode = mode; + serial_receive_data_msg_.pitch = pitch; + serial_receive_data_msg_.yaw = yaw; + serial_receive_data_msg_.yaw_to_pitch_angle = yaw_to_pitch_angle; + serial_receive_data_msg_.bullet_speed = bullet_speed; + + auto stamp = this->now(); + + // 发布 odom -> yaw_link 变换 (只有yaw旋转) + tf2::Quaternion q_yaw; + q_yaw.setRPY(0, 0, yaw * M_PI / 180.0); + transform_stamped_.transform.rotation = tf2::toMsg(q_yaw); + transform_stamped_.transform.translation.x = 0; + transform_stamped_.transform.translation.y = 0; + transform_stamped_.transform.translation.z = 0; + transform_stamped_.header.frame_id = "odom"; + transform_stamped_.child_frame_id = "yaw_link"; + transform_stamped_.header.stamp = stamp; + tf_broadcaster_->sendTransform(transform_stamped_); + + // 发布 yaw_link -> gimbal_link 变换 (只有pitch旋转 + yaw-pitch轴偏移) + tf2::Quaternion q_pitch; + q_pitch.setRPY(0, -pitch * M_PI / 180.0, 0); // 只有pitch + transform_stamped_.transform.rotation = tf2::toMsg(q_pitch); + if (use_yaw_to_pitch_angle_ && yaw_to_pitch_radius_ > 0.0) { + double yaw_to_pitch_angle_rad = yaw_to_pitch_angle * M_PI / 180.0; + transform_stamped_.transform.translation.x = + -yaw_to_pitch_radius_ * std::sin(yaw_to_pitch_angle_rad); + transform_stamped_.transform.translation.y = yaw_to_pitch_offset_[1]; + transform_stamped_.transform.translation.z = + yaw_to_pitch_radius_ * std::cos(yaw_to_pitch_angle_rad); + } else { + transform_stamped_.transform.translation.x = yaw_to_pitch_offset_[0]; + transform_stamped_.transform.translation.y = yaw_to_pitch_offset_[1]; + transform_stamped_.transform.translation.z = yaw_to_pitch_offset_[2]; + } + transform_stamped_.header.frame_id = "yaw_link"; + transform_stamped_.child_frame_id = "pitch_link"; + transform_stamped_.header.stamp = stamp; + tf_broadcaster_->sendTransform(transform_stamped_); + + // serial_receive_data_msg.mode = mode; + serial_receive_data_pub_->publish(serial_receive_data_msg_); + + for (auto &[service_name, client] : set_mode_clients_) { + if (client.mode.load() != mode && !client.on_waiting.load()) { + setMode(client, mode); + } + } + }); + } + + ~VirtualSerialNode() { + // 设置关闭标志,让所有等待循环退出 + is_running_.store(false); + // 取消定时器 + if (timer_) { + timer_->cancel(); + } + FYT_INFO("serial_driver", "VirtualSerialNode destroyed."); + } + + void setMode(SetModeClient &client, const uint8_t mode) { + std::string service_name = client.ptr->get_service_name(); + + // Check if service is ready without blocking + if (!client.ptr->service_is_ready()) { + return; + } + + // Send request + auto req = std::make_shared(); + req->mode = mode; + client.on_waiting.store(true); + auto result = client.ptr->async_send_request( + req, [mode, &client](rclcpp::Client::SharedFuture result) { + client.on_waiting.store(false); + if (result.get()->success) { + client.mode.store(mode); + } + }); + } + +private: + HeartBeatPublisher::SharedPtr heartbeat_; + std::unique_ptr tf_broadcaster_; + rclcpp::Publisher::SharedPtr serial_receive_data_pub_; + rclcpp::TimerBase::SharedPtr timer_; + rm_interfaces::msg::SerialReceiveData serial_receive_data_msg_; + geometry_msgs::msg::TransformStamped transform_stamped_; + + bool has_rune_; + + // 运行状态标志,用于优雅关闭 + std::atomic is_running_{true}; + + // yaw轴到pitch轴的偏移量 [x, y, z] (单位: 米) + std::vector yaw_to_pitch_offset_ = {0.0, 0.0, 0.0}; + double yaw_to_pitch_radius_ = 0.0; + bool use_yaw_to_pitch_angle_ = true; + + std::unordered_map set_mode_clients_; +}; +} // namespace fyt::serial_driver + +#include "rclcpp_components/register_node_macro.hpp" + +// Register the component with class_loader. +// This acts as a sort of entry point, allowing the component to be discoverable when its library +// is being loaded into a running process. +RCLCPP_COMPONENTS_REGISTER_NODE(fyt::serial_driver::VirtualSerialNode) + diff --git a/src/rm_hardware_driver/rm_serial_driver/test/dummy_transporter.hpp b/src/rm_hardware_driver/rm_serial_driver/test/dummy_transporter.hpp new file mode 100644 index 0000000..5fa2610 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/test/dummy_transporter.hpp @@ -0,0 +1,94 @@ +// Copyright 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef DUMMY_TRANSPORTER_HPP_ +#define DUMMY_TRANSPORTER_HPP_ + +#include + +#include +#include +#include + +#include "rm_serial_driver/transporter_interface.hpp" + +using namespace fyt::serial_driver; +// FIFO传输设备,用于测试。 +class FifoTransporter : public TransporterInterface +{ +public: + FifoTransporter(int fifo_rd_fd, int fifo_wr_fd) + : fifo_rd_fd_(fifo_rd_fd), fifo_wr_fd_(fifo_wr_fd) + {} + + bool open() override + { + return true; + } + void close() override + { + } + bool isOpen() override + { + return true; + } + int read(void * buffer, size_t len) override + { + return ::read(fifo_rd_fd_, buffer, len); + } + int write(const void * buffer, size_t len) override + { + return ::write(fifo_wr_fd_, buffer, len); + } + std::string errorMessage() override + { + return error_message_; + } + +private: + int fifo_rd_fd_; + int fifo_wr_fd_; + std::string error_message_; +}; + +class TransporterFactory +{ +public: + TransporterFactory() + { + int ret = pipe(fds1); + FYT_ASSERT(ret == 0); + ret = pipe(fds2); + FYT_ASSERT(ret == 0); + + transporter1_ = std::make_shared(fds1[0], fds2[1]); + transporter2_ = std::make_shared(fds2[0], fds1[1]); + } + TransporterInterface::SharedPtr get_transporter1() + { + return transporter1_; + } + TransporterInterface::SharedPtr get_transporter2() + { + return transporter2_; + } + +private: + int fds1[2]; + int fds2[2]; + TransporterInterface::SharedPtr transporter1_; + TransporterInterface::SharedPtr transporter2_; +}; + +#endif // DUMMY_TRANSPORTER_HPP_ \ No newline at end of file diff --git a/src/rm_hardware_driver/rm_serial_driver/test/test_fixed_packet_tool.cpp b/src/rm_hardware_driver/rm_serial_driver/test/test_fixed_packet_tool.cpp new file mode 100644 index 0000000..cad9059 --- /dev/null +++ b/src/rm_hardware_driver/rm_serial_driver/test/test_fixed_packet_tool.cpp @@ -0,0 +1,74 @@ +// Copyright 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include +#include +#include + +#include "dummy_transporter.hpp" +#include "gtest/gtest.h" +#include "rm_serial_driver/fixed_packet.hpp" +#include "rm_serial_driver/fixed_packet_tool.hpp" + +using namespace fyt; +TEST(FixedPacketTool, construct_with_nullptr) { + EXPECT_THROW(serial_driver::FixedPacketTool<32>(nullptr), std::invalid_argument); +} + +TEST(FixedPacketTool, send_and_recv) { + auto factory = std::make_shared(); + auto transporter1 = factory->get_transporter1(); + auto transporter2 = factory->get_transporter2(); + auto packet_tool1 = std::make_shared>(transporter1); + auto packet_tool2 = std::make_shared>(transporter2); + serial_driver::FixedPacket<32> packet1, packet2; + // send + int a = 10; + packet1.loadData(a, 10); + bool send_ret = packet_tool1->sendPacket(packet1); + ASSERT_TRUE(send_ret); + // recv + int b; + bool recv_ret = packet_tool2->recvPacket(packet2); + ASSERT_TRUE(recv_ret); + packet2.unloadData(b, 10); + EXPECT_EQ(a, b); +} + +TEST(FixedPacketTool, realtime_send) { + auto factory = std::make_shared(); + auto transporter1 = factory->get_transporter1(); + auto transporter2 = factory->get_transporter2(); + auto packet_tool1 = std::make_shared>(transporter1); + auto packet_tool2 = std::make_shared>(transporter2); + packet_tool1->enbaleRealtimeSend(true); + serial_driver::FixedPacket<32> packet1, packet2; + // recv + auto t = std::thread([&]() { + int b; + for (int i = 0; i < 10; i++) { + bool recv_ret = packet_tool2->recvPacket(packet2); + ASSERT_TRUE(recv_ret); + packet2.unloadData(b, 10); + EXPECT_EQ(i, b); + } + }); + // send + for (int i = 0; i < 10; i++) { + packet1.loadData(i, 10); + bool send_ret = packet_tool1->sendPacket(packet1); + ASSERT_TRUE(send_ret); + } + t.join(); +} \ No newline at end of file diff --git a/src/rm_hardware_driver/ros2_hik_camera/.clang-format b/src/rm_hardware_driver/ros2_hik_camera/.clang-format new file mode 100644 index 0000000..2f8d64b --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/.clang-format @@ -0,0 +1,18 @@ +--- +Language: Cpp +BasedOnStyle: Google + +AccessModifierOffset: -2 +AlignAfterOpenBracket: AlwaysBreak +BraceWrapping: + AfterClass: true + AfterFunction: true + AfterNamespace: true + AfterStruct: true +BreakBeforeBraces: Custom +ColumnLimit: 100 +ConstructorInitializerIndentWidth: 0 +ContinuationIndentWidth: 2 +DerivePointerAlignment: false +PointerAlignment: Middle +ReflowComments: false \ No newline at end of file diff --git a/src/rm_hardware_driver/ros2_hik_camera/.clang-tidy b/src/rm_hardware_driver/ros2_hik_camera/.clang-tidy new file mode 100644 index 0000000..bf3d848 --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/.clang-tidy @@ -0,0 +1,55 @@ +--- +Checks: '-*, + performance-*, + -performance-unnecessary-value-param, + llvm-namespace-comment, + modernize-redundant-void-arg, + modernize-use-nullptr, + modernize-use-default, + modernize-use-override, + modernize-loop-convert, + modernize-make-shared, + modernize-make-unique, + misc-unused-parameters, + readability-named-parameter, + readability-redundant-smartptr-get, + readability-redundant-string-cstr, + readability-simplify-boolean-expr, + readability-container-size-empty, + readability-identifier-naming, + ' +HeaderFilterRegex: '' +AnalyzeTemporaryDtors: false +CheckOptions: + - key: llvm-namespace-comment.ShortNamespaceLines + value: '10' + - key: llvm-namespace-comment.SpacesBeforeComments + value: '2' + - key: misc-unused-parameters.StrictMode + value: '1' + - key: readability-braces-around-statements.ShortStatementLines + value: '2' + # type names + - key: readability-identifier-naming.ClassCase + value: CamelCase + - key: readability-identifier-naming.EnumCase + value: CamelCase + - key: readability-identifier-naming.UnionCase + value: CamelCase + # method names + - key: readability-identifier-naming.MethodCase + value: camelBack + # variable names + - key: readability-identifier-naming.VariableCase + value: lower_case + - key: readability-identifier-naming.ClassMemberSuffix + value: '_' + # const static or global variables are UPPER_CASE + - key: readability-identifier-naming.EnumConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.StaticConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.ClassConstantCase + value: UPPER_CASE + - key: readability-identifier-naming.GlobalVariableCase + value: UPPER_CASE \ No newline at end of file diff --git a/src/rm_hardware_driver/ros2_hik_camera/CMakeLists.txt b/src/rm_hardware_driver/ros2_hik_camera/CMakeLists.txt new file mode 100644 index 0000000..cc6af2c --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/CMakeLists.txt @@ -0,0 +1,78 @@ +cmake_minimum_required(VERSION 3.8) +project(hik_camera) + +## Use C++14 +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +## By adding -Wall and -Werror, the compiler does not ignore warnings anymore, +## enforcing cleaner code. +add_definitions(-Wall -Werror) + +## Export compile commands for clangd +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() + +find_package(OpenCV REQUIRED) + +ament_auto_add_library(${PROJECT_NAME} SHARED + src/hik_camera_node.cpp + src/recorder.cpp + src/video_player_node.cpp +) + +target_include_directories(${PROJECT_NAME} PUBLIC hikSDK/include) +target_include_directories(${PROJECT_NAME} PUBLIC include ${OpenCV_INCLUDE_DIRS}) + +if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") + target_link_directories(${PROJECT_NAME} PUBLIC hikSDK/lib/amd64) + install( + DIRECTORY hikSDK/lib/amd64/ + DESTINATION lib + ) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + target_link_directories(${PROJECT_NAME} PUBLIC hikSDK/lib/arm64) + install( + DIRECTORY hikSDK/lib/arm64/ + DESTINATION lib + ) +else() + message(FATAL_ERROR "Unsupport host system architecture: ${CMAKE_HOST_SYSTEM_PROCESSOR}!") +endif() + +target_link_libraries(${PROJECT_NAME} + FormatConversion + MediaProcess + MvCameraControl + MVRender + MvUsb3vTL + ${OpenCV_LIBS} +) + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN fyt::camera_driver::HikCameraNode + EXECUTABLE ${PROJECT_NAME}_node +) + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN fyt::camera_driver::VideoPlayerNode + EXECUTABLE video_player_node +) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + list(APPEND AMENT_LINT_AUTO_EXCLUDE + ament_cmake_copyright + ament_cmake_cpplint + ament_cmake_uncrustify + ) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package( + INSTALL_TO_SHARE + config + launch +) diff --git a/src/rm_hardware_driver/ros2_hik_camera/README.md b/src/rm_hardware_driver/ros2_hik_camera/README.md new file mode 100644 index 0000000..036f47f --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/README.md @@ -0,0 +1,100 @@ +# ros2_hik_camera + +A ROS2 packge for Hikvision USB3.0 industrial camera + +## Usage + +``` +ros2 launch hik_camera hik_camera.launch.py +``` + +离线视频回放(VideoPlayerNode,用于没有相机时跑全链路/复现): + +```bash +ros2 run hik_camera video_player_node --ros-args --params-file +``` + +也可以在整套工程里通过 rm_bringup 启动(推荐),此时相机参数通常来自: + +- rm_bringup/config/node_params/camera_driver_params.yaml + +注意:rm_bringup 里加载的是自己的参数文件,hik_camera 包内的 config 主要用于“单独启动 hik_camera.launch.py”时测试。 + +## Params + +以下参数均为 `camera_driver` 节点的 ROS 参数(YAML 中写在 `/**/ros__parameters` 下面即可): + +- `camera_info_url`:标定文件 URL(如 `package://rm_bringup/config/camera_info.yaml`) +- `camera_name`:相机名字标签(主要给 CameraInfo/工具识别用,不影响取图) +- `camera_frame_id`:发布图像的 frame_id,默认 `camera_optical_frame` +- `use_sensor_data_qos`:是否使用 sensor_data QoS + +成像控制: + +- `exposure_time`:曝光时间(单位:us),支持运行时 `ros2 param set` +- `gain`:增益,支持运行时 `ros2 param set` +- `auto_white_balance`:自动白平衡(0=Off,非0=Continuous) +- `frame_rate`:期望帧率(会尝试下发到相机的 `AcquisitionFrameRate*` 节点;不同型号可能不支持) + +ROI / 裁剪(已接入海康 SDK 的 Width/Height/OffsetX/OffsetY,且会按相机的 min/max/inc 自动对齐): + +- `resolution_width` +- `resolution_height` +- `offsetX` +- `offsetY` + +像素格式(发布端输出格式,驱动会用 SDK 转码后发布): + +- `pixel_format`:`rgb8`(默认)/ `bgr8` / `mono8` + +录像: + +- `recording`:是否录制,`true` 时保存到 `~/fyt2024-log/video/.avi` + +VideoPlayerNode 参数(与 rm_bringup/config/node_params/video_player_params.yaml 对齐): + +- `path`:视频文件路径 +- `frame_rate`:发布帧率 +- `start_frame`:从第几帧开始发布(前面只读不发) +- `keep_looping`:播到结尾是否循环 +- `frame_id`:发布 frame_id + +示例: +/**: + ros__parameters: + camera_info_url: package://rm_bringup/config/camera_info.yaml + camera_name: narrow_stereo + camera_frame_id: camera_optical_frame + pixel_format: rgb8 + + exposure_time: 2500 + gain: 15.0 + auto_white_balance: 1 + frame_rate: 210 + + resolution_width: 1280 + resolution_height: 1024 + offsetX: 0 + offsetY: 0 + + recording: false + +``` + +## Topics + +- `image_raw`:图像(Image) +- `image_raw/camera_info`:相机标定信息(CameraInfo) +- `camera_driver/heartbeat`:心跳(Int64,自增,1Hz) + +## Health / Reconnect + +- 驱动包含看门狗:超过 5 秒没有收到新帧会触发 `close()` 并自动重连 `open()`。 + +## Daheng 风格参数说明(为什么有些需要重启) + +在本工程里,类似 `resolution_width/height`、`offsetX/Y`、`auto_white_balance`、`frame_rate` 这类参数属于“相机配置”,通常是在相机 `open()` 时一次性下发到硬件。 + +- 对 Daheng 原实现:运行时只支持动态改 `exposure_time/gain`;其它参数改 YAML 后需要重启节点生效。 +- 对当前 Hik 实现:这些参数已支持运行时动态改(`ros2 param set` 会立即尝试下发到相机),但具体是否成功取决于相机型号是否暴露对应 GenICam 节点(失败会 WARN)。 + diff --git a/src/rm_hardware_driver/ros2_hik_camera/config/camera_info.yaml b/src/rm_hardware_driver/ros2_hik_camera/config/camera_info.yaml new file mode 100644 index 0000000..5fb458a --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/config/camera_info.yaml @@ -0,0 +1,26 @@ +image_width: 1280 +image_height: 1024 +camera_name: narrow_stereo +camera_matrix: + rows: 3 + cols: 3 + data: [1385.639315, 0. , 597.199071, + 0. , 1387.157400 , 452.204594, + 0. , 0. , 1. ] +distortion_model: plumb_bob +distortion_coefficients: + rows: 1 + cols: 5 + data: [-0.057934, 0.141815, -0.003889, -0.006984, 0.000000] +rectification_matrix: + rows: 3 + cols: 3 + data: [1., 0., 0., + 0., 1., 0., + 0., 0., 1.] +projection_matrix: + rows: 3 + cols: 4 + data: [1380.831055, 0. , 590.255495, 0. , + 0. , 1387.520996, 449.174676, 0. , + 0. , 0. , 1. , 0. ] diff --git a/src/rm_hardware_driver/ros2_hik_camera/config/camera_params.yaml b/src/rm_hardware_driver/ros2_hik_camera/config/camera_params.yaml new file mode 100644 index 0000000..7459e37 --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/config/camera_params.yaml @@ -0,0 +1,7 @@ +/camera_driver: + ros__parameters: + camera_name: narrow_stereo + camera_info_url: package://hik_camera/config/camera_info.yaml + exposure_time: 3000 + gain: 16.0 + use_sensor_data_qos: true diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/CameraParams.h b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/CameraParams.h new file mode 100644 index 0000000..8869f6e --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/CameraParams.h @@ -0,0 +1,1081 @@ + +#ifndef _MV_CAMERA_PARAMS_H_ +#define _MV_CAMERA_PARAMS_H_ + +#include "PixelType.h" + +#ifndef __cplusplus +typedef char bool; +#define true 1 +#define false 0 +#endif + +/// \~chinese +/// 设备类型定义 +/// \~english +/// Device Type Definition +#define MV_UNKNOW_DEVICE 0x00000000 ///< \~chinese 未知设备类型,保留意义 \~english Unknown Device Type, Reserved +#define MV_GIGE_DEVICE 0x00000001 ///< \~chinese GigE设备 \~english GigE Device +#define MV_1394_DEVICE 0x00000002 ///< \~chinese 1394-a/b 设备 \~english 1394-a/b Device +#define MV_USB_DEVICE 0x00000004 ///< \~chinese USB 设备 \~english USB Device +#define MV_CAMERALINK_DEVICE 0x00000008 ///< \~chinese CamLink设备 \~english CamLink Device + +/// \~chinese GigE设备信息 \~english GigE device info +typedef struct _MV_GIGE_DEVICE_INFO_ +{ + unsigned int nIpCfgOption; + unsigned int nIpCfgCurrent; ///< \~chinese \~english IP configuration:bit31-static bit30-dhcp bit29-lla + unsigned int nCurrentIp; + unsigned int nCurrentSubNetMask; ///< \~chinese \~english curtent subnet mask + unsigned int nDefultGateWay; ///< \~chinese \~english current gateway + unsigned char chManufacturerName[32]; + unsigned char chModelName[32]; + unsigned char chDeviceVersion[32]; + unsigned char chManufacturerSpecificInfo[48]; + unsigned char chSerialNumber[16]; + unsigned char chUserDefinedName[16]; + unsigned int nNetExport; ///< \~chinese 网口IP地址 \~english NetWork IP Address + + unsigned int nReserved[4]; +}MV_GIGE_DEVICE_INFO; + +#define INFO_MAX_BUFFER_SIZE 64 + +/// \~chinese USB设备信息 \~english USB device info +typedef struct _MV_USB3_DEVICE_INFO_ +{ + unsigned char CrtlInEndPoint; ///< \~chinese 控制输入端点 \~english Control input endpoint + unsigned char CrtlOutEndPoint; ///< \~chinese 控制输出端点 \~english Control output endpoint + unsigned char StreamEndPoint; ///< \~chinese 流端点 \~english Flow endpoint + unsigned char EventEndPoint; ///< \~chinese 事件端点 \~english Event endpoint + unsigned short idVendor; ///< \~chinese 供应商ID号 \~english Vendor ID Number + unsigned short idProduct; ///< \~chinese 产品ID号 \~english Device ID Number + unsigned int nDeviceNumber; ///< \~chinese 设备序列号 \~english Device Serial Number + unsigned char chDeviceGUID[INFO_MAX_BUFFER_SIZE]; ///< \~chinese 设备GUID号 \~english Device GUID Number + unsigned char chVendorName[INFO_MAX_BUFFER_SIZE]; ///< \~chinese 供应商名字 \~english Vendor Name + unsigned char chModelName[INFO_MAX_BUFFER_SIZE]; ///< \~chinese 型号名字 \~english Model Name + unsigned char chFamilyName[INFO_MAX_BUFFER_SIZE]; ///< \~chinese 家族名字 \~english Family Name + unsigned char chDeviceVersion[INFO_MAX_BUFFER_SIZE]; ///< \~chinese 设备版本号 \~english Device Version + unsigned char chManufacturerName[INFO_MAX_BUFFER_SIZE]; ///< \~chinese 制造商名字 \~english Manufacturer Name + unsigned char chSerialNumber[INFO_MAX_BUFFER_SIZE]; ///< \~chinese 序列号 \~english Serial Number + unsigned char chUserDefinedName[INFO_MAX_BUFFER_SIZE]; ///< \~chinese 用户自定义名字 \~english User Defined Name + unsigned int nbcdUSB; ///< \~chinese 支持的USB协议 \~english Support USB Protocol + + unsigned int nReserved[3]; ///< \~chinese 保留字节 \~english Reserved bytes +}MV_USB3_DEVICE_INFO; + +/// \~chinese +/// \brief CamLink设备信息 +/// \~english +/// \brief CamLink device info +typedef struct _MV_CamL_DEV_INFO_ +{ + unsigned char chPortID[INFO_MAX_BUFFER_SIZE]; + unsigned char chModelName[INFO_MAX_BUFFER_SIZE]; + unsigned char chFamilyName[INFO_MAX_BUFFER_SIZE]; + unsigned char chDeviceVersion[INFO_MAX_BUFFER_SIZE]; + unsigned char chManufacturerName[INFO_MAX_BUFFER_SIZE]; + unsigned char chSerialNumber[INFO_MAX_BUFFER_SIZE]; + + unsigned int nReserved[38]; +}MV_CamL_DEV_INFO; + +/// \~chinese +/// \brief 设备信息 +/// \~english +/// \brief Device info +typedef struct _MV_CC_DEVICE_INFO_ +{ + unsigned short nMajorVer; + unsigned short nMinorVer; + unsigned int nMacAddrHigh; ///< \~chinese MAC 地址\~english MAC Address + unsigned int nMacAddrLow; + + unsigned int nTLayerType; ///< \~chinese 设备传输层协议类型,e.g. MV_GIGE_DEVICE\~english Device Transport Layer Protocol Type, e.g. MV_GIGE_DEVICE + + unsigned int nReserved[4]; + + union + { + MV_GIGE_DEVICE_INFO stGigEInfo; + MV_USB3_DEVICE_INFO stUsb3VInfo; + MV_CamL_DEV_INFO stCamLInfo; + // more ... + }SpecialInfo; + +}MV_CC_DEVICE_INFO; + +/// \~chinese 网络传输的相关信息\~english Network transmission information +typedef struct _MV_NETTRANS_INFO_ +{ + int64_t nReviceDataSize; ///< \~chinese 已接收数据大小 [统计StartGrabbing和StopGrabbing之间的数据量]\~english Received Data Size [Calculate the Data Size between StartGrabbing and StopGrabbing] + int nThrowFrameCount; ///< \~chinese 丢帧数量\~english Throw frame number + unsigned int nNetRecvFrameCount; + int64_t nRequestResendPacketCount; ///< \~chinese 请求重发包数 + int64_t nResendPacketCount; ///< \~chinese 重发包数 + +}MV_NETTRANS_INFO; + +#define MV_MAX_TLS_NUM 8 ///< \~chinese 最多支持的传输层实例个数\~english The maximum number of supported transport layer instances +#define MV_MAX_DEVICE_NUM 256 ///< \~chinese 最大支持的设备个数\~english The maximum number of supported devices + +/// \~chinese +/// \brief 设备信息列表 +/// \~english +/// \brief Device Information List +typedef struct _MV_CC_DEVICE_INFO_LIST_ +{ + unsigned int nDeviceNum; ///< \~chinese 在线设备数量\~english Online Device Number + MV_CC_DEVICE_INFO* pDeviceInfo[MV_MAX_DEVICE_NUM]; ///< \~chinese 支持最多256个设备\~english Support up to 256 devices + +}MV_CC_DEVICE_INFO_LIST; + + +/// \~chinese Chunk内容 \~english The content of ChunkData +typedef struct _MV_CHUNK_DATA_CONTENT_ +{ + unsigned char* pChunkData; + unsigned int nChunkID; + unsigned int nChunkLen; + + unsigned int nReserved[8]; // 保留 + +}MV_CHUNK_DATA_CONTENT; + +/// \~chinese 输出帧的信息\~english Output Frame Information +typedef struct _MV_FRAME_OUT_INFO_ +{ + unsigned short nWidth; ///< \~chinese 图像宽 \~english Image Width + unsigned short nHeight; ///< \~chinese 图像高 \~english Image Height + enum MvGvspPixelType enPixelType; ///< \~chinese 像素格式 \~english Pixel Type + + unsigned int nFrameNum; ///< \~chinese 帧号 \~english Frame Number + unsigned int nDevTimeStampHigh; ///< \~chinese 时间戳高32位\~english Timestamp high 32 bits + unsigned int nDevTimeStampLow; ///< \~chinese 时间戳低32位\~english Timestamp low 32 bits + unsigned int nReserved0; ///< \~chinese 保留,8字节对齐\~english Reserved, 8-byte aligned + int64_t nHostTimeStamp; ///< \~chinese 主机生成的时间戳\~english Host-generated timestamp + + unsigned int nFrameLen; + + unsigned int nLostPacket; ///< \~chinese 本帧丢包数\~english Lost Pacekt Number In This Frame + unsigned int nReserved[2]; +}MV_FRAME_OUT_INFO; + +/// \~chinese 输出帧的信息\~english Output Frame Information +typedef struct _MV_FRAME_OUT_INFO_EX_ +{ + unsigned short nWidth; ///< \~chinese 图像宽 \~english Image Width + unsigned short nHeight; ///< \~chinese 图像高 \~english Image Height + enum MvGvspPixelType enPixelType; ///< \~chinese 像素格式 \~english Pixel Type + + unsigned int nFrameNum; ///< \~chinese 帧号 \~english Frame Number + unsigned int nDevTimeStampHigh; ///< \~chinese 时间戳高32位\~english Timestamp high 32 bits + unsigned int nDevTimeStampLow; ///< \~chinese 时间戳低32位\~english Timestamp low 32 bits + unsigned int nReserved0; ///< \~chinese 保留,8字节对齐\~english Reserved, 8-byte aligned + int64_t nHostTimeStamp; ///< \~chinese 主机生成的时间戳\~english Host-generated timestamp + + unsigned int nFrameLen; + + /// \~chinese 设备水印时标\~english Device frame-specific time scale + unsigned int nSecondCount; + unsigned int nCycleCount; + unsigned int nCycleOffset; + + float fGain; + float fExposureTime; + unsigned int nAverageBrightness; ///< \~chinese 平均亮度\~english Average brightness + + /// \~chinese 白平衡相关\~english White balance + unsigned int nRed; + unsigned int nGreen; + unsigned int nBlue; + + unsigned int nFrameCounter; + unsigned int nTriggerIndex; ///< \~chinese 触发计数\~english Trigger Counting + + unsigned int nInput; ///< \~chinese 输入\~english Input + unsigned int nOutput; ///< \~chinese 输出\~english Output + + /// \~chinese ROI区域\~english ROI Region + unsigned short nOffsetX; + unsigned short nOffsetY; + unsigned short nChunkWidth; + unsigned short nChunkHeight; + + unsigned int nLostPacket; ///< \~chinese 本帧丢包数\~english Lost Pacekt Number In This Frame + + unsigned int nUnparsedChunkNum;///< \~chinese 未解析的Chunkdata个数 + union + { + MV_CHUNK_DATA_CONTENT* pUnparsedChunkContent; + int64_t nAligning; + }UnparsedChunkList; + + unsigned int nReserved[36]; // 保留 +}MV_FRAME_OUT_INFO_EX; + +/// \~chinese 图像结构体,输出图像指针地址及图像信息\~english Image Struct, output the pointer of Image and the information of the specific image +typedef struct _MV_FRAME_OUT_ +{ + unsigned char* pBufAddr; ///< \~chinese 图像指针地址\~english pointer of image + MV_FRAME_OUT_INFO_EX stFrameInfo; ///< \~chinese 图像信息\~english information of the specific image + + unsigned int nRes[16]; ///< \~chinese 保留\~english reserved +}MV_FRAME_OUT; + + +typedef struct _MV_DISPLAY_FRAME_INFO_ +{ + void* hWnd; ///< \~chinese 窗口句柄\~english HWND + unsigned char* pData; ///< \~chinese 显示的数据\~english Data Buffer + unsigned int nDataLen; ///< \~chinese 数据长度\~english Data Size + unsigned short nWidth; ///< \~chinese 图像宽\~english Width + unsigned short nHeight; ///< \~chinese 图像高\~english Height + enum MvGvspPixelType enPixelType; ///< \~chinese 像素格式\~english Pixel format + unsigned int nRes[4]; + +}MV_DISPLAY_FRAME_INFO; + +/// \~chinese 保存图片格式\~english Save image type +enum MV_SAVE_IAMGE_TYPE +{ + MV_Image_Undefined = 0, + MV_Image_Bmp = 1, + MV_Image_Jpeg = 2, + MV_Image_Png = 3, + MV_Image_Tif = 4, +}; + +/// \~chinese 图片保存参数\~english Save Image Parameters +typedef struct _MV_SAVE_IMAGE_PARAM_T_ +{ + unsigned char* pData; ///< [IN] \~chinese 输入数据缓存\~english Input Data Buffer + unsigned int nDataLen; ///< [IN] \~chinese 输入数据大小\~english Input Data Size + enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 输入数据的像素格式\~english Input Data Pixel Format + unsigned short nWidth; ///< [IN] \~chinese 图像宽\~english Image Width + unsigned short nHeight; ///< [IN] \~chinese 图像高\~english Image Height + + unsigned char* pImageBuffer; ///< [OUT] \~chinese 输出图片缓存\~english Output Image Buffer + unsigned int nImageLen; ///< [OUT] \~chinese 输出图片大小\~english Output Image Size + unsigned int nBufferSize; ///< [IN] \~chinese 提供的输出缓冲区大小\~english Output buffer size provided + enum MV_SAVE_IAMGE_TYPE enImageType; ///< [IN] \~chinese 输出图片格式\~english Output Image Format + +}MV_SAVE_IMAGE_PARAM; + +/// \~chinese 图片保存参数\~english Save Image Parameters +typedef struct _MV_SAVE_IMAGE_PARAM_T_EX_ +{ + unsigned char* pData; ///< [IN] \~chinese 输入数据缓存\~english Input Data Buffer + unsigned int nDataLen; ///< [IN] \~chinese 输入数据大小\~english Input Data Size + enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 输入数据的像素格式\~english Input Data Pixel Format + unsigned short nWidth; ///< [IN] \~chinese 图像宽\~english Image Width + unsigned short nHeight; ///< [IN] \~chinese 图像高\~english Image Height + + unsigned char* pImageBuffer; ///< [OUT] \~chinese 输出图片缓存\~english Output Image Buffer + unsigned int nImageLen; ///< [OUT] \~chinese 输出图片大小\~english Output Image Size + unsigned int nBufferSize; ///< [IN] \~chinese 提供的输出缓冲区大小\~english Output buffer size provided + enum MV_SAVE_IAMGE_TYPE enImageType; ///< [IN] \~chinese 输出图片格式\~english Output Image Format + unsigned int nJpgQuality; ///< [IN] \~chinese JPG编码质量(50-99],其它格式无效\~english Encoding quality(50-99],Other formats are invalid + + ///< [IN] \~chinese Bayer格式转为RGB24的插值方法 0-最近邻 1-双线性 2-Hamilton (如果传入其它值则默认为最近邻) + ///< [IN] \~english Interpolation method of convert Bayer to RGB24 0-nearest neighbour 1-bilinearity 2-Hamilton + unsigned int iMethodValue; + unsigned int nReserved[3]; + +}MV_SAVE_IMAGE_PARAM_EX; + +/// \~chinese 旋转角度 \~english Rotation angle +typedef enum _MV_IMG_ROTATION_ANGLE_ +{ + MV_IMAGE_ROTATE_90 = 1, + MV_IMAGE_ROTATE_180 = 2, + MV_IMAGE_ROTATE_270 = 3, + +}MV_IMG_ROTATION_ANGLE; + +/// \~chinese 图像旋转结构体 \~english Rotate image structure +typedef struct _MV_CC_ROTATE_IMAGE_PARAM_T_ +{ + enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format + unsigned int nWidth; ///< [IN][OUT] \~chinese 图像宽 \~english Width + unsigned int nHeight; ///< [IN][OUT] \~chinese 图像高 \~english Height + + unsigned char* pSrcData; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer + unsigned int nSrcDataLen; ///< [IN] \~chinese 输入数据长度 \~english Input data length + + unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存 \~english Output data buffer + unsigned int nDstBufLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length + unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size + + MV_IMG_ROTATION_ANGLE enRotationAngle; ///< [IN] \~chinese 旋转角度 \~english Rotation angle + + unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved + +}MV_CC_ROTATE_IMAGE_PARAM; + +/// \~chinese 翻转类型 \~english Flip type +typedef enum _MV_IMG_FLIP_TYPE_ +{ + MV_FLIP_VERTICAL = 1, + MV_FLIP_HORIZONTAL = 2, + +}MV_IMG_FLIP_TYPE; + +/// \~chinese 图像翻转结构体 \~english Flip image structure +typedef struct _MV_CC_FLIP_IMAGE_PARAM_T_ +{ + enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format + unsigned int nWidth; ///< [IN] \~chinese 图像宽 \~english Width + unsigned int nHeight; ///< [IN] \~chinese 图像高 \~english Height + + unsigned char* pSrcData; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer + unsigned int nSrcDataLen; ///< [IN] \~chinese 输入数据长度 \~english Input data length + + unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存 \~english Output data buffer + unsigned int nDstBufLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length + unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size + + MV_IMG_FLIP_TYPE enFlipType; ///< [IN] \~chinese 翻转类型 \~english Flip type + + unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved + +}MV_CC_FLIP_IMAGE_PARAM; + + +/// \~chinese 图像转换结构体 \~english Pixel convert structure +typedef struct _MV_PIXEL_CONVERT_PARAM_T_ +{ + unsigned short nWidth; ///< [IN] \~chinese 图像宽 \~english Width + unsigned short nHeight; ///< [IN] \~chinese 图像高\~english Height + + enum MvGvspPixelType enSrcPixelType; ///< [IN] \~chinese 源像素格式\~english Source pixel format + unsigned char* pSrcData; ///< [IN] \~chinese 输入数据缓存\~english Input data buffer + unsigned int nSrcDataLen; ///< [IN] \~chinese 输入数据大小\~english Input data size + + enum MvGvspPixelType enDstPixelType; ///< [IN] \~chinese 目标像素格式\~english Destination pixel format + unsigned char* pDstBuffer; ///< [OUT] \~chinese 输出数据缓存\~english Output data buffer + unsigned int nDstLen; ///< [OUT] \~chinese 输出数据大小\~english Output data size + unsigned int nDstBufferSize; ///< [IN] \~chinese 提供的输出缓冲区大小\~english Provided outbut buffer size + + unsigned int nRes[4]; +}MV_CC_PIXEL_CONVERT_PARAM; + +/// \~chinese Gamma类型 \~english Gamma type +typedef enum _MV_CC_GAMMA_TYPE_ +{ + MV_CC_GAMMA_TYPE_NONE = 0, ///< \~chinese 不启用 \~english Disable + MV_CC_GAMMA_TYPE_VALUE = 1, ///< \~chinese Gamma值 \~english Gamma value + MV_CC_GAMMA_TYPE_USER_CURVE = 2, ///< \~chinese Gamma曲线 \~english Gamma curve + ///< \~chinese 长度:256*sizeof(unsigned char) \~english 8bit,length:256*sizeof(unsigned char) + MV_CC_GAMMA_TYPE_LRGB2SRGB = 3, ///< \~chinese linear RGB to sRGB \~english linear RGB to sRGB + MV_CC_GAMMA_TYPE_SRGB2LRGB = 4, ///< \~chinese sRGB to linear RGB(仅色彩插值时支持,色彩校正时无效) \~english sRGB to linear RGB + +}MV_CC_GAMMA_TYPE; + +// Gamma信息 +/// \~chinese Gamma信息结构体 \~english Gamma info structure +typedef struct _MV_CC_GAMMA_PARAM_T_ +{ + MV_CC_GAMMA_TYPE enGammaType; ///< [IN] \~chinese Gamma类型 \~english Gamma type + float fGammaValue; ///< [IN] \~chinese Gamma值[0.1,4.0] \~english Gamma value[0.1,4.0] + unsigned char* pGammaCurveBuf; ///< [IN] \~chinese Gamma曲线缓存 \~english Gamma curve buffer + unsigned int nGammaCurveBufLen; ///< [IN] \~chinese Gamma曲线长度 \~english Gamma curve buffer size + + unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved + +}MV_CC_GAMMA_PARAM; + +/// \~chinese 水印信息 \~english Frame-specific information +typedef struct _MV_CC_FRAME_SPEC_INFO_ +{ + /// \~chinese 设备水印时标 \~english Device frame-specific time scale + unsigned int nSecondCount; ///< [OUT] \~chinese 秒数 \~english The Seconds + unsigned int nCycleCount; ///< [OUT] \~chinese 周期数 \~english The Count of Cycle + unsigned int nCycleOffset; ///< [OUT] \~chinese 周期偏移量 \~english The Offset of Cycle + + float fGain; ///< [OUT] \~chinese 增益 \~english Gain + float fExposureTime; ///< [OUT] \~chinese 曝光时间 \~english Exposure Time + unsigned int nAverageBrightness; ///< [OUT] \~chinese 平均亮度 \~english Average brightness + + /// \~chinese 白平衡相关 \~english White balance + unsigned int nRed; ///< [OUT] \~chinese 红色 \~english Red + unsigned int nGreen; ///< [OUT] \~chinese 绿色 \~english Green + unsigned int nBlue; ///< [OUT] \~chinese 蓝色 \~english Blue + + unsigned int nFrameCounter; ///< [OUT] \~chinese 总帧数 \~english Frame Counter + unsigned int nTriggerIndex; ///< [OUT] \~chinese 触发计数 \~english Trigger Counting + + unsigned int nInput; ///< [OUT] \~chinese 输入 \~english Input + unsigned int nOutput; ///< [OUT] \~chinese 输出 \~english Output + + /// \~chinese ROI区域 \~english ROI Region + unsigned short nOffsetX; ///< [OUT] \~chinese 水平偏移量 \~english OffsetX + unsigned short nOffsetY; ///< [OUT] \~chinese 垂直偏移量 \~english OffsetY + unsigned short nFrameWidth; ///< [OUT] \~chinese 水印宽 \~english The Width of Chunk + unsigned short nFrameHeight; ///< [OUT] \~chinese 水印高 \~english The Height of Chunk + + unsigned int nReserved[16]; ///< \~chinese 预留 \~english Reserved + +}MV_CC_FRAME_SPEC_INFO; + +/// \~chinese 无损解码参数 \~english High Bandwidth decode structure +typedef struct _MV_CC_HB_DECODE_PARAM_T_ +{ + unsigned char* pSrcBuf; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer + unsigned int nSrcLen; ///< [IN] \~chinese 输入数据大小 \~english Input data size + + unsigned int nWidth; ///< [OUT] \~chinese 图像宽 \~english Width + unsigned int nHeight; ///< [OUT] \~chinese 图像高 \~english Height + unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存 \~english Output data buffer + unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size + unsigned int nDstBufLen; ///< [OUT] \~chinese 输出数据大小 \~english Output data size + enum MvGvspPixelType enDstPixelType; ///< [OUT] \~chinese 输出的像素格式 \~english Output pixel format + + MV_CC_FRAME_SPEC_INFO stFrameSpecInfo; ///< [OUT] \~chinese 水印信息 \~english Frame Spec Info + + unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved + +}MV_CC_HB_DECODE_PARAM; + +/// \~chinese 录像格式定义\~english Record Format Type +typedef enum _MV_RECORD_FORMAT_TYPE_ +{ + MV_FormatType_Undefined = 0, + MV_FormatType_AVI = 1, + +}MV_RECORD_FORMAT_TYPE; + +/// \~chinese 录像参数\~english Record Parameters +typedef struct _MV_CC_RECORD_PARAM_T_ +{ + enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 输入数据的像素格式 + + unsigned short nWidth; ///< [IN] \~chinese 图像宽(指定目标参数时需为2的倍数) + unsigned short nHeight; ///< [IN] \~chinese 图像高(指定目标参数时需为2的倍数) + + float fFrameRate; ///< [IN] \~chinese 帧率fps(1/16-120) + unsigned int nBitRate; ///< [IN] \~chinese 码率kbps(128kbps-16Mbps) + + MV_RECORD_FORMAT_TYPE enRecordFmtType; ///< [IN] \~chinese 录像格式 + + char* strFilePath; ///< [IN] \~chinese 录像文件存放路径(如果路径中存在中文,需转成utf-8) + + unsigned int nRes[8]; + +}MV_CC_RECORD_PARAM; + +/// \~chinese 录像数据\~english Record Data +typedef struct _MV_CC_INPUT_FRAME_INFO_T_ +{ + unsigned char* pData; ///< [IN] \~chinese 图像数据指针 + unsigned int nDataLen; ///< [IN] \~chinese 图像大小 + + unsigned int nRes[8]; + +}MV_CC_INPUT_FRAME_INFO; + +/// \~chinese 采集模式\~english Acquisition mode +typedef enum _MV_CAM_ACQUISITION_MODE_ +{ + MV_ACQ_MODE_SINGLE = 0, ///< \~chinese 单帧模式\~english Single Mode + MV_ACQ_MODE_MUTLI = 1, ///< \~chinese 多帧模式\~english Multi Mode + MV_ACQ_MODE_CONTINUOUS = 2, ///< \~chinese 持续采集模式\~english Continuous Mode + +}MV_CAM_ACQUISITION_MODE; + +/// \~chinese 增益模式\~english Gain Mode +typedef enum _MV_CAM_GAIN_MODE_ +{ + MV_GAIN_MODE_OFF = 0, ///< \~chinese 关闭\~english Single Mode + MV_GAIN_MODE_ONCE = 1, ///< \~chinese 一次\~english Multi Mode + MV_GAIN_MODE_CONTINUOUS = 2, ///< \~chinese 连续\~english Continuous Mode + +}MV_CAM_GAIN_MODE; + +/// \~chinese 曝光模式\~english Exposure Mode +typedef enum _MV_CAM_EXPOSURE_MODE_ +{ + MV_EXPOSURE_MODE_TIMED = 0, ///< Timed + MV_EXPOSURE_MODE_TRIGGER_WIDTH = 1, ///< TriggerWidth +}MV_CAM_EXPOSURE_MODE; + +/// \~chinese 自动曝光模式 \~english Auto Exposure Mode +typedef enum _MV_CAM_EXPOSURE_AUTO_MODE_ +{ + MV_EXPOSURE_AUTO_MODE_OFF = 0, ///< \~chinese 关闭\~english Off + MV_EXPOSURE_AUTO_MODE_ONCE = 1, ///< \~chinese 一次\~english Once + MV_EXPOSURE_AUTO_MODE_CONTINUOUS = 2, ///< \~chinese 连续\~english Continuous + +}MV_CAM_EXPOSURE_AUTO_MODE; + +/// \~chinese 触发模式 \~english Trigger Mode +typedef enum _MV_CAM_TRIGGER_MODE_ +{ + MV_TRIGGER_MODE_OFF = 0, ///< \~chinese 关闭\~english Off + MV_TRIGGER_MODE_ON = 1, ///< \~chinese 打开\~english ON + +}MV_CAM_TRIGGER_MODE; + +typedef enum _MV_CAM_GAMMA_SELECTOR_ +{ + MV_GAMMA_SELECTOR_USER = 1, + MV_GAMMA_SELECTOR_SRGB = 2, + +}MV_CAM_GAMMA_SELECTOR; + +typedef enum _MV_CAM_BALANCEWHITE_AUTO_ +{ + MV_BALANCEWHITE_AUTO_OFF = 0, + MV_BALANCEWHITE_AUTO_ONCE = 2, + MV_BALANCEWHITE_AUTO_CONTINUOUS = 1, ///< \~chinese 连续\~english Continuous + +}MV_CAM_BALANCEWHITE_AUTO; + +typedef enum _MV_CAM_TRIGGER_SOURCE_ +{ + MV_TRIGGER_SOURCE_LINE0 = 0, + MV_TRIGGER_SOURCE_LINE1 = 1, + MV_TRIGGER_SOURCE_LINE2 = 2, + MV_TRIGGER_SOURCE_LINE3 = 3, + MV_TRIGGER_SOURCE_COUNTER0 = 4, + + MV_TRIGGER_SOURCE_SOFTWARE = 7, + MV_TRIGGER_SOURCE_FrequencyConverter= 8, + +}MV_CAM_TRIGGER_SOURCE; + +typedef enum _MV_GIGE_TRANSMISSION_TYPE_ +{ + MV_GIGE_TRANSTYPE_UNICAST = 0x0, ///< \~chinese 表示单播(默认)\~english Unicast mode + MV_GIGE_TRANSTYPE_MULTICAST = 0x1, ///< \~chinese 表示组播\~english Multicast mode + MV_GIGE_TRANSTYPE_LIMITEDBROADCAST = 0x2, ///< \~chinese 表示局域网内广播,暂不支持\~english Limited broadcast mode,not support + MV_GIGE_TRANSTYPE_SUBNETBROADCAST = 0x3, ///< \~chinese 表示子网内广播,暂不支持\~english Subnet broadcast mode,not support + MV_GIGE_TRANSTYPE_CAMERADEFINED = 0x4, ///< \~chinese 表示从相机获取,暂不支持\~english Transtype from camera,not support + MV_GIGE_TRANSTYPE_UNICAST_DEFINED_PORT = 0x5, ///< \~chinese 表示用户自定义应用端接收图像数据Port号\~english User Defined Receive Data Port + MV_GIGE_TRANSTYPE_UNICAST_WITHOUT_RECV = 0x00010000, ///< \~chinese 表示设置了单播,但本实例不接收图像数据\~english Unicast without receive data + MV_GIGE_TRANSTYPE_MULTICAST_WITHOUT_RECV = 0x00010001, ///< \~chinese 表示组播模式,但本实例不接收图像数据\~english Multicast without receive data +}MV_GIGE_TRANSMISSION_TYPE; +// GigEVision IP Configuration +#define MV_IP_CFG_STATIC 0x05000000 +#define MV_IP_CFG_DHCP 0x06000000 +#define MV_IP_CFG_LLA 0x04000000 + +// GigEVision Net Transfer Mode +#define MV_NET_TRANS_DRIVER 0x00000001 +#define MV_NET_TRANS_SOCKET 0x00000002 + +// CameraLink Baud Rates (CLUINT32) +#define MV_CAML_BAUDRATE_9600 0x00000001 +#define MV_CAML_BAUDRATE_19200 0x00000002 +#define MV_CAML_BAUDRATE_38400 0x00000004 +#define MV_CAML_BAUDRATE_57600 0x00000008 +#define MV_CAML_BAUDRATE_115200 0x00000010 +#define MV_CAML_BAUDRATE_230400 0x00000020 +#define MV_CAML_BAUDRATE_460800 0x00000040 +#define MV_CAML_BAUDRATE_921600 0x00000080 +#define MV_CAML_BAUDRATE_AUTOMAX 0x40000000 + +/// \~chinese 信息类型\~english Information Type +#define MV_MATCH_TYPE_NET_DETECT 0x00000001 ///< \~chinese 网络流量和丢包信息\~english Network traffic and packet loss information +#define MV_MATCH_TYPE_USB_DETECT 0x00000002 ///< \~chinese host接收到来自U3V设备的字节总数\~english The total number of bytes host received from U3V device + +/// \~chinese 某个节点对应的子节点个数最大值\~english The maximum number of child nodes corresponding to a node +#define MV_MAX_XML_NODE_NUM_C 128 + +/// \~chinese 节点名称字符串最大长度\~english The maximum length of node name string +#define MV_MAX_XML_NODE_STRLEN_C 64 + +/// \~chinese 节点String值最大长度\~english The maximum length of Node String +#define MV_MAX_XML_STRVALUE_STRLEN_C 64 + +/// \~chinese 节点描述字段最大长度\~english The maximum length of the node description field +#define MV_MAX_XML_DISC_STRLEN_C 512 + +/// \~chinese 最多的单元数\~englishThe maximum number of units +#define MV_MAX_XML_ENTRY_NUM 10 + +/// \~chinese 父节点个数上限\~english The maximum number of parent nodes +#define MV_MAX_XML_PARENTS_NUM 8 + +/// \~chinese 每个已经实现单元的名称长度\~english The length of the name of each unit that has been implemented +#define MV_MAX_XML_SYMBOLIC_STRLEN_C 64 + +#define MV_MAX_XML_SYMBOLIC_NUM 64 + + +/// \~chinese 全匹配的一种信息结构体\~english A fully matched information structure +typedef struct _MV_ALL_MATCH_INFO_ +{ + unsigned int nType; ///< \~chinese 需要输出的信息类型,e.g. MV_MATCH_TYPE_NET_DETECT\~english Information type need to output ,e.g. MV_MATCH_TYPE_NET_DETECT + void* pInfo; ///< \~chinese 输出的信息缓存,由调用者分配\~english Output information cache, which is allocated by the caller + unsigned int nInfoSize; ///< \~chinese 信息缓存的大小\~english Information cache size + +}MV_ALL_MATCH_INFO; + + + +/// \~chinese 网络流量和丢包信息反馈结构体,对应类型为 MV_MATCH_TYPE_NET_DETECT +/// \~en:Network traffic and packet loss feedback structure, the corresponding type is MV_MATCH_TYPE_NET_DETECT +typedef struct _MV_MATCH_INFO_NET_DETECT_ +{ + int64_t nReviceDataSize; ///< \~chinese 已接收数据大小 [统计StartGrabbing和StopGrabbing之间的数据量]\~english Received data size + int64_t nLostPacketCount; ///< \~chinese 丢失的包数量\~english Number of packets lost + unsigned int nLostFrameCount; ///< \~chinese 丢帧数量\~english Number of frames lost + unsigned int nNetRecvFrameCount; ///< \~chinese 保留\~english Reserved + int64_t nRequestResendPacketCount; ///< \~chinese 请求重发包数 + int64_t nResendPacketCount; ///< \~chinese 重发包数 +}MV_MATCH_INFO_NET_DETECT; + +/// \~chinese host收到从u3v设备端的总字节数,对应类型为 MV_MATCH_TYPE_USB_DETECT\~english The total number of bytes host received from the u3v device side, the corresponding type is MV_MATCH_TYPE_USB_DETECT +typedef struct _MV_MATCH_INFO_USB_DETECT_ +{ + int64_t nReviceDataSize; ///< \~chinese 已接收数据大小 [统计OpenDevicce和CloseDevice之间的数据量]\~english Received data size + unsigned int nRevicedFrameCount; ///< \~chinese 已收到的帧数\~english Number of frames received + unsigned int nErrorFrameCount; ///< \~chinese 错误帧数\~english Number of error frames + unsigned int nReserved[2]; ///< \~chinese 保留\~english Reserved +}MV_MATCH_INFO_USB_DETECT; + +typedef struct _MV_IMAGE_BASIC_INFO_ +{ + // width + unsigned short nWidthValue; + unsigned short nWidthMin; + unsigned int nWidthMax; + unsigned int nWidthInc; + + // height + unsigned int nHeightValue; + unsigned int nHeightMin; + unsigned int nHeightMax; + unsigned int nHeightInc; + + // framerate + float fFrameRateValue; + float fFrameRateMin; + float fFrameRateMax; + + /// \~chinese 像素格式\~english pixel format + unsigned int enPixelType; ///< \~chinese 当前的像素格式\~english Current pixel format + unsigned int nSupportedPixelFmtNum; ///< \~chinese 支持的像素格式种类\~english Support pixel format + unsigned int enPixelList[MV_MAX_XML_SYMBOLIC_NUM]; + unsigned int nReserved[8]; + +}MV_IMAGE_BASIC_INFO; + +/// \~chinese 异常消息类型\~english Exception message type +#define MV_EXCEPTION_DEV_DISCONNECT 0x00008001 ///< \~chinese 设备断开连接\~english The device is disconnected +#define MV_EXCEPTION_VERSION_CHECK 0x00008002 ///< \~chinese SDK与驱动版本不匹配\~english SDK does not match the driver version +/// \~chinese 设备的访问模式\~english Device Access Mode +/// \~chinese 独占权限,其他APP只允许读CCP寄存器\~english Exclusive authority, other APP is only allowed to read the CCP register +#define MV_ACCESS_Exclusive 1 +/// \~chinese 可以从5模式下抢占权限,然后以独占权限打开\~english You can seize the authority from the 5 mode, and then open with exclusive authority +#define MV_ACCESS_ExclusiveWithSwitch 2 +/// \~chinese 控制权限,其他APP允许读所有寄存器\~english Control authority, allows other APP reading all registers +#define MV_ACCESS_Control 3 +/// \~chinese 可以从5的模式下抢占权限,然后以控制权限打开\~english You can seize the authority from the 5 mode, and then open with control authority +#define MV_ACCESS_ControlWithSwitch 4 +/// \~chinese 以可被抢占的控制权限打开\~english Open with seized control authority +#define MV_ACCESS_ControlSwitchEnable 5 +/// \~chinese 可以从5的模式下抢占权限,然后以可被抢占的控制权限打开\~english You can seize the authority from the 5 mode, and then open with seized control authority +#define MV_ACCESS_ControlSwitchEnableWithKey 6 +/// \~chinese 读模式打开设备,适用于控制权限下\~english Open with read mode and is available under control authority +#define MV_ACCESS_Monitor 7 + + +/************************************************************************/ +/* 封装了GenICam的C接口相关参数定义 */ +/* Package of GenICam C interface-related parameters definition */ +/************************************************************************/ + +/// \~chinese 每个节点对应的接口类型\~english Interface type corresponds to each node +enum MV_XML_InterfaceType +{ + IFT_IValue, //!> IValue interface + IFT_IBase, //!> IBase interface + IFT_IInteger, //!> IInteger interface + IFT_IBoolean, //!> IBoolean interface + IFT_ICommand, //!> ICommand interface + IFT_IFloat, //!> IFloat interface + IFT_IString, //!> IString interface + IFT_IRegister, //!> IRegister interface + IFT_ICategory, //!> ICategory interface + IFT_IEnumeration, //!> IEnumeration interface + IFT_IEnumEntry, //!> IEnumEntry interface + IFT_IPort, //!> IPort interface +}; + +/// \~chinese 节点的访问模式\~english Node Access Mode +enum MV_XML_AccessMode +{ + AM_NI, //!< Not implemented + AM_NA, //!< Not available + AM_WO, //!< Write Only + AM_RO, //!< Read Only + AM_RW, //!< Read and Write + AM_Undefined, //!< Object is not yet initialized + AM_CycleDetect, //!< used internally for AccessMode cycle detection +}; + +/// \~chinese 节点的可见性权限\~english Node Visible Permission +enum MV_XML_Visibility +{ + V_Beginner = 0, //!< Always visible + V_Expert = 1, //!< Visible for experts or Gurus + V_Guru = 2, //!< Visible for Gurus + V_Invisible = 3, //!< Not Visible + V_Undefined = 99 //!< Object is not yet initialized +}; + +/// \~chinese Event事件回调信息\~english Event callback infomation +#define MAX_EVENT_NAME_SIZE 128 // 相机Event事件名称最大长度\~english Max length of event name + +typedef struct _MV_EVENT_OUT_INFO_ +{ + char EventName[MAX_EVENT_NAME_SIZE]; ///< \~chinese Event名称\~english Event name + + unsigned short nEventID; ///< \~chinese Event号\~english Event ID + unsigned short nStreamChannel; ///< \~chinese 流通道序号\~english Circulation number + + unsigned int nBlockIdHigh; ///< \~chinese 帧号高位\~english BlockId high + unsigned int nBlockIdLow; ///< \~chinese 帧号低位\~english BlockId low + + unsigned int nTimestampHigh; ///< \~chinese 时间戳高位\~english Timestramp high + unsigned int nTimestampLow; ///< \~chinese 时间戳低位\~english Timestramp low + + void* pEventData; ///< \~chinese Event数据\~english Event data + unsigned int nEventDataSize; ///< \~chinese Event数据长度\~english Event data len + + unsigned int nReserved[16]; ///< \~chinese 预留\~english Reserved +}MV_EVENT_OUT_INFO; + +/// \~chinese 文件存取\~english File Access +typedef struct _MV_CC_FILE_ACCESS_T +{ + const char* pUserFileName; ///< \~chinese 用户文件名\~english User file name + const char* pDevFileName; ///< \~chinese 设备文件名\~english Device file name + + unsigned int nReserved[32]; ///< \~chinese 预留\~english Reserved +}MV_CC_FILE_ACCESS; + +/// \~chinese 文件存取进度\~english File Access Progress +typedef struct _MV_CC_FILE_ACCESS_PROGRESS_T +{ + int64_t nCompleted; ///< \~chinese 已完成的长度\~english Completed Length + int64_t nTotal; ///< \~chinese 总长度\~english Total Length + + unsigned int nReserved[8]; ///< \~chinese 预留\~english Reserved +}MV_CC_FILE_ACCESS_PROGRESS; + + + +/// \~chinese 传输模式,可以为单播模式、组播模式等\~english Transmission type +typedef struct _MV_TRANSMISSION_TYPE_T +{ + MV_GIGE_TRANSMISSION_TYPE enTransmissionType; ///< \~chinese 传输模式\~english Transmission type + unsigned int nDestIp; ///< \~chinese 目标IP,组播模式下有意义\~english Destination IP + unsigned short nDestPort; ///< \~chinese 目标Port,组播模式下有意义\~english Destination port + + unsigned int nReserved[32]; ///< \~chinese 预留\~english Reserved +}MV_TRANSMISSION_TYPE; + +/// \~chinese 动作命令信息\~english Action Command +typedef struct _MV_ACTION_CMD_INFO_T +{ + unsigned int nDeviceKey; ///< \~chinese 设备密钥 + unsigned int nGroupKey; ///< \~chinese 组键 + unsigned int nGroupMask; ///< \~chinese 组掩码 + + unsigned int bActionTimeEnable; ///< \~chinese 只有设置成1时Action Time才有效,非1时无效 + int64_t nActionTime; ///< \~chinese 预定的时间,和主频有关 + + const char* pBroadcastAddress; ///< \~chinese 广播包地址 + unsigned int nTimeOut; ///< \~chinese 等待ACK的超时时间,如果为0表示不需要ACK + + unsigned int bSpecialNetEnable; ///< [IN] \~chinese 只有设置成1时指定的网卡IP才有效,非1时无效 \~english Special IP Enable + unsigned int nSpecialNetIP; ///< [IN] \~chinese 指定的网卡IP \~english Special Net IP address + + unsigned int nReserved[14]; ///< \~chinese 预留\~english Reserved + +}MV_ACTION_CMD_INFO; + +/// \~chinese 动作命令返回信息\~english Action Command Result +typedef struct _MV_ACTION_CMD_RESULT_T +{ + unsigned char strDeviceAddress[12 + 3 + 1]; ///< IP address of the device + + //status code returned by the device + int nStatus;//1.0x0000:success. + //2.0x8001:Command is not supported by the device. + //3.0x8013:The device is not synchronized to a master clock to be used as time reference. + //4.0x8015:A device queue or packet data has overflowed. + //5.0x8016:The requested scheduled action command was requested at a time that is already past. + + unsigned int nReserved[4]; ///< \~chinese 预留\~english Reserved + +}MV_ACTION_CMD_RESULT; + +/// \~chinese 动作命令返回信息列表\~english Action Command Result List +typedef struct _MV_ACTION_CMD_RESULT_LIST_T +{ + unsigned int nNumResults; ///< \~chinese 返回值个数 + MV_ACTION_CMD_RESULT* pResults; + +}MV_ACTION_CMD_RESULT_LIST; + +// ch:单个节点基本属性 | en:Single Node Basic Attributes +typedef struct _MV_XML_NODE_FEATURE_ +{ + enum MV_XML_InterfaceType enType; ///< \~chinese 节点类型\~english Node Type + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Is visibility + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述,目前暂不支持\~english Node Description, NOT SUPPORT NOW + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称\~english Display Name + char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名\~english Node Name + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示\~english Notice + + unsigned int nReserved[4]; +}MV_XML_NODE_FEATURE; + +/// \~chinese 节点列表\~english Node List +typedef struct _MV_XML_NODES_LIST_ +{ + unsigned int nNodeNum; ///< \~chinese 节点个数\~english Node Number + MV_XML_NODE_FEATURE stNodes[MV_MAX_XML_NODE_NUM_C]; +}MV_XML_NODES_LIST; + + + +typedef struct _MV_XML_FEATURE_Value_ +{ + enum MV_XML_InterfaceType enType; ///< \~chinese节点类型\~english Node Type + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese节点描述 目前暂不支持\~english Node Description, NOT SUPPORT NOW + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称\~english Display Name + char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名\~english Node Name + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示\~english Notice + unsigned int nReserved[4]; +}MV_XML_FEATURE_Value; + +typedef struct _MV_XML_FEATURE_Base_ +{ + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode +}MV_XML_FEATURE_Base; + +typedef struct _MV_XML_FEATURE_Integer_ +{ + char strName[MV_MAX_XML_NODE_STRLEN_C]; + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持\~english NOT SUPPORT NOW + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; + + enum MV_XML_Visibility enVisivility; ///< \~chinese是否可见\~english Visible + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + int64_t nValue; ///< \~chinese 当前值\~english Current Value + int64_t nMinValue; ///< \~chinese 最小值\~english Min Value + int64_t nMaxValue; ///< \~chinese 最大值\~english Max Value + int64_t nIncrement; ///< \~chinese 增量\~english Increment + + unsigned int nReserved[4]; + +}MV_XML_FEATURE_Integer; + +typedef struct _MV_XML_FEATURE_Boolean_ +{ + char strName[MV_MAX_XML_NODE_STRLEN_C]; + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持\~english NOT SUPPORT NOW + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; + + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + bool bValue; ///< \~chinese 当前值\~english Current Value + + unsigned int nReserved[4]; +}MV_XML_FEATURE_Boolean; + +typedef struct _MV_XML_FEATURE_Command_ +{ + char strName[MV_MAX_XML_NODE_STRLEN_C]; + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持\~english NOT SUPPORT NOW + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; + + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + + unsigned int nReserved[4]; +}MV_XML_FEATURE_Command; + +typedef struct _MV_XML_FEATURE_Float_ +{ + char strName[MV_MAX_XML_NODE_STRLEN_C]; + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持\~english NOT SUPPORT NOW + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; + + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + double dfValue; ///< \~chinese 当前值\~english Current Value + double dfMinValue; ///< \~chinese 最小值\~english Min Value + double dfMaxValue; ///< \~chinese 最大值\~english Max Value + double dfIncrement; ///< \~chinese 增量\~english Increment + + unsigned int nReserved[4]; +}MV_XML_FEATURE_Float; + +typedef struct _MV_XML_FEATURE_String_ +{ + char strName[MV_MAX_XML_NODE_STRLEN_C]; + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持\~english NOT SUPPORT NOW + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; + + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + char strValue[MV_MAX_XML_STRVALUE_STRLEN_C]; ///< \~chinese 当前值\~english Current Value + + unsigned int nReserved[4]; +}MV_XML_FEATURE_String; + +typedef struct _MV_XML_FEATURE_Register_ +{ + char strName[MV_MAX_XML_NODE_STRLEN_C]; + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持\~english NOT SUPPORT NOW + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; + + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + int64_t nAddrValue; ///< \~chinese 当前值\~english Current Value + + unsigned int nReserved[4]; +}MV_XML_FEATURE_Register; + +typedef struct _MV_XML_FEATURE_Category_ +{ + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述 目前暂不支持\~english Node Description, NOT SUPPORT NOW + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称\~english Display Name + char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名\~english Node Name + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示\~english Notice + + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + + unsigned int nReserved[4]; +}MV_XML_FEATURE_Category; + +typedef struct _MV_XML_FEATURE_EnumEntry_ +{ + char strName[MV_MAX_XML_NODE_STRLEN_C]; + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持\~english NOT SUPPORT NOW + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; + int bIsImplemented; + int nParentsNum; + MV_XML_NODE_FEATURE stParentsList[MV_MAX_XML_PARENTS_NUM]; + + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + int64_t nValue; ///< \~chinese 当前值\~english Current Value + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + int nReserved[8]; + +}MV_XML_FEATURE_EnumEntry; + + +typedef struct _MV_XML_FEATURE_Enumeration_ +{ + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述 目前暂不支持\~english Node Description, NOT SUPPORT NOW + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称\~english Display Name + char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名\~english Node Name + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示\~english Notice + + int nSymbolicNum; ///< \~chinese Symbolic数\~english Symbolic Number + char strCurrentSymbolic[MV_MAX_XML_SYMBOLIC_STRLEN_C]; ///< \~chinese 当前Symbolic索引\~english Current Symbolic Index + char strSymbolic[MV_MAX_XML_SYMBOLIC_NUM][MV_MAX_XML_SYMBOLIC_STRLEN_C]; + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + int64_t nValue; ///< \~chinese 当前值\~english Current Value + + unsigned int nReserved[4]; +}MV_XML_FEATURE_Enumeration; + + +typedef struct _MV_XML_FEATURE_Port_ +{ + enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见\~english Visible + char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述 目前暂不支持\~english Node Description, NOT SUPPORT NOW + char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称\~english Display Name + char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名\~english Node Name + char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示\~english Notice + + enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式\~english Access Mode + int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是 目前暂不支持\~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW + + unsigned int nReserved[4]; +}MV_XML_FEATURE_Port; + +typedef struct _MV_XML_CAMERA_FEATURE_ +{ + enum MV_XML_InterfaceType enType; + union + { + MV_XML_FEATURE_Integer stIntegerFeature; + MV_XML_FEATURE_Float stFloatFeature; + MV_XML_FEATURE_Enumeration stEnumerationFeature; + MV_XML_FEATURE_String stStringFeature; + }SpecialFeature; + +}MV_XML_CAMERA_FEATURE; + +typedef struct _MVCC_ENUMVALUE_T +{ + unsigned int nCurValue; ///< \~chinese 当前值\~english Current Value + unsigned int nSupportedNum; ///< \~chinese 数据的有效数据个数\~english Number of valid data + unsigned int nSupportValue[MV_MAX_XML_SYMBOLIC_NUM]; + + unsigned int nReserved[4]; +}MVCC_ENUMVALUE; + +typedef struct _MVCC_INTVALUE_T +{ + unsigned int nCurValue; ///< \~chinese 当前值\~english Current Value + unsigned int nMax; + unsigned int nMin; + unsigned int nInc; + + unsigned int nReserved[4]; +}MVCC_INTVALUE; + +typedef struct _MVCC_INTVALUE_EX_T +{ + int64_t nCurValue; ///< \~chinese 当前值\~english Current Value + int64_t nMax; + int64_t nMin; + int64_t nInc; + + unsigned int nReserved[16]; +}MVCC_INTVALUE_EX; + +typedef struct _MVCC_FLOATVALUE_T +{ + float fCurValue; ///< \~chinese 当前值\~english Current Value + float fMax; + float fMin; + + unsigned int nReserved[4]; +}MVCC_FLOATVALUE; + +typedef struct _MVCC_STRINGVALUE_T +{ + char chCurValue[256]; ///< \~chinese 当前值\~english Current Value + + int64_t nMaxLength; + unsigned int nReserved[2]; +}MVCC_STRINGVALUE; + +#endif /* _MV_CAMERA_PARAMS_H_ */ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvCameraControl.h b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvCameraControl.h new file mode 100644 index 0000000..72f940a --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvCameraControl.h @@ -0,0 +1,3398 @@ + +#ifndef _MV_CAMERA_CTRL_H_ +#define _MV_CAMERA_CTRL_H_ + +#include "MvErrorDefine.h" +#include "CameraParams.h" + +/** +* @brief 动态库导入导出定义 +* @brief Import and export definition of the dynamic library +*/ +#ifndef MV_CAMCTRL_API + + #if (defined (_WIN32) || defined(WIN64)) + #if defined(MV_CAMCTRL_EXPORTS) + #define MV_CAMCTRL_API __declspec(dllexport) + #else + #define MV_CAMCTRL_API __declspec(dllimport) + #endif + #else + #ifndef __stdcall + #define __stdcall + #endif + + #if defined(MV_CAMCTRL_EXPORTS) + #define MV_CAMCTRL_API __attribute__((visibility("default"))) + #else + #define MV_CAMCTRL_API + #endif + #endif + +#endif + +#ifndef IN + #define IN +#endif + +#ifndef OUT + #define OUT +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/************************************************************************/ +/* 相机的基本指令和操作 */ +/* Camera basic instructions and operations */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 获取SDK版本号 + * @return 始终返回4字节版本号 + | 主 | 次 | 修正 | 测试 | + | :---: | :---: | :---: | :---: | + | 8bits | 8bits | 8bits | 8bits | + * @remarks 比如返回值为0x01000001,即SDK版本号为V1.0.0.1。 + + * @~english + * @brief Get SDK Version + * @return Always return 4 Bytes of version number + | Main | Sub | Rev | Test | + | :---: | :---: | :---: | :---: | + | 8bits | 8bits | 8bits | 8bits | + * @remarks For example, if the return value is 0x01000001, the SDK version is V1.0.0.1. + ************************************************************************/ +MV_CAMCTRL_API unsigned int __stdcall MV_CC_GetSDKVersion(); + +/********************************************************************//** + * @~chinese + * @brief 获取支持的传输层 + * @return 支持的传输层编号 + + * @~english + * @brief Get supported Transport Layer + * @return Supported Transport Layer number + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_EnumerateTls(); + +/********************************************************************//** + * @~chinese + * @brief 枚举设备 + * @param nTLayerType [IN] 枚举传输层 + * @param pstDevList [OUT] 设备列表 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 设备列表的内存是在SDK内部分配的,多线程调用该接口时会进行设备列表内存的释放和申请.\n + 建议尽量避免多线程枚举操作。 + + * @~english + * @brief Enumerate Device + * @param nTLayerType [IN] Enumerate TLs + * @param pstDevList [OUT] Device List + * @return Success, return #MV_OK. Failure, return error code + * @remarks @remarks The memory of the device list is allocated within the SDK. When the interface is invoked by multiple threads, the memory of the device list will be released and applied.\n + It is recommended to avoid multithreaded enumeration operations as much as possible. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_EnumDevices(IN unsigned int nTLayerType, IN OUT MV_CC_DEVICE_INFO_LIST* pstDevList); + +/********************************************************************//** + * @~chinese + * @brief 根据厂商名字枚举设备 + * @param nTLayerType [IN] 枚举传输层 + * @param pstDevList [OUT] 设备列表 + * @param pManufacturerName [IN] 厂商名字 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Enumerate device according to manufacture name + * @param nTLayerType [IN] Transmission layer of enumeration + * @param pstDevList [OUT] Device list + * @param pManufacturerName [IN] Manufacture Name + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_EnumDevicesEx(IN unsigned int nTLayerType, IN OUT MV_CC_DEVICE_INFO_LIST* pstDevList, IN const char* pManufacturerName); + +/********************************************************************//** + * @~chinese + * @brief 设备是否可达 + * @param pstDevInfo [IN] 设备信息结构体 + * @param nAccessMode [IN] 访问权限 + * @return 可达,返回true;不可达,返回false + * @remarks 读取设备CCP寄存器的值,判断当前状态是否具有某种访问权限。 \n + 如果设备不支持 #MV_ACCESS_ExclusiveWithSwitch、 #MV_ACCESS_ControlWithSwitch、 #MV_ACCESS_ControlSwitchEnableWithKey这三种模式,接口返回false。目前设备不支持这3种抢占模式,国际上主流的厂商的相机也都暂不支持这3种模式。 \n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Is the device accessible + * @param pstDevInfo [IN] Device Information Structure + * @param nAccessMode [IN] Access Right + * @return Access, return true. Not access, return false + @remarks Read device CCP register value and determine current access permission.\n + Return false if the device does not support the modes #MV_ACCESS_ExclusiveWithSwitch, #MV_ACCESS_ControlWithSwitch, #MV_ACCESS_ControlSwitchEnableWithKey. Currently the device does not support the 3 preemption modes, neither do the devices from other mainstream manufacturers. \n + This API is not supported by CameraLink device. + ************************************************************************/ +MV_CAMCTRL_API bool __stdcall MV_CC_IsDeviceAccessible(IN MV_CC_DEVICE_INFO* pstDevInfo, IN unsigned int nAccessMode); + +/********************************************************************//** + * @~chinese + * @brief 设置SDK日志路径(如果日志服务MvLogServer已启用,则该接口无效,默认日志服务为开启状态) + * @param pSDKLogPath [IN] SDK日志路径 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 设置路径之后,可以指定路径存放日志。\n + v2.4.1版本新增日志服务,开启服务之后该接口无效。 + + * @~english + * @brief Set SDK log path + * @param pSDKLogPath [IN] SDK log path + * @return Access, return true. Not access, return false + * @remarks For version V2.4.1, added log service, this API is invalid when the service is enabled.And The logging service is enabled by default\n + This API is used to set the log file storing path. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetSDKLogPath(IN const char * pSDKLogPath); + +/********************************************************************//** + * @~chinese + * @brief 创建设备句柄 + * @param handle [OUT] 设备句柄 + * @param pstDevInfo [IN] 设备信息结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 根据输入的设备信息,创建库内部必须的资源和初始化内部模块。通过该接口创建句柄,调用SDK接口,会默认生成SDK日志文件,保存在当前可执行程序路径下的MvSdkLog文件夹,如果不需要生成日志文件,可以通过MV_CC_CreateHandleWithoutLog创建句柄。 + + * @~english + * @brief Create Device Handle + * @param handle [OUT] Device handle + * @param pstDevInfo [IN] Device Information Structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks Create required resources within library and initialize internal module according to input device information. Create handle and call SDK interface through this interface, and SDK log file will be created by default. Creating handle through #MV_CC_CreateHandleWithoutLog will not generate log files. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_CreateHandle(OUT void ** handle, IN const MV_CC_DEVICE_INFO* pstDevInfo); + +/********************************************************************//** + * @~chinese + * @brief 创建设备句柄,不生成日志 + * @param handle [OUT] 设备句柄 + * @param pstDevInfo [IN] 设备信息结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 根据输入的设备信息,创建库内部必须的资源和初始化内部模块。通过该接口创建句柄,调用SDK接口,不会默认生成SDK日志文件,如果需要生成日志文件可以通过MV_CC_CreateHandle创建句柄,日志文件自动生成,保存在当前可执行程序路径下的MvSdkLog文件夹。 + + * @~english + * @brief Create Device Handle without log + * @param handle [OUT] Device handle + * @param pstDevInfo [IN] Device Information Structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks Create required resources within library and initialize internal module according to input device information. Create handle and call SDK interface through this interface, and SDK log file will not be created. To create logs, create handle through MV_CC_CreateHandle, and log files will be automatically generated. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_CreateHandleWithoutLog(OUT void ** handle, IN const MV_CC_DEVICE_INFO* pstDevInfo); + +/********************************************************************//** + * @~chinese + * @brief 销毁设备句柄 + * @param handle [IN] 设备句柄 + * @return 成功,返回#MV_OK;错误,返回错误码 + + * @~english + * @brief Destroy Device Handle + * @param handle [IN] Device handle + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_DestroyHandle(IN void * handle); + +/********************************************************************//** + * @~chinese + * @brief 打开设备 + * @param handle [IN] 设备句柄 + * @param nAccessMode [IN] 访问权限 + * @param nSwitchoverKey [IN] 切换访问权限时的密钥 + * @return 成功,返回#MV_OK ;错误,返回错误码 + * @remarks 根据设置的设备参数,找到对应的设备,连接设备。\n + 调用接口时可不传入nAccessMode和nSwitchoverKey,此时默认设备访问模式为独占权限。目前设备暂不支持#MV_ACCESS_ExclusiveWithSwitch、 #MV_ACCESS_ControlWithSwitch、MV_ACCESS_ControlSwitchEnable、MV_ACCESS_ControlSwitchEnableWithKey这四种抢占模式。\n + 对于U3V设备,nAccessMode、nSwitchoverKey这两个参数无效。 + + * @~english + * @brief Open Device + * @param handle [IN] Device handle + * @param nAccessMode [IN] Access Right + * @param nSwitchoverKey [IN] Switch key of access right + * @return Success, return #MV_OK. Failure, return error code + * @remarks Find specific device and connect according to set device parameters. \n + When calling the interface, the input of nAccessMode and nSwitchoverKey is optional, and the device access mode is exclusive. Currently the device does not support the following preemption modes: MV_ACCESS_ExclusiveWithSwitch, MV_ACCESS_ControlWithSwitch, MV_ACCESS_ControlSwitchEnableWithKey.\n + For USB3Vision device, nAccessMode, nSwitchoverKey are invalid. + ************************************************************************/ +#ifndef __cplusplus +MV_CAMCTRL_API int __stdcall MV_CC_OpenDevice(IN void* handle, IN unsigned int nAccessMode, IN unsigned short nSwitchoverKey); +#else +MV_CAMCTRL_API int __stdcall MV_CC_OpenDevice(IN void* handle, IN unsigned int nAccessMode = MV_ACCESS_Exclusive, IN unsigned short nSwitchoverKey = 0); +#endif + +/********************************************************************//** + * @~chinese + * @brief 关闭相机 + * @param handle [IN] 设备句柄 + * @return 成功,返回#MV_OK ;错误,返回错误码 + * @remarks 通过MV_CC_OpenDevice连接设备后,可以通过该接口断开设备连接,释放资源 + + * @~english + * @brief Close Device + * @param handle [IN] Device handle + * @return Success, return #MV_OK. Failure, return error code + * @remarks After connecting to device through MV_CC_OpenDevice, use this interface to disconnect and release resources. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_CloseDevice(IN void* handle); + +/********************************************************************//** + * @~chinese + * @brief 判断相机是否处于连接状态 + * @param handle [IN] 设备句柄 + * @return 设备处于连接状态,返回true;没连接或失去连接,返回false + + * @~english + * @brief Is The Device Connected + * @param handle [IN] Device handle + * @return Connected, return true. Not Connected or DIsconnected, return false + ***********************************************************************/ +MV_CAMCTRL_API bool __stdcall MV_CC_IsDeviceConnected(IN void* handle); + +/********************************************************************//** + * @~chinese + * @brief 注册图像数据回调 + * @param handle [IN] 设备句柄 + * @param cbOutput [IN] 回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 通过该接口可以设置图像数据回调函数,在MV_CC_CreateHandle之后即可调用。 \n + 图像数据采集有两种方式,两种方式不能复用: + - 方式一:调用MV_CC_RegisterImageCallBackEx设置图像数据回调函数,然后调用MV_CC_StartGrabbing开始采集,采集的图像数据在设置的回调函数中返回。 + - 方式二:调用MV_CC_StartGrabbing开始采集,然后在应用层循环调用MV_CC_GetOneFrameTimeout获取指定像素格式的帧数据,获取帧数据时上层应用程序需要根据帧率控制好调用该接口的频率。 + 该接口仅在windows版本和Linux版本下支持。\n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Register the image callback function + * @param handle [IN] Device handle + * @param cbOutput [IN] Callback function pointer + * @param pUser [IN] User defined variable + * @return Success, return #MV_OK. Failure, return error code + * @remarks After MV_CC_CreateHandle, call this interface to set image data callback function.\n + There are two available image data acquisition modes, and cannot be used together: + - Mode 1: Call MV_CC_RegisterImageCallBack to set image data callback function, and then call MV_CC_StartGrabbing to start acquiring. The acquired image data will return in the set callback function. + - Mode 2: Call MV_CC_StartGrabbing to start acquiring, and then call MV_CC_GetOneFrameTimeout repeatedly in application layer to get frame data of specified pixel format. When getting frame data, the frequency of calling this interface should be controlled by upper layer application according to frame rate. + This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RegisterImageCallBackEx(void* handle, + void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser), + void* pUser); + +/********************************************************************//** + * @~chinese + * @brief 注册图像数据回调,RGB + * @param handle [IN] 设备句柄 + * @param cbOutput [IN] 回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 通过该接口可以设置图像数据回调函数,在MV_CC_CreateHandle之后即可调用。 \n + 图像数据采集有两种方式,两种方式不能复用: + - 方式一:调用MV_CC_RegisterImageCallBackForRGB设置RGB24格式图像数据回调函数,然后调用MV_CC_StartGrabbing开始采集,采集的图像数据在设置的回调函数中返回。 + - 方式二:调用MV_CC_StartGrabbing开始采集,然后在应用层循环调用MV_CC_GetImageForRGB获取RGB24格式的帧数据,获取帧数据时上层应用程序需要根据帧率控制好调用该接口的频率。\n\n + 该接口仅在windows版本和Linux版本下支持。 \n + 该接口不支持CameraLink设备。 + + * @~english + * @brief register image data callback, RGB + * @param handle [IN] Device handle + * @param cbOutput [IN] Callback function pointer + * @param pUser [IN] User defined variable + * @return Success, return #MV_OK. Failure, return error code + * @remarks Before calling this API to set image data callback function, you should call this API MV_CC_CreateHandle. \n + There are two image acquisition modes, the two modes cannot be reused: + - Mode 1: Call #MV_CC_RegisterImageCallBackForRGB to set RGB24 format image data callback function, + and then call #MV_CC_StartGrabbing to start acquisition, + the collected image data will be returned in the configured callback function. + - Mode 2: Call MV_CC_StartGrabbing to start acquisition, and the call MV_CC_GetImageForRGB + repeatedly in application layer to get frame data with RGB24 format. + When getting frame data, the upper application program should control the frequency + of calling this API according to frame rate. \n\n + This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RegisterImageCallBackForRGB(void* handle, + void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser), + void* pUser); + +/********************************************************************//** + * @~chinese + * @brief 注册图像数据回调,BGR + * @param handle [IN] 设备句柄 + * @param cbOutput [IN] 回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 成功,返回 #MV_OK ;错误,返回错误码 + * @remarks 通过该接口可以设置图像数据回调函数,在MV_CC_CreateHandle之后即可调用。\n + 图像数据采集有两种方式,两种方式不能复用:\n + - 方式一:调用 #MV_CC_RegisterImageCallBackForBGR 设置 #BGR24 图像数据回调函数,然后调用 #MV_CC_StartGrabbing 开始采集,采集的图像数据在设置的回调函数中返回。 + - 方式二:调用 #MV_CC_StartGrabbing 开始采集,然后在应用层循环调用 #MV_CC_GetImageForBGR 获取 #BGR24 格式的帧数据,获取帧数据时上层应用程序需要根据帧率控制好调用该接口的频率。 \n\n + 该接口仅在windows版本和Linux版本下支持。 \n + 该接口不支持CameraLink设备。 + + * @~english + * @brief register image data callback, BGR + * @param handle [IN] Device handle + * @param cbOutput [IN] Callback function pointer + * @param pUser [IN] User defined variable + * @return Success, return #MV_OK. Failure, return error code + * @remarks Before calling this API to set image data callback function, you should call this API MV_CC_CreateHandle. \n + There are two image acquisition modes, the two modes cannot be reused: \n + - Mode 1: Call MV_CC_RegisterImageCallBackForBGR to set RGB24 format image data callback function, and then call MV_CC_StartGrabbing to start acquisition, the collected image data will be returned in the configured callback function.\n + - Mode 2: Call MV_CC_StartGrabbing to start acquisition, and the call MV_CC_GetImageForBGR repeatedly in application layer to get frame data with BGR24 format. When getting frame data, the upper application program should control the frequency of calling this API according to frame rate.\n + This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RegisterImageCallBackForBGR(void* handle, + void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser), + void* pUser); + +/********************************************************************//** + * @~chinese + * @brief 开始取流 + * @param handle [IN] 设备句柄 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 该接口不支持CameraLink设备。 + + * @~english + * @brief Start Grabbing + * @param handle [IN] Device handle + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_StartGrabbing(IN void* handle); + +/********************************************************************//** + * @~chinese + * @brief 停止取流 + * @param handle [IN] 设备句柄 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 该接口不支持CameraLink设备。 + + * @~english + * @brief Stop Grabbing + * @param handle [IN] Device handle + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_StopGrabbing(IN void* handle); + +/********************************************************************//** + * @~chinese + * @brief 获取一帧RGB数据,此函数为查询式获取,每次调用查询内部 + 缓存有无数据,有数据则获取数据,无数据返回错误码 + * @param handle [IN] 设备句柄 + * @param pData [OUT] 图像数据接收指针 + * @param nDataSize [IN] 接收缓存大小 + * @param pFrameInfo [OUT] 图像信息结构体 + * @param nMsec [IN] 等待超时时间 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 每次调用该接口,将查询内部缓存是否有数据,如果有数据则转换成RGB24格式返回,如果没有数据则返回错误码。因为图像转换成RGB24格式有耗时,所以当数据帧率过高时该接口可能会导致丢帧。\n + 调用该接口获取图像数据帧之前需要先调用MV_CC_StartGrabbing启动图像采集。该接口为主动式获取帧数据,上层应用程序需要根据帧率,控制好调用该接口的频率。 \n + 该接口不支持CameraLink设备。 \n + 该接口仅在windows版本和Linux版本下支持。 + + * @~english + * @brief Get one frame of RGB data, this function is using query to get data + query whether the internal cache has data, get data if there has, return error code if no data + * @param handle [IN] Device handle + * @param pData [OUT] Image data receiving buffer + * @param nDataSize [IN] Buffer size + * @param pFrameInfo [OUT] Image information structure + * @param nMsec [IN] Waiting timeout + * @return Success, return #MV_OK. Failure, return error code + * @remarks Before calling this API to set image data callback function, you should call this API MV_CC_CreateHandle. \n + There are two image acquisition modes, the two modes cannot be reused: \n + - Mode 1: Call MV_CC_RegisterImageCallBackForBGR to set RGB24 format image data callback function, and then call MV_CC_StartGrabbing to start acquisition, the collected image data will be returned in the configured callback function.\n + - Mode 2: Call MV_CC_StartGrabbing to start acquisition, and the call MV_CC_GetImageForBGR repeatedly in application layer to get frame data with BGR24 format. When getting frame data, the upper application program should control the frequency of calling this API according to frame rate. \n + This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetImageForRGB(IN void* handle, IN OUT unsigned char * pData , IN unsigned int nDataSize, IN OUT MV_FRAME_OUT_INFO_EX* pFrameInfo, int nMsec); + +/********************************************************************//** + * @~chinese + * @brief 获取一帧BGR数据,此函数为查询式获取,每次调用查询内部 + 缓存有无数据,有数据则获取数据,无数据返回错误码 + * @param handle [IN] 设备句柄 + * @param pData [OUT] 图像数据接收指针 + * @param nDataSize [IN] 接收缓存大小 + * @param pFrameInfo [OUT] 图像信息结构体 + * @param nMsec [IN] 等待超时时间 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 每次调用该接口,将查询内部缓存是否有数据,如果有数据则转换成BGR24格式返回,如果没有数据则返回错误码。因为图像转换成BGR24格式有耗时,所以当数据帧率过高时该接口可能会导致丢帧。 \n + 调用该接口获取图像数据帧之前需要先调用MV_CC_StartGrabbing启动图像采集。该接口为主动式获取帧数据,上层应用程序需要根据帧率,控制好调用该接口的频率。\n + 该接口不支持CameraLink设备。\n + 该接口仅在windows版本和Linux版本下支持。 + + + * @~english + * @brief Get one frame of BGR data, this function is using query to get data + query whether the internal cache has data, get data if there has, return error code if no data + * @param handle [IN] Device handle + * @param pData [OUT] Image data receiving buffer + * @param nDataSize [IN] Buffer size + * @param pFrameInfo [OUT] Image information structure + * @param nMsec [IN] Waiting timeout + * @return Success, return #MV_OK. Failure, return error code + * @remarks Before calling this API to set image data callback function, you should call this API MV_CC_CreateHandle. \n + There are two image acquisition modes, the two modes cannot be reused: \n + - Mode 1: Call MV_CC_RegisterImageCallBackForBGR to set RGB24 format image data callback function, and then call MV_CC_StartGrabbing to start acquisition, the collected image data will be returned in the configured callback function.\n + - Mode 2: Call MV_CC_StartGrabbing to start acquisition, and the call MV_CC_GetImageForBGR repeatedly in application layer to get frame data with BGR24 format. When getting frame data, the upper application program should control the frequency of calling this API according to frame rate. \n + This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetImageForBGR(IN void* handle, IN OUT unsigned char * pData , IN unsigned int nDataSize, IN OUT MV_FRAME_OUT_INFO_EX* pFrameInfo, int nMsec); + +/********************************************************************//** + * @~chinese + * @brief 使用内部缓存获取一帧图片(与MV_CC_Display不能同时使用) + * @param handle [IN] 设备句柄 + * @param pFrame [OUT] 图像数据和图像信息 + * @param nMsec [IN] 等待超时时间,输入INFINITE时表示无限等待,直到收到一帧数据或者停止取流 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 调用该接口获取图像数据帧之前需要先调用MV_CC_StartGrabbing启动图像采集。该接口为主动式获取帧数据,上层应用程序需要根据帧率,控制好调用该接口的频率。该接口支持设置超时时间,SDK内部等待直到有数据时返回,可以增加取流平稳性,适合用于对平稳性要求较高的场合。 \n + 该接口与MV_CC_FreeImageBuffer配套使用,当处理完取到的数据后,需要用MV_CC_FreeImageBuffer接口将pFrame内的数据指针权限进行释放。 \n + 该接口与MV_CC_GetOneFrameTimeout相比,有着更高的效率。且其取流缓存的分配是由sdk内部自动分配的,而MV_CC_GetOneFrameTimeout接口是需要客户自行分配。\n + 该接口在调用MV_CC_Display后无法取流。 \n + 该接口对于U3V、GIGE设备均可支持。 \n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Get a frame of an image using an internal cache + * @param handle [IN] Device handle + * @param pFrame [OUT] Image data and image information + * @param nMsec [IN] Waiting timeout + * @return Success, return #MV_OK. Failure, return error code + * @remarks Before calling this API to get image data frame, you should call MV_CC_StartGrabbing to start image acquisition. This API can get frame data actively, the upper layer program should control the frequency of calling this API according to the frame rate. This API supports setting timeout, and SDK will wait to return until data appears. This function will increase the streaming stability, which can be used in the situation with high stability requirement. \n + This API and MV_CC_FreeImageBuffer should be called in pairs, after processing the acquired data, you should call MV_CC_FreeImageBuffer to release the data pointer permission of pFrame. \n + This interface is more efficient than MV_CC_GetOneFrameTimeout. The allocation of the stream cache is automatically allocated within the SDK.The MV_CC_GetOneFrameTimeout interface needs to be allocated by customers themselves. \n + This API cannot be called to stream after calling MV_CC_Display. \n + This API is not supported by CameraLink device. \n + This API is supported by both USB3 vision camera and GigE camera. \n + **********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetImageBuffer(IN void* handle, OUT MV_FRAME_OUT* pFrame, IN unsigned int nMsec); + +/********************************************************************//** + * @~chinese + * @brief 释放图像缓存(此接口用于释放不再使用的图像缓存,与MV_CC_GetImageBuffer配套使用) + * @param handle [IN] 设备句柄 + * @param pFrame [IN] 图像数据和图像数据 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 该接口与MV_CC_GetImageBuffer配套使用,使用MV_CC_GetImageBuffer接口取到的图像数据pFrame,需要用 #MV_CC_FreeImageBuffer 接口进行权限释放。 \n + 该接口对于取流效率高于GetOneFrameTimeout接口,且GetImageBuffer在不进行Free的情况下,最大支持输出的节点数与 #MV_CC_SetImageNodeNum 接口所设置的节点数相等,默认节点数是1。\n + 该接口对于U3V、GIGE设备均可支持。 \n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Free image buffer(this interface can free image buffer, used with MV_CC_GetImageBuffer) + * @param handle [IN] Device handle + * @param pFrame [IN] Image data and image information + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API and MV_CC_GetImageBuffer should be called in pairs, before calling MV_CC_GetImageBuffer to get image data pFrame, you should call #MV_CC_FreeImageBuffer to release the permission. \n + Compared with API MV_CC_GetOneFrameTimeout, this API has higher efficiency of image acquisition. The max. number of nodes can be outputted is same as the "nNum" of API #MV_CC_SetImageNodeNum, default value is 1. \n + This API is not supported by CameraLink device. \n + This API is supported by both USB3 vision camera and GigE camera. + **********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_FreeImageBuffer(IN void* handle, IN MV_FRAME_OUT* pFrame); + +/********************************************************************//** + * @~chinese + * @brief 采用超时机制获取一帧图片,SDK内部等待直到有数据时返回 + * @param handle [IN] 设备句柄 + * @param pData [OUT] 图像数据接收指针 + * @param nDataSize [IN] 接收缓存大小 + * @param pFrameInfo [OUT] 图像信息结构体 + * @param nMsec [IN] 等待超时时间 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 调用该接口获取图像数据帧之前需要先调用MV_CC_StartGrabbing启动图像采集。该接口为主动式获取帧数据,上层应用程序需要根据帧率,控制好调用该接口的频率。该接口支持设置超时时间,SDK内部等待直到有数据时返回,可以增加取流平稳性,适合用于对平稳性要求较高的场合。\n + 该接口对于U3V、GIGE设备均可支持。\n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Timeout mechanism is used to get image, and the SDK waits inside until the data is returned + * @param handle [IN] Device handle + * @param pData [OUT] Image data receiving buffer + * @param nDataSize [IN] Buffer size + * @param pFrameInfo [OUT] Image information structure + * @param nMsec [IN] Waiting timeout + * @return Success, return #MV_OK. Failure, return error code + * @remarks Before calling this API to get image data frame, call MV_CC_StartGrabbing to start image acquisition. This API can get frame data actively, the upper layer program should control the frequency of calling this API according to the frame rate. This API supports setting timeout, SDK will wait to return until data appears. This function will increase the streaming stability, which can be used in the situation with high stability requirement. \n + Both the USB3Vision and GIGE camera can support this API. \n + This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetOneFrameTimeout(IN void* handle, IN OUT unsigned char * pData , IN unsigned int nDataSize, IN OUT MV_FRAME_OUT_INFO_EX* pFrameInfo, unsigned int nMsec); + +/********************************************************************//** + * @~chinese + * @brief 清除取流数据缓存 + * @param handle [IN] 设备句柄 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口允许用户在不停止取流的时候,就能清除缓存中不需要的图像。\n + 该接口在连续模式切触发模式后,可以清除历史数据。 + + * @~english + * @brief if Image buffers has retrieved the data,Clear them + * @param handle [IN] Device handle + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface allows user to clear the unnecessary images from the buffer memory without stopping acquisition. \n + This interface allows user to clear previous data after switching from continuous mode to trigger mode. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_ClearImageBuffer(IN void* handle); + +/********************************************************************//** + * @~chinese + * @brief 显示图像,注册显示窗口,内部自动显示(与MV_CC_GetImageBuffer不能同时使用) + * @param handle [IN] 句柄 + * @param hWnd [IN] 显示窗口句柄 + * @return 成功,返回#MV_OK;错误,返回错误码 + + * @~english + * @brief Display one frame image, register display window, automatic display internally + * @param handle [IN] Handle + * @param hWnd [IN] Display Window Handle + * @return Success, return #MV_OK. Failure, return error code + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_Display(IN void* handle, void* hWnd); + +/********************************************************************//** + * @~chinese + * @brief 显示一帧图像 + * @param handle [IN] 设备句柄 + * @param pDisplayInfo [IN] 图像信息 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 该接口对于U3V、GIGE设备均可支持。\n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Display one frame image + * @param handle [IN] Device handle + * @param pDisplayInfo [IN] Frame Info + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API is valid for USB3Vision camera and GIGE camera. \n + This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_DisplayOneFrame(IN void* handle, IN MV_DISPLAY_FRAME_INFO* pDisplayInfo); + +/********************************************************************//** + * @~chinese + * @brief 设置SDK内部图像缓存节点个数,大于等于1,在抓图前调用 + * @param handle [IN] 设备句柄 + * @param nNum [IN] 缓存节点个数,范围[1,30],默认为1 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 调用该接口可以设置SDK内部图像缓存节点个数,在调用MV_CC_StartGrabbing开始抓图前调用。\n + 增加图像缓存节点个数会增加SDK使用的内存,但是可以有效避免某些性能差的ARM板出现的跳帧现象。\n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Set the number of the internal image cache nodes in SDK, Greater than or equal to 1, to be called before the capture + * @param handle [IN] Device handle + * @param nNum [IN] Image Node Number, range[1,30], default 1 + * @return Success, return #MV_OK. Failure, return error code + * @remarks Call this interface to set the number of SDK internal image buffer nodes. + The interface should be called before calling MV_CC_StartGrabbing for capturing. \n + Increasing the number of image cache nodes will increase the memory used by the SDK, + but it can effectively avoid frame skipping on some ARM boards with poor performance. \n + This API is not supported by CameraLink device. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetImageNodeNum(IN void* handle, unsigned int nNum); + +/********************************************************************//** + * @~chinese + * @brief 获取设备信息,取流之前调用 + * @param handle [IN] 设备句柄 + * @param pstDevInfo [IN][OUT] 返回给调用者有关相机设备信息结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 支持用户在打开设备后获取设备信息。\n + 若该设备是GigE相机,则调用该接口存在阻塞风险,因此不建议在取流过程中调用该接口。 + + * @~english + * @brief Get device information + * @param handle [IN] Device handle + * @param pstDevInfo [IN][OUT] Structure pointer of device information + * @return Success, return #MV_OK. Failure, return error code + * @remarks The API support users to access device information after opening the device. \n + If the device is a GigE camera, there is a blocking risk in calling the interface, so it is not recommended to call the interface during the fetching process. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetDeviceInfo(IN void * handle, IN OUT MV_CC_DEVICE_INFO* pstDevInfo); + +/********************************************************************//** + * @~chinese + * @brief 获取各种类型的信息 + * @param handle [IN] 设备句柄 + * @param pstInfo [IN][OUT] 返回给调用者有关相机各种类型的信息结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 接口里面输入需要获取的信息类型(指定MV_ALL_MATCH_INFO结构体中的nType类型),获取对应的信息(在MV_ALL_MATCH_INFO结构体中pInfo里返回)。 \n + 该接口的调用前置条件取决于所获取的信息类型,获取GigE设备的MV_MATCH_TYPE_NET_DETECT信息需在开启抓图之后调用,获取U3V设备的MV_MATCH_TYPE_USB_DETECT信息需在打开设备之后调用。 \n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Get various type of information + * @param handle [IN] Device handle + * @param pstInfo [IN][OUT] Structure pointer of various type of information + * @return Success, return #MV_OK. Failure, return error code + * @remarks Input required information type (specify nType in structure MV_ALL_MATCH_INFO) in the interface and get corresponding information (return in pInfo of structure MV_ALL_MATCH_INFO). \n + The calling precondition of this interface is determined by obtained information type. Call after enabling capture to get MV_MATCH_TYPE_NET_DETECT information of GigE device, and call after starting device to get MV_MATCH_TYPE_USB_DETECT information of USB3Vision device. \n + This API is not supported by CameraLink device. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetAllMatchInfo(IN void* handle, IN OUT MV_ALL_MATCH_INFO* pstInfo); + +/************************************************************************/ +/* 设置和获取相机参数的万能接口 */ +/* General interface for getting and setting camera parameters */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 获取Integer属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值,如获取宽度信息则为"Width" + * @param pIntValue [IN][OUT] 返回给调用者有关相机属性结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以获取int类型的指定节点的值。strKey取值可以参考XML节点参数类型列表, + * 表格里面数据类型为“IInteger”的节点值都可以通过该接口获取,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Get Integer value + * @param handle [IN] Device handle + * @param strKey [IN] Key value, for example, using "Width" to get width + * @param pIntValue [IN][OUT] Structure pointer of camera features + * @return Success, return #MV_OK. Failure, return error code + * @remarks You can call this API to get the value of camera node with integer type after connecting the device. + * For strKey value, refer to MvCameraNode. All the node values of "IInteger" in the list + * can be obtained via this API. strKey corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetIntValue(IN void* handle,IN const char* strKey,OUT MVCC_INTVALUE *pIntValue); + +/********************************************************************//** + * @~chinese + * @brief 获取Integer属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值,如获取宽度信息则为"Width" + * @param pIntValue [IN][OUT] 返回给调用者有关相机属性结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以获取int类型的指定节点的值。strKey取值可以参考XML节点参数类型列表, + * 表格里面数据类型为“IInteger”的节点值都可以通过该接口获取,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Get Integer value + * @param handle [IN] Device handle + * @param strKey [IN] Key value, for example, using "Width" to get width + * @param pIntValue [IN][OUT] Structure pointer of camera features + * @return Success, return #MV_OK. Failure, return error code + * @remarks You can call this API to get the value of camera node with integer type after connecting the device. + * For strKey value, refer to MvCameraNode. All the node values of "IInteger" in the list + * can be obtained via this API. strKey corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetIntValueEx(IN void* handle,IN const char* strKey,OUT MVCC_INTVALUE_EX *pIntValue); + +/********************************************************************//** + * @~chinese + * @brief 设置Integer型属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值,如获取宽度信息则为"Width" + * @param nValue [IN] 想要设置的相机的属性值 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以设置int类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IInteger”的节点值都可以通过该接口设置,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Set Integer value + * @param handle [IN] Device handle + * @param strKey [IN] Key value, for example, using "Width" to set width + * @param nValue [IN] Feature value to set + * @return Success, return #MV_OK. Failure, return error code + * @remarks You can call this API to set the value of camera node with integer type after connecting the device. For strKey value, refer to MvCameraNode. All the node values of "IInteger" in the list can be obtained via this API. strKey corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetIntValue(IN void* handle,IN const char* strKey,IN unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 设置Integer型属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值,如获取宽度信息则为"Width" + * @param nValue [IN] 想要设置的相机的属性值 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以设置int类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IInteger”的节点值都可以通过该接口设置,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Set Integer value + * @param handle [IN] Device handle + * @param strKey [IN] Key value, for example, using "Width" to set width + * @param nValue [IN] Feature value to set + * @return Success, return #MV_OK. Failure, return error code + * @remarks You can call this API to set the value of camera node with integer type after connecting the device. For strKey value, refer to MvCameraNode. All the node values of "IInteger" in the list can be obtained via this API. strKey corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetIntValueEx(IN void* handle,IN const char* strKey,IN int64_t nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取Enum属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值,如获取像素格式信息则为"PixelFormat" + * @param pEnumValue [IN][OUT] 返回给调用者有关相机属性结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以获取Enum类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IEnumeration”的节点值都可以通过该接口获取,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Get Enum value + * @param handle [IN] Device handle + * @param strKey [IN] Key value, for example, using "PixelFormat" to get pixel format + * @param pEnumValue [IN][OUT] Structure pointer of camera features + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to get specified Enum nodes. For value of strKey, see MvCameraNode, The node values of IEnumeration can be obtained through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetEnumValue(IN void* handle,IN const char* strKey,OUT MVCC_ENUMVALUE *pEnumValue); + +/********************************************************************//** + * @~chinese + * @brief 设置Enum型属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值,如获取像素格式信息则为"PixelFormat" + * @param nValue [IN] 想要设置的相机的属性值 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以设置Enum类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IEnumeration”的节点值都可以通过该接口设置,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Set Enum value + * @param handle [IN] Device handle + * @param strKey [IN] Key value, for example, using "PixelFormat" to set pixel format + * @param nValue [IN] Feature value to set + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to set specified Enum nodes. For value of strKey, see MvCameraNode, The node values of IEnumeration can be obtained through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetEnumValue(IN void* handle,IN const char* strKey,IN unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 设置Enum型属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值,如获取像素格式信息则为"PixelFormat" + * @param sValue [IN] 想要设置的相机的属性字符串 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以设置Enum类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IEnumeration”的节点值都可以通过该接口设置,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Set Enum value + * @param handle [IN] Device handle + * @param strKey [IN] Key value, for example, using "PixelFormat" to set pixel format + * @param sValue [IN] Feature String to set + * @return Success, return #MV_OK. Failure, return error code + * @remarks Call this API after connecting the device. All the values of nodes with IEnumeration type can be set via this API. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetEnumValueByString(IN void* handle,IN const char* strKey,IN const char* sValue); + +/********************************************************************//** + * @~chinese + * @brief 获取Float属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值 + * @param pFloatValue [IN][OUT] 返回给调用者有关相机属性结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以获取float类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IFloat”的节点值都可以通过该接口获取,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Get Float value + * @param handle [IN] Device handle + * @param strKey [IN] Key value + * @param pFloatValue [IN][OUT] Structure pointer of camera features + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to get specified float node. For detailed strKey value see: MvCameraNode. The node values of IFloat can be obtained through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetFloatValue(IN void* handle,IN const char* strKey,OUT MVCC_FLOATVALUE *pFloatValue); + +/********************************************************************//** + * @~chinese + * @brief 设置float型属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值 + * @param fValue [IN] 想要设置的相机的属性值 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以设置float类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IFloat”的节点值都可以通过该接口设置,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Set float value + * @param handle [IN] Device handle + * @param strKey [IN] Key value + * @param fValue [IN] Feature value to set + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to set specified float node. For detailed strKey value see: MvCameraNode. The node values of IFloat can be set through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetFloatValue(IN void* handle,IN const char* strKey,IN float fValue); + +/********************************************************************//** + * @~chinese + * @brief 获取Boolean属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值 + * @param pBoolValue [IN][OUT] 返回给调用者有关相机属性值 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以获取bool类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IBoolean”的节点值都可以通过该接口获取,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Get Boolean value + * @param handle [IN] Device handle + * @param strKey [IN] Key value + * @param pBoolValue [IN][OUT] Structure pointer of camera features + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to get specified bool nodes. For value of strKey, see MvCameraNode. The node values of IBoolean can be obtained through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetBoolValue(IN void* handle,IN const char* strKey,OUT bool *pBoolValue); + +/********************************************************************//** + * @~chinese + * @brief 设置Boolean型属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值 + * @param bValue [IN] 想要设置的相机的属性值 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以设置bool类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IBoolean”的节点值都可以通过该接口设置,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Set Boolean value + * @param handle [IN] Device handle + * @param strKey [IN] Key value + * @param bValue [IN] Feature value to set + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to set specified bool nodes. For value of strKey, see MvCameraNode. The node values of IBoolean can be set through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBoolValue(IN void* handle,IN const char* strKey,IN bool bValue); + +/********************************************************************//** + * @~chinese + * @brief 获取String属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值 + * @param pStringValue [IN][OUT] 返回给调用者有关相机属性结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以获取string类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IString”的节点值都可以通过该接口获取,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Get String value + * @param handle [IN] Device handle + * @param strKey [IN] Key value + * @param pStringValue [IN][OUT] Structure pointer of camera features + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to get specified string nodes. For value of strKey, see MvCameraNode. The node values of IString can be obtained through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetStringValue(IN void* handle,IN const char* strKey,OUT MVCC_STRINGVALUE *pStringValue); + +/********************************************************************//** + * @~chinese + * @brief 设置String型属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值 + * @param sValue [IN] 想要设置的相机的属性值 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以设置string类型的指定节点的值。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“IString”的节点值都可以通过该接口设置,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Set String value + * @param handle [IN] Device handle + * @param strKey [IN] Key value + * @param sValue [IN] Feature value to set + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to set specified string nodes. For value of strKey, see MvCameraNode. The node values of IString can be set through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetStringValue(IN void* handle,IN const char* strKey,IN const char * sValue); + +/********************************************************************//** + * @~chinese + * @brief 设置Command型属性值 + * @param handle [IN] 设备句柄 + * @param strKey [IN] 属性键值 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 连接设备之后调用该接口可以设置指定的Command类型节点。strKey取值可以参考XML节点参数类型列表,表格里面数据类型为“ICommand”的节点都可以通过该接口设置,strKey参数取值对应列表里面的“名称”一列。 + + * @~english + * @brief Send Command + * @param handle [IN] Device handle + * @param strKey [IN] Key value + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to set specified Command nodes. For value of strKey, see MvCameraNode. The node values of ICommand can be set through this interface, strKey value corresponds to the Name column. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetCommandValue(IN void* handle,IN const char* strKey); + +/********************************************************************//** + * @~chinese + * @brief 清除GenICam节点缓存 + * @param handle [IN] 设备句柄 + * @return 成功,返回#MV_OK;错误,返回错误码 + + * @~english + * @brief Invalidate GenICam Nodes + * @param handle [IN] Device handle + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_InvalidateNodes(IN void* handle); + + +/************************************************************************/ +/* 设备升级 和 寄存器读写 和异常、事件回调 */ +/* Device upgrade, register read and write and exception callback */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 设备本地升级 + * @param handle [IN] 设备句柄 + * @param pFilePathName [IN] 文件名 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 通过该接口可以将升级固件文件发送给设备进行升级。该接口需要等待升级固件文件成功传给设备端之后再返回,响应时间可能较长。 + + * @~english + * @brief Device Local Upgrade + * @param handle [IN] Device handle + * @param pFilePathName [IN] File name + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_LocalUpgrade(IN void* handle, const void *pFilePathName); + +/********************************************************************//** + * @~chinese + * @brief 获取升级进度 + * @param handle [IN] 设备句柄 + * @param pnProcess [OUT] 进度接收地址 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 获取升级进度百分值。 + + * @~english + * @brief Get Upgrade Progress + * @param handle [IN] Device handle + * @param pnProcess [OUT] Progress receiving address + * @return Success, return #MV_OK. Failure, return error code + * @remarks Call this API to send the upgrade firmware to the device for upgrade. This API will wait for return until the upgrade firmware is sent to the device, this response may take a long time. \n + For CameraLink device, it keeps sending upgrade firmware continuously. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetUpgradeProcess(IN void* handle, unsigned int* pnProcess); + +/********************************************************************//** + * @~chinese + * @brief 读内存 + * @param handle [IN] 设备句柄 + * @param pBuffer [IN][OUT] 作为返回值使用,保存读到的内存值(内存值是按照大端模式存储的) + * @param nAddress [IN] 待读取的内存地址,该地址可以从设备的Camera.xml文件中获取,形如xxx_RegAddr的xml节点值 + * @param nLength [IN] 待读取的内存长度 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 访问设备,读取某段寄存器的数据。 + + * @~english + * @brief Read Memory + * @param handle [IN] Device Handle + * @param pBuffer [IN][OUT] Used as a return value, save the read-in memory value ( Memory value is stored in accordance with the big end model) + * @param nAddress [IN] Memory address to be read, which can be obtained from the Camera.xml file of the device, the form xml node value of xxx_RegAddr + * @param nLength [IN] Length of the memory to be read + * @return Success, return #MV_OK. Failure, return error code + * @remarks Access device, read the data from certain register. +*************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_ReadMemory(IN void* handle , void *pBuffer, int64_t nAddress, int64_t nLength); + +/********************************************************************//** + * @~chinese + * @brief 写内存 + * @param handle [IN] 设备句柄 + * @param pBuffer [IN] 待写入的内存值(注意内存值要按照大端模式存储) + * @param nAddress [IN] 待写入的内存地址,该地址可以从设备的Camera.xml文件中获取,形如xxx_RegAddr的xml节点值 + * @param nLength [IN] 待写入的内存长度 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 访问设备,把一段数据写入某段寄存器。 + + * @~english + * @brief Write Memory + * @param handle [IN] Device Handle + * @param pBuffer [IN] Memory value to be written ( Note the memory value to be stored in accordance with the big end model) + * @param nAddress [IN] Memory address to be written, which can be obtained from the Camera.xml file of the device, the form xml node value of xxx_RegAddr + * @param nLength [IN] Length of the memory to be written + * @return Success, return #MV_OK. Failure, return error code + * @remarks Access device, write a piece of data into a certain segment of register. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_WriteMemory(IN void* handle , const void *pBuffer, int64_t nAddress, int64_t nLength); + +/********************************************************************//** + * @~chinese + * @brief 注册异常消息回调,在打开设备之后调用 + * @param handle [IN] 设备句柄 + * @param cbException [IN] 异常回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 该接口需要在MV_CC_OpenDevice打开设备之后调用。设备异常断开连接后可以在回调里面获取到异常消息,GigE设备掉线之后需要先调用MV_CC_CloseDevice接口关闭设备,再调用MV_CC_OpenDevice接口重新打开设备。 + + * @~english + * @brief Register Exception Message CallBack, call after open device + * @param handle [IN] Device handle + * @param cbException [IN] Exception Message CallBack Function Pointer + * @param pUser [IN] User defined variable + * @return Success, return #MV_OK. Failure, return error code + * @remarks Call this interface after the device is opened by MV_CC_OpenDevice. When device is exceptionally disconnected, the exception message can be obtained from callback function. For Disconnected GigE device, first call MV_CC_CloseDevice to shut device, and then call MV_CC_OpenDevice to reopen the device. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RegisterExceptionCallBack(IN void* handle, + void(__stdcall* cbException)(unsigned int nMsgType, void* pUser), void* pUser); + +/********************************************************************//** + * @~chinese + * @brief 注册全部事件回调,在打开设备之后调用 + * @param handle [IN] 设备句柄 + * @param cbEvent [IN] 事件回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 通过该接口设置事件回调,可以在回调函数里面获取采集、曝光等事件信息。 \n + 该接口不支持CameraLink设备。\n + 该接口仅在windows版本和Linux版本下支持。 + + * @~english + * @brief Register event callback, which is called after the device is opened + * @param handle [IN] Device handle + * @param cbEvent [IN] Event CallBack Function Pointer + * @param pUser [IN] User defined variable + * @return Success, return #MV_OK. Failure, return error code + * @remarks Call this API to set the event callback function to get the event information, e.g., acquisition, exposure, and so on. \n + This API is not supported by CameraLink device. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RegisterAllEventCallBack(void* handle, void(__stdcall* cbEvent)(MV_EVENT_OUT_INFO * pEventInfo, void* pUser), void* pUser); + +/********************************************************************//** + * @~chinese + * @brief 注册单个事件回调,在打开设备之后调用 + * @param handle [IN] 设备句柄 + * @param pEventName [IN] 事件名称 + * @param cbEvent [IN] 事件回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 通过该接口设置事件回调,可以在回调函数里面获取采集、曝光等事件信息。\n + 该接口不支持CameraLink设备,仅支持"设备掉线"这一种事件。 + + * @~english + * @brief Register single event callback, which is called after the device is opened + * @param handle [IN] Device handle + * @param pEventName [IN] Event name + * @param cbEvent [IN] Event CallBack Function Pointer + * @param pUser [IN] User defined variable + * @return Success, return #MV_OK. Failure, return error code + * @remarks Call this API to set the event callback function to get the event information, e.g., acquisition, exposure, and so on. \n + This API is not supported by CameraLink device . +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RegisterEventCallBackEx(void* handle, const char* pEventName, + void(__stdcall* cbEvent)(MV_EVENT_OUT_INFO * pEventInfo, void* pUser), void* pUser); + + +/************************************************************************/ +/* GigEVision 设备独有的接口 */ +/* GigEVision device specific interface */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 强制IP + * @param handle [IN] 设备句柄 + * @param nIP [IN] 设置的IP + * @param nSubNetMask [IN] 子网掩码 + * @param nDefaultGateWay [IN] 默认网关 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 强制设置相机网络参数(包括IP、子网掩码、默认网关),强制设置之后将需要重新创建设备句柄,仅GigEVision相机支持。\n + 如果设备为DHCP的状态,调用该接口强制设置相机网络参数之后设备将会重启。 + + * @~english + * @brief Force IP + * @param handle [IN] Device handle + * @param nIP [IN] IP to set + * @param nSubNetMask [IN] Subnet mask + * @param nDefaultGateWay [IN] Default gateway + * @return Success, return #MV_OK. Failure, return error code + * @remarks Force setting camera network parameter (including IP address, subnet mask, default gateway). After forced setting, device handle should be created again. This function is only supported by GigEVision camera.\n + If device is in DHCP status, after calling this API to force setting camera network parameter, the device will restart. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_ForceIpEx(IN void* handle, unsigned int nIP, unsigned int nSubNetMask, unsigned int nDefaultGateWay); + +/********************************************************************//** + * @~chinese + * @brief 配置IP方式 + * @param handle [IN] 设备句柄 + * @param nType [IN] IP类型,见MV_IP_CFG_x + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 发送命令设置相机的IP方式,如DHCP、LLA等,仅GigEVision相机支持。 + + * @~english + * @brief IP configuration method + * @param handle [IN] Device handle + * @param nType [IN] IP type, refer to MV_IP_CFG_x + * @return Success, return #MV_OK. Failure, return error code + * @remarks Send command to set camera IP mode, such as DHCP and LLA, only supported by GigEVision. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetIpConfig(IN void* handle, unsigned int nType); + +/********************************************************************//** + * @~chinese + * @brief 设置仅使用某种模式,type: MV_NET_TRANS_x,不设置时,默认优先使用driver + * @param handle [IN] 设备句柄 + * @param nType [IN] 网络传输模式,见MV_NET_TRANS_x + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 通过该接口可以设置SDK内部优先使用的网络模式,默认优先使用驱动模式,仅GigEVision相机支持。 + + * @~english + * @brief Set to use only one mode,type: MV_NET_TRANS_x. When do not set, priority is to use driver by default + * @param handle [IN] Device handle + * @param nType [IN] Net transmission mode, refer to MV_NET_TRANS_x + * @return Success, return #MV_OK. Failure, return error code + * @remarksSet SDK internal priority network mode through this interface, drive mode by default, only supported by GigEVision camera. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetNetTransMode(IN void* handle, unsigned int nType); + +/********************************************************************//** + * @~chinese + * @brief 获取网络传输信息 + * @param handle [IN] 设备句柄 + * @param pstInfo [OUT] 信息结构体 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 通过该接口可以获取网络传输相关信息,包括已接收数据大小、丢帧数量等,在MV_CC_StartGrabbing开启采集之后调用。仅GigEVision相机支持。 + + * @~english + * @brief Get net transmission information + * @param handle [IN] Device handle + * @param pstInfo [OUT] Information Structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks Get network transmission information through this API, including received data size, number of lost frames. Call this API after starting image acquiring through MV_CC_StartGrabbing. This API is supported only by GigEVision Camera. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetNetTransInfo(IN void* handle, MV_NETTRANS_INFO* pstInfo); + +/********************************************************************//** + * @~chinese + * @brief 设置GVSP取流超时时间 + * @param handle [IN] 设备句柄 + * @param nMillisec [IN] 超时时间,默认300ms,范围:>10ms + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 连接设备之后,取流动作发生前,调用该接口可以设置GVSP取流超时时间。GVSP取流超时设置过短可能造成图像异常,设置过长可能造成取流时间变长。 + + * @~english + * @brief Set GVSP streaming timeout + * @param handle [IN] Device handle + * @param nMillisec [IN] Timeout, default 300ms, range: >10ms + * @return Success, return MV_OK. Failure, return error code + * @remarks After the device is connected, and just before start streaming, + * call this interface to set GVSP streaming timeout value. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetGvspTimeout(void* handle, unsigned int nMillisec); + +/********************************************************************//** + * @~chinese + * @brief 获取GVSP取流超时时间 + * @param handle [IN] 设备句柄 + * @param pnMillisec [IN] 超时时间指针,以毫秒位单位 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口用于获取当前的GVSP取流超时时间 + + * @~english + * @brief Get GVSP streaming timeout + * @param handle [IN] Device handle + * @param pnMillisec [IN] Timeout, ms as unit + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface is used to get the current GVSP streaming timeout. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetGvspTimeout(IN void* handle, unsigned int* pnMillisec); + +/********************************************************************//** + * @~chinese + * @brief 设置GVCP命令超时时间 + * @param handle [IN] 设备句柄 + * @param nMillisec [IN] 超时时间,默认500ms,范围:0-10000ms + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 连接设备之后调用该接口可以设置GVCP命令超时时间。 + + * @~english + * @brief Set GVCP cammand timeout + * @param handle [IN] Device handle + * @param nMillisec [IN] Timeout, default 500ms, range: 0-10000ms + * @return Success, return MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to set GVCP command timeout time. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetGvcpTimeout(void* handle, unsigned int nMillisec); + +/********************************************************************//** + * @~chinese + * @brief 获取GVCP命令超时时间 + * @param handle [IN] 设备句柄 + * @param pnMillisec [OUT] 超时时间指针,以毫秒位单位 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口用于获取当前的GVCP超时时间。 + + * @~english + * @brief Get GVCP cammand timeout + * @param handle [IN] Device handle + * @param pnMillisec [OUT] Timeout, ms as unit + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface is used to get the current GVCP timeout. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetGvcpTimeout(IN void* handle, unsigned int* pnMillisec); + +/********************************************************************//** + * @~chinese + * @brief 设置重传GVCP命令次数 + * @param handle [IN] 设备句柄 + * @param nRetryGvcpTimes [IN] 重传次数,范围:0-100 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口用于在GVCP包传输异常时,增加重传的次数,在一定程度上可以避免设备掉线,范围为0-100。 + + * @~english + * @brief Set the number of retry GVCP cammand + * @param handle [IN] Device handle + * @param nRetryGvcpTimes [IN] The number of retries,rang:0-100 + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface is used to increase The Times of retransmission when GVCP packet transmission is abnormal,and to some extent, it can avoid dropping the camera, with a range of 0-100. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetRetryGvcpTimes(IN void* handle, unsigned int nRetryGvcpTimes); + +/********************************************************************//** + * @~chinese + * @brief 获取重传GVCP命令次数 + * @param handle [IN] 设备句柄 + * @param pnRetryGvcpTimes [OUT] 重传次数指针 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口用于获取当前的GVCP重传次数,默认3次。 + + * @~english + * @brief Get the number of retry GVCP cammand + * @param handle [IN] Device handle + * @param pnRetryGvcpTimes [OUT] The number of retries + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface is used to get the current number of GVCP retransmissions, which defaults to 3. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetRetryGvcpTimes(IN void* handle, unsigned int* pnRetryGvcpTimes); + +/********************************************************************//** + * @~chinese + * @brief 获取最佳的packet size,该接口目前只支持GigE设备 + * @param handle [IN] 设备句柄 + * @return 最佳packetsize + * @remarks 获取最佳的packet size,对应GigEVision设备是SCPS,对应U3V设备是每次从驱动读取的包大小,该大小即网络上传输一个包的大小。该接口需要在MV_CC_OpenDevice之后、MV_CC_StartGrabbing之前调用。 \n + 该接口不支持CameraLink设备。 + + * @~english + * @brief Get the optimal Packet Size, Only support GigE Camera + * @param handle [IN] Device handle + * @return Optimal packetsize + * @remarks To get optimized packet size, for GigEVision device is SCPS, for USB3Vision device is the size of packet read from drive each time, and it is the size of a packet transported on the network. The interface should be called after MV_CC_OpenDevice and before MV_CC_StartGrabbing. \n + This API is not supported by CameraLink device. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetOptimalPacketSize(IN void* handle); + +/********************************************************************//** + * @~chinese + * @brief 设置是否打开重发包支持,及重发包设置 + * @param handle [IN] 设备句柄 + * @param bEnable [IN] 是否支持重发包 + * @param nMaxResendPercent [IN] 最大重发比 + * @param nResendTimeout [IN] 重发超时时间 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 连接设备之后调用该接口可以设置重发包属性,仅GigEVision相机支持。 \n + 该接口仅在windows版本和Linux版本下支持。 + + * @~english + * @brief Set whethe to enable resend, and set resend + * @param handle [IN] Device handle + * @param bEnable [IN] enable resend + * @param nMaxResendPercent [IN] Max resend persent + * @param nResendTimeout [IN] Resend timeout + * @return Success, return #MV_OK. Failure, return error code + * @remarks After the device is connected, call this interface to set resend packet properties, only supported by GigEVision camera. + ************************************************************************/ +#ifndef __cplusplus +MV_CAMCTRL_API int __stdcall MV_GIGE_SetResend(void* handle, unsigned int bEnable, unsigned int nMaxResendPercent, unsigned int nResendTimeout); +#else +MV_CAMCTRL_API int __stdcall MV_GIGE_SetResend(void* handle, unsigned int bEnable, unsigned int nMaxResendPercent = 10, unsigned int nResendTimeout = 50); +#endif + + +/********************************************************************//** + * @~chinese + * @brief 设置重传命令最大尝试次数 + * @param handle [IN] 设备句柄 + * @param nRetryTimes [IN] 重传命令最大尝试次数,默认20 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口必须在MV_CC_StartGrabbing之前调用,否则返回错误码MV_E_CALLORDER。 + + * @~english + * @brief set the max resend retry times + * @param handle [IN] Device handle + * @param nRetryTimes [IN] the max times to retry resending lost packets,default 20 + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface must be called before MV_CC_StartGrabbing. Otherwise return MV_E_CALLORDER. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetResendMaxRetryTimes(void* handle, unsigned int nRetryTimes); + +/********************************************************************//** + * @~chinese + * @brief 获取重传命令最大尝试次数 + * @param handle [IN] 设备句柄 + * @param pnRetryTimes [IN] 重传命令最大尝试次数 + * @return 成功,返回MV_OK;错误,返回错误码 + + * @~english + * @brief get the max resend retry times + * @param handle [IN] Device handle + * @param pnRetryTimes [OUT] the max times to retry resending lost packets + * @return Success, return MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetResendMaxRetryTimes(void* handle, unsigned int* pnRetryTimes); + +/********************************************************************//** + * @~chinese + * @brief 设置同一重传包多次请求之间的时间间隔 + * @param handle [IN] 设备句柄 + * @param nMillisec [IN] 同一重传包多次请求之间的时间间隔,默认10ms + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口必须在MV_CC_StartGrabbing之前调用,否则返回错误码MV_E_CALLORDER。 + + * @~english + * @brief set time interval between same resend requests + * @param handle [IN] Device handle + * @param nMillisec [OUT] the time interval between same resend requests, default 10ms + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface must be called before MV_CC_StartGrabbing. Otherwise return MV_E_CALLORDER. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetResendTimeInterval(void* handle, unsigned int nMillisec); + +/********************************************************************//** + * @~chinese + * @brief 获取同一重传包多次请求之间的时间间隔 + * @param handle [IN] 设备句柄 + * @param pnMillisec [IN] 同一重传包多次请求之间的时间间隔 + * @return 成功,返回MV_OK;错误,返回错误码 + + * @~english + * @brief get time interval between same resend requests + * @param handle [IN] Device handle + * @param pnMillisec [OUT] the time interval between same resend requests + * @return Success, return MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetResendTimeInterval(void* handle, unsigned int* pnMillisec); + + +/********************************************************************//** + * @~chinese + * @brief 设置传输模式,可以为单播模式、组播模式等 + * @param handle [IN] 设备句柄 + * @param pstTransmissionType [IN] 传输模式结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 通过该接口可以设置传输模式为单播、组播等模式,仅GigEVision相机支持。 + + * @~english + * @brief Set transmission type,Unicast or Multicast + * @param handle [IN] Device handle + * @param pstTransmissionType [IN] Struct of transmission type + * @return Success, return #MV_OK. Failure, return error code + * @remarks Call this API to set the transmission mode as single cast mode and multicast mode. And this API is only valid for GigEVision camera. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetTransmissionType(void* handle, MV_TRANSMISSION_TYPE * pstTransmissionType); + +/********************************************************************//** + * @~chinese + * @brief 发出动作命令 + * @param pstActionCmdInfo [IN] 动作命令信息 + * @param pstActionCmdResults [OUT] 动作命令返回信息列表 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 仅GigEVision相机支持。 + + * @~english + * @brief Issue Action Command + * @param pstActionCmdInfo [IN] Action Command + * @param pstActionCmdResults [OUT] Action Command Result List + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API is supported only by GigEVision camera. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_IssueActionCommand(IN MV_ACTION_CMD_INFO* pstActionCmdInfo, OUT MV_ACTION_CMD_RESULT_LIST* pstActionCmdResults); + +/************************************************************************/ +/* XML解析树的生成 */ +/* XML parse tree generation */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 获取相机属性树XML + * @param handle [IN] 设备句柄 + * @param pData [OUT] XML数据接收缓存 + * @param nDataSize [IN] 接收缓存大小 + * @param pnDataLen [OUT] 实际数据大小 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 当pData为NULL或nDataSize比实际的xml文件小时,不拷贝数据,由pnDataLen返回xml文件大小;\n + 当pData为有效缓存地址,且缓存足够大时,拷贝完整数据保存在该缓存里面,并由pnDataLen返回xml文件实际大小。 + + * @~english + * @brief Get camera feature tree XML + * @param handle [IN] Device handle + * @param pData [OUT] XML data receiving buffer + * @param nDataSize [IN] Buffer size + * @param pnDataLen [OUT] Actual data length + * @return Success, return #MV_OK. Failure, return error code + * @remarks * @remarks When pData is NULL or nDataSize than the actual XML file hours, do not copy the data, returned by pnDataLen XML file size.\n + When pData is a valid cache address and the cache is large enough, copy the full data into the cache, and pnDataLen returns the actual size of the XML file. + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_XML_GetGenICamXML(IN void* handle, IN OUT unsigned char* pData, IN unsigned int nDataSize, OUT unsigned int* pnDataLen); + +/************************************************************************/ +/* 附加接口 */ +/* Additional interface */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 保存图片,支持Bmp和Jpeg.编码质量在50-99之前 + * @param handle [IN] 设备句柄 + * @param pSaveParam [IN][OUT] 保存图片参数结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 通过将接口可以将从设备采集到的原始图像数据转换成JPEG或者BMP等格式并存放在指定内存中,然后用户可以将转换之后的数据直接保存成图片文件。该接口调用无接口顺序要求,有图像源数据就可以进行转换,可以先调用MV_CC_GetOneFrameTimeout或者MV_CC_RegisterImageCallBackEx设置回调函数,获取一帧图像数据,然后再通过该接口转换格式。 \n + MV_CC_SaveImageEx2比MV_CC_SaveImageEx增加参数handle,为了保证与其他接口的统一。\n + 该接口仅在windows版本和Linux版本下支持。 + + * @~english + * @brief Save image, support Bmp and Jpeg. Encoding quality(50-99] + * @param handle [IN] Device handle + * @param pSaveParam [IN][OUT] Save image parameters structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks Once there is image data, you can call this API to convert the data. \n + You can also call MV_CC_GetOneFrameTimeout or MV_CC_RegisterImageCallBackEx or MV_CC_GetImageBuffer to get one image frame and set the callback function, and then call this API to convert the format. \n + Comparing with the API MV_CC_SaveImageEx, this API added the parameter handle to ensure the unity with other API. + + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SaveImageEx2(IN void* handle, MV_SAVE_IMAGE_PARAM_EX* pSaveParam); + + +/********************************************************************//** + * @~chinese + * @brief 图像旋转 + * @param handle [IN] 设备句柄 + * @param pstRotateParam [IN][OUT] 图像旋转参数结构体 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口只支持MONO8/RGB24/BGR24格式数据的90/180/270度旋转。 + + * @~english + * @brief Rotate Image + * @param handle [IN] Device handle + * @param pstRotateParam [IN][OUT] Rotate image parameter structure + * @return Success, return MV_OK. Failure, return error code + * @remarks This API only support 90/180/270 rotation of data in the MONO8/RGB24/BGR24 format. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RotateImage(IN void* handle, IN OUT MV_CC_ROTATE_IMAGE_PARAM* pstRotateParam); + +/********************************************************************//** + * @~chinese + * @brief 图像翻转 + * @param handle [IN] 设备句柄 + * @param pstFlipParam [IN][OUT] 图像翻转参数结构体 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 该接口只支持MONO8/RGB24/BGR24格式数据的垂直和水平翻转。 + + * @~english + * @brief Flip Image + * @param handle [IN] Device handle + * @param pstFlipParam [IN][OUT] Flip image parameter structure + * @return Success, return MV_OK. Failure, return error code + * @remarks This API only support vertical and horizontal reverse of data in the MONO8/RGB24/BGR24 format. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_FlipImage(IN void* handle, IN OUT MV_CC_FLIP_IMAGE_PARAM* pstFlipParam); + +/********************************************************************//** + * @~chinese + * @brief 像素格式转换 + * @param handle [IN] 设备句柄 + * @param pstCvtParam [IN][OUT] 像素格式转换参数结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 通过将接口可以将从设备采集到的原始图像数据转换成用户所需的像素格式并存放在指定内存中。该接口调用无接口顺序要求,有图像源数据就可以进行转换,可以先调用MV_CC_GetOneFrameTimeout或者MV_CC_RegisterImageCallBack设置回调函数,获取一帧图像数据,然后再通过该接口转换格式。如果相机当前采集图像是JPEG压缩的格式,则不支持调用该接口进行显示。 \n + 该接口仅在windows版本和Linux版本下支持。 + + * @~english + * @brief Pixel format conversion + * @param handle [IN] Device handle + * @param pstCvtParam [IN][OUT] Convert Pixel Type parameter structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API is used to transform the collected original data to pixel format and save to specified memory. There is no order requirement to call this API, the transformation will execute when there is image data. First call MV_CC_GetOneFrameTimeout or MV_CC_RegisterImageCallBackEx to set callback function, and get a frame of image data, then call this API to transform the format. \n + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_ConvertPixelType(IN void* handle, IN OUT MV_CC_PIXEL_CONVERT_PARAM* pstCvtParam); + +/********************************************************************//** + * @~chinese + * @brief 插值算法类型设置 + * @param handle [IN] 设备句柄 + * @param BayerCvtQuality [IN] Bayer的插值方法 0-最近邻 1-双线性 2-Hamilton + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks 设置内部图像转换接口的贝尔插值质量参数,MV_CC_ConvertPixelType、MV_CC_SaveImageEx2接口内部使用的插值算法是该接口所设定的。 + + * @~english + * @brief Interpolation algorithm type setting + * @param handle [IN] Device handle + * @param BayerCvtQuality [IN] Bayer interpolation method 0-nearest neighbour 1-bilinearity 2-Hamilton + * @return Success, return #MV_OK. Failure, return error code + * @remarks Set the bell interpolation quality parameters of the internal image conversion interface, and the interpolation algorithm used in the MV CC ConvertPixelType and MV CC SaveImageEx2 interfaces is set by this interface. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBayerCvtQuality(IN void* handle, IN unsigned int BayerCvtQuality); + +/********************************************************************//** + * @~chinese + * @brief 设置Bayer格式的Gamma信息 + * @param handle [IN] 设备句柄 + * @param pstGammaParam [IN] Gamma信息 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 设置该信息后,在调用MV_CC_ConvertPixelType、MV_CC_SaveImageEx2接口将Bayer8/10/12/16格式转成RGB24/48, RGBA32/64,BGR24/48,BGRA32/64时起效。 + + * @~english + * @brief Set Gamma param + * @param handle [IN] Device handle + * @param pstGammaParam [IN] Gamma param + * @return Success, return MV_OK. Failure, return error code + * @remarks After setting the param, it work in the calling MV_CC_ConvertPixelType\MV_CC_SaveImageEx2 API convert Bayer8/10/12/16 to RGB24/48, RGBA32/64,BGR24/48,BGRA32/64. + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBayerGammaParam(IN void* handle, IN MV_CC_GAMMA_PARAM* pstGammaParam); + + +/********************************************************************//** + * @~chinese + * @brief 无损解码 + * @param handle [IN] 设备句柄 + * @param pstDecodeParam [IN][OUT] 无损解码参数结构体 + * @return 成功,返回MV_OK;错误,返回错误码 + * @remarks 将从相机中取到的无损压缩码流解码成裸数据,同时支持解析当前相机实时图像的水印信息(如果输入的无损码流不是当前相机或者不是实时取流的,则水印解析可能异常) + + * @~english + * @brief High Bandwidth Decode + * @param handle [IN] Device handle + * @param pstDecodeParam [IN][OUT] High Bandwidth Decode parameter structure + * @return Success, return MV_OK. Failure, return error code + * @remarks Decode the lossless compressed data from the camera into raw data + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_HB_Decode(IN void* handle, IN OUT MV_CC_HB_DECODE_PARAM* pstDecodeParam); + +/********************************************************************//** + * @~chinese + * @brief 保存相机属性 + * @param handle [IN] 设备句柄 + * @param pFileName [IN] 属性文件名 + * @return 成功,返回#MV_OK;错误,返回错误码 + + * @~english + * @brief Save camera feature + * @param handle [IN] Device handle + * @param pFileName [IN] File name + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_FeatureSave(IN void* handle, IN const char* pFileName); + +/********************************************************************//** + * @~chinese + * @brief 导入相机属性 + * @param handle [IN] 设备句柄 + * @param pFileName [IN] 属性文件名 + * @return 成功,返回#MV_OK;错误,返回错误码 + + * @~english + * @brief Load camera feature + * @param handle [IN] Device handle + * @param pFileName [IN] File name + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_FeatureLoad(IN void* handle, IN const char* pFileName); + +/********************************************************************//** + * @~chinese + * @brief 从相机读取文件 + * @param handle [IN] 设备句柄 + * @param pstFileAccess [IN] 文件存取结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + + * @~english + * @brief Read the file from the camera + * @param handle [IN] Device handle + * @param pstFileAccess [IN] File access structure + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_FileAccessRead(IN void* handle, IN MV_CC_FILE_ACCESS * pstFileAccess); + +/********************************************************************//** + * @~chinese + * @brief 将文件写入相机 + * @param handle [IN] 设备句柄 + * @param pstFileAccess [IN] 文件存取结构体 + * @return 成功,返回#MV_OK ;错误,返回错误码 + + * @~english + * @brief Write the file to camera + * @param handle [IN] Device handle + * @param pstFileAccess [IN] File access structure + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_FileAccessWrite(IN void* handle, IN MV_CC_FILE_ACCESS * pstFileAccess); + +/********************************************************************//** + * @~chinese + * @brief 获取文件存取的进度 + * @param handle [IN] 设备句柄 + * @param pstFileAccessProgress [IN] 进度内容 + * @return 成功,返回#MV_OK ;错误,返回错误码 (当前文件存取的状态) + + * @~english + * @brief Get File Access Progress + * @param handle [IN] Device handle + * @param pstFileAccessProgress [IN] File access Progress + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetFileAccessProgress(IN void* handle, OUT MV_CC_FILE_ACCESS_PROGRESS * pstFileAccessProgress); + +/********************************************************************//** + * @~chinese + * @brief 开始录像 + * @param handle [IN] 设备句柄 + * @param pstRecordParam [IN] 录像参数结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + + * @~english + * @brief Start Record + * @param handle [IN] Device handle + * @param pstRecordParam [IN] Record param structure + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_StartRecord(IN void* handle, IN MV_CC_RECORD_PARAM* pstRecordParam); + +/********************************************************************//** + * @~chinese + * @brief 输入录像数据 + * @param handle [IN] 设备句柄 + * @param pstInputFrameInfo [IN] 录像数据结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + + * @~english + * @brief Input RAW data to Record + * @param handle [IN] Device handle + * @param pstInputFrameInfo [IN] Record data structure + * @return Success, return #MV_OK. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_InputOneFrame(IN void* handle, IN MV_CC_INPUT_FRAME_INFO * pstInputFrameInfo); + +/********************************************************************//** + * @~chinese + * @brief 停止录像 + * @param handle [IN] 设备句柄 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Stop Record + * @param handle [IN] Device handle + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_StopRecord(IN void* handle); + + + +/************************************************************************/ +/* 不建议使用的接口 */ +/* Interfaces not recommended */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 获取图像基本信息 + * @param handle [IN] 相机句柄 + * @param pstInfo [IN][OUT] 返回给调用者有关相机图像基本信息结构体指针 + * @return 成功,返回 #MV_OK ,失败,返回错误码 + * @remarks 参考 CameraParams.h 中的 #MV_IMAGE_BASIC_INFO 定义 + + * @~english + * @brief Get basic information of image + * @param handle [IN] Handle + * @param pstInfo [IN][OUT] Structure pointer of image basic information + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to the definition of #MV_IMAGE_BASIC_INFO in CameraParams.h + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetImageInfo(IN void* handle, IN OUT MV_IMAGE_BASIC_INFO* pstInfo); + +/********************************************************************//** + * @~chinese + * @brief 获取GenICam代理 + * @param handle [IN] 句柄地址 + * @return GenICam代理类指针 ,正常返回值非NULL;异常返回NULL + + * @~english + * @brief Get GenICam proxy + * @param handle [IN] Handle address + * @return GenICam proxy pointer, normal, return non-NULL; exception, return NULL + ************************************************************************/ +MV_CAMCTRL_API void* __stdcall MV_CC_GetTlProxy(IN void* handle); + +/********************************************************************//** + * @~chinese + * @brief 获取根节点 + * @param handle [IN] 句柄 + * @param pstNode [OUT] 根节点信息结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Get root node + * @param handle [IN] Handle + * @param pstNode [OUT] Root node information structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_XML_GetRootNode(IN void* handle, IN OUT MV_XML_NODE_FEATURE* pstNode); + +/********************************************************************//** + * @~chinese + * @brief 从xml中获取指定节点的所有子节点,根节点为Root + * @param handle [IN] 句柄 + * @param pstNode [IN] 根节点信息结构体 + * @param pstNodesList [OUT] 节点列表结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Get all children node of specific node from xml, root node is Root + * @param handle [IN] Handle + * @param pstNode [IN] Root node information structure + * @param pstNodesList [OUT] Node information structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_XML_GetChildren(IN void* handle, IN MV_XML_NODE_FEATURE* pstNode, IN OUT MV_XML_NODES_LIST* pstNodesList); + +/********************************************************************//** + * @~chinese + * @brief 获得当前节点的属性 + * @param handle [IN] 句柄 + * @param pstNode [IN] 根节点信息结构体 + * @param pstFeature [OUT] 当前节点属性结构体, + pstFeature 具体结构体内容参考 MV_XML_FEATURE_x + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Get current node feature + * @param handle [IN] Handle + * @param pstNode [IN] Root node information structure + * @param pstFeature [OUT] Current node feature structure + Details of pstFeature refer to MV_XML_FEATURE_x + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_XML_GetNodeFeature(IN void* handle, IN MV_XML_NODE_FEATURE* pstNode, IN OUT void* pstFeature); + +/********************************************************************//** + * @~chinese + * @brief 更新节点 + * @param handle [IN] 句柄 + * @param enType [IN] 节点类型 + * @param pstFeature [OUT] 当前节点属性结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Update node + * @param handle [IN] Handle + * @param enType [IN] Node type + * @param pstFeature [OUT] Current node feature structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_XML_UpdateNodeFeature(IN void* handle, IN enum MV_XML_InterfaceType enType, IN void* pstFeature); + +// 有节点需要更新时的回调函数 +// 当调用MV_XML_UpdateNodeFeature接口更新节点属性时,注册的回调函数cbUpdate会在pstNodesList中返回与之相关联的节点 +/********************************************************************//** + * @~chinese + * @fn MV_XML_RegisterUpdateCallBack + * @brief 注册更新回调 + * @param handle [IN] 句柄 + * @param cbUpdate [IN] 回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Register update callback + * @param handle [IN] Handle + * @param cbUpdate [IN] Callback function pointer + * @param pUser [IN] User defined variable + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_XML_RegisterUpdateCallBack(IN void* handle, + IN void(__stdcall* cbUpdate)(enum MV_XML_InterfaceType enType, void* pstFeature, MV_XML_NODES_LIST* pstNodesList, void* pUser), + IN void* pUser); + + +/************************************************************************/ +/* 弃用的接口 */ +/* Abandoned interface */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 获取一帧图像,此函数为查询式获取,每次调用查询内部缓存有 + 无数据,有数据则范围数据,无数据返回错误码 + (该接口已弃用,建议改用 MV_CC_GetOneFrameTimeOut接口) + * @param handle [IN] 句柄 + * @param pData [OUT] 图像数据接收指针 + * @param nDataSize [IN] 接收缓存大小 + * @param pFrameInfo [OUT] 图像信息结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Get one frame data, this function is using query to get data, + query whether the internal cache has data, return data if there has, return error code if no data + (This interface is abandoned, it is recommended to use the MV_CC_GetOneFrameTimeOut) + * @param handle [IN] Handle + * @param pData [OUT] Recevied image data pointer + * @param nDataSize [IN] Recevied buffer size + * @param pFrameInfo [OUT] Image information structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetOneFrame(IN void* handle, IN OUT unsigned char * pData , IN unsigned int nDataSize, IN OUT MV_FRAME_OUT_INFO* pFrameInfo); + +/********************************************************************//** + * @~chinese + * @brief 获取一帧trunck数据,此函数为查询式获取,每次调用查询内部 + 缓存有无数据,有数据则范围数据,无数据返回错误码 + (该接口已弃用,建议改用 MV_CC_GetOneFrameTimeOut接口) + * @param handle [IN] 句柄 + * @param pData [OUT] 图像数据接收指针 + * @param nDataSize [IN] 接收缓存大小 + * @param pFrameInfo [OUT] 图像信息结构体 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Get one frame of trunck data, this function is using query to get data, + query whether the internal cache has data, return data if there has, return error code if no data + (This interface is abandoned, it is recommended to use the MV_CC_GetOneFrameTimeOut) + * @param handle [IN] Handle + * @param pData [OUT] Recevied image data pointer + * @param nDataSize [IN] Recevied buffer size + * @param pFrameInfo [OUT] Image information structure + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetOneFrameEx(IN void* handle, IN OUT unsigned char * pData , IN unsigned int nDataSize, IN OUT MV_FRAME_OUT_INFO_EX* pFrameInfo); + +/********************************************************************//** + * @~chinese + * @brief 注册图像数据回调(该接口已弃用,建议改用 MV_CC_RegisterImageCallBackEx接口) + * @param handle [IN] 句柄 + * @param cbOutput [IN] 回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Register image data callback (This interface is abandoned, it is recommended to use the MV_CC_RegisterImageCallBackEx) + * @param handle [IN] Handle + * @param cbOutput [IN] Callback function pointer + * @param pUser [IN] User defined variable + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ***********************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RegisterImageCallBack(void* handle, + void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO* pFrameInfo, void* pUser), + void* pUser); + +/********************************************************************//** + * @~chinese + * @brief 保存图片(该接口已弃用,建议改用 MV_CC_SaveImageEx2接口) + * @param pSaveParam [IN][OUT] 保存图片参数结构体 + - pData; // [IN] 输入数据缓存 + - nDataLen; // [IN] 输入数据大小 + - enPixelType; // [IN] 输入数据的像素格式 + - nWidth; // [IN] 图像宽 + - nHeight; // [IN] 图像高 + - pImageBuffer; // [OUT] 输出图片缓存 + - nImageLen; // [OUT] 输出图片大小 + - nBufferSize; // [IN] 提供的输出缓冲区大小 + - enImageType; // [IN] 输出图片格式 + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Save image (This interface is abandoned, it is recommended to use the MV_CC_SaveImageEx2) + * @param pSaveParam [IN][OUT] Save image parameters structure + - pData; // [IN] Input data buffer + - nDataLen; // [IN] Input data size + - enPixelType; // [IN] Input data pixel format + - nWidth; // [IN] Width + - nHeight; // [IN] Height + - pImageBuffer; // [OUT] Output image buffer + - nImageLen; // [OUT] Output image size + - nBufferSize; // [IN] Provided output buffer size + - enImageType; // [IN] Output image type + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SaveImage(IN OUT MV_SAVE_IMAGE_PARAM* pSaveParam); + +/********************************************************************//** + * @~chinese + * @brief 保存图片,支持Bmp和Jpeg.编码质量在50-99之前 (该接口已弃用,建议改用 MV_CC_SaveImageEx2接口) + * @param pSaveParam [IN][OUT] 保存图片参数结构体 + pData; // [IN] 输入数据缓存 + nDataLen; // [IN] 输入数据大小 + enPixelType; // [IN] 输入数据的像素格式 + nWidth; // [IN] 图像宽 + nHeight; // [IN] 图像高 + pImageBuffer; // [OUT] 输出图片缓存 + nImageLen; // [OUT] 输出图片大小 + nBufferSize; // [IN] 提供的输出缓冲区大小 + enImageType; // [IN] 输出图片格式 + nJpgQuality; // [IN] 编码质量, (50-99] + nReserved[4]; + * @return 成功,返回#MV_OK;错误,返回错误码 + * @remarks + + * @~english + * @brief Save image, support Bmp and Jpeg. Encoding quality, (50-99] + * @param pSaveParam [IN][OUT] Save image parameters structure + pData; // [IN] Input data buffer + nDataLen; // [IN] Input data size + enPixelType; // [IN] Pixel format of input data + nWidth; // [IN] Image width + nHeight; // [IN] Image height + pImageBuffer; // [OUT] Output image buffer + nImageLen; // [OUT] Output image size + nBufferSize; // [IN] Output buffer size provided + enImageType; // [IN] Output image format + nJpgQuality; // [IN] Encoding quality, (50-99] + nReserved[4]; + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SaveImageEx(IN OUT MV_SAVE_IMAGE_PARAM_EX* pSaveParam); + +/********************************************************************//** + * @~chinese + * @brief 强制IP(该接口已弃用,建议改用 MV_GIGE_ForceIpEx接口) + * @param handle [IN] 设备句柄 + * @param nIP [IN] 设置的IP + * @return 见返回错误码 + * @remarks + + * @~english + * @brief Force IP (This interface is abandoned, it is recommended to use the MV_GIGE_ForceIpEx) + * @param handle [IN] Handle + * @param nIP [IN] IP to set + * @return Refer to error code + * @remarks +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_ForceIp(IN void* handle, unsigned int nIP); + +/********************************************************************//** + * @~chinese + * @brief 注册事件回调(该接口已弃用,建议改用 MV_CC_RegisterEventCallBackEx接口) + * @param handle [IN] 设备句柄 + * @param cbEvent [IN] 事件回调函数指针 + * @param pUser [IN] 用户自定义变量 + * @return 见返回错误码 + * @remarks + + * @~english + * @brief Register event callback (this interface has been deprecated and is recommended to be converted to the MV_CC_RegisterEventCallBackEx interface) + * @param handle [IN] Handle + * @param cbEvent [IN] event callback pointer + * @param pUser [IN] User defined value + * @return Refer to error code + * @remarks +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_RegisterEventCallBack(void* handle, + void(__stdcall* cbEvent)(unsigned int nExternalEventId, void* pUser), + void* pUser); + + +/************************************************************************/ +/* 相机参数获取和设置,此模块的所有接口,将逐步废弃,建议用万能接口代替 */ +/* Get and set camara parameters, all interfaces of this module will be replaced by general interface*/ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 获取图像宽度 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机宽度的信息结构体指针 + * 返回的pstValue结构体的意义 + * - unsigned int nCurValue; // 代表相机当前的宽度值 + * - unsigned int nMax; // 表示相机允许的最大可设置的宽度值 + * - unsigned int nMin; // 表示相机允许的最小可设置的宽度值 + * - unsigned int nInc; // 表示相机设置的宽度增量必须是nInc的倍数,否则无效 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 其他整型结构体参数的接口可参照此接口 + + * @~english + * @brief Get image width + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Returns the information structure pointer about the camera's width for the caller + * The meaning of returns pstValue structure + * - unsigned int nCurValue; // Represents the current width value of the camera + * - unsigned int nMax; // Indicates the maximum settable width value allowed by the camera + * - unsigned int nMin; // Indicates the minimum settable width value allowed by the camera + * - unsigned int nInc; // Indicates that the width increment set by the camera must be a multiple of nInc, otherwise it is invalid + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Other Integer structure parameters interface can refer to this interface + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetWidth(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置图像宽度 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的相机宽度的值,注意此宽度值必须是MV_CC_GetWidth接口返回的pstValue中的nInc的倍数才能设置成功 + * @return 成功,返回#MV_OK,并且相机宽度将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set image width + * @param handle [IN] Camera Handle + * @param nValue [IN] To set the value of the camera width, note that the width value must be a multiple of nInc in the pstValue returned by the MV_CC_GetWidth interface + * @return Success, return #MV_OK, and the camera width will change to the corresponding value. Failure, return error code + * @remarks +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetWidth(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取图像高度 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机高度的信息结构体指针 + * @return 成功,返回#MV_OK,并将高度信息返回到结构体中,失败,返回错误码 + * @remarks 可参照接口#MV_CC_GetWidth + + * @~english + * @brief Get image height + * @param handle [IN] Camera handle + * @param pstValue [IN][OUT] Return pointer of information structure related to camera height to user + * @return Success, return #MV_OK, and return height information to the structure. Failure, return error code + * @remarks Refer to #MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetHeight(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置图像高度 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的相机宽度的值,注意此宽度值必须是MV_CC_GetWidth接口返回的pstValue中的nInc的倍数才能设置成功 + * @return 成功,返回#MV_OK,并且相机高度将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set image height + * @param handle [IN] Camera Handle + * @param nValue [IN] Camera height value to set, note that this value must be times of nInc of pstValue returned by MV_CC_GetWidth + * @return Success, return #MV_OK, and the camera height will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetHeight(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取图像X偏移 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机X偏移的信息结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口#MV_CC_GetWidth + + * @~english + * @brief Get image X offset + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Return pointer of information structure related to camera X offset to user + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to #MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetAOIoffsetX(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置图像AOI偏移 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的相机AOI的值 + * @return 成功,返回#MV_OK,并且相机AOI偏移将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set image X offset + * @param handle [IN] Camera Handle + * @param nValue [IN] Camera X offset value to set + * @return Success, return #MV_OK, and the camera X offset will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetAOIoffsetX(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取图像Y偏移 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机Y偏移的信息结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口#MV_CC_GetWidth + + * @~english + * @brief Get image Y offset + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Return pointer of information structure related to camera Y offset to user + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to #MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetAOIoffsetY(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置图像AOI偏移 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的相机AOI的值 + * @return 成功,返回#MV_OK,并且相机AOI偏移将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set image Y offset + * @param handle [IN] Camera Handle + * @param nValue [IN] Camera Y offset value to set + * @return Success, return #MV_OK, and the camera Y offset will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetAOIoffsetY(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取曝光下限 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机曝光值下限结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口#MV_CC_GetWidth + + * @~english + * @brief Get exposure lower limit + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Return pointer of information structure related to camera exposure lower to user + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to #MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetAutoExposureTimeLower(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置曝光值下限 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的曝光值下限 + * @return 成功,返回#MV_OK,并且相机曝光下限将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set exposure lower limit + * @param handle [IN] Camera Handle + * @param nValue [IN] Exposure lower to set + * @return Success, return #MV_OK, and the camera exposure time lower limit value will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetAutoExposureTimeLower(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取曝光上限 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机曝光值上限结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口#MV_CC_GetWidth + + * @~english + * @brief Get exposure upper limit + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Return pointer of information structure related to camera exposure upper to user + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to #MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetAutoExposureTimeUpper(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置曝光值上限 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的曝光值上限 + * @return 成功,返回#MV_OK,并且相机曝光上限将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set exposure upper limit + * @param handle [IN] Camera Handle + * @param nValue [IN] Exposure upper to set + * @return Success, return #MV_OK, and the camera exposure time upper limit value will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetAutoExposureTimeUpper(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取亮度值 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机亮度结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口#MV_CC_GetWidth + + * @~english + * @brief Get brightness + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Return pointer of information structure related to camera brightness to user + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to #MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetBrightness(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置亮度值 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的亮度值 + * @return 成功,返回#MV_OK,并且相机亮度将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set brightness + * @param handle [IN] Camera Handle + * @param nValue [IN] Brightness upper to set + * @return Success, return #MV_OK, and the camera brightness value will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBrightness(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取帧率 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机帧率的信息结构体指针 + * 返回的pstValue结构体的意义 + * - float fCurValue; // 表示相机当前的帧率 + * - float fMax; // 表示相机允许设置的最大帧率 + * - float fMin; // 表示相机允许设置的最小帧率 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 其他浮点型结构体参数的接口可参照此接口 + + * @~english + * @brief Get Frame Rate + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Return pointer of information structure related to camera frame rate to user + * The meaning of returns pstValue structure + * - float fCurValue; // Indicates the current frame rate of the camera + * - float fMax; // Indicates the maximum frame rate allowed by the camera + * - float fMin; // Indicates the minimum frame rate allowed by the camera + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Other interface of Float structure parameters can refer to this interface + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetFrameRate(IN void* handle, IN OUT MVCC_FLOATVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置帧率 + * @param handle [IN] 相机句柄 + * @param fValue [IN] 想要设置的相机帧率 + * @return 成功,返回#MV_OK,并且相机帧率将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set frame rate + * @param handle [IN] Camera Handle + * @param fValue [IN] Camera frame rate to set + * @return Success, return #MV_OK, and camera frame rate will be changed to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetFrameRate(IN void* handle, IN const float fValue); + +/********************************************************************//** + * @~chinese + * @brief 获取增益 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机增益的信息结构体指针 + * 返回的pstValue结构体的意义 + * - float fCurValue; // 表示相机当前的帧率 + * - float fMax; // 表示相机允许设置的最大帧率 + * - float fMin; // 表示相机允许设置的最小帧率 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 其他浮点型结构体参数的接口可参照此接口 + + * @~english + * @brief Get Gain + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Return pointer of information structure related to gain to user + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * - float fCurValue; // Camera current gain + * - float fMax; // The maximum gain camera allowed + * - float fMin; // The minimum gain camera allowed + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Other interface of Float structure parameters can refer to this interface + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetGain(IN void* handle, IN OUT MVCC_FLOATVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置帧率 + * @param handle [IN] 相机句柄 + * @param fValue [IN] 想要设置的相机帧率 + * @return 成功,返回#MV_OK,并且相机帧率将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set Gain + * @param handle [IN] Camera Handle + * @param fValue [IN] Gain value to set + * @return Success, return #MV_OK, and the camera gain value will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetGain(IN void* handle, IN const float fValue); + +/********************************************************************//** + * @~chinese + * @brief 获取曝光时间 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机曝光时间的信息结构体指针 + * 返回的pstValue结构体的意义 + * - float fCurValue; // 表示相机当前的帧率 + * - float fMax; // 表示相机允许设置的最大帧率 + * - float fMin; // 表示相机允许设置的最小帧率 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 其他浮点型结构体参数的接口可参照此接口 + + * @~english + * @brief Get exposure time + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Return pointer of information structure related to exposure time to user + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * - float fCurValue; // Camera current exposure time + * - float fMax; // The maximum exposure time camera allowed + * - float fMin; // The minimum exposure time camera allowed + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Other interface of Float structure parameters can refer to this interface + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetExposureTime(IN void* handle, IN OUT MVCC_FLOATVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置曝光时间 + * @param handle [IN] 相机句柄 + * @param fValue [IN] 想要设置的相机帧率 + * @return 成功,返回#MV_OK,并且相机帧率将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set exposure time + * @param handle [IN] Camera Handle + * @param fValue [IN] Exposure time to set + * @return Success, return #MV_OK, and the camera exposure time value will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetExposureTime(IN void* handle, IN const float fValue); + +/********************************************************************//** + * @~chinese + * @brief 获取像素格式 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者的有关像素格式的信息结构体指针 \n + * 返回的pstValue结构体的意义 + * - unsigned int nCurValue; // 相机当前的像素格式,是枚举类型,比如说PixelType_Gvsp_Mono8, 这里获得的是其整型值,具体数值参照PixelType.h的MvGvspPixelType枚举类型 + * - unsigned int nSupportedNum; // 相机支持的像素格式的个数 + * - unsigned int nSupportValue[MV_MAX_XML_SYMBOLIC_NUM]; // 相机所有支持的像素格式对应的整型值列表,后面要设置像素格式时,参数必须是这个数组中的一种,否则无效 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 其他枚举类型参数接口可参照此接口,有关相应参数的枚举类型对应的整型值请查找PixelType.h 和 CameraParams.h中相应的定义 + + * @~english + * @brief Get Pixel Format + * @param handle [IN] Camera Handle + * @param pstValue [IN][OUT] Returns the information structure pointer about pixel format for the caller \n + * The meaning of returns pstValue structure + * - unsigned int nCurValue; // The current pixel format of the camera, is the enumeration type, such as #PixelType_Gvsp_Mono8, here is the integer value, the specific value please refer to MvGvspPixelType enumeration type in PixelType.h + * - unsigned int nSupportedNum; // Number of pixel formats supported by the camera + * - unsigned int nSupportValue[MV_MAX_XML_SYMBOLIC_NUM]; // The integer values list correspond to all supported pixel formats of the camera, followed by when set the pixel format, the parameter must be one of this list, otherwise invalid + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Other interface of Enumeration structure parameters can refer to this interface, look for the corresponding definition in PixelType.h and CameraParams.h for the integer values of the enum type parameter + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetPixelFormat(IN void* handle, IN OUT MVCC_ENUMVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置像素格式 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 要设置的像素格式对应的整型值,调用此接口时可以直接填写枚举值,如#MV_CC_SetPixelFormat(m_handle, #PixelType_Gvsp_RGB8_Packed); + * @return 成功,返回#MV_OK,并且相机像素格式将会更改为相应值,失败,返回错误码 + * @remarks 要设置的枚举类型必须是Get接口返回的nSupportValue[MV_MAX_XML_SYMBOLIC_NUM]中的一种,否则会失败 + + * @~english + * @brief Set Pixel Format + * @param handle [IN] Camera Handle + * @param nValue [IN] The corresponding integer value for pixel format to be set, when calling this interface can be directly filled in enumeration values, such as MV_CC_SetPixelFormat(m_handle, PixelType_Gvsp_RGB8_Packed); + * @return Success, return #MV_OK, and the camera pixel format will change to the corresponding value. Failure, return error code + * @remarks Other interface of Enumeration structure parameters can refer to this interface, the enumeration type to be set must be one of the nSupportValue [#MV_MAX_XML_SYMBOLIC_NUM] returned by the Get interface, otherwise it will fail + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetPixelFormat(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取采集模式 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者的有关采集模式的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口#MV_CC_GetPixelFormat,参考 CameraParams.h 中的#MV_CAM_ACQUISITION_MODE 定义 + + * @~english + * @brief Get acquisition mode + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of acquisition mode + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to #MV_CC_GetPixelFormat and definition of #MV_CAM_ACQUISITION_MODE in CameraParams.h + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetAcquisitionMode(IN void* handle, IN OUT MVCC_ENUMVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置像素格式 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 要设置的采集模式对应的整型值 + * @return 成功,返回#MV_OK,并且相机采集模式将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set acquisition mode + * @param handle [IN] Handle + * @param nValue [IN] Integer value to set corresponding to acquisition mode + * @return Success, return #MV_OK, and the camera acquisition mode will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetAcquisitionMode(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取增益模式 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者的有关增益模式的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口#MV_CC_GetPixelFormat,参考 CameraParams.h 中的 MV_CAM_GAIN_MODE 定义 + + * @~english + * @brief Get gain mode + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of gain mode + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to #MV_CC_GetPixelFormat and definition of #MV_CAM_GAIN_MODE in CameraParams.h + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetGainMode(IN void* handle, IN OUT MVCC_ENUMVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置增益模式 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 要设置的增益模式对应的整型值 + * @return 成功,返回#MV_OK,并且相机增益模式将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set gain mode + * @param handle [IN] Handle + * @param nValue [IN] Integer value to set corresponding to gain mode + * @return Success, return #MV_OK, and the camera gain mode will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetGainMode(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取自动曝光模式 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者的有关自动曝光模式的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口#MV_CC_GetPixelFormat,参考 CameraParams.h 中的#MV_CAM_EXPOSURE_AUTO_MODE 定义 + + * @~english + * @brief Get auto exposure mode + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of auto exposure mode + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to #MV_CC_GetPixelFormat and definition of #MV_CAM_EXPOSURE_AUTO_MODE in CameraParams.h + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetExposureAutoMode(IN void* handle, IN OUT MVCC_ENUMVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置自动曝光模式 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 要设置的自动曝光模式对应的整型值 + * @return 成功,返回#MV_OK,并且相机自动曝光模式将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set auto exposure mode + * @param handle [IN] Handle + * @param nValue [IN] Integer value to set corresponding to auto exposure mode + * @return Success, return #MV_OK, and the camera auto exposure mode will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetExposureAutoMode(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取触发模式 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者的有关触发模式的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口#MV_CC_GetPixelFormat,参考 CameraParams.h 中的#MV_CAM_TRIGGER_MODE 定义 + + * @~english + * @brief Get trigger mode + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of trigger mode + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to #MV_CC_GetPixelFormat and definition of #MV_CAM_TRIGGER_MODE in CameraParams.h + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetTriggerMode(IN void* handle, IN OUT MVCC_ENUMVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置触发模式 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 要设置的触发模式对应的整型值 + * @return 成功,返回#MV_OK,并且相机触发模式将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set trigger mode + * @param handle [IN] Handle + * @param nValue [IN] Integer value to set corresponding to trigger mode + * @return Success, return #MV_OK, and the camera trigger mode will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetTriggerMode(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取触发延时 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机触发延时的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口MV_CC_GetFrameRate + + * @~english + * @brief Get tigger delay + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of trigger delay + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to MV_CC_GetFrameRate + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetTriggerDelay(IN void* handle, IN OUT MVCC_FLOATVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置触发延时 + * @param handle [IN] 相机句柄 + * @param fValue [IN] 想要设置的相机触发延时 + * @return 成功,返回#MV_OK,并且相机触发延时将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set tigger delay + * @param handle [IN] Handle + * @param fValue [IN] Trigger delay to set + * @return Success, return #MV_OK, and the camera trigger delay will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetTriggerDelay(IN void* handle, IN const float fValue); + +/********************************************************************//** + * @~chinese + * @brief 获取触发源 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者的有关触发源的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口MV_CC_GetPixelFormat,参考 CameraParams.h 中的 MV_CAM_TRIGGER_SOURCE 定义 + + * @~english + * @brief Get trigger source + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of trigger source + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to MV_CC_GetPixelFormat and definition of MV_CAM_TRIGGER_SOURCE in CameraParams.h + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetTriggerSource(IN void* handle, IN OUT MVCC_ENUMVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置触发源 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 要设置的触发源对应的整型值 + * @return 成功,返回#MV_OK,并且相机触发源将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set trigger source + * @param handle [IN] Handle + * @param nValue [IN] Integer value to set corresponding to trigger source + * @return Success, return #MV_OK, and the camera trigger source will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetTriggerSource(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 软触发一次(接口仅在已选择的触发源为软件触发时有效) + * @param handle [IN] 相机句柄 + * @return 成功,返回#MV_OK, 失败,返回错误码 + * @remarks + + * @~english + * @brief Execute software trigger once (this interface only valid when the trigger source is set to software) + * @param handle [IN] Handle + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_TriggerSoftwareExecute(IN void* handle); + +/********************************************************************//** + * @~chinese + * @brief 获取Gamma类型 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者的有关Gamma类型的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口MV_CC_GetPixelFormat,参考 CameraParams.h 中的 MV_CAM_GAMMA_SELECTOR 定义 + + * @~english + * @brief Get Gamma mode + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of gamma mode + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to MV_CC_GetPixelFormat and definition of MV_CAM_GAMMA_SELECTOR in CameraParams.h + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetGammaSelector(IN void* handle, IN OUT MVCC_ENUMVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置Gamma类型 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 要设置的Gamma类型对应的整型值 + * @return 成功,返回#MV_OK,并且相机Gamma类型将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set Gamma mode + * @param handle [IN] Handle + * @param nValue [IN] Integer value to set corresponding to gamma mode + * @return Success, return #MV_OK, and the camera gamma mode will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetGammaSelector(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取Gamma值 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机Gamma值的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口MV_CC_GetExposureTime + + * @~english + * @brief Get Gamma value + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of gamma value + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to MV_CC_GetFrameRate + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetGamma(IN void* handle, IN OUT MVCC_FLOATVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置Gamma值 + * @param handle [IN] 相机句柄 + * @param fValue [IN] 想要设置的相机Gamma值 + * @return 成功,返回#MV_OK,并且相机Gamma值将会更改为相应值,失败,返回错误码 + + * @~english + * @brief Set Gamma value + * @param handle [IN] Handle + * @param fValue [IN] Gamma value to set + * @return Success, return #MV_OK, and the camera gamma value will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetGamma(IN void* handle, IN const float fValue); + +/********************************************************************//** + * @~chinese + * @brief 获取锐度 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机锐度结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get sharpness + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of sharpness + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetSharpness(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置锐度 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的锐度 + * @return 成功,返回#MV_OK,并且相机锐度将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set sharpness + * @param handle [IN] Handle + * @param nValue [IN] Sharpness to set + * @return Success, return #MV_OK, and the camera sharpness will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetSharpness(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取灰度 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机灰度结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get Hue + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of Hue + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetHue(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置灰度 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的灰度 + * @return 成功,返回#MV_OK,并且相机灰度将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set Hue + * @param handle [IN] Handle + * @param nValue [IN] Hue to set + * @return Success, return #MV_OK, and the camera Hue will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetHue(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取饱和度 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机饱和度结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get Saturation + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of Saturation + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetSaturation(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置饱和度 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的饱和度 + * @return 成功,返回#MV_OK,并且相机饱和度将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set Saturation + * @param handle [IN] Handle + * @param nValue [IN] Saturation to set + * @return Success, return #MV_OK, and the camera Saturation will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetSaturation(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取自动白平衡 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者的有关自动白平衡的信息结构体指针 + * @return 成功,返回#MV_OK,并获得相应参数信息的结构体, 失败, 返回错误码 + * @remarks 可参照接口MV_CC_GetPixelFormat,参考 CameraParams.h 中的 MV_CAM_BALANCEWHITE_AUTO 定义 + + + * @~english + * @brief Get Auto white balance + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of auto white balance + * @return Success, return #MV_OK, and get the structure of the corresponding parameters. Failure, return error code + * @remarks Refer to MV_CC_GetPixelFormat and definition of MV_CAM_BALANCEWHITE_AUTO in CameraParams.h + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetBalanceWhiteAuto(IN void* handle, IN OUT MVCC_ENUMVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置自动白平衡 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 要设置的自动白平衡对应的整型值 + * @return 成功,返回#MV_OK,并且相机自动白平衡将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set Auto white balance + * @param handle [IN] Handle + * @param nValue [IN] Integer value to set corresponding to auto white balance + * @return Success, return #MV_OK, and the camera auto white balance will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBalanceWhiteAuto(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取白平衡 红 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机白平衡 红结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get white balance red + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of white balance red + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetBalanceRatioRed(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置白平衡 红 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的白平衡 红 + * @return 成功,返回#MV_OK,并且相机白平衡 红将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set white balance red + * @param handle [IN] Handle + * @param nValue [IN] White balance red to set + * @return Success, return #MV_OK, and the camera white balance red will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBalanceRatioRed(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取白平衡 绿 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机白平衡 绿结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get white balance green + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of white balance green + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetBalanceRatioGreen(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置白平衡 绿 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的白平衡 绿 + * @return 成功,返回#MV_OK,并且相机白平衡 绿将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set white balance green + * @param handle [IN] Handle + * @param nValue [IN] White balance green to set + * @return Success, return #MV_OK, and the camera white balance green will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBalanceRatioGreen(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取白平衡 蓝 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机白平衡 蓝结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get white balance blue + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of white balance blue + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetBalanceRatioBlue(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置白平衡 蓝 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的白平衡 蓝 + * @return 成功,返回#MV_OK,并且相机白平衡 蓝将会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set white balance blue + * @param handle [IN] Handle + * @param nValue [IN] White balance blue to set + * @return Success, return #MV_OK, and the camera white balance blue will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBalanceRatioBlue(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取水印信息内包含的信息类型 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机水印信息内包含的信息类型结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get information type included by frame stamp + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of information type included by frame stamp + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetFrameSpecInfoAbility(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置水印信息内包含的信息类型 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的水印信息内包含的信息类型 + * @return 成功,返回#MV_OK,并且相机水印信息内包含的信息类型会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set information type included by frame stamp + * @param handle [IN] Handle + * @param nValue [IN] Information type included by frame stamp to set + * @return Success, return #MV_OK, and the camera information type included by frame stamp will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetFrameSpecInfoAbility(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取设备自定义名字 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机名字结构体指针 + * @return 成功,返回#MV_OK,并且获取到相机的自定义名字,失败,返回错误码 + * @remarks + + * @~english + * @brief Get device user defined name + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of device name + * @return Success, return #MV_OK, and get the camera user defined name. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetDeviceUserID(IN void* handle, IN OUT MVCC_STRINGVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置设备自定义名字 + * @param handle [IN] 相机句柄 + * @param chValue [IN] 设备名字 + * @return 成功,返回#MV_OK,并且设置设备自定义名字,失败,返回错误码 + * @remarks + + * @~english + * @brief Set device user defined name + * @param handle [IN] Handle + * @param chValue [IN] Device name + * @return Success, return #MV_OK, and set the camera user defined name. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetDeviceUserID(IN void* handle, IN const char* chValue); + +/********************************************************************//** + * @~chinese + * @brief 获取一次触发的帧数 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机一次触发的帧数结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get frame number trigger by once + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of frame number trigger by once + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetBurstFrameCount(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置一次触发的帧数 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的一次触发的帧数 + * @return 成功,返回#MV_OK,并且相机一次触发的帧数会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set frame number trigger by once + * @param handle [IN] Handle + * @param nValue [IN] Frame number trigger by once to set + * @return Success, return #MV_OK, and the camera frame number trigger by once will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetBurstFrameCount(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取行频 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机行频结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get line rate + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of line rate + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetAcquisitionLineRate(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置行频 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的行频 + * @return 成功,返回#MV_OK,并且相机行频会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set line rate + * @param handle [IN] Handle + * @param nValue [IN] Line rate to set + * @return Success, return #MV_OK, and the camera line rate will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetAcquisitionLineRate(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取心跳信息 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机心跳信息结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get heartbeat information + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of heartbeat information + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_GetHeartBeatTimeout(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置心跳信息 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的心跳信息 + * @return 成功,返回#MV_OK,并且相机心跳信息会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set heartbeat information + * @param handle [IN] Handle + * @param nValue [IN] Heartbeat information to set + * @return Success, return #MV_OK, and the camera heartbeat information will change to the corresponding value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CC_SetHeartBeatTimeout(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取网络包大小 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机网络包大小结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get network packet size + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of network packet size + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetGevSCPSPacketSize(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置网络包大小 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的网络包大小 + * @return 成功,返回#MV_OK,并且相机网络包大小会更改为相应值,失败,返回错误码 + + * @~english + * @brief Set network packet size + * @param handle [IN] Handle + * @param nValue [IN] Packet size to set + * @return Success, return #MV_OK, and change packet size to setting value. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetGevSCPSPacketSize(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取网络包发送间隔 + * @param handle [IN] 相机句柄 + * @param pstValue [IN][OUT] 返回给调用者有关相机网络包发送间隔结构体指针 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 可参照接口MV_CC_GetWidth + + * @~english + * @brief Get network packet sending delay + * @param handle [IN] Handle + * @param pstValue [IN][OUT] Structure pointer of network packet sending delay + * @return Success, return #MV_OK. Failure, return error code + * @remarks Refer to MV_CC_GetWidth + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetGevSCPD(IN void* handle, IN OUT MVCC_INTVALUE* pstValue); + +/********************************************************************//** + * @~chinese + * @brief 设置网络包发送间隔 + * @param handle [IN] 相机句柄 + * @param nValue [IN] 想要设置的网络包发送间隔 + * @return 成功,返回#MV_OK,并且相机网络包发送间隔会更改为相应值,失败,返回错误码 + + * @~english + * @brief Set network packet sending delay + * @param handle [IN] Handle + * @param nValue [IN] Packet delay to set + * @return Success, return #MV_OK, and change packet delay to setting value. Failure, return error code + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetGevSCPD(IN void* handle, IN const unsigned int nValue); + +/********************************************************************//** + * @~chinese + * @brief 获取接收端IP地址,0xa9fe0102 表示 169.254.1.2 + * @param handle [IN] 相机句柄 + * @param pnIP [IN][OUT] 返回给调用者接收端IP地址 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks + + * @~english + * @brief Get receiver IP address, 0xa9fe0102 indicates 169.254.1.2 + * @param handle [IN] Handle + * @param pnIP [IN][OUT] Receiver IP address + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetGevSCDA(IN void* handle, unsigned int* pnIP); + +/********************************************************************//** + * @~chinese + * @brief 设置接收端IP地址 + * @param handle [IN] 相机句柄 + * unsigned int nIP [IN] 想要设置的接收端IP地址 + * @return 成功,返回#MV_OK,并且相机接收端IP地址会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set receiver IP address + * @param handle [IN] Handel + * unsigned int nIP [IN] Receiver IP address to set + * @return Success, return #MV_OK, and change receiver IP address to setting value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetGevSCDA(IN void* handle, unsigned int nIP); + +/********************************************************************//** + * @~chinese + * @brief 获取发送端的端口号 + * @param handle [IN] 相机句柄 + * @param pnPort [IN][OUT] 返回给调用者发送端的端口号 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks + + * @~english + * @brief Get transmitter port number + * @param handle [IN] Handle + * @param pnPort [IN][OUT] Transmitter port number + * @return Success, return #MV_OK. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_GetGevSCSP(IN void* handle, unsigned int* pnPort); + +/********************************************************************//** + * @~chinese + * @brief 设置发送端的端口号 + * @param handle [IN] 相机句柄 + * @param nPort [IN] 想要设置的发送端的端口号 + * @return 成功,返回#MV_OK,并且相机发送端的端口号会更改为相应值,失败,返回错误码 + * @remarks + + * @~english + * @brief Set transmitter port number + * @param handle [IN] Handle + * @param nPort [IN] Transmitter port number to set + * @return Success, return #MV_OK, and change transmitter port number to setting value. Failure, return error code + * @remarks + ************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_GIGE_SetGevSCSP(IN void* handle, unsigned int nPort); + + +/************************************************************************/ +/* CameraLink 设备独有的接口,Linux 平台不支持 */ +/* APIs only support CameraLink device, not supported on Linux */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 设置设备波特率 + * @param handle [IN] 设备句柄 + * @param nBaudrate [IN] 设置的波特率值,数值参考CameraParams.h中宏定义,如#define MV_CAML_BAUDRATE_9600 0x00000001 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 该接口接口支持在设备未连接时调用。 + + * @~english + * @brief Set device bauderate using one of the CL_BAUDRATE_XXXX value + * @param handle [IN] Device handle + * @param nBaudrate [IN] baud rate to set. Refer to the CameraParams.h for parameter definitions, for example, #define MV_CAML_BAUDRATE_9600 0x00000001 + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API is supported only by CameraLink device.\n + This API supports calls when devices are not connected. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CAML_SetDeviceBauderate(IN void* handle, unsigned int nBaudrate); + +/********************************************************************//** + * @~chinese + * @brief 获取设备波特率 + * @param handle [IN] 设备句柄 + * @param pnCurrentBaudrate [OUT] 波特率信息指针,数值参考CameraParams.h中宏定义,如#define MV_CAML_BAUDRATE_9600 0x00000001 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 该接口接口支持在设备未连接时调用。 + + * @~english + * @brief Returns the current device bauderate, using one of the CL_BAUDRATE_XXXX value + * @param handle [IN] Device handle + * @param pnCurrentBaudrate [OUT] Return pointer of baud rate to user. Refer to the CameraParams.h for parameter definitions, for example, #define MV_CAML_BAUDRATE_9600 0x00000001 + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API is supported only by CameraLink device.\n + This API supports calls when devices are not connected. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CAML_GetDeviceBauderate(IN void* handle, unsigned int* pnCurrentBaudrate); + +/********************************************************************//** + * @~chinese + * @brief 获取设备与主机间连接支持的波特率 + * @param handle [IN] 设备句柄 + * @param pnBaudrateAblity [OUT] 支持的波特率信息的指针。所支持波特率的或运算结果,单个数值参考CameraParams.h中宏定义,如#define MV_CAML_BAUDRATE_9600 0x00000001 + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks 该接口接口支持在设备未连接时调用。 + + * @~english + * @brief Returns supported bauderates of the combined device and host interface + * @param handle [IN] Device handle + * @param pnBaudrateAblity [OUT] Return pointer of the supported bauderates to user. 'OR' operation results of the supported bauderates. Refer to the CameraParams.h for single value definitions, for example, #define MV_CAML_BAUDRATE_9600 0x00000001 + * @return Success, return #MV_OK. Failure, return error code + * @remarks This API is supported only by CameraLink device.\n + This API supports calls when devices are not connected. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CAML_GetSupportBauderates(IN void* handle, unsigned int* pnBaudrateAblity); + +/********************************************************************//** + * @~chinese + * @brief 设置串口操作等待时长 + * @param handle [IN] 设备句柄 + * @param nMillisec [IN] 串口操作的等待时长, ms + * @return 成功,返回#MV_OK,失败,返回错误码 + * @remarks + + * @~english + * @brief Sets the timeout for operations on the serial port + * @param handle [IN] Device handle + * @param nMillisec [IN] Timeout in [ms] for operations on the serial port. + * @return Success, return #MV_OK. Failure, return error code + * @return Success, return MV_OK. Failure, return error code +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_CAML_SetGenCPTimeOut(IN void* handle, unsigned int nMillisec); + +/************************************************************************/ +/* U3V 设备独有的接口 */ +/************************************************************************/ +/********************************************************************//** + * @~chinese + * @brief 设置U3V的传输包大小 + * @param handle [IN] 设备句柄 + * @param nTransferSize [IN] 传输的包大小, Byte,默认为1M,rang:>=0x10000 + * @return 成功,返回MV_OK,失败,返回错误码 + * @remarks 增加传输包大小可以适当降低取流时的CPU占用率。但不同的PC和不同USB扩展卡存在不同的兼容性,如果该参数设置过大可能会出现取不到图像的风险。 + + * @~english + * @brief Set transfer size of U3V device + * @param handle [IN] Device handle + * @param nTransferSize [IN] Transfer size,Byte,default:1M,rang:>=0x10000 + * @return Success, return MV_OK. Failure, return error code + * @remarks Increasing the transmission packet size can reduce the CPU utilization at the time of fetching. However, different PCS and different USB extension CARDS have different compatibility, and if this parameter is set too large, there may be the risk of not getting the image. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_USB_SetTransferSize(IN void* handle, unsigned int nTransferSize); + +/********************************************************************//** + * @~chinese + * @brief 获取U3V的传输包大小 + * @param handle [IN] 设备句柄 + * @param pnTransferSize [OUT] 传输的包大小指针, Byte + * @return 成功,返回MV_OK,失败,返回错误码 + * @remarks 该接口用于获取当前的U3V传输包大小,默认1M。 + + * @~english + * @brief Get transfer size of U3V device + * @param handle [IN] Device handle + * @param pnTransferSize [OUT] Transfer size,Byte + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface is used to get the current U3V transfer packet size, default 1M. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_USB_GetTransferSize(IN void* handle, unsigned int* pnTransferSize); + +/********************************************************************//** + * @~chinese + * @brief 设置U3V的传输通道个数 + * @param handle [IN] 设备句柄 + * @param nTransferWays [IN] 传输通道个数,范围:1-10 + * @return 成功,返回MV_OK,失败,返回错误码 + * @remarks 用户可以根据PC的性能、设备出图帧率、图像大小和内存使用率等因素对该参数进行调节。但不同的PC和不同的USB扩展卡存在不同的兼容性。 + + * @~english + * @brief Set transfer ways of U3V device + * @param handle [IN] Device handle + * @param nTransferWays [IN] Transfer ways,rang:1-10 + * @return Success, return MV_OK. Failure, return error code + * @remarks Users can adjust this parameter according to PC performance, camera image frame rate, image size, memory utilization and other factors. But different PCS and different USB expansion CARDS have different compatibility. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_USB_SetTransferWays(IN void* handle, unsigned int nTransferWays); + +/********************************************************************//** + * @~chinese + * @brief 获取U3V的传输通道个数 + * @param handle [IN] 设备句柄 + * @param pnTransferWays [OUT] 传输通道个数指针 + * @return 成功,返回MV_OK,失败,返回错误码 + * @remarks 该接口用于获取当前的U3V异步取流节点个数,2000W设备的MONO8默认为3个,YUV为默认2个,RGB为默认1个,其它情况默认8个节点。 + + * @~english + * @brief Get transfer ways of U3V device + * @param handle [IN] Device handle + * @param pnTransferWays [OUT] Transfer ways + * @return Success, return MV_OK. Failure, return error code + * @remarks This interface is used to get the current number of U3V asynchronous feed nodes. For 2000W camera, MONO8 defaults to 3, YUV defaults to 2, RGB defaults to 1, and other cases default to 8 nodes. +************************************************************************/ +MV_CAMCTRL_API int __stdcall MV_USB_GetTransferWays(IN void* handle, unsigned int* pnTransferWays); + +#ifdef __cplusplus +} +#endif + +#endif //_MV_CAMERA_CTRL_H_ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvErrorDefine.h b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvErrorDefine.h new file mode 100644 index 0000000..523b496 --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvErrorDefine.h @@ -0,0 +1,104 @@ + +#ifndef _MV_ERROR_DEFINE_H_ +#define _MV_ERROR_DEFINE_H_ + +/********************************************************************/ +/// \~chinese +/// \name 正确码定义 +/// @{ +/// \~english +/// \name Definition of correct code +/// @{ +#define MV_OK 0x00000000 ///< \~chinese 成功,无错误 \~english Successed, no error +/// @} + +/********************************************************************/ +/// \~chinese +/// \name 通用错误码定义:范围0x80000000-0x800000FF +/// @{ +/// \~english +/// \name Definition of General error code +/// @{ +#define MV_E_HANDLE 0x80000000 ///< \~chinese 错误或无效的句柄 \~english Error or invalid handle +#define MV_E_SUPPORT 0x80000001 ///< \~chinese 不支持的功能 \~english Not supported function +#define MV_E_BUFOVER 0x80000002 ///< \~chinese 缓存已满 \~english Buffer overflow +#define MV_E_CALLORDER 0x80000003 ///< \~chinese 函数调用顺序错误 \~english Function calling order error +#define MV_E_PARAMETER 0x80000004 ///< \~chinese 错误的参数 \~english Incorrect parameter +#define MV_E_RESOURCE 0x80000006 ///< \~chinese 资源申请失败 \~english Applying resource failed +#define MV_E_NODATA 0x80000007 ///< \~chinese 无数据 \~english No data +#define MV_E_PRECONDITION 0x80000008 ///< \~chinese 前置条件有误,或运行环境已发生变化 \~english Precondition error, or running environment changed +#define MV_E_VERSION 0x80000009 ///< \~chinese 版本不匹配 \~english Version mismatches +#define MV_E_NOENOUGH_BUF 0x8000000A ///< \~chinese 传入的内存空间不足 \~english Insufficient memory +#define MV_E_ABNORMAL_IMAGE 0x8000000B ///< \~chinese 异常图像,可能是丢包导致图像不完整 \~english Abnormal image, maybe incomplete image because of lost packet +#define MV_E_LOAD_LIBRARY 0x8000000C ///< \~chinese 动态导入DLL失败 \~english Load library failed +#define MV_E_NOOUTBUF 0x8000000D ///< \~chinese 没有可输出的缓存 \~english No Avaliable Buffer +#define MV_E_UNKNOW 0x800000FF ///< \~chinese 未知的错误 \~english Unknown error +/// @} + +/********************************************************************/ +/// \~chinese +/// \name GenICam系列错误:范围0x80000100-0x800001FF +/// @{ +/// \~english +/// \name GenICam Series Error Codes: Range from 0x80000100 to 0x800001FF +/// @{ +#define MV_E_GC_GENERIC 0x80000100 ///< \~chinese 通用错误 \~english General error +#define MV_E_GC_ARGUMENT 0x80000101 ///< \~chinese 参数非法 \~english Illegal parameters +#define MV_E_GC_RANGE 0x80000102 ///< \~chinese 值超出范围 \~english The value is out of range +#define MV_E_GC_PROPERTY 0x80000103 ///< \~chinese 属性 \~english Property +#define MV_E_GC_RUNTIME 0x80000104 ///< \~chinese 运行环境有问题 \~english Running environment error +#define MV_E_GC_LOGICAL 0x80000105 ///< \~chinese 逻辑错误 \~english Logical error +#define MV_E_GC_ACCESS 0x80000106 ///< \~chinese 节点访问条件有误 \~english Node accessing condition error +#define MV_E_GC_TIMEOUT 0x80000107 ///< \~chinese 超时 \~english Timeout +#define MV_E_GC_DYNAMICCAST 0x80000108 ///< \~chinese 转换异常 \~english Transformation exception +#define MV_E_GC_UNKNOW 0x800001FF ///< \~chinese GenICam未知错误 \~english GenICam unknown error +/// @} + +/********************************************************************/ +/// \~chinese +/// \name GigE_STATUS对应的错误码:范围0x80000200-0x800002FF +/// @{ +/// \~english +/// \name GigE_STATUS Error Codes: Range from 0x80000200 to 0x800002FF +/// @{ +#define MV_E_NOT_IMPLEMENTED 0x80000200 ///< \~chinese 命令不被设备支持 \~english The command is not supported by device +#define MV_E_INVALID_ADDRESS 0x80000201 ///< \~chinese 访问的目标地址不存在 \~english The target address being accessed does not exist +#define MV_E_WRITE_PROTECT 0x80000202 ///< \~chinese 目标地址不可写 \~english The target address is not writable +#define MV_E_ACCESS_DENIED 0x80000203 ///< \~chinese 设备无访问权限 \~english No permission +#define MV_E_BUSY 0x80000204 ///< \~chinese 设备忙,或网络断开 \~english Device is busy, or network disconnected +#define MV_E_PACKET 0x80000205 ///< \~chinese 网络包数据错误 \~english Network data packet error +#define MV_E_NETER 0x80000206 ///< \~chinese 网络相关错误 \~english Network error +#define MV_E_IP_CONFLICT 0x80000221 ///< \~chinese 设备IP冲突 \~english Device IP conflict +/// @} + +/********************************************************************/ +/// \~chinese +/// \name USB_STATUS对应的错误码:范围0x80000300-0x800003FF +/// @{ +/// \~english +/// \name USB_STATUS Error Codes: Range from 0x80000300 to 0x800003FF +/// @{ +#define MV_E_USB_READ 0x80000300 ///< \~chinese 读usb出错 \~english Reading USB error +#define MV_E_USB_WRITE 0x80000301 ///< \~chinese 写usb出错 \~english Writing USB error +#define MV_E_USB_DEVICE 0x80000302 ///< \~chinese 设备异常 \~english Device exception +#define MV_E_USB_GENICAM 0x80000303 ///< \~chinese GenICam相关错误 \~english GenICam error +#define MV_E_USB_BANDWIDTH 0x80000304 ///< \~chinese 带宽不足 该错误码新增 \~english Insufficient bandwidth, this error code is newly added +#define MV_E_USB_DRIVER 0x80000305 ///< \~chinese 驱动不匹配或者未装驱动 \~english Driver mismatch or unmounted drive +#define MV_E_USB_UNKNOW 0x800003FF ///< \~chinese USB未知的错误 \~english USB unknown error +/// @} + +/********************************************************************/ +/// \~chinese +/// \name 升级时对应的错误码:范围0x80000400-0x800004FF +/// @{ +/// \~english +/// \name Upgrade Error Codes: Range from 0x80000400 to 0x800004FF +/// @{ +#define MV_E_UPG_FILE_MISMATCH 0x80000400 ///< \~chinese 升级固件不匹配 \~english Firmware mismatches +#define MV_E_UPG_LANGUSGE_MISMATCH 0x80000401 ///< \~chinese 升级固件语言不匹配 \~english Firmware language mismatches +#define MV_E_UPG_CONFLICT 0x80000402 ///< \~chinese 升级冲突(设备已经在升级了再次请求升级即返回此错误) \~english Upgrading conflicted (repeated upgrading requests during device upgrade) +#define MV_E_UPG_INNER_ERR 0x80000403 ///< \~chinese 升级时相机内部出现错误 \~english Camera internal error during upgrade +#define MV_E_UPG_UNKNOW 0x800004FF ///< \~chinese 升级时未知错误 \~english Unknown error during upgrade +/// @} + +#endif //_MV_ERROR_DEFINE_H_ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvISPErrorDefine.h b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvISPErrorDefine.h new file mode 100644 index 0000000..5231dfa --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/MvISPErrorDefine.h @@ -0,0 +1,93 @@ + +#ifndef _MV_ISP_ERROR_DEFINE_H_ +#define _MV_ISP_ERROR_DEFINE_H_ + +/************************************************************************ +* ISP㷨Ĵ +************************************************************************/ +// ͨ +#define MV_ALG_OK 0x00000000 //ȷ +#define MV_ALG_ERR 0x10000000 //ȷʹ + +// +#define MV_ALG_E_ABILITY_ARG 0x10000001 //дЧ + +// ڴ +#define MV_ALG_E_MEM_NULL 0x10000002 //ڴַΪ +#define MV_ALG_E_MEM_ALIGN 0x10000003 //ڴ벻Ҫ +#define MV_ALG_E_MEM_LACK 0x10000004 //ڴռС +#define MV_ALG_E_MEM_SIZE_ALIGN 0x10000005 //ڴռСҪ +#define MV_ALG_E_MEM_ADDR_ALIGN 0x10000006 //ڴַҪ + +// ͼ +#define MV_ALG_E_IMG_FORMAT 0x10000007 //ͼʽȷ߲֧ +#define MV_ALG_E_IMG_SIZE 0x10000008 //ͼ߲ȷ߳Χ +#define MV_ALG_E_IMG_STEP 0x10000009 //ͼstepƥ +#define MV_ALG_E_IMG_DATA_NULL 0x1000000A //ͼݴ洢ַΪ + +// +#define MV_ALG_E_CFG_TYPE 0x1000000B //û߻ȡͲȷ +#define MV_ALG_E_CFG_SIZE 0x1000000C //û߻ȡ롢ṹСȷ +#define MV_ALG_E_PRC_TYPE 0x1000000D //Ͳȷ +#define MV_ALG_E_PRC_SIZE 0x1000000E //ʱ롢Сȷ +#define MV_ALG_E_FUNC_TYPE 0x1000000F //ӴͲȷ +#define MV_ALG_E_FUNC_SIZE 0x10000010 //Ӵʱ롢Сȷ + +// в +#define MV_ALG_E_PARAM_INDEX 0x10000011 //indexȷ +#define MV_ALG_E_PARAM_VALUE 0x10000012 //valueȷ߳Χ +#define MV_ALG_E_PARAM_NUM 0x10000013 //param_numȷ + +// ӿڵü +#define MV_ALG_E_NULL_PTR 0x10000014 //ָΪ +#define MV_ALG_E_OVER_MAX_MEM 0x10000015 //޶ڴ +#define MV_ALG_E_CALL_BACK 0x10000016 //ص + +// 㷨ؼ +#define MV_ALG_E_ENCRYPT 0x10000017 //ܴ +#define MV_ALG_E_EXPIRE 0x10000018 //㷨ʹ޴ + +// ڲģ鷵صĻ +#define MV_ALG_E_BAD_ARG 0x10000019 //Χȷ +#define MV_ALG_E_DATA_SIZE 0x1000001A //ݴСȷ +#define MV_ALG_E_STEP 0x1000001B //stepȷ + +// cpuָִ֧ +#define MV_ALG_E_CPUID 0x1000001C //cpu֧Żеָ + +#define MV_ALG_WARNING 0x1000001D // + +#define MV_ALG_E_TIME_OUT 0x1000001E //㷨ⳬʱ +#define MV_ALG_E_LIB_VERSION 0x1000001F //㷨汾ų +#define MV_ALG_E_MODEL_VERSION 0x10000020 //ģͰ汾ų +#define MV_ALG_E_GPU_MEM_ALLOC 0x10000021 //GPUڴ +#define MV_ALG_E_FILE_NON_EXIST 0x10000022 //ļ +#define MV_ALG_E_NONE_STRING 0x10000023 //ַΪ +#define MV_ALG_E_IMAGE_CODEC 0x10000024 //ͼ +#define MV_ALG_E_FILE_OPEN 0x10000025 //ļ +#define MV_ALG_E_FILE_READ 0x10000026 //ļȡ +#define MV_ALG_E_FILE_WRITE 0x10000027 //ļд +#define MV_ALG_E_FILE_READ_SIZE 0x10000028 //ļȡС +#define MV_ALG_E_FILE_TYPE 0x10000029 //ļʹ +#define MV_ALG_E_MODEL_TYPE 0x1000002A //ģʹ +#define MV_ALG_E_MALLOC_MEM 0x1000002B //ڴ +#define MV_ALG_E_BIND_CORE_FAILED 0x1000002C //̰߳ʧ + +// д +#define MV_ALG_E_DENOISE_NE_IMG_FORMAT 0x10402001 //ͼʽ +#define MV_ALG_E_DENOISE_NE_FEATURE_TYPE 0x10402002 //ʹ +#define MV_ALG_E_DENOISE_NE_PROFILE_NUM 0x10402003 //Ը +#define MV_ALG_E_DENOISE_NE_GAIN_NUM 0x10402004 // +#define MV_ALG_E_DENOISE_NE_GAIN_VAL 0x10402005 //ֵ +#define MV_ALG_E_DENOISE_NE_BIN_NUM 0x10402006 // +#define MV_ALG_E_DENOISE_NE_INIT_GAIN 0x10402007 //Ƴʼô +#define MV_ALG_E_DENOISE_NE_NOT_INIT 0x10402008 //δʼ +#define MV_ALG_E_DENOISE_COLOR_MODE 0x10402009 //ɫռģʽ +#define MV_ALG_E_DENOISE_ROI_NUM 0x1040200a //ͼROI +#define MV_ALG_E_DENOISE_ROI_ORI_PT 0x1040200b //ͼROIԭ +#define MV_ALG_E_DENOISE_ROI_SIZE 0x1040200c //ͼROIС +#define MV_ALG_E_DENOISE_GAIN_NOT_EXIST 0x1040200d //治(Ѵ) +#define MV_ALG_E_DENOISE_GAIN_BEYOND_RANGE 0x1040200e //治ڷΧ +#define MV_ALG_E_DENOISE_NP_BUF_SIZE 0x1040200f //ڴС + +#endif //_MV_ISP_ERROR_DEFINE_H_ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/PixelType.h b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/PixelType.h new file mode 100644 index 0000000..0394656 --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/include/PixelType.h @@ -0,0 +1,202 @@ + +#ifndef _MV_PIXEL_TYPE_H_ +#define _MV_PIXEL_TYPE_H_ + +//#include "Base/GCTypes.h" + + +/************************************************************************/ +/* GigE Vision (2.0.03) PIXEL FORMATS */ +/************************************************************************/ + +// Indicate if pixel is monochrome or RGB +#define MV_GVSP_PIX_MONO 0x01000000 +#define MV_GVSP_PIX_RGB 0x02000000 // deprecated in version 1.1 +#define MV_GVSP_PIX_COLOR 0x02000000 +#define MV_GVSP_PIX_CUSTOM 0x80000000 +#define MV_GVSP_PIX_COLOR_MASK 0xFF000000 + +// Indicate effective number of bits occupied by the pixel (including padding). +// This can be used to compute amount of memory required to store an image. +#define MV_PIXEL_BIT_COUNT(n) ((n) << 16) + +#define MV_GVSP_PIX_EFFECTIVE_PIXEL_SIZE_MASK 0x00FF0000 +#define MV_GVSP_PIX_EFFECTIVE_PIXEL_SIZE_SHIFT 16 + +// Pixel ID: lower 16-bit of the pixel formats +#define MV_GVSP_PIX_ID_MASK 0x0000FFFF +#define MV_GVSP_PIX_COUNT 0x46 // next Pixel ID available + + +enum MvGvspPixelType +{ + // Undefined pixel type +#ifdef WIN32 + PixelType_Gvsp_Undefined = 0xFFFFFFFF, +#else + PixelType_Gvsp_Undefined = -1, +#endif + // Mono buffer format defines + PixelType_Gvsp_Mono1p = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(1) | 0x0037), + PixelType_Gvsp_Mono2p = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(2) | 0x0038), + PixelType_Gvsp_Mono4p = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(4) | 0x0039), + PixelType_Gvsp_Mono8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0001), + PixelType_Gvsp_Mono8_Signed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0002), + PixelType_Gvsp_Mono10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0003), + PixelType_Gvsp_Mono10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0004), + PixelType_Gvsp_Mono12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0005), + PixelType_Gvsp_Mono12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0006), + PixelType_Gvsp_Mono14 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0025), + PixelType_Gvsp_Mono16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0007), + + // Bayer buffer format defines + PixelType_Gvsp_BayerGR8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0008), + PixelType_Gvsp_BayerRG8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0009), + PixelType_Gvsp_BayerGB8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x000A), + PixelType_Gvsp_BayerBG8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x000B), + PixelType_Gvsp_BayerGR10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000C), + PixelType_Gvsp_BayerRG10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000D), + PixelType_Gvsp_BayerGB10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000E), + PixelType_Gvsp_BayerBG10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000F), + PixelType_Gvsp_BayerGR12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0010), + PixelType_Gvsp_BayerRG12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0011), + PixelType_Gvsp_BayerGB12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0012), + PixelType_Gvsp_BayerBG12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0013), + PixelType_Gvsp_BayerGR10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0026), + PixelType_Gvsp_BayerRG10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0027), + PixelType_Gvsp_BayerGB10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0028), + PixelType_Gvsp_BayerBG10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0029), + PixelType_Gvsp_BayerGR12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002A), + PixelType_Gvsp_BayerRG12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002B), + PixelType_Gvsp_BayerGB12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002C), + PixelType_Gvsp_BayerBG12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002D), + PixelType_Gvsp_BayerGR16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x002E), + PixelType_Gvsp_BayerRG16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x002F), + PixelType_Gvsp_BayerGB16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0030), + PixelType_Gvsp_BayerBG16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0031), + + // RGB Packed buffer format defines + PixelType_Gvsp_RGB8_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0014), + PixelType_Gvsp_BGR8_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0015), + PixelType_Gvsp_RGBA8_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x0016), + PixelType_Gvsp_BGRA8_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x0017), + PixelType_Gvsp_RGB10_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0018), + PixelType_Gvsp_BGR10_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0019), + PixelType_Gvsp_RGB12_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x001A), + PixelType_Gvsp_BGR12_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x001B), + PixelType_Gvsp_RGB16_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0033), + PixelType_Gvsp_BGR16_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x004B), + PixelType_Gvsp_RGBA16_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x0064), + PixelType_Gvsp_BGRA16_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x0051), + PixelType_Gvsp_RGB10V1_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x001C), + PixelType_Gvsp_RGB10V2_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x001D), + PixelType_Gvsp_RGB12V1_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(36) | 0X0034), + PixelType_Gvsp_RGB565_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0035), + PixelType_Gvsp_BGR565_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0X0036), + + // YUV Packed buffer format defines + PixelType_Gvsp_YUV411_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x001E), + PixelType_Gvsp_YUV422_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x001F), + PixelType_Gvsp_YUV422_YUYV_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0032), + PixelType_Gvsp_YUV444_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0020), + PixelType_Gvsp_YCBCR8_CBYCR = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x003A), + PixelType_Gvsp_YCBCR422_8 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x003B), + PixelType_Gvsp_YCBCR422_8_CBYCRY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0043), + PixelType_Gvsp_YCBCR411_8_CBYYCRYY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x003C), + PixelType_Gvsp_YCBCR601_8_CBYCR = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x003D), + PixelType_Gvsp_YCBCR601_422_8 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x003E), + PixelType_Gvsp_YCBCR601_422_8_CBYCRY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0044), + PixelType_Gvsp_YCBCR601_411_8_CBYYCRYY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x003F), + PixelType_Gvsp_YCBCR709_8_CBYCR = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0040), + PixelType_Gvsp_YCBCR709_422_8 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0041), + PixelType_Gvsp_YCBCR709_422_8_CBYCRY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0045), + PixelType_Gvsp_YCBCR709_411_8_CBYYCRYY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x0042), + + // RGB Planar buffer format defines + PixelType_Gvsp_RGB8_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0021), + PixelType_Gvsp_RGB10_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0022), + PixelType_Gvsp_RGB12_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0023), + PixelType_Gvsp_RGB16_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0024), + + // 自定义的图片格式 + PixelType_Gvsp_Jpeg = (MV_GVSP_PIX_CUSTOM | MV_PIXEL_BIT_COUNT(24) | 0x0001), + + PixelType_Gvsp_Coord3D_ABC32f = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(96) | 0x00C0),//0x026000C0 + PixelType_Gvsp_Coord3D_ABC32f_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(96) | 0x00C1),//0x026000C1 + + // 该值被废弃,请参考PixelType_Gvsp_Coord3D_AC32f_64; the value is discarded + PixelType_Gvsp_Coord3D_AC32f = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(40) | 0x00C2), + // 该值被废弃; the value is discarded (已放入Chunkdata) + PixelType_Gvsp_COORD3D_DEPTH_PLUS_MASK = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(28) | 0x0001), + + PixelType_Gvsp_Coord3D_ABC32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(96) | 0x3001),//0x82603001 + PixelType_Gvsp_Coord3D_AB32f = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x3002),//0x82403002 + PixelType_Gvsp_Coord3D_AB32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x3003),//0x82403003 + PixelType_Gvsp_Coord3D_AC32f_64 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x00C2),//0x024000C2 + PixelType_Gvsp_Coord3D_AC32f_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x00C3),//0x024000C3 + PixelType_Gvsp_Coord3D_AC32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x3004),//0x82403004 + PixelType_Gvsp_Coord3D_A32f = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x00BD),//0x012000BD + PixelType_Gvsp_Coord3D_A32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x3005),//0x81203005 + PixelType_Gvsp_Coord3D_C32f = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x00BF),//0x012000BF + PixelType_Gvsp_Coord3D_C32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x3006),//0x81203006 + + PixelType_Gvsp_Coord3D_ABC16 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x00B9),//0x023000B9 + PixelType_Gvsp_Coord3D_C16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x00B8),//0x011000B8 + + //无损压缩像素格式定义 + PixelType_Gvsp_HB_Mono8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0001), + PixelType_Gvsp_HB_Mono10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0003), + PixelType_Gvsp_HB_Mono10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0004), + PixelType_Gvsp_HB_Mono12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0005), + PixelType_Gvsp_HB_Mono12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0006), + PixelType_Gvsp_HB_Mono16 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0007), + PixelType_Gvsp_HB_BayerGR8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0008), + PixelType_Gvsp_HB_BayerRG8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0009), + PixelType_Gvsp_HB_BayerGB8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x000A), + PixelType_Gvsp_HB_BayerBG8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x000B), + PixelType_Gvsp_HB_BayerRBGG8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0046), + PixelType_Gvsp_HB_BayerGR10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000C), + PixelType_Gvsp_HB_BayerRG10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000D), + PixelType_Gvsp_HB_BayerGB10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000E), + PixelType_Gvsp_HB_BayerBG10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000F), + PixelType_Gvsp_HB_BayerGR12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0010), + PixelType_Gvsp_HB_BayerRG12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0011), + PixelType_Gvsp_HB_BayerGB12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0012), + PixelType_Gvsp_HB_BayerBG12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0013), + PixelType_Gvsp_HB_BayerGR10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0026), + PixelType_Gvsp_HB_BayerRG10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0027), + PixelType_Gvsp_HB_BayerGB10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0028), + PixelType_Gvsp_HB_BayerBG10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0029), + PixelType_Gvsp_HB_BayerGR12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002A), + PixelType_Gvsp_HB_BayerRG12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002B), + PixelType_Gvsp_HB_BayerGB12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002C), + PixelType_Gvsp_HB_BayerBG12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002D), + PixelType_Gvsp_HB_YUV422_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x001F), + PixelType_Gvsp_HB_YUV422_YUYV_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0032), + PixelType_Gvsp_HB_RGB8_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0014), + PixelType_Gvsp_HB_BGR8_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0015), + PixelType_Gvsp_HB_RGBA8_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x0016), + PixelType_Gvsp_HB_BGRA8_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x0017), + PixelType_Gvsp_HB_RGB16_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0033), + PixelType_Gvsp_HB_BGR16_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x004B), + PixelType_Gvsp_HB_RGBA16_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x0064), + PixelType_Gvsp_HB_BGRA16_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x0051), + +}; + +//enum MvUsbPixelType +//{ +// +//}; + +//跨平台定义 +//Cross Platform Definition +#ifdef WIN32 +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +#include +#endif + + +#endif /* _MV_PIXEL_TYPE_H_ */ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libFormatConversion.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libFormatConversion.so new file mode 100644 index 0000000..10d4e0b Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libFormatConversion.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMVRender.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMVRender.so new file mode 100644 index 0000000..b09a02b Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMVRender.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMediaProcess.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMediaProcess.so new file mode 100644 index 0000000..6fd3f71 Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMediaProcess.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMvCameraControl.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMvCameraControl.so new file mode 100644 index 0000000..88c139b Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMvCameraControl.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMvUsb3vTL.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMvUsb3vTL.so new file mode 100644 index 0000000..810e863 Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/amd64/libMvUsb3vTL.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libFormatConversion.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libFormatConversion.so new file mode 100644 index 0000000..793ac90 Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libFormatConversion.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMVRender.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMVRender.so new file mode 100644 index 0000000..4ed543c Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMVRender.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMediaProcess.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMediaProcess.so new file mode 100644 index 0000000..3f2d9e4 Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMediaProcess.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMvCameraControl.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMvCameraControl.so new file mode 100644 index 0000000..0c20a4f Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMvCameraControl.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMvUsb3vTL.so b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMvUsb3vTL.so new file mode 100644 index 0000000..2749f55 Binary files /dev/null and b/src/rm_hardware_driver/ros2_hik_camera/hikSDK/lib/arm64/libMvUsb3vTL.so differ diff --git a/src/rm_hardware_driver/ros2_hik_camera/include/hik_camera/recorder.hpp b/src/rm_hardware_driver/ros2_hik_camera/include/hik_camera/recorder.hpp new file mode 100644 index 0000000..4cdcf3c --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/include/hik_camera/recorder.hpp @@ -0,0 +1,46 @@ +#ifndef HIK_CAMERA_RECORDER_HPP_ +#define HIK_CAMERA_RECORDER_HPP_ + +// std +#include +#include +#include +#include +#include +#include +#include + +// OpenCV +#include + +namespace fyt::camera_driver { +class Recorder { +public: + using Frame = std::vector; + + Recorder(const std::filesystem::path &file, int fps, cv::Size size); + ~Recorder(); + + void addFrame(const Frame &frame); + void start(); + void stop(); + + std::filesystem::path path; + +private: + void recorderThread(); + + cv::Size size_; + int fps_; + cv::VideoWriter writer_; + + std::deque frame_queue_; + + std::mutex mutex_; + std::atomic recording_{false}; + std::condition_variable cv_; + std::thread recorder_thread_; +}; +} // namespace fyt::camera_driver + +#endif // HIK_CAMERA_RECORDER_HPP_ diff --git a/src/rm_hardware_driver/ros2_hik_camera/launch/hik_camera.launch.py b/src/rm_hardware_driver/ros2_hik_camera/launch/hik_camera.launch.py new file mode 100644 index 0000000..1d25f29 --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/launch/hik_camera.launch.py @@ -0,0 +1,34 @@ +import os + +from ament_index_python.packages import get_package_share_directory, get_package_prefix +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument +from launch.substitutions import LaunchConfiguration +from launch_ros.actions import Node + + +def generate_launch_description(): + params_file = os.path.join( + get_package_share_directory('hik_camera'), 'config', 'camera_params.yaml') + + camera_info_url = 'package://hik_camera/config/camera_info.yaml' + + return LaunchDescription([ + DeclareLaunchArgument(name='params_file', + default_value=params_file), + DeclareLaunchArgument(name='camera_info_url', + default_value=camera_info_url), + DeclareLaunchArgument(name='use_sensor_data_qos', + default_value='false'), + + Node( + package='hik_camera', + executable='hik_camera_node', + output='screen', + emulate_tty=True, + parameters=[LaunchConfiguration('params_file'), { + 'camera_info_url': LaunchConfiguration('camera_info_url'), + 'use_sensor_data_qos': LaunchConfiguration('use_sensor_data_qos'), + }], + ) + ]) diff --git a/src/rm_hardware_driver/ros2_hik_camera/package.xml b/src/rm_hardware_driver/ros2_hik_camera/package.xml new file mode 100644 index 0000000..268b81f --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/package.xml @@ -0,0 +1,30 @@ + + + + hik_camera + 0.0.0 + TODO: Package description + nolem + TODO: License declaration + + + ament_cmake + + + rclcpp + rclcpp_components + sensor_msgs + image_transport + image_transport_plugins + camera_info_manager + rm_utils + opencv + + camera_calibration + + ament_lint_auto + ament_lint_common + + ament_cmake + + diff --git a/src/rm_hardware_driver/ros2_hik_camera/src/hik_camera_node.cpp b/src/rm_hardware_driver/ros2_hik_camera/src/hik_camera_node.cpp new file mode 100644 index 0000000..c70542d --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/src/hik_camera_node.cpp @@ -0,0 +1,514 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "MvCameraControl.h" +#include "hik_camera/recorder.hpp" +#include "rm_utils/heartbeat.hpp" +#include "rm_utils/logger/log.hpp" + +namespace fyt::camera_driver +{ +class HikCameraNode : public rclcpp::Node +{ +public: + explicit HikCameraNode(const rclcpp::NodeOptions & options) : Node("camera_driver", options) + { + FYT_REGISTER_LOGGER("camera_driver", "~/fyt2024-log", INFO); + FYT_INFO("camera_driver", "Starting HikCameraNode!"); + + camera_name_ = this->declare_parameter("camera_name", "narrow_stereo"); + camera_info_url_ = + this->declare_parameter("camera_info_url", "package://hik_camera/config/camera_info.yaml"); + frame_id_ = this->declare_parameter("camera_frame_id", "camera_optical_frame"); + pixel_format_ = this->declare_parameter("pixel_format", "rgb8"); + frame_rate_ = this->declare_parameter("frame_rate", 210); + exposure_time_ = this->declare_parameter("exposure_time", 5000); + gain_ = this->declare_parameter("gain", 12.0); + + resolution_width_ = this->declare_parameter("resolution_width", 1280); + resolution_height_ = this->declare_parameter("resolution_height", 1024); + offset_x_ = this->declare_parameter("offsetX", 0); + offset_y_ = this->declare_parameter("offsetY", 0); + + image_msg_.header.frame_id = frame_id_; + image_msg_.encoding = pixel_format_; + + bool use_sensor_data_qos = this->declare_parameter("use_sensor_data_qos", true); + auto qos = use_sensor_data_qos ? rmw_qos_profile_sensor_data : rmw_qos_profile_default; + camera_pub_ = image_transport::create_camera_publisher(this, "image_raw", qos); + + camera_info_manager_ = + std::make_unique(this, camera_name_); + if (camera_info_manager_->validateURL(camera_info_url_)) { + camera_info_manager_->loadCameraInfo(camera_info_url_); + camera_info_msg_ = camera_info_manager_->getCameraInfo(); + } else { + camera_info_manager_->setCameraName(camera_name_); + sensor_msgs::msg::CameraInfo camera_info; + camera_info_manager_->setCameraInfo(camera_info); + FYT_WARN("camera_driver", "Invalid camera info URL: {}", camera_info_url_); + } + + // Heartbeat + heartbeat_ = fyt::HeartBeatPublisher::create(this); + + // Param set callback + params_callback_handle_ = this->add_on_set_parameters_callback( + std::bind(&HikCameraNode::parametersCallback, this, std::placeholders::_1)); + + // Recorder + bool enable_recorder = this->declare_parameter("recording", false); + if (enable_recorder) { + std::string home = std::getenv("HOME") ? std::getenv("HOME") : std::string("."); + namespace fs = std::filesystem; + std::filesystem::path video_path = fs::path(home) / "fyt2024-log/video/" / + std::string(std::to_string(std::time(nullptr)) + ".avi"); + recorder_ = std::make_unique( + video_path, frame_rate_, cv::Size(resolution_width_, resolution_height_)); + recorder_->start(); + FYT_INFO("camera_driver", "Recorder started! Video file: {}", video_path.string()); + } + + // Watch dog timer (also handles initial open) + timer_ = this->create_wall_timer( + std::chrono::milliseconds(1000), std::bind(&HikCameraNode::timerCallback, this)); + + // Start capture thread + capture_thread_ = std::thread([this]() { this->captureLoop(); }); + + FYT_INFO("camera_driver", "HikCameraNode has been initialized!"); + } + + ~HikCameraNode() override + { + close(); + if (capture_thread_.joinable()) { + capture_thread_.join(); + } + if (recorder_ != nullptr) { + recorder_->stop(); + FYT_INFO( + "camera_driver", "Recorder stopped! Video file {} has been saved", + recorder_->path.string()); + } + FYT_INFO("camera_driver", "HikCameraNode has been destroyed!"); + } + +private: + static int64_t clampToInc(int64_t value, int64_t min, int64_t max, int64_t inc) + { + if (inc <= 0) { + inc = 1; + } + if (value < min) { + value = min; + } + if (value > max) { + value = max; + } + const int64_t delta = value - min; + return min + (delta / inc) * inc; + } + + bool getIntNodeLocked(const char * name, MVCC_INTVALUE & out) + { + if (camera_handle_ == nullptr) { + return false; + } + return MV_CC_GetIntValue(camera_handle_, name, &out) == MV_OK; + } + + bool setIntNodeLocked(const char * name, int64_t value) + { + if (camera_handle_ == nullptr) { + return false; + } + return MV_CC_SetIntValue(camera_handle_, name, value) == MV_OK; + } + + void applyRoiLocked() + { + // Best-effort: not all cameras support all nodes + MVCC_INTVALUE width_info; + MVCC_INTVALUE height_info; + MVCC_INTVALUE offx_info; + MVCC_INTVALUE offy_info; + + const bool has_width = getIntNodeLocked("Width", width_info); + const bool has_height = getIntNodeLocked("Height", height_info); + const bool has_offx = getIntNodeLocked("OffsetX", offx_info); + const bool has_offy = getIntNodeLocked("OffsetY", offy_info); + + if (!has_width || !has_height) { + FYT_WARN("camera_driver", "Camera does not expose Width/Height nodes; ROI params ignored"); + return; + } + + int64_t target_w = + clampToInc(resolution_width_, width_info.nMin, width_info.nMax, width_info.nInc); + int64_t target_h = + clampToInc(resolution_height_, height_info.nMin, height_info.nMax, height_info.nInc); + + int64_t target_x = 0; + int64_t target_y = 0; + if (has_offx) { + target_x = clampToInc(offset_x_, offx_info.nMin, offx_info.nMax, offx_info.nInc); + } + if (has_offy) { + target_y = clampToInc(offset_y_, offy_info.nMin, offy_info.nMax, offy_info.nInc); + } + + // Some cameras constrain width/height based on offset; apply in safe order + if (has_offx) { + (void)setIntNodeLocked("OffsetX", target_x); + } + if (has_offy) { + (void)setIntNodeLocked("OffsetY", target_y); + } + (void)setIntNodeLocked("Width", target_w); + (void)setIntNodeLocked("Height", target_h); + + resolution_width_ = static_cast(target_w); + resolution_height_ = static_cast(target_h); + offset_x_ = static_cast(target_x); + offset_y_ = static_cast(target_y); + + FYT_INFO( + "camera_driver", "ROI applied: {}x{} offset({},{})", resolution_width_, resolution_height_, + offset_x_, offset_y_); + } + + void timerCallback() + { + // Open camera + while (!is_open_ && rclcpp::ok()) { + if (!open()) { + FYT_ERROR("camera_driver", "open() failed"); + close(); + return; + } + } + + // Watchdog: no frames for too long => reconnect + double dt = (this->now() - latest_frame_stamp_).seconds(); + if (dt > 5.0) { + FYT_WARN("camera_driver", "Camera is not alive! lost frame for {:.2f} seconds", dt); + close(); + } + } + + bool open() + { + if (is_open_) { + close(); + } + + FYT_INFO("camera_driver", "Opening Hik Camera Device!"); + + MV_CC_DEVICE_INFO_LIST device_list; + int ret = MV_CC_EnumDevices(MV_GIGE_DEVICE | MV_USB_DEVICE, &device_list); + if (ret != MV_OK || device_list.nDeviceNum == 0) { + FYT_WARN("camera_driver", "No camera found! Enum state: [0x{:x}]", ret); + return false; + } + FYT_INFO("camera_driver", "Found {} devices", device_list.nDeviceNum); + + ret = MV_CC_CreateHandle(&camera_handle_, device_list.pDeviceInfo[0]); + if (ret != MV_OK) { + FYT_ERROR("camera_driver", "CreateHandle failed: [0x{:x}]", ret); + camera_handle_ = nullptr; + return false; + } + + ret = MV_CC_OpenDevice(camera_handle_); + if (ret != MV_OK) { + FYT_ERROR("camera_driver", "OpenDevice failed: [0x{:x}]", ret); + MV_CC_DestroyHandle(&camera_handle_); + camera_handle_ = nullptr; + return false; + } + + { + std::lock_guard lock(camera_mutex_); + // Trigger off (continuous) + (void)MV_CC_SetTriggerMode(camera_handle_, MV_TRIGGER_MODE_OFF); + + // Apply ROI/offset before querying image info + applyRoiLocked(); + + // Set exposure / gain + (void)MV_CC_SetFloatValue(camera_handle_, "ExposureTime", static_cast(exposure_time_)); + (void)MV_CC_SetFloatValue(camera_handle_, "Gain", static_cast(gain_)); + } + + // Get image info + { + std::lock_guard lock(camera_mutex_); + ret = MV_CC_GetImageInfo(camera_handle_, &img_info_); + } + if (ret != MV_OK) { + FYT_ERROR("camera_driver", "GetImageInfo failed: [0x{:x}]", ret); + close(); + return false; + } + + // Init convert param + convert_param_ = {}; + convert_param_.nWidth = img_info_.nWidthValue; + convert_param_.nHeight = img_info_.nHeightValue; + convert_param_.enDstPixelType = PixelType_Gvsp_RGB8_Packed; + + // Use actual output size from camera + resolution_width_ = static_cast(img_info_.nWidthValue); + resolution_height_ = static_cast(img_info_.nHeightValue); + + image_msg_.height = resolution_height_; + image_msg_.width = resolution_width_; + image_msg_.step = resolution_width_ * 3; + image_msg_.data.resize(static_cast(image_msg_.height) * image_msg_.step); + + camera_info_msg_.header.frame_id = frame_id_; + camera_info_msg_.width = image_msg_.width; + camera_info_msg_.height = image_msg_.height; + latest_frame_stamp_ = this->now(); + + { + std::lock_guard lock(camera_mutex_); + ret = MV_CC_StartGrabbing(camera_handle_); + } + if (ret != MV_OK) { + FYT_ERROR("camera_driver", "StartGrabbing failed: [0x{:x}]", ret); + close(); + return false; + } + + is_open_ = true; + FYT_INFO("camera_driver", "Hik Camera Device Open Success!"); + return true; + } + + void close() + { + if (!is_open_) { + return; + } + FYT_INFO("camera_driver", "Closing Hik Camera Device!"); + is_open_ = false; + + std::lock_guard lock(camera_mutex_); + if (camera_handle_) { + (void)MV_CC_StopGrabbing(camera_handle_); + (void)MV_CC_CloseDevice(camera_handle_); + (void)MV_CC_DestroyHandle(&camera_handle_); + camera_handle_ = nullptr; + } + } + + void captureLoop() + { + MV_FRAME_OUT out_frame; + while (rclcpp::ok()) { + if (!is_open_ || camera_handle_ == nullptr) { + std::this_thread::sleep_for(std::chrono::milliseconds(10)); + continue; + } + + int ret; + { + std::lock_guard lock(camera_mutex_); + if (!is_open_ || camera_handle_ == nullptr) { + continue; + } + ret = MV_CC_GetImageBuffer(camera_handle_, &out_frame, 1000); + } + if (ret != MV_OK) { + FYT_WARN("camera_driver", "GetImageBuffer failed: [0x{:x}]", ret); + fail_count_++; + if (fail_count_ > 5) { + close(); + } + continue; + } + + // Ensure output buffer + const size_t need_size = + static_cast(out_frame.stFrameInfo.nWidth) * out_frame.stFrameInfo.nHeight * 3; + if (image_msg_.data.size() != need_size) { + image_msg_.data.resize(need_size); + } + + convert_param_.pDstBuffer = image_msg_.data.data(); + convert_param_.nDstBufferSize = image_msg_.data.size(); + convert_param_.pSrcData = out_frame.pBufAddr; + convert_param_.nSrcDataLen = out_frame.stFrameInfo.nFrameLen; + convert_param_.enSrcPixelType = out_frame.stFrameInfo.enPixelType; + + { + std::lock_guard lock(camera_mutex_); + if (!is_open_ || camera_handle_ == nullptr) { + continue; + } + ret = MV_CC_ConvertPixelType(camera_handle_, &convert_param_); + } + if (ret != MV_OK) { + FYT_WARN("camera_driver", "ConvertPixelType failed: [0x{:x}]", ret); + { + std::lock_guard lock(camera_mutex_); + if (camera_handle_ != nullptr) { + (void)MV_CC_FreeImageBuffer(camera_handle_, &out_frame); + } + } + fail_count_++; + continue; + } + + auto stamp = this->now(); + image_msg_.header.stamp = stamp; + image_msg_.header.frame_id = frame_id_; + image_msg_.height = out_frame.stFrameInfo.nHeight; + image_msg_.width = out_frame.stFrameInfo.nWidth; + image_msg_.step = out_frame.stFrameInfo.nWidth * 3; + + camera_info_msg_.header = image_msg_.header; + camera_pub_.publish(image_msg_, camera_info_msg_); + + latest_frame_stamp_ = stamp; + fail_count_ = 0; + + if (recorder_ != nullptr) { + recorder_->addFrame(image_msg_.data); + } + + { + std::lock_guard lock(camera_mutex_); + if (camera_handle_ != nullptr) { + (void)MV_CC_FreeImageBuffer(camera_handle_, &out_frame); + } + } + } + } + + rcl_interfaces::msg::SetParametersResult parametersCallback( + const std::vector & parameters) + { + rcl_interfaces::msg::SetParametersResult result; + result.successful = true; + + for (const auto & param : parameters) { + if (param.get_name() == "exposure_time") { + exposure_time_ = param.as_int(); + std::lock_guard lock(camera_mutex_); + if (camera_handle_ != nullptr) { + int status = + MV_CC_SetFloatValue(camera_handle_, "ExposureTime", static_cast(exposure_time_)); + if (status != MV_OK) { + result.successful = false; + result.reason = "Failed to set exposure time, status = " + std::to_string(status); + } else { + FYT_INFO("camera_driver", "Set exposure_time: {}", exposure_time_); + } + } + } else if (param.get_name() == "gain") { + gain_ = param.as_double(); + std::lock_guard lock(camera_mutex_); + if (camera_handle_ != nullptr) { + int status = MV_CC_SetFloatValue(camera_handle_, "Gain", static_cast(gain_)); + if (status != MV_OK) { + result.successful = false; + result.reason = "Failed to set gain, status = " + std::to_string(status); + } else { + FYT_INFO("camera_driver", "Set gain: {}", gain_); + } + } + } else if (param.get_name() == "resolution_width") { + resolution_width_ = param.as_int(); + std::lock_guard lock(camera_mutex_); + if (camera_handle_ != nullptr) { + applyRoiLocked(); + } + } else if (param.get_name() == "resolution_height") { + resolution_height_ = param.as_int(); + std::lock_guard lock(camera_mutex_); + if (camera_handle_ != nullptr) { + applyRoiLocked(); + } + } else if (param.get_name() == "offsetX") { + offset_x_ = param.as_int(); + std::lock_guard lock(camera_mutex_); + if (camera_handle_ != nullptr) { + applyRoiLocked(); + } + } else if (param.get_name() == "offsetY") { + offset_y_ = param.as_int(); + std::lock_guard lock(camera_mutex_); + if (camera_handle_ != nullptr) { + applyRoiLocked(); + } + } + } + + return result; + } + + // ROS pub + sensor_msgs::msg::Image image_msg_; + image_transport::CameraPublisher camera_pub_; + + // camera info + std::string camera_name_; + std::string camera_info_url_; + std::string frame_id_; + std::string pixel_format_; + std::unique_ptr camera_info_manager_; + sensor_msgs::msg::CameraInfo camera_info_msg_; + + // Watch dog + rclcpp::TimerBase::SharedPtr timer_; + rclcpp::Time latest_frame_stamp_{0, 0, RCL_ROS_TIME}; + + // Heartbeat + fyt::HeartBeatPublisher::SharedPtr heartbeat_; + + // Params + int frame_rate_{210}; + int exposure_time_{5000}; + double gain_{12.0}; + int resolution_width_{1280}; + int resolution_height_{1024}; + int offset_x_{0}; + int offset_y_{0}; + + // Recorder + std::unique_ptr recorder_; + + // Camera SDK + void * camera_handle_{nullptr}; + MV_IMAGE_BASIC_INFO img_info_{}; + MV_CC_PIXEL_CONVERT_PARAM convert_param_{}; + + std::mutex camera_mutex_; + + // State + std::atomic is_open_{false}; + int fail_count_{0}; + std::thread capture_thread_; + rclcpp::Node::OnSetParametersCallbackHandle::SharedPtr params_callback_handle_; +}; +} // namespace fyt::camera_driver + +#include "rclcpp_components/register_node_macro.hpp" + +RCLCPP_COMPONENTS_REGISTER_NODE(fyt::camera_driver::HikCameraNode) diff --git a/src/rm_hardware_driver/ros2_hik_camera/src/recorder.cpp b/src/rm_hardware_driver/ros2_hik_camera/src/recorder.cpp new file mode 100644 index 0000000..a3c964d --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/src/recorder.cpp @@ -0,0 +1,82 @@ +#include "hik_camera/recorder.hpp" + +#include + +namespace fyt::camera_driver { +Recorder::Recorder(const std::filesystem::path &file, int fps, cv::Size size) +: path(file), size_(size), fps_(fps) {} + +Recorder::~Recorder() { stop(); } + +void Recorder::start() { + if (recording_.exchange(true)) { + return; + } + + writer_.open( + path.string(), cv::VideoWriter::fourcc('M', 'J', 'P', 'G'), fps_, size_, true); + + recorder_thread_ = std::thread(&Recorder::recorderThread, this); +} + +void Recorder::stop() { + if (!recording_.exchange(false)) { + return; + } + + cv_.notify_all(); + if (recorder_thread_.joinable()) { + recorder_thread_.join(); + } + + if (writer_.isOpened()) { + writer_.release(); + } +} + +void Recorder::addFrame(const Frame &frame) { + if (!recording_.load()) { + return; + } + + { + std::lock_guard lock(mutex_); + frame_queue_.push_back(frame); + } + cv_.notify_one(); +} + +void Recorder::recorderThread() { + while (recording_.load()) { + Frame frame; + { + std::unique_lock lock(mutex_); + cv_.wait_for(lock, std::chrono::milliseconds(100), [this]() { + return !recording_.load() || !frame_queue_.empty(); + }); + + if (!recording_.load()) { + break; + } + if (frame_queue_.empty()) { + continue; + } + + frame = std::move(frame_queue_.front()); + frame_queue_.pop_front(); + } + + if (!writer_.isOpened()) { + continue; + } + + if (frame.size() != static_cast(size_.width * size_.height * 3)) { + continue; + } + + cv::Mat img(size_.height, size_.width, CV_8UC3, frame.data()); + writer_.write(img); + } +} + +} // namespace fyt::camera_driver diff --git a/src/rm_hardware_driver/ros2_hik_camera/src/video_player_node.cpp b/src/rm_hardware_driver/ros2_hik_camera/src/video_player_node.cpp new file mode 100644 index 0000000..263495e --- /dev/null +++ b/src/rm_hardware_driver/ros2_hik_camera/src/video_player_node.cpp @@ -0,0 +1,171 @@ +// Video player node for offline debugging + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "rm_utils/heartbeat.hpp" +#include "rm_utils/logger/log.hpp" + +namespace fyt::camera_driver { +class VideoPlayerNode : public rclcpp::Node { +public: + explicit VideoPlayerNode(const rclcpp::NodeOptions &options) : Node("camera_driver", options) { + FYT_REGISTER_LOGGER("camera_driver", "~/fyt2024-log", INFO); + FYT_INFO("camera_driver", "Starting VideoPlayerNode!"); + + video_path_ = this->declare_parameter("path", "/tmp/video.avi"); + camera_info_url_ = + this->declare_parameter("camera_info_url", "package://rm_bringup/config/camera_info.yaml"); + frame_id_ = this->declare_parameter("frame_id", "camera_optical_frame"); + frame_rate_ = this->declare_parameter("frame_rate", 30); + start_frame_ = this->declare_parameter("start_frame", 0); + keep_looping_ = this->declare_parameter("keep_looping", true); + + heartbeat_ = fyt::HeartBeatPublisher::create(this); + + const std::filesystem::path video_file(video_path_); + if (!std::filesystem::exists(video_file)) { + FYT_ERROR("camera_driver", "Video file {} does not exist!", video_file.string()); + rclcpp::shutdown(); + return; + } + + cap_.open(video_path_); + if (!cap_.isOpened()) { + FYT_ERROR("camera_driver", "Video file open failed: {}", video_path_); + rclcpp::shutdown(); + return; + } + + image_msg_.header.frame_id = frame_id_; + image_msg_.encoding = sensor_msgs::image_encodings::BGR8; + + image_msg_.width = static_cast(cap_.get(cv::CAP_PROP_FRAME_WIDTH)); + image_msg_.height = static_cast(cap_.get(cv::CAP_PROP_FRAME_HEIGHT)); + image_msg_.step = image_msg_.width * 3; + image_msg_.data.resize(static_cast(image_msg_.step) * image_msg_.height); + + camera_info_manager_ = std::make_shared( + this, "camera_driver", "file://" + video_path_); + + if (camera_info_manager_->validateURL(camera_info_url_)) { + camera_info_manager_->loadCameraInfo(camera_info_url_); + camera_info_ = camera_info_manager_->getCameraInfo(); + } else { + camera_info_manager_->setCameraName(video_path_); + sensor_msgs::msg::CameraInfo camera_info; + camera_info.header.frame_id = frame_id_; + camera_info.header.stamp = this->now(); + camera_info.width = image_msg_.width; + camera_info.height = image_msg_.height; + camera_info_manager_->setCameraInfo(camera_info); + FYT_WARN("camera_driver", "Invalid camera info URL: {}", camera_info_url_); + } + + camera_info_.header.frame_id = frame_id_; + camera_info_.width = image_msg_.width; + camera_info_.height = image_msg_.height; + + bool use_sensor_data_qos = this->declare_parameter("use_sensor_data_qos", true); + auto qos = use_sensor_data_qos ? rmw_qos_profile_sensor_data : rmw_qos_profile_default; + camera_pub_ = image_transport::create_camera_publisher(this, "image_raw", qos); + + const int publish_fps = (frame_rate_ > 0) ? frame_rate_ : 30; + const auto period = std::chrono::duration_cast( + std::chrono::duration(1.0 / static_cast(publish_fps))); + + timer_ = this->create_wall_timer(period, std::bind(&VideoPlayerNode::onTimer, this)); + + FYT_INFO( + "camera_driver", "Video player ready: {} ({}x{}, {} fps)", video_path_, image_msg_.width, + image_msg_.height, publish_fps); + } + +private: + void onTimer() { + if (!cap_.isOpened()) { + return; + } + + cv::Mat frame; + cap_ >> frame; + + if (frame.empty()) { + FYT_INFO("camera_driver", "Video file ends!"); + if (!keep_looping_) { + rclcpp::shutdown(); + return; + } + + cap_.release(); + cap_.open(video_path_); + frame_cnt_ = 0; + return; + } + + frame_cnt_++; + if (frame_cnt_ < start_frame_) { + return; + } + + if (frame.cols != static_cast(image_msg_.width) || + frame.rows != static_cast(image_msg_.height) || frame.type() != CV_8UC3) { + cv::Mat bgr; + if (frame.channels() == 3) { + bgr = frame; + } else if (frame.channels() == 1) { + cv::cvtColor(frame, bgr, cv::COLOR_GRAY2BGR); + } else { + frame.convertTo(bgr, CV_8UC3); + } + if (bgr.cols != static_cast(image_msg_.width) || bgr.rows != static_cast(image_msg_.height)) { + cv::resize(bgr, bgr, cv::Size(static_cast(image_msg_.width), static_cast(image_msg_.height))); + } + std::memcpy(image_msg_.data.data(), bgr.data, image_msg_.data.size()); + } else { + std::memcpy(image_msg_.data.data(), frame.data, image_msg_.data.size()); + } + + auto stamp = this->now(); + image_msg_.header.stamp = stamp; + camera_info_.header.stamp = stamp; + camera_info_.header.frame_id = frame_id_; + image_msg_.header.frame_id = frame_id_; + + camera_pub_.publish(image_msg_, camera_info_); + } + + fyt::HeartBeatPublisher::SharedPtr heartbeat_; + + std::string video_path_; + std::string camera_info_url_; + std::string frame_id_; + int frame_rate_{30}; + int start_frame_{0}; + bool keep_looping_{true}; + int frame_cnt_{0}; + + cv::VideoCapture cap_; + + image_transport::CameraPublisher camera_pub_; + sensor_msgs::msg::Image image_msg_; + sensor_msgs::msg::CameraInfo camera_info_; + std::shared_ptr camera_info_manager_; + + rclcpp::TimerBase::SharedPtr timer_; +}; +} // namespace fyt::camera_driver + +#include "rclcpp_components/register_node_macro.hpp" +RCLCPP_COMPONENTS_REGISTER_NODE(fyt::camera_driver::VideoPlayerNode) diff --git a/src/rm_interfaces/CMakeLists.txt b/src/rm_interfaces/CMakeLists.txt new file mode 100644 index 0000000..21dcd3b --- /dev/null +++ b/src/rm_interfaces/CMakeLists.txt @@ -0,0 +1,37 @@ +cmake_minimum_required(VERSION 3.8) +project(rm_interfaces) + +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + +# find dependencies +find_package(ament_cmake REQUIRED) +find_package(rosidl_default_generators REQUIRED) +find_package(geometry_msgs REQUIRED) + +rosidl_generate_interfaces(${PROJECT_NAME} + "msg/Armor.msg" + "msg/Armors.msg" + "msg/Target.msg" + "msg/RuneTarget.msg" + "msg/Point2d.msg" + "msg/GimbalCmd.msg" + "msg/ChassisCmd.msg" + "msg/DebugLight.msg" + "msg/DebugLights.msg" + "msg/DebugArmor.msg" + "msg/DebugArmors.msg" + "msg/DebugRuneAngle.msg" + "msg/Measurement.msg" + "msg/JudgeSystemData.msg" + "msg/OperatorCommand.msg" + "msg/SerialReceiveData.msg" + "srv/SetMode.srv" + DEPENDENCIES + std_msgs + geometry_msgs +) + + +ament_package() diff --git a/src/rm_interfaces/msg/Armor.msg b/src/rm_interfaces/msg/Armor.msg new file mode 100644 index 0000000..723f523 --- /dev/null +++ b/src/rm_interfaces/msg/Armor.msg @@ -0,0 +1,4 @@ +string number +string type +float32 distance_to_image_center +geometry_msgs/Pose pose \ No newline at end of file diff --git a/src/rm_interfaces/msg/Armors.msg b/src/rm_interfaces/msg/Armors.msg new file mode 100644 index 0000000..0a70d30 --- /dev/null +++ b/src/rm_interfaces/msg/Armors.msg @@ -0,0 +1,2 @@ +std_msgs/Header header +Armor[] armors \ No newline at end of file diff --git a/src/rm_interfaces/msg/ChassisCmd.msg b/src/rm_interfaces/msg/ChassisCmd.msg new file mode 100644 index 0000000..b403f77 --- /dev/null +++ b/src/rm_interfaces/msg/ChassisCmd.msg @@ -0,0 +1,4 @@ +std_msgs/Header header +bool is_spining +bool is_navigating +geometry_msgs/Twist twist \ No newline at end of file diff --git a/src/rm_interfaces/msg/DebugArmor.msg b/src/rm_interfaces/msg/DebugArmor.msg new file mode 100644 index 0000000..cf96eec --- /dev/null +++ b/src/rm_interfaces/msg/DebugArmor.msg @@ -0,0 +1,5 @@ +int32 center_x +string type +float32 light_ratio +float32 center_distance +float32 angle diff --git a/src/rm_interfaces/msg/DebugArmors.msg b/src/rm_interfaces/msg/DebugArmors.msg new file mode 100644 index 0000000..e12e300 --- /dev/null +++ b/src/rm_interfaces/msg/DebugArmors.msg @@ -0,0 +1 @@ +DebugArmor[] data \ No newline at end of file diff --git a/src/rm_interfaces/msg/DebugLight.msg b/src/rm_interfaces/msg/DebugLight.msg new file mode 100644 index 0000000..c876dbc --- /dev/null +++ b/src/rm_interfaces/msg/DebugLight.msg @@ -0,0 +1,4 @@ +int32 center_x +bool is_light +float32 ratio +float32 angle \ No newline at end of file diff --git a/src/rm_interfaces/msg/DebugLights.msg b/src/rm_interfaces/msg/DebugLights.msg new file mode 100644 index 0000000..14e31ce --- /dev/null +++ b/src/rm_interfaces/msg/DebugLights.msg @@ -0,0 +1 @@ +DebugLight[] data \ No newline at end of file diff --git a/src/rm_interfaces/msg/DebugRuneAngle.msg b/src/rm_interfaces/msg/DebugRuneAngle.msg new file mode 100644 index 0000000..9918427 --- /dev/null +++ b/src/rm_interfaces/msg/DebugRuneAngle.msg @@ -0,0 +1,2 @@ +std_msgs/Header header +float64 data \ No newline at end of file diff --git a/src/rm_interfaces/msg/GimbalCmd.msg b/src/rm_interfaces/msg/GimbalCmd.msg new file mode 100644 index 0000000..41b0117 --- /dev/null +++ b/src/rm_interfaces/msg/GimbalCmd.msg @@ -0,0 +1,8 @@ +std_msgs/Header header +float64 pitch +float64 yaw +float64 yaw_diff +float64 pitch_diff +float64 distance +bool fire_advice +uint8 shoot_rate \ No newline at end of file diff --git a/src/rm_interfaces/msg/JudgeSystemData.msg b/src/rm_interfaces/msg/JudgeSystemData.msg new file mode 100644 index 0000000..b7e14c2 --- /dev/null +++ b/src/rm_interfaces/msg/JudgeSystemData.msg @@ -0,0 +1,5 @@ +uint8 game_status +int16 remaining_time +int16 blood +int16 outpost_hp +OperatorCommand operator_command diff --git a/src/rm_interfaces/msg/Measurement.msg b/src/rm_interfaces/msg/Measurement.msg new file mode 100644 index 0000000..b3f94d9 --- /dev/null +++ b/src/rm_interfaces/msg/Measurement.msg @@ -0,0 +1,4 @@ +float64 x +float64 y +float64 z +float64 yaw diff --git a/src/rm_interfaces/msg/OperatorCommand.msg b/src/rm_interfaces/msg/OperatorCommand.msg new file mode 100644 index 0000000..1bc5508 --- /dev/null +++ b/src/rm_interfaces/msg/OperatorCommand.msg @@ -0,0 +1,3 @@ +uint8 is_retreating +uint8 is_drone_avoiding +uint8 is_outpost_attacking \ No newline at end of file diff --git a/src/rm_interfaces/msg/Point2d.msg b/src/rm_interfaces/msg/Point2d.msg new file mode 100644 index 0000000..220abf7 --- /dev/null +++ b/src/rm_interfaces/msg/Point2d.msg @@ -0,0 +1,2 @@ +float32 x +float32 y \ No newline at end of file diff --git a/src/rm_interfaces/msg/RuneTarget.msg b/src/rm_interfaces/msg/RuneTarget.msg new file mode 100644 index 0000000..f4c724e --- /dev/null +++ b/src/rm_interfaces/msg/RuneTarget.msg @@ -0,0 +1,4 @@ +std_msgs/Header header +Point2d[5] pts +bool is_lost +bool is_big_rune \ No newline at end of file diff --git a/src/rm_interfaces/msg/SerialReceiveData.msg b/src/rm_interfaces/msg/SerialReceiveData.msg new file mode 100644 index 0000000..8a3fa38 --- /dev/null +++ b/src/rm_interfaces/msg/SerialReceiveData.msg @@ -0,0 +1,8 @@ +std_msgs/Header header +uint8 mode +float32 bullet_speed +float32 roll +float32 yaw +float32 yaw_to_pitch_angle +float32 pitch +JudgeSystemData judge_system_data diff --git a/src/rm_interfaces/msg/Target.msg b/src/rm_interfaces/msg/Target.msg new file mode 100644 index 0000000..c3c8b42 --- /dev/null +++ b/src/rm_interfaces/msg/Target.msg @@ -0,0 +1,14 @@ +std_msgs/Header header +bool tracking +string id +int32 armors_num +geometry_msgs/Point position +geometry_msgs/Vector3 velocity +float64 yaw +float64 v_yaw +float64 radius_1 +float64 radius_2 +float64 d_za +float64 d_zc +float64 yaw_diff +float64 position_diff diff --git a/src/rm_interfaces/package.xml b/src/rm_interfaces/package.xml new file mode 100644 index 0000000..c2203c5 --- /dev/null +++ b/src/rm_interfaces/package.xml @@ -0,0 +1,21 @@ + + + + rm_interfaces + 0.0.0 + TODO: Package description + chenjun + TODO: License declaration + + ament_cmake + + rosidl_default_generators + rosidl_default_runtime + rosidl_interface_packages + + geometry_msgs + + + ament_cmake + + diff --git a/src/rm_interfaces/srv/SetMode.srv b/src/rm_interfaces/srv/SetMode.srv new file mode 100644 index 0000000..cee26e2 --- /dev/null +++ b/src/rm_interfaces/srv/SetMode.srv @@ -0,0 +1,4 @@ +uint8 mode #0:自瞄红 1:自瞄蓝 2:小符红 3:小符蓝 4:大符红 5:大符蓝 +--- +bool success # indicate successful run of triggered service +string message # informational, e.g. for error messages \ No newline at end of file diff --git a/src/rm_robot_description/CMakeLists.txt b/src/rm_robot_description/CMakeLists.txt new file mode 100644 index 0000000..655dc66 --- /dev/null +++ b/src/rm_robot_description/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.8) +project(rm_robot_description) + +# find dependencies +find_package(ament_cmake REQUIRED) + +# Install files +install(DIRECTORY + urdf + DESTINATION share/${PROJECT_NAME}) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + set(ament_cmake_copyright_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() + +ament_package() diff --git a/src/rm_robot_description/LICENSE b/src/rm_robot_description/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/src/rm_robot_description/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/rm_robot_description/README.md b/src/rm_robot_description/README.md new file mode 100644 index 0000000..4804a5e --- /dev/null +++ b/src/rm_robot_description/README.md @@ -0,0 +1,26 @@ +# rm_robot_description +RoboMaster 视觉自瞄系统所需的 URDF + +rm_vision + +该项目为 [rm_vision](https://github.com/chenjunnn/rm_vision) 的子模块 + +## 坐标系定义 + +单位和方向请参考 https://www.ros.org/reps/rep-0103.html + +odom: 以云台中心为原点的惯性系 + +yaw_joint: 表述云台的 yaw 轴与惯性系的旋转关系 + +pitch_joint: 表述云台的 pitch 轴与惯性系的旋转关系 + +camera_joint: 表述相机到惯性系的变换关系 + +camera_optical_joint: 表述以 z 轴为前方的相机坐标系转换为 x 轴为前方的相机坐标系的旋转关系 + +## 使用方法 + +修改 [urdf/rm_gimbal.urdf.xacro](urdf/rm_gimbal.urdf.xacro) 中的 `gimbal_camera_transfrom` + +xyz 与 rpy 对应机器人云台上相机到云台中心的平移与旋转关系,可以由机械图纸测量得到,或在机器人上直接测量 diff --git a/src/rm_robot_description/docs/rm_vision.svg b/src/rm_robot_description/docs/rm_vision.svg new file mode 100644 index 0000000..a9d40c6 --- /dev/null +++ b/src/rm_robot_description/docs/rm_vision.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/rm_robot_description/package.xml b/src/rm_robot_description/package.xml new file mode 100644 index 0000000..a166d8c --- /dev/null +++ b/src/rm_robot_description/package.xml @@ -0,0 +1,21 @@ + + + + rm_robot_description + 0.0.0 + TODO: Package description + chenjun + TODO: License declaration + + ament_cmake + + launch_ros + xacro + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/src/rm_robot_description/urdf/rm_gimbal.urdf.xacro b/src/rm_robot_description/urdf/rm_gimbal.urdf.xacro new file mode 100644 index 0000000..64e755e --- /dev/null +++ b/src/rm_robot_description/urdf/rm_gimbal.urdf.xacro @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/rm_robot_description/urdf/sentry.urdf.xacro b/src/rm_robot_description/urdf/sentry.urdf.xacro new file mode 100644 index 0000000..59a798f --- /dev/null +++ b/src/rm_robot_description/urdf/sentry.urdf.xacro @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/rm_rune/COLCON_IGNORE b/src/rm_rune/COLCON_IGNORE new file mode 100644 index 0000000..e69de29 diff --git a/src/rm_rune/README.md b/src/rm_rune/README.md new file mode 100644 index 0000000..40906cc --- /dev/null +++ b/src/rm_rune/README.md @@ -0,0 +1,21 @@ +# rm_rune + +FYT视觉24赛季能量机关识别和预测算法ROS2功能包 + +## 维护者及开源许可证 + +Maintainer : Chengfu Zou, chengfuzou@outlook.com + +``` +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +``` diff --git a/src/rm_rune/rm_rune/CMakeLists.txt b/src/rm_rune/rm_rune/CMakeLists.txt new file mode 100644 index 0000000..ed7d6fc --- /dev/null +++ b/src/rm_rune/rm_rune/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.8) +project(rm_rune) + +find_package(ament_cmake_auto REQUIRED) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + set(ament_cmake_copyright_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package() diff --git a/src/rm_rune/rm_rune/package.xml b/src/rm_rune/rm_rune/package.xml new file mode 100644 index 0000000..2e3604e --- /dev/null +++ b/src/rm_rune/rm_rune/package.xml @@ -0,0 +1,22 @@ + + + + rm_rune + 0.0.0 + TODO: Package description + chengfuzou + TODO: License declaration + + ament_cmake + + rm_interfaces + rune_detector + rune_solver + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/src/rm_rune/rune_detector/CMakeLists.txt b/src/rm_rune/rune_detector/CMakeLists.txt new file mode 100644 index 0000000..9fc3880 --- /dev/null +++ b/src/rm_rune/rune_detector/CMakeLists.txt @@ -0,0 +1,64 @@ +cmake_minimum_required(VERSION 3.10) +project(rune_detector) + +## Use C++14 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +## By adding -Wall and -Werror, the compiler does not ignore warnings anymore, +## enforcing cleaner code. +add_definitions(-Wall -Werror -O3) + +## Export compile commands for clangd +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +# find dependencies +find_package(ament_cmake_auto REQUIRED) +find_package(OpenCV REQUIRED) +find_package(Eigen3 REQUIRED) +find_package(OpenVINO REQUIRED COMPONENTS Runtime ONNX) +ament_auto_find_build_dependencies() + +########### +## Build ## +########### + +ament_auto_add_library(${PROJECT_NAME} SHARED + DIRECTORY src +) + +target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS} ${EIGEN3_LIBS} openvino::frontend::onnx openvino::runtime) +target_include_directories(${PROJECT_NAME} PUBLIC ${OpenCV_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS}) + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN fyt::rune::RuneDetectorNode + EXECUTABLE rune_detector_node +) + +############# +## Testing ## +############# + + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + list(APPEND AMENT_LINT_AUTO_EXCLUDE + ament_cmake_copyright + ament_cmake_uncrustify + ament_cmake_cpplint + ) + ament_lint_auto_find_test_dependencies() + + find_package(ament_cmake_gtest) + ament_add_gtest(test_detector test/test_detector.cpp) + target_link_libraries(test_detector ${PROJECT_NAME}) + +endif() + + +ament_auto_package( + INSTALL_TO_SHARE + model + docs +) + diff --git a/src/rm_rune/rune_detector/README.md b/src/rm_rune/rune_detector/README.md new file mode 100644 index 0000000..74c4f25 --- /dev/null +++ b/src/rm_rune/rune_detector/README.md @@ -0,0 +1,26 @@ +# rune_detector + +FYT视觉24赛季能量机关识别ROS2包。从图像中识别出能量机关的5个关键点。 + +OpenVINO推理部分参考了[rm_vision-OpenVINO](https://github.com/Ericsii/rm_vision-OpenVINO) + +## fyt::rune::RuneDetectorNode + +能量机关识别器节点,订阅图像话题,调用OpenVINO进行网络推理,定位出能量机关的五个关键点 + +### 发布话题 + +* `rune_target` (`rm_interfaces/msg/RuneTarget`) - 识别到的待击打能量机关五个关键点 +* `bebug_img` (`sensor_msgs/msg/Image`) - debug图像,绘制出识别到的目标和识别R标的二值化ROI + +### 订阅话题 + +* `image_raw` (`sensor_msgs/msg/Image`) - 工业相机采集的图像 + +### 参数 + +* `detector.model` (string, default: "yolox_rune.onnx") - 训练好的网络权重文件. +* `detector.device_type` (string, default: CPU) - 推理网络的设备,可选,CPU/GPU/AUTO 之一. +* `debug` (bool, default: true) - 是否开启debug模式. +* `requests_limit` (int, default: 5) - 推理请求队列的最大长度,大于0时意味着异步推理,会消耗更多的处理器资源换取推理速度. +* `detect_r_tag` (bool, default: true) - 是否使用传统方法识别R标,相比网络预测,传统方法识别R标会更稳定. diff --git a/src/rm_rune/rune_detector/docs/test.png b/src/rm_rune/rune_detector/docs/test.png new file mode 100644 index 0000000..88303cd Binary files /dev/null and b/src/rm_rune/rune_detector/docs/test.png differ diff --git a/src/rm_rune/rune_detector/include/rune_detector/rune_detector.hpp b/src/rm_rune/rune_detector/include/rune_detector/rune_detector.hpp new file mode 100644 index 0000000..924ebb8 --- /dev/null +++ b/src/rm_rune/rune_detector/include/rune_detector/rune_detector.hpp @@ -0,0 +1,93 @@ +// Copyright 2023 Yunlong Feng +// +// Additional modifications and features by Chengfu Zou, 2024. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RUNE_DETECTOR_RUNE_DETECTOR_HPP_ +#define RUNE_DETECTOR_RUNE_DETECTOR_HPP_ + +// std +#include +#include +#include +#include +#include +#include +#include +// third party +#include +#include +#include +// project +#include "rune_detector/types.hpp" + +namespace fyt::rune { +struct GridAndStride { + int grid0; + int grid1; + int stride; +}; + +class RuneDetector { +public: + using CallbackType = std::function &, int64_t, const cv::Mat &)>; + +public: + // Construct a new OpenVINO Detector object + explicit RuneDetector(const std::filesystem::path &model_path, + const std::string &device_name, + float conf_threshold = 0.25, + int top_k = 128, + float nms_threshold = 0.3, + bool auto_init = false); + + void init(); + + // Push an inference request to the detector + std::future pushInput(const cv::Mat &rgb_img, int64_t timestamp_nanosec); + + void setCallback(CallbackType callback); + + // Detect R tag using traditional method + // Return the center of the R tag and binary roi image (for debug) + std::tuple detectRTag(const cv::Mat &img, + int binary_thresh, + const cv::Point2f &prior); + +private: + // Do inference and call the infer_callback_ after inference + bool processCallback(const cv::Mat resized_img, + Eigen::Matrix3f transform_matrix, + int64_t timestamp_nanosec, + const cv::Mat &src_img); + +private: + std::string model_path_; + std::string device_name_; + float conf_threshold_; + int top_k_; + float nms_threshold_; + std::mutex mtx_; + std::vector strides_; + std::vector grid_strides_; + + CallbackType infer_callback_; + + std::unique_ptr ov_core_; + std::unique_ptr compiled_model_; +}; +} // namespace fyt::rune +#endif // RUNE_DETECTOR_RUNE_DETECTOR_HPP_ diff --git a/src/rm_rune/rune_detector/include/rune_detector/rune_detector_node.hpp b/src/rm_rune/rune_detector/include/rune_detector/rune_detector_node.hpp new file mode 100644 index 0000000..3b9318b --- /dev/null +++ b/src/rm_rune/rune_detector/include/rune_detector/rune_detector_node.hpp @@ -0,0 +1,97 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RUNE_DETECTOR_RUNE_DETECTOR_NODE_HPP_ +#define RUNE_DETECTOR_RUNE_DETECTOR_NODE_HPP_ + +// std +#include +#include +#include +#include +// ros2 +#include +#include +#include +#include +#include +#include +#include +// 3rd party +#include +#include +// project +#include "rm_interfaces/msg/rune_target.hpp" +#include "rm_interfaces/msg/serial_receive_data.hpp" +#include "rm_interfaces/srv/set_mode.hpp" +#include "rm_utils/common.hpp" +#include "rm_utils/heartbeat.hpp" +#include "rune_detector/rune_detector.hpp" + +namespace fyt::rune { +class RuneDetectorNode : public rclcpp::Node { +public: + RuneDetectorNode(const rclcpp::NodeOptions &options); + +private: + std::unique_ptr initDetector(); + + void imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr img_msg); + void inferResultCallback(std::vector &rune_objects, + int64_t timestamp_nanosec, + const cv::Mat &img); + + void createDebugPublishers(); + void destroyDebugPublishers(); + + void setModeCallback(const std::shared_ptr request, + std::shared_ptr response); + // Dynamic Parameter + rcl_interfaces::msg::SetParametersResult onSetParameters( + std::vector parameters); + rclcpp::Node::OnSetParametersCallbackHandle::SharedPtr on_set_parameters_callback_handle_; + + // Heartbeat + HeartBeatPublisher::SharedPtr heartbeat_; + + // Image subscription + rclcpp::Subscription::SharedPtr img_sub_; + + //Target publisher + std::string frame_id_; + rclcpp::Publisher::SharedPtr rune_pub_; + + // Enable/Disable Rune Detector + rclcpp::Service::SharedPtr set_rune_mode_srv_; + + // Rune detector + int requests_limit_; + std::queue> detect_requests_; + std::unique_ptr rune_detector_; + + // Rune params + EnemyColor detect_color_; + bool is_rune_; + bool is_big_rune_; + + // For R tag detection + bool detect_r_tag_; + int binary_thresh_; + + // Debug infomation + bool debug_; + image_transport::Publisher result_img_pub_; +}; +} // namespace fyt::rune +#endif // RUNE_DETECTOR_RUNE_DETECTOR_NODE_HPP_ diff --git a/src/rm_rune/rune_detector/include/rune_detector/types.hpp b/src/rm_rune/rune_detector/include/rune_detector/types.hpp new file mode 100644 index 0000000..bf05ddc --- /dev/null +++ b/src/rm_rune/rune_detector/include/rune_detector/types.hpp @@ -0,0 +1,89 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RUNE_DETECTOR_TYPES_HPP_ +#define RUNE_DETECTOR_TYPES_HPP_ + +// 3rd party +#include +// project +#include "rm_utils/common.hpp" + +namespace fyt::rune { + +enum class RuneType { INACTIVATED = 0, ACTIVATED }; + +struct FeaturePoints { + FeaturePoints() { + r_center = cv::Point2f(-1, -1); + bottom_right = cv::Point2f(-1, -1); + top_right = cv::Point2f(-1, -1); + top_left = cv::Point2f(-1, -1); + bottom_left = cv::Point2f(-1, -1); + } + + void reset() { + r_center = cv::Point2f(-1, -1); + bottom_right = cv::Point2f(-1, -1); + top_right = cv::Point2f(-1, -1); + top_left = cv::Point2f(-1, -1); + bottom_left = cv::Point2f(-1, -1); + } + + FeaturePoints operator+(const FeaturePoints &other) { + FeaturePoints res; + res.r_center = r_center + other.r_center; + res.bottom_right = bottom_right + other.bottom_right; + res.top_right = top_right + other.top_right; + res.top_left = top_left + other.top_left; + res.bottom_left = bottom_left + other.bottom_left; + return res; + } + + FeaturePoints operator/(const float &other) { + FeaturePoints res; + res.r_center = r_center / other; + res.bottom_right = bottom_right / other; + res.top_right = top_right / other; + res.top_left = top_left / other; + res.bottom_left = bottom_left / other; + return res; + } + + std::vector toVector2f() const { + return {r_center, bottom_left, top_left, top_right, bottom_right}; + } + std::vector toVector2i() const { + return {r_center, bottom_left, top_left, top_right, bottom_right}; + } + + cv::Point2f r_center; + cv::Point2f bottom_right; + cv::Point2f top_right; + cv::Point2f top_left; + cv::Point2f bottom_left; + + std::vector children; +}; + +struct RuneObject { + EnemyColor color; + RuneType type; + float prob; + FeaturePoints pts; + cv::Rect box; +}; + +} // namespace fyt::rune +#endif // RUNE_DETECTOR_TYPES_HPP_ diff --git a/src/rm_rune/rune_detector/model/yolox_rune.bin b/src/rm_rune/rune_detector/model/yolox_rune.bin new file mode 100644 index 0000000..a5115b7 Binary files /dev/null and b/src/rm_rune/rune_detector/model/yolox_rune.bin differ diff --git a/src/rm_rune/rune_detector/model/yolox_rune.onnx b/src/rm_rune/rune_detector/model/yolox_rune.onnx new file mode 100644 index 0000000..bce1747 Binary files /dev/null and b/src/rm_rune/rune_detector/model/yolox_rune.onnx differ diff --git a/src/rm_rune/rune_detector/model/yolox_rune.xml b/src/rm_rune/rune_detector/model/yolox_rune.xml new file mode 100644 index 0000000..bab9f92 --- /dev/null +++ b/src/rm_rune/rune_detector/model/yolox_rune.xml @@ -0,0 +1,14841 @@ + + + + + + + + 1 + 3 + 480 + 480 + + + + + + + + 40 + 3 + 4 + 4 + + + + + + + + + + + 40 + 3 + 4 + 4 + + + + + 40 + 3 + 4 + 4 + + + + + + + + 1 + 3 + 480 + 480 + + + 40 + 3 + 4 + 4 + + + + + 1 + 40 + 120 + 120 + + + + + + + + 1 + 40 + 1 + 1 + + + + + + + + + + + 1 + 40 + 1 + 1 + + + + + 1 + 40 + 1 + 1 + + + + + + + + 1 + 40 + 120 + 120 + + + 1 + 40 + 1 + 1 + + + + + 1 + 40 + 120 + 120 + + + + + + + 1 + 40 + 120 + 120 + + + + + 1 + 40 + 120 + 120 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 40 + 120 + 120 + + + + 2 + + + + + 1 + 10 + 120 + 120 + + + 1 + 30 + 120 + 120 + + + + + + + + 10 + 10 + 3 + 3 + + + + + + + + + + + 10 + 10 + 3 + 3 + + + + + 10 + 10 + 3 + 3 + + + + + + + + 1 + 10 + 120 + 120 + + + 10 + 10 + 3 + 3 + + + + + 1 + 10 + 120 + 120 + + + + + + + + 1 + 10 + 120 + 120 + + + 1 + 30 + 120 + 120 + + + + + 1 + 40 + 120 + 120 + + + + + + + + 80 + 40 + 1 + 1 + + + + + + + + + + + 80 + 40 + 1 + 1 + + + + + 80 + 40 + 1 + 1 + + + + + + + + 1 + 40 + 120 + 120 + + + 80 + 40 + 1 + 1 + + + + + 1 + 80 + 120 + 120 + + + + + + + + 1 + 80 + 1 + 1 + + + + + + + + + + + 1 + 80 + 1 + 1 + + + + + 1 + 80 + 1 + 1 + + + + + + + + 1 + 80 + 120 + 120 + + + 1 + 80 + 1 + 1 + + + + + 1 + 80 + 120 + 120 + + + + + + + + 1 + 80 + 120 + 120 + + + + + 1 + 80 + 120 + 120 + + + + + + + + 40 + 80 + 1 + 1 + + + + + + + + + + + 40 + 80 + 1 + 1 + + + + + 40 + 80 + 1 + 1 + + + + + + + + 1 + 80 + 120 + 120 + + + 40 + 80 + 1 + 1 + + + + + 1 + 40 + 120 + 120 + + + + + + + + 1 + 40 + 120 + 120 + + + 1 + 40 + 120 + 120 + + + + + 1 + 40 + 120 + 120 + + + + + + + + 80 + 40 + 2 + 2 + + + + + + + + + + + 80 + 40 + 2 + 2 + + + + + 80 + 40 + 2 + 2 + + + + + + + + 1 + 40 + 120 + 120 + + + 80 + 40 + 2 + 2 + + + + + 1 + 80 + 60 + 60 + + + + + + + + 1 + 80 + 1 + 1 + + + + + + + + + + + 1 + 80 + 1 + 1 + + + + + 1 + 80 + 1 + 1 + + + + + + + + 1 + 80 + 60 + 60 + + + 1 + 80 + 1 + 1 + + + + + 1 + 80 + 60 + 60 + + + + + + + 1 + 80 + 60 + 60 + + + + + 1 + 80 + 60 + 60 + + + + + + + + 2 + + + + + + + + 1 + 80 + 60 + 60 + + + 2 + + + + + 1 + 80 + 1 + 1 + + + + + + + + + + + 2 + + + + + + + + 1 + 80 + 1 + 1 + + + 2 + + + + + 1 + 80 + + + + + + + + 5 + 80 + + + + + + + + + + + 5 + 80 + + + + + 5 + 80 + + + + + + + + 1 + 80 + + + 5 + 80 + + + + + 1 + 5 + + + + + + + + 1 + 5 + + + + + + + + + + + 1 + 5 + + + + + 1 + 5 + + + + + + + + 1 + 5 + + + 1 + 5 + + + + + 1 + 5 + + + + + + + 1 + 5 + + + + + 1 + 5 + + + + + + + + 80 + 5 + + + + + + + + + + + 80 + 5 + + + + + 80 + 5 + + + + + + + + 1 + 5 + + + 80 + 5 + + + + + 1 + 80 + + + + + + + + 1 + 80 + + + + + + + + + + + 1 + 80 + + + + + 1 + 80 + + + + + + + + 1 + 80 + + + 1 + 80 + + + + + 1 + 80 + + + + + + + 1 + 80 + + + + + 1 + 80 + + + + + + + + + + + 4 + + + + + + + + 1 + 80 + + + 4 + + + + + 1 + 80 + 1 + 1 + + + + + + + + 1 + 80 + 60 + 60 + + + 1 + 80 + 1 + 1 + + + + + 1 + 80 + 60 + 60 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 80 + 60 + 60 + + + + 2 + + + + + 1 + 20 + 60 + 60 + + + 1 + 60 + 60 + 60 + + + + + + + + 20 + 20 + 3 + 3 + + + + + + + + + + + 20 + 20 + 3 + 3 + + + + + 20 + 20 + 3 + 3 + + + + + + + + 1 + 20 + 60 + 60 + + + 20 + 20 + 3 + 3 + + + + + 1 + 20 + 60 + 60 + + + + + + + + 1 + 20 + 60 + 60 + + + 1 + 60 + 60 + 60 + + + + + 1 + 80 + 60 + 60 + + + + + + + + 160 + 80 + 1 + 1 + + + + + + + + + + + 160 + 80 + 1 + 1 + + + + + 160 + 80 + 1 + 1 + + + + + + + + 1 + 80 + 60 + 60 + + + 160 + 80 + 1 + 1 + + + + + 1 + 160 + 60 + 60 + + + + + + + + 1 + 160 + 1 + 1 + + + + + + + + + + + 1 + 160 + 1 + 1 + + + + + 1 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 60 + 60 + + + 1 + 160 + 1 + 1 + + + + + 1 + 160 + 60 + 60 + + + + + + + + 1 + 160 + 60 + 60 + + + + + 1 + 160 + 60 + 60 + + + + + + + + 80 + 160 + 1 + 1 + + + + + + + + + + + 80 + 160 + 1 + 1 + + + + + 80 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 60 + 60 + + + 80 + 160 + 1 + 1 + + + + + 1 + 80 + 60 + 60 + + + + + + + + 1 + 80 + 60 + 60 + + + 1 + 80 + 60 + 60 + + + + + 1 + 80 + 60 + 60 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 80 + 60 + 60 + + + + 2 + + + + + 1 + 20 + 60 + 60 + + + 1 + 60 + 60 + 60 + + + + + + + + 20 + 20 + 3 + 3 + + + + + + + + + + + 20 + 20 + 3 + 3 + + + + + 20 + 20 + 3 + 3 + + + + + + + + 1 + 20 + 60 + 60 + + + 20 + 20 + 3 + 3 + + + + + 1 + 20 + 60 + 60 + + + + + + + + 1 + 20 + 60 + 60 + + + 1 + 60 + 60 + 60 + + + + + 1 + 80 + 60 + 60 + + + + + + + + 160 + 80 + 1 + 1 + + + + + + + + + + + 160 + 80 + 1 + 1 + + + + + 160 + 80 + 1 + 1 + + + + + + + + 1 + 80 + 60 + 60 + + + 160 + 80 + 1 + 1 + + + + + 1 + 160 + 60 + 60 + + + + + + + + 1 + 160 + 1 + 1 + + + + + + + + + + + 1 + 160 + 1 + 1 + + + + + 1 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 60 + 60 + + + 1 + 160 + 1 + 1 + + + + + 1 + 160 + 60 + 60 + + + + + + + + 1 + 160 + 60 + 60 + + + + + 1 + 160 + 60 + 60 + + + + + + + + 80 + 160 + 1 + 1 + + + + + + + + + + + 80 + 160 + 1 + 1 + + + + + 80 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 60 + 60 + + + 80 + 160 + 1 + 1 + + + + + 1 + 80 + 60 + 60 + + + + + + + + 1 + 80 + 60 + 60 + + + 1 + 80 + 60 + 60 + + + + + 1 + 80 + 60 + 60 + + + + + + + + 160 + 80 + 2 + 2 + + + + + + + + + + + 160 + 80 + 2 + 2 + + + + + 160 + 80 + 2 + 2 + + + + + + + + 1 + 80 + 60 + 60 + + + 160 + 80 + 2 + 2 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 1 + 1 + + + + + + + + + + + 1 + 160 + 1 + 1 + + + + + 1 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 2 + + + + + + + + 1 + 160 + 30 + 30 + + + 2 + + + + + 1 + 160 + 1 + 1 + + + + + + + + + + + 2 + + + + + + + + 1 + 160 + 1 + 1 + + + 2 + + + + + 1 + 160 + + + + + + + + 10 + 160 + + + + + + + + + + + 10 + 160 + + + + + 10 + 160 + + + + + + + + 1 + 160 + + + 10 + 160 + + + + + 1 + 10 + + + + + + + + 1 + 10 + + + + + + + + + + + 1 + 10 + + + + + 1 + 10 + + + + + + + + 1 + 10 + + + 1 + 10 + + + + + 1 + 10 + + + + + + + 1 + 10 + + + + + 1 + 10 + + + + + + + + 160 + 10 + + + + + + + + + + + 160 + 10 + + + + + 160 + 10 + + + + + + + + 1 + 10 + + + 160 + 10 + + + + + 1 + 160 + + + + + + + + 1 + 160 + + + + + + + + + + + 1 + 160 + + + + + 1 + 160 + + + + + + + + 1 + 160 + + + 1 + 160 + + + + + 1 + 160 + + + + + + + 1 + 160 + + + + + 1 + 160 + + + + + + + + + + + 4 + + + + + + + + 1 + 160 + + + 4 + + + + + 1 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 160 + 30 + 30 + + + + 2 + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + + + + 40 + 40 + 3 + 3 + + + + + + + + + + + 40 + 40 + 3 + 3 + + + + + 40 + 40 + 3 + 3 + + + + + + + + 1 + 40 + 30 + 30 + + + 40 + 40 + 3 + 3 + + + + + 1 + 40 + 30 + 30 + + + + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 1 + 1 + + + + + + + + + + + 320 + 160 + 1 + 1 + + + + + 320 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 30 + 30 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 160 + 320 + 1 + 1 + + + + + + + + + + + 160 + 320 + 1 + 1 + + + + + 160 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 160 + 320 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 160 + 30 + 30 + + + + 2 + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + + + + 40 + 40 + 3 + 3 + + + + + + + + + + + 40 + 40 + 3 + 3 + + + + + 40 + 40 + 3 + 3 + + + + + + + + 1 + 40 + 30 + 30 + + + 40 + 40 + 3 + 3 + + + + + 1 + 40 + 30 + 30 + + + + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 1 + 1 + + + + + + + + + + + 320 + 160 + 1 + 1 + + + + + 320 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 30 + 30 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 160 + 320 + 1 + 1 + + + + + + + + + + + 160 + 320 + 1 + 1 + + + + + 160 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 160 + 320 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 160 + 30 + 30 + + + + 2 + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + + + + 40 + 40 + 3 + 3 + + + + + + + + + + + 40 + 40 + 3 + 3 + + + + + 40 + 40 + 3 + 3 + + + + + + + + 1 + 40 + 30 + 30 + + + 40 + 40 + 3 + 3 + + + + + 1 + 40 + 30 + 30 + + + + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 1 + 1 + + + + + + + + + + + 320 + 160 + 1 + 1 + + + + + 320 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 30 + 30 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 160 + 320 + 1 + 1 + + + + + + + + + + + 160 + 320 + 1 + 1 + + + + + 160 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 160 + 320 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 160 + 30 + 30 + + + + 2 + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + + + + 40 + 40 + 3 + 3 + + + + + + + + + + + 40 + 40 + 3 + 3 + + + + + 40 + 40 + 3 + 3 + + + + + + + + 1 + 40 + 30 + 30 + + + 40 + 40 + 3 + 3 + + + + + 1 + 40 + 30 + 30 + + + + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 1 + 1 + + + + + + + + + + + 320 + 160 + 1 + 1 + + + + + 320 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 30 + 30 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 160 + 320 + 1 + 1 + + + + + + + + + + + 160 + 320 + 1 + 1 + + + + + 160 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 160 + 320 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 160 + 30 + 30 + + + + 2 + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + + + + 40 + 40 + 3 + 3 + + + + + + + + + + + 40 + 40 + 3 + 3 + + + + + 40 + 40 + 3 + 3 + + + + + + + + 1 + 40 + 30 + 30 + + + 40 + 40 + 3 + 3 + + + + + 1 + 40 + 30 + 30 + + + + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 1 + 1 + + + + + + + + + + + 320 + 160 + 1 + 1 + + + + + 320 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 30 + 30 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 160 + 320 + 1 + 1 + + + + + + + + + + + 160 + 320 + 1 + 1 + + + + + 160 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 160 + 320 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 160 + 30 + 30 + + + + 2 + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + + + + 40 + 40 + 3 + 3 + + + + + + + + + + + 40 + 40 + 3 + 3 + + + + + 40 + 40 + 3 + 3 + + + + + + + + 1 + 40 + 30 + 30 + + + 40 + 40 + 3 + 3 + + + + + 1 + 40 + 30 + 30 + + + + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 1 + 1 + + + + + + + + + + + 320 + 160 + 1 + 1 + + + + + 320 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 30 + 30 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 160 + 320 + 1 + 1 + + + + + + + + + + + 160 + 320 + 1 + 1 + + + + + 160 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 160 + 320 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 160 + 30 + 30 + + + + 2 + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + + + + 40 + 40 + 3 + 3 + + + + + + + + + + + 40 + 40 + 3 + 3 + + + + + 40 + 40 + 3 + 3 + + + + + + + + 1 + 40 + 30 + 30 + + + 40 + 40 + 3 + 3 + + + + + 1 + 40 + 30 + 30 + + + + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 1 + 1 + + + + + + + + + + + 320 + 160 + 1 + 1 + + + + + 320 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 30 + 30 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 160 + 320 + 1 + 1 + + + + + + + + + + + 160 + 320 + 1 + 1 + + + + + 160 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 160 + 320 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 160 + 30 + 30 + + + + 2 + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + + + + 40 + 40 + 3 + 3 + + + + + + + + + + + 40 + 40 + 3 + 3 + + + + + 40 + 40 + 3 + 3 + + + + + + + + 1 + 40 + 30 + 30 + + + 40 + 40 + 3 + 3 + + + + + 1 + 40 + 30 + 30 + + + + + + + + 1 + 40 + 30 + 30 + + + 1 + 120 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 1 + 1 + + + + + + + + + + + 320 + 160 + 1 + 1 + + + + + 320 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 1 + 320 + 30 + 30 + + + + + 1 + 320 + 30 + 30 + + + + + + + + 160 + 320 + 1 + 1 + + + + + + + + + + + 160 + 320 + 1 + 1 + + + + + 160 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 30 + 30 + + + 160 + 320 + 1 + 1 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 1 + 160 + 30 + 30 + + + 1 + 160 + 30 + 30 + + + + + 1 + 160 + 30 + 30 + + + + + + + + 320 + 160 + 2 + 2 + + + + + + + + + + + 320 + 160 + 2 + 2 + + + + + 320 + 160 + 2 + 2 + + + + + + + + 1 + 160 + 30 + 30 + + + 320 + 160 + 2 + 2 + + + + + 1 + 320 + 15 + 15 + + + + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 15 + 15 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 15 + 15 + + + + + + + 1 + 320 + 15 + 15 + + + + + 1 + 320 + 15 + 15 + + + + + + + + 2 + + + + + + + + 1 + 320 + 15 + 15 + + + 2 + + + + + 1 + 320 + 1 + 1 + + + + + + + + + + + 2 + + + + + + + + 1 + 320 + 1 + 1 + + + 2 + + + + + 1 + 320 + + + + + + + + 20 + 320 + + + + + + + + + + + 20 + 320 + + + + + 20 + 320 + + + + + + + + 1 + 320 + + + 20 + 320 + + + + + 1 + 20 + + + + + + + + 1 + 20 + + + + + + + + + + + 1 + 20 + + + + + 1 + 20 + + + + + + + + 1 + 20 + + + 1 + 20 + + + + + 1 + 20 + + + + + + + 1 + 20 + + + + + 1 + 20 + + + + + + + + 320 + 20 + + + + + + + + + + + 320 + 20 + + + + + 320 + 20 + + + + + + + + 1 + 20 + + + 320 + 20 + + + + + 1 + 320 + + + + + + + + 1 + 320 + + + + + + + + + + + 1 + 320 + + + + + 1 + 320 + + + + + + + + 1 + 320 + + + 1 + 320 + + + + + 1 + 320 + + + + + + + 1 + 320 + + + + + 1 + 320 + + + + + + + + + + + 4 + + + + + + + + 1 + 320 + + + 4 + + + + + 1 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 15 + 15 + + + 1 + 320 + 1 + 1 + + + + + 1 + 320 + 15 + 15 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 320 + 15 + 15 + + + + 2 + + + + + 1 + 80 + 15 + 15 + + + 1 + 240 + 15 + 15 + + + + + + + + 80 + 80 + 3 + 3 + + + + + + + + + + + 80 + 80 + 3 + 3 + + + + + 80 + 80 + 3 + 3 + + + + + + + + 1 + 80 + 15 + 15 + + + 80 + 80 + 3 + 3 + + + + + 1 + 80 + 15 + 15 + + + + + + + + 1 + 80 + 15 + 15 + + + 1 + 240 + 15 + 15 + + + + + 1 + 320 + 15 + 15 + + + + + + + + 640 + 320 + 1 + 1 + + + + + + + + + + + 640 + 320 + 1 + 1 + + + + + 640 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 15 + 15 + + + 640 + 320 + 1 + 1 + + + + + 1 + 640 + 15 + 15 + + + + + + + + 1 + 640 + 1 + 1 + + + + + + + + + + + 1 + 640 + 1 + 1 + + + + + 1 + 640 + 1 + 1 + + + + + + + + 1 + 640 + 15 + 15 + + + 1 + 640 + 1 + 1 + + + + + 1 + 640 + 15 + 15 + + + + + + + + 1 + 640 + 15 + 15 + + + + + 1 + 640 + 15 + 15 + + + + + + + + 320 + 640 + 1 + 1 + + + + + + + + + + + 320 + 640 + 1 + 1 + + + + + 320 + 640 + 1 + 1 + + + + + + + + 1 + 640 + 15 + 15 + + + 320 + 640 + 1 + 1 + + + + + 1 + 320 + 15 + 15 + + + + + + + + 1 + 320 + 15 + 15 + + + 1 + 320 + 15 + 15 + + + + + 1 + 320 + 15 + 15 + + + + + + + + + + + + + + 2 + + + + + + + 1 + 320 + 15 + 15 + + + + 2 + + + + + 1 + 80 + 15 + 15 + + + 1 + 240 + 15 + 15 + + + + + + + + 80 + 80 + 3 + 3 + + + + + + + + + + + 80 + 80 + 3 + 3 + + + + + 80 + 80 + 3 + 3 + + + + + + + + 1 + 80 + 15 + 15 + + + 80 + 80 + 3 + 3 + + + + + 1 + 80 + 15 + 15 + + + + + + + + 1 + 80 + 15 + 15 + + + 1 + 240 + 15 + 15 + + + + + 1 + 320 + 15 + 15 + + + + + + + + 640 + 320 + 1 + 1 + + + + + + + + + + + 640 + 320 + 1 + 1 + + + + + 640 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 15 + 15 + + + 640 + 320 + 1 + 1 + + + + + 1 + 640 + 15 + 15 + + + + + + + + 1 + 640 + 1 + 1 + + + + + + + + + + + 1 + 640 + 1 + 1 + + + + + 1 + 640 + 1 + 1 + + + + + + + + 1 + 640 + 15 + 15 + + + 1 + 640 + 1 + 1 + + + + + 1 + 640 + 15 + 15 + + + + + + + + 1 + 640 + 15 + 15 + + + + + 1 + 640 + 15 + 15 + + + + + + + + 320 + 640 + 1 + 1 + + + + + + + + + + + 320 + 640 + 1 + 1 + + + + + 320 + 640 + 1 + 1 + + + + + + + + 1 + 640 + 15 + 15 + + + 320 + 640 + 1 + 1 + + + + + 1 + 320 + 15 + 15 + + + + + + + + 1 + 320 + 15 + 15 + + + 1 + 320 + 15 + 15 + + + + + 1 + 320 + 15 + 15 + + + + + + + + 128 + 320 + 1 + 1 + + + + + + + + + + + 128 + 320 + 1 + 1 + + + + + 128 + 320 + 1 + 1 + + + + + + + + 1 + 320 + 15 + 15 + + + 128 + 320 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + + + + 4 + + + + + + + + 1 + 128 + 15 + 15 + + + 4 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 128 + 160 + 1 + 1 + + + + + + + + + + + 128 + 160 + 1 + 1 + + + + + 128 + 160 + 1 + 1 + + + + + + + + 1 + 160 + 30 + 30 + + + 128 + 160 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 30 + 30 + + + + + 1 + 256 + 30 + 30 + + + + + + + + 64 + 256 + 1 + 1 + + + + + + + + + + + 64 + 256 + 1 + 1 + + + + + 64 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 30 + 30 + + + 64 + 256 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 256 + 1 + 1 + 5 + 5 + + + + + + + + + + + 256 + 1 + 1 + 5 + 5 + + + + + 256 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 256 + 30 + 30 + + + 256 + 1 + 1 + 5 + 5 + + + + + 1 + 256 + 30 + 30 + + + + + + + + 1 + 256 + 1 + 1 + + + + + + + + + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 30 + 30 + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 30 + 30 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 30 + 30 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 30 + 30 + + + 4 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 128 + 80 + 1 + 1 + + + + + + + + + + + 128 + 80 + 1 + 1 + + + + + 128 + 80 + 1 + 1 + + + + + + + + 1 + 80 + 60 + 60 + + + 128 + 80 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + 1 + 128 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 60 + 60 + + + + + 1 + 256 + 60 + 60 + + + + + + + + 64 + 256 + 1 + 1 + + + + + + + + + + + 64 + 256 + 1 + 1 + + + + + 64 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 60 + 60 + + + 64 + 256 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + 1 + 64 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + 1 + 64 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 256 + 1 + 1 + 5 + 5 + + + + + + + + + + + 256 + 1 + 1 + 5 + 5 + + + + + 256 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 256 + 60 + 60 + + + 256 + 1 + 1 + 5 + 5 + + + + + 1 + 256 + 60 + 60 + + + + + + + + 1 + 256 + 1 + 1 + + + + + + + + + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 60 + 60 + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 60 + 60 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 60 + 60 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + 1 + 64 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 1 + 1 + 5 + 5 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 2 + 64 + 32 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + 1 + 128 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 128 + 60 + 60 + + + 128 + 1 + 1 + 5 + 5 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 2 + 64 + 64 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + 1 + 128 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 60 + 60 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 10 + 64 + 1 + 1 + + + + + + + + + + + 10 + 64 + 1 + 1 + + + + + 10 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 10 + 64 + 1 + 1 + + + + + 1 + 10 + 60 + 60 + + + + + + + + 1 + 10 + 1 + 1 + + + + + + + + + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 1 + 1 + + + + + + + + 1 + 10 + 60 + 60 + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 1 + 60 + 60 + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 1 + 60 + 60 + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 60 + 60 + + + + + + + 1 + 1 + 60 + 60 + + + + + 1 + 1 + 60 + 60 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 60 + 60 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 4 + 64 + 1 + 1 + + + + + + + + + + + 4 + 64 + 1 + 1 + + + + + 4 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 4 + 64 + 1 + 1 + + + + + 1 + 4 + 60 + 60 + + + + + + + + 1 + 4 + 1 + 1 + + + + + + + + + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 1 + 1 + + + + + + + + 1 + 4 + 60 + 60 + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 60 + 60 + + + + + + + 1 + 4 + 60 + 60 + + + + + 1 + 4 + 60 + 60 + + + + + + + + 1 + 10 + 60 + 60 + + + 1 + 1 + 60 + 60 + + + 1 + 4 + 60 + 60 + + + + + 1 + 15 + 60 + 60 + + + + + + + + + + + 3 + + + + + + + + 1 + 15 + 60 + 60 + + + 3 + + + + + 1 + 15 + 3600 + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 128 + 60 + 60 + + + 128 + 1 + 1 + 5 + 5 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 30 + 30 + + + + + 1 + 256 + 30 + 30 + + + + + + + + 64 + 256 + 1 + 1 + + + + + + + + + + + 64 + 256 + 1 + 1 + + + + + 64 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 30 + 30 + + + 64 + 256 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 256 + 1 + 1 + 5 + 5 + + + + + + + + + + + 256 + 1 + 1 + 5 + 5 + + + + + 256 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 256 + 30 + 30 + + + 256 + 1 + 1 + 5 + 5 + + + + + 1 + 256 + 30 + 30 + + + + + + + + 1 + 256 + 1 + 1 + + + + + + + + + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 30 + 30 + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 30 + 30 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 30 + 30 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 5 + 5 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 2 + 64 + 32 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 1 + 1 + 5 + 5 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 2 + 64 + 64 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 30 + 30 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 10 + 64 + 1 + 1 + + + + + + + + + + + 10 + 64 + 1 + 1 + + + + + 10 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 10 + 64 + 1 + 1 + + + + + 1 + 10 + 30 + 30 + + + + + + + + 1 + 10 + 1 + 1 + + + + + + + + + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 1 + 1 + + + + + + + + 1 + 10 + 30 + 30 + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 1 + 30 + 30 + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 1 + 30 + 30 + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 30 + 30 + + + + + + + 1 + 1 + 30 + 30 + + + + + 1 + 1 + 30 + 30 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 30 + 30 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 4 + 64 + 1 + 1 + + + + + + + + + + + 4 + 64 + 1 + 1 + + + + + 4 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 4 + 64 + 1 + 1 + + + + + 1 + 4 + 30 + 30 + + + + + + + + 1 + 4 + 1 + 1 + + + + + + + + + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 1 + 1 + + + + + + + + 1 + 4 + 30 + 30 + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 30 + 30 + + + + + + + 1 + 4 + 30 + 30 + + + + + 1 + 4 + 30 + 30 + + + + + + + + 1 + 10 + 30 + 30 + + + 1 + 1 + 30 + 30 + + + 1 + 4 + 30 + 30 + + + + + 1 + 15 + 30 + 30 + + + + + + + + 1 + 15 + 30 + 30 + + + 3 + + + + + 1 + 15 + 900 + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 1 + 1 + 5 + 5 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 64 + 256 + 1 + 1 + + + + + + + + + + + 64 + 256 + 1 + 1 + + + + + 64 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 64 + 256 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + 1 + 64 + 15 + 15 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 15 + 15 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + 1 + 64 + 15 + 15 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 15 + 15 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 256 + 1 + 1 + 5 + 5 + + + + + + + + + + + 256 + 1 + 1 + 5 + 5 + + + + + 256 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 256 + 15 + 15 + + + 256 + 1 + 1 + 5 + 5 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 1 + 256 + 1 + 1 + + + + + + + + + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + 1 + 64 + 15 + 15 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 64 + 15 + 15 + + + 64 + 1 + 1 + 5 + 5 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 2 + 64 + 32 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 1 + 1 + 5 + 5 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 2 + 64 + 64 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 15 + 15 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 10 + 64 + 1 + 1 + + + + + + + + + + + 10 + 64 + 1 + 1 + + + + + 10 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 10 + 64 + 1 + 1 + + + + + 1 + 10 + 15 + 15 + + + + + + + + 1 + 10 + 1 + 1 + + + + + + + + + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 1 + 1 + + + + + + + + 1 + 10 + 15 + 15 + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 1 + 15 + 15 + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 1 + 15 + 15 + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 15 + 15 + + + + + + + 1 + 1 + 15 + 15 + + + + + 1 + 1 + 15 + 15 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 15 + 15 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 4 + 64 + 1 + 1 + + + + + + + + + + + 4 + 64 + 1 + 1 + + + + + 4 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 4 + 64 + 1 + 1 + + + + + 1 + 4 + 15 + 15 + + + + + + + + 1 + 4 + 1 + 1 + + + + + + + + + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 1 + 1 + + + + + + + + 1 + 4 + 15 + 15 + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 15 + 15 + + + + + + + 1 + 4 + 15 + 15 + + + + + 1 + 4 + 15 + 15 + + + + + + + + 1 + 10 + 15 + 15 + + + 1 + 1 + 15 + 15 + + + 1 + 4 + 15 + 15 + + + + + 1 + 15 + 15 + 15 + + + + + + + + 1 + 15 + 15 + 15 + + + 3 + + + + + 1 + 15 + 225 + + + + + + + + 1 + 15 + 3600 + + + 1 + 15 + 900 + + + 1 + 15 + 225 + + + + + 1 + 15 + 4725 + + + + + + + + 3 + + + + + + + 1 + 15 + 4725 + + + 3 + + + + + 1 + 4725 + 15 + + + + + + + 1 + 4725 + 15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/rm_rune/rune_detector/model/yolox_rune_3.6m.bin b/src/rm_rune/rune_detector/model/yolox_rune_3.6m.bin new file mode 100644 index 0000000..21fcf96 Binary files /dev/null and b/src/rm_rune/rune_detector/model/yolox_rune_3.6m.bin differ diff --git a/src/rm_rune/rune_detector/model/yolox_rune_3.6m.onnx b/src/rm_rune/rune_detector/model/yolox_rune_3.6m.onnx new file mode 100644 index 0000000..892991d Binary files /dev/null and b/src/rm_rune/rune_detector/model/yolox_rune_3.6m.onnx differ diff --git a/src/rm_rune/rune_detector/model/yolox_rune_3.6m.xml b/src/rm_rune/rune_detector/model/yolox_rune_3.6m.xml new file mode 100644 index 0000000..0b9b12a --- /dev/null +++ b/src/rm_rune/rune_detector/model/yolox_rune_3.6m.xml @@ -0,0 +1,15207 @@ + + + + + + + + 1 + 3 + 480 + 480 + + + + + + + + 16 + 3 + 5 + 5 + + + + + + + + + + + 16 + 3 + 5 + 5 + + + + + 16 + 3 + 5 + 5 + + + + + + + + 1 + 3 + 480 + 480 + + + 16 + 3 + 5 + 5 + + + + + 1 + 16 + 240 + 240 + + + + + + + + 1 + 16 + 1 + 1 + + + + + + + + + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 240 + 240 + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 240 + 240 + + + + + + + 1 + 16 + 240 + 240 + + + + + 1 + 16 + 240 + 240 + + + + + + + + 16 + 1 + 1 + 3 + 3 + + + + + + + + + + + 16 + 1 + 1 + 3 + 3 + + + + + 16 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 16 + 240 + 240 + + + 16 + 1 + 1 + 3 + 3 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 1 + 16 + 1 + 1 + + + + + + + + + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 32 + 16 + 1 + 1 + + + + + + + + + + + 32 + 16 + 1 + 1 + + + + + 32 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 32 + 16 + 1 + 1 + + + + + 1 + 32 + 120 + 120 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 120 + 120 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 120 + 120 + + + + + + + 1 + 32 + 120 + 120 + + + + + 1 + 32 + 120 + 120 + + + + + + + + 16 + 32 + 1 + 1 + + + + + + + + + + + 16 + 32 + 1 + 1 + + + + + 16 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 120 + 120 + + + 16 + 32 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 1 + 16 + 1 + 1 + + + + + + + + + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + 1 + 16 + 120 + 120 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 16 + 16 + 1 + 1 + + + + + + + + + + + 16 + 16 + 1 + 1 + + + + + 16 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 16 + 16 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 1 + 16 + 1 + 1 + + + + + + + + + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + 1 + 16 + 120 + 120 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 16 + 1 + 1 + 3 + 3 + + + + + + + + + + + 16 + 1 + 1 + 3 + 3 + + + + + 16 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 16 + 120 + 120 + + + 16 + 1 + 1 + 3 + 3 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 1 + 16 + 1 + 1 + + + + + + + + + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 16 + 16 + 1 + 1 + + + + + + + + + + + 16 + 16 + 1 + 1 + + + + + 16 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 16 + 16 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 1 + 16 + 1 + 1 + + + + + + + + + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + 1 + 16 + 120 + 120 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 1 + 16 + 120 + 120 + + + 1 + 16 + 120 + 120 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 16 + 32 + 1 + 1 + + + + + + + + + + + 16 + 32 + 1 + 1 + + + + + 16 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 120 + 120 + + + 16 + 32 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 1 + 16 + 1 + 1 + + + + + + + + + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 1 + 1 + + + + + + + + 1 + 16 + 120 + 120 + + + 1 + 16 + 1 + 1 + + + + + 1 + 16 + 120 + 120 + + + + + + + 1 + 16 + 120 + 120 + + + + + 1 + 16 + 120 + 120 + + + + + + + + 1 + 16 + 120 + 120 + + + 1 + 16 + 120 + 120 + + + + + 1 + 32 + 120 + 120 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 120 + 120 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 120 + 120 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 120 + 120 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 120 + 120 + + + + + + + 1 + 32 + 120 + 120 + + + + + 1 + 32 + 120 + 120 + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 32 + 120 + 120 + + + 32 + 1 + 1 + 3 + 3 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 64 + 32 + 1 + 1 + + + + + + + + + + + 64 + 32 + 1 + 1 + + + + + 64 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 64 + 32 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + 1 + 64 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 32 + 64 + 1 + 1 + + + + + + + + + + + 32 + 64 + 1 + 1 + + + + + 32 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 32 + 64 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 1 + 1 + 3 + 3 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 1 + 1 + 3 + 3 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 1 + 1 + 3 + 3 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 64 + 1 + 1 + + + + + + + + + + + 32 + 64 + 1 + 1 + + + + + 32 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 32 + 64 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + 1 + 64 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 128 + 64 + 1 + 1 + + + + + + + + + + + 128 + 64 + 1 + 1 + + + + + 128 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 128 + 64 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 128 + 1 + 1 + 3 + 3 + + + + + + + + + + + 128 + 1 + 1 + 3 + 3 + + + + + 128 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 1 + 1 + 3 + 3 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 256 + 128 + 1 + 1 + + + + + + + + + + + 256 + 128 + 1 + 1 + + + + + 256 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 256 + 128 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 1 + 256 + 1 + 1 + + + + + + + + + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + 1 + 256 + 15 + 15 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + 1 + 512 + 15 + 15 + + + + + + + + 256 + 512 + 1 + 1 + + + + + + + + + + + 256 + 512 + 1 + 1 + + + + + 256 + 512 + 1 + 1 + + + + + + + + 1 + 512 + 15 + 15 + + + 256 + 512 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 1 + 256 + 1 + 1 + + + + + + + + + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + 1 + 256 + 15 + 15 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 1 + 1 + 3 + 3 + + + + + + + + + + + 128 + 1 + 1 + 3 + 3 + + + + + 128 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 1 + 1 + 3 + 3 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 256 + 256 + 1 + 1 + + + + + + + + + + + 256 + 256 + 1 + 1 + + + + + 256 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 256 + 256 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 1 + 256 + 1 + 1 + + + + + + + + + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + 1 + 256 + 15 + 15 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + + + + 4 + + + + + + + + 1 + 128 + 15 + 15 + + + 4 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 30 + 30 + + + + + 1 + 256 + 30 + 30 + + + + + + + + 64 + 256 + 1 + 1 + + + + + + + + + + + 64 + 256 + 1 + 1 + + + + + 64 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 30 + 30 + + + 64 + 256 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 256 + 1 + 1 + + + + + + + + + + + 64 + 256 + 1 + 1 + + + + + 64 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 30 + 30 + + + 64 + 256 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 4 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 32 + 128 + 1 + 1 + + + + + + + + + + + 32 + 128 + 1 + 1 + + + + + 32 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 32 + 128 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + + + + 32 + 1 + 1 + 3 + 3 + + + + + 32 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 1 + 1 + 3 + 3 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 32 + 1 + 1 + + + + + + + + + + + 32 + 32 + 1 + 1 + + + + + 32 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 32 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 32 + 128 + 1 + 1 + + + + + + + + + + + 32 + 128 + 1 + 1 + + + + + 32 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 32 + 128 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 1 + 1 + + + + + + + + + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 1 + 1 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 1 + 1 + + + + + 1 + 32 + 60 + 60 + + + + + + + 1 + 32 + 60 + 60 + + + + + 1 + 32 + 60 + 60 + + + + + + + + 1 + 32 + 60 + 60 + + + 1 + 32 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + 1 + 64 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + 1 + 64 + 60 + 60 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 1 + 1 + 5 + 5 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 2 + 64 + 32 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + 1 + 128 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 128 + 60 + 60 + + + 128 + 1 + 1 + 5 + 5 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 2 + 64 + 64 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 60 + 60 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 60 + 60 + + + + + + + 1 + 128 + 60 + 60 + + + + + 1 + 128 + 60 + 60 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 60 + 60 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 10 + 64 + 1 + 1 + + + + + + + + + + + 10 + 64 + 1 + 1 + + + + + 10 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 10 + 64 + 1 + 1 + + + + + 1 + 10 + 60 + 60 + + + + + + + + 1 + 10 + 1 + 1 + + + + + + + + + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 1 + 1 + + + + + + + + 1 + 10 + 60 + 60 + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 60 + 60 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 1 + 64 + 1 + 1 + + + + + 1 + 1 + 60 + 60 + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 1 + 60 + 60 + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 60 + 60 + + + + + + + 1 + 1 + 60 + 60 + + + + + 1 + 1 + 60 + 60 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 60 + 60 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 60 + 60 + + + + + + + + 4 + 64 + 1 + 1 + + + + + + + + + + + 4 + 64 + 1 + 1 + + + + + 4 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 60 + 60 + + + 4 + 64 + 1 + 1 + + + + + 1 + 4 + 60 + 60 + + + + + + + + 1 + 4 + 1 + 1 + + + + + + + + + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 1 + 1 + + + + + + + + 1 + 4 + 60 + 60 + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 60 + 60 + + + + + + + 1 + 4 + 60 + 60 + + + + + 1 + 4 + 60 + 60 + + + + + + + + 1 + 10 + 60 + 60 + + + 1 + 1 + 60 + 60 + + + 1 + 4 + 60 + 60 + + + + + 1 + 15 + 60 + 60 + + + + + + + + + + + 3 + + + + + + + + 1 + 15 + 60 + 60 + + + 3 + + + + + 1 + 15 + 3600 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 60 + 60 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + + + + 64 + 1 + 1 + 3 + 3 + + + + + 64 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 3 + 3 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 64 + 1 + 1 + + + + + + + + + + + 64 + 64 + 1 + 1 + + + + + 64 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 64 + 128 + 1 + 1 + + + + + + + + + + + 64 + 128 + 1 + 1 + + + + + 64 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 64 + 128 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + 1 + 64 + 30 + 30 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 64 + 30 + 30 + + + 64 + 1 + 1 + 5 + 5 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 2 + 64 + 32 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 1 + 1 + 5 + 5 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 2 + 64 + 64 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 30 + 30 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 30 + 30 + + + + + + + 1 + 128 + 30 + 30 + + + + + 1 + 128 + 30 + 30 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 30 + 30 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 10 + 64 + 1 + 1 + + + + + + + + + + + 10 + 64 + 1 + 1 + + + + + 10 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 10 + 64 + 1 + 1 + + + + + 1 + 10 + 30 + 30 + + + + + + + + 1 + 10 + 1 + 1 + + + + + + + + + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 1 + 1 + + + + + + + + 1 + 10 + 30 + 30 + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 30 + 30 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 1 + 64 + 1 + 1 + + + + + 1 + 1 + 30 + 30 + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 1 + 30 + 30 + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 30 + 30 + + + + + + + 1 + 1 + 30 + 30 + + + + + 1 + 1 + 30 + 30 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 30 + 30 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 30 + 30 + + + + + + + + 4 + 64 + 1 + 1 + + + + + + + + + + + 4 + 64 + 1 + 1 + + + + + 4 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 30 + 30 + + + 4 + 64 + 1 + 1 + + + + + 1 + 4 + 30 + 30 + + + + + + + + 1 + 4 + 1 + 1 + + + + + + + + + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 1 + 1 + + + + + + + + 1 + 4 + 30 + 30 + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 30 + 30 + + + + + + + 1 + 4 + 30 + 30 + + + + + 1 + 4 + 30 + 30 + + + + + + + + 1 + 10 + 30 + 30 + + + 1 + 1 + 30 + 30 + + + 1 + 4 + 30 + 30 + + + + + 1 + 15 + 30 + 30 + + + + + + + + 1 + 15 + 30 + 30 + + + 3 + + + + + 1 + 15 + 900 + + + + + + + + 128 + 1 + 1 + 3 + 3 + + + + + + + + + + + 128 + 1 + 1 + 3 + 3 + + + + + 128 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 128 + 30 + 30 + + + 128 + 1 + 1 + 3 + 3 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 1 + 1 + 3 + 3 + + + + + + + + + + + 128 + 1 + 1 + 3 + 3 + + + + + 128 + 1 + 1 + 3 + 3 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 1 + 1 + 3 + 3 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 128 + 1 + 1 + + + + + + + + + + + 128 + 128 + 1 + 1 + + + + + 128 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 256 + 1 + 1 + + + + + + + + + + + 128 + 256 + 1 + 1 + + + + + 128 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 128 + 256 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 15 + 15 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 256 + 256 + 1 + 1 + + + + + + + + + + + 256 + 256 + 1 + 1 + + + + + 256 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 256 + 256 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 1 + 256 + 1 + 1 + + + + + + + + + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 1 + 256 + 1 + 1 + + + + + 1 + 256 + 15 + 15 + + + + + + + 1 + 256 + 15 + 15 + + + + + 1 + 256 + 15 + 15 + + + + + + + + 64 + 256 + 1 + 1 + + + + + + + + + + + 64 + 256 + 1 + 1 + + + + + 64 + 256 + 1 + 1 + + + + + + + + 1 + 256 + 15 + 15 + + + 64 + 256 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + 1 + 64 + 15 + 15 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + + + + 64 + 1 + 1 + 5 + 5 + + + + + 64 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 64 + 15 + 15 + + + 64 + 1 + 1 + 5 + 5 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + + + + 2 + 64 + 32 + 1 + 1 + + + + + 2 + 64 + 32 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 2 + 64 + 32 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + + + + 128 + 1 + 1 + 5 + 5 + + + + + 128 + 1 + 1 + 5 + 5 + + + + + + + + 1 + 128 + 15 + 15 + + + 128 + 1 + 1 + 5 + 5 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + + + + 2 + 64 + 64 + 1 + 1 + + + + + 2 + 64 + 64 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 2 + 64 + 64 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + + 1 + 128 + 1 + 1 + + + + + + + + + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 1 + 1 + + + + + + + + 1 + 128 + 15 + 15 + + + 1 + 128 + 1 + 1 + + + + + 1 + 128 + 15 + 15 + + + + + + + 1 + 128 + 15 + 15 + + + + + 1 + 128 + 15 + 15 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 15 + 15 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 10 + 64 + 1 + 1 + + + + + + + + + + + 10 + 64 + 1 + 1 + + + + + 10 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 10 + 64 + 1 + 1 + + + + + 1 + 10 + 15 + 15 + + + + + + + + 1 + 10 + 1 + 1 + + + + + + + + + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 1 + 1 + + + + + + + + 1 + 10 + 15 + 15 + + + 1 + 10 + 1 + 1 + + + + + 1 + 10 + 15 + 15 + + + + + + + + 1 + 64 + 1 + 1 + + + + + + + + + + + 1 + 64 + 1 + 1 + + + + + 1 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 1 + 64 + 1 + 1 + + + + + 1 + 1 + 15 + 15 + + + + + + + + 1 + 1 + 1 + 1 + + + + + + + + + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 1 + 15 + 15 + + + 1 + 1 + 1 + 1 + + + + + 1 + 1 + 15 + 15 + + + + + + + 1 + 1 + 15 + 15 + + + + + 1 + 1 + 15 + 15 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + + + + 2 + + + + + + + + 1 + 128 + 15 + 15 + + + 2 + + + 2 + + + 2 + + + + + 1 + 64 + 15 + 15 + + + + + + + + 4 + 64 + 1 + 1 + + + + + + + + + + + 4 + 64 + 1 + 1 + + + + + 4 + 64 + 1 + 1 + + + + + + + + 1 + 64 + 15 + 15 + + + 4 + 64 + 1 + 1 + + + + + 1 + 4 + 15 + 15 + + + + + + + + 1 + 4 + 1 + 1 + + + + + + + + + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 1 + 1 + + + + + + + + 1 + 4 + 15 + 15 + + + 1 + 4 + 1 + 1 + + + + + 1 + 4 + 15 + 15 + + + + + + + 1 + 4 + 15 + 15 + + + + + 1 + 4 + 15 + 15 + + + + + + + + 1 + 10 + 15 + 15 + + + 1 + 1 + 15 + 15 + + + 1 + 4 + 15 + 15 + + + + + 1 + 15 + 15 + 15 + + + + + + + + 1 + 15 + 15 + 15 + + + 3 + + + + + 1 + 15 + 225 + + + + + + + + 1 + 15 + 3600 + + + 1 + 15 + 900 + + + 1 + 15 + 225 + + + + + 1 + 15 + 4725 + + + + + + + + 3 + + + + + + + 1 + 15 + 4725 + + + 3 + + + + + 1 + 4725 + 15 + + + + + + + 1 + 4725 + 15 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/rm_rune/rune_detector/package.xml b/src/rm_rune/rune_detector/package.xml new file mode 100644 index 0000000..422f970 --- /dev/null +++ b/src/rm_rune/rune_detector/package.xml @@ -0,0 +1,35 @@ + + + + rune_detector + 0.0.0 + TODO: Package description + uu + TODO: License declaration + + ament_cmake + + + rclcpp + rclcpp_components + sensor_msgs + geometry_msgs + std_srvs + eigen + rm_utils + visualization_msgs + message_filters + cv_bridge + image_transport + image_transport_plugins + rm_interfaces + vision_opencv + tf2 + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/src/rm_rune/rune_detector/src/rune_detector.cpp b/src/rm_rune/rune_detector/src/rune_detector.cpp new file mode 100644 index 0000000..bc0be3d --- /dev/null +++ b/src/rm_rune/rune_detector/src/rune_detector.cpp @@ -0,0 +1,426 @@ +// Copyright 2023 Yunlong Feng +// +// Additional modifications and features by Chengfu Zou, 2024. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rune_detector/rune_detector.hpp" +// std +#include +#include +#include +// third party +#include +// project +#include "rm_utils/common.hpp" +#include "rune_detector/types.hpp" + +namespace fyt::rune { + +static constexpr int INPUT_W = 480; // Width of input +static constexpr int INPUT_H = 480; // Height of input +static constexpr int NUM_CLASSES = 2; // Number of classes +static constexpr int NUM_COLORS = 2; // Number of color +static constexpr int NUM_POINTS = 5; +static constexpr int NUM_POINTS_2 = 2 * NUM_POINTS; +static constexpr float MERGE_CONF_ERROR = 0.15; +static constexpr float MERGE_MIN_IOU = 0.9; +// 由于训练失误,网络的颜色是反的 +static std::unordered_map DNN_COLOR_TO_ENEMY_COLOR = { + {0, EnemyColor::BLUE}, {1, EnemyColor::RED}}; + +static cv::Mat letterbox(const cv::Mat &img, Eigen::Matrix3f &transform_matrix, + std::vector new_shape = {INPUT_W, INPUT_H}) { + // Get current image shape [height, width] + + int img_h = img.rows; + int img_w = img.cols; + + // Compute scale ratio(new / old) and target resized shape + float scale = + std::min(new_shape[1] * 1.0 / img_h, new_shape[0] * 1.0 / img_w); + int resize_h = static_cast(round(img_h * scale)); + int resize_w = static_cast(round(img_w * scale)); + + // Compute padding + int pad_h = new_shape[1] - resize_h; + int pad_w = new_shape[0] - resize_w; + + // Resize and pad image while meeting stride-multiple constraints + cv::Mat resized_img; + cv::resize(img, resized_img, cv::Size(resize_w, resize_h)); + + // divide padding into 2 sides + float half_h = pad_h * 1.0 / 2; + float half_w = pad_w * 1.0 / 2; + + // Compute padding boarder + int top = static_cast(round(half_h - 0.1)); + int bottom = static_cast(round(half_h + 0.1)); + int left = static_cast(round(half_w - 0.1)); + int right = static_cast(round(half_w + 0.1)); + + /* clang-format off */ + /* *INDENT-OFF* */ + + // Compute point transform_matrix + transform_matrix << 1.0 / scale, 0, -half_w / scale, + 0, 1.0 / scale, -half_h / scale, + 0, 0, 1; + + /* *INDENT-ON* */ + /* clang-format on */ + + // Add border + cv::copyMakeBorder(resized_img, resized_img, top, bottom, left, right, + cv::BORDER_CONSTANT, cv::Scalar(114, 114, 114)); + + return resized_img; +} + +// Generate grids and stride for post processing +// target_w: Width of input. +// target_h: Height of input. +// strides A vector of stride. +// grid_strides Grid stride generated in this function +static void generateGridsAndStride(const int target_w, const int target_h, + std::vector &strides, + std::vector &grid_strides) { + for (auto stride : strides) { + int num_grid_w = target_w / stride; + int num_grid_h = target_h / stride; + + for (int g1 = 0; g1 < num_grid_h; g1++) { + for (int g0 = 0; g0 < num_grid_w; g0++) { + grid_strides.emplace_back(GridAndStride{g0, g1, stride}); + } + } + } +} + +// Decode output tensor +static void generateProposals( + std::vector &output_objs, std::vector &scores, + std::vector &rects, const cv::Mat &output_buffer, + const Eigen::Matrix &transform_matrix, float conf_threshold, + std::vector grid_strides) { + const int num_anchors = grid_strides.size(); + + for (int anchor_idx = 0; anchor_idx < num_anchors; anchor_idx++) { + float confidence = output_buffer.at(anchor_idx, NUM_POINTS_2); + if (confidence < conf_threshold) { + continue; + } + + const int grid0 = grid_strides[anchor_idx].grid0; + const int grid1 = grid_strides[anchor_idx].grid1; + const int stride = grid_strides[anchor_idx].stride; + + double color_score, class_score; + cv::Point color_id, class_id; + cv::Mat color_scores = + output_buffer.row(anchor_idx) + .colRange(NUM_POINTS_2 + 1, NUM_POINTS_2 + 1 + NUM_COLORS); + cv::Mat num_scores = + output_buffer.row(anchor_idx) + .colRange(NUM_POINTS_2 + 1 + NUM_COLORS, + NUM_POINTS_2 + 1 + NUM_COLORS + NUM_CLASSES); + // Argmax + cv::minMaxLoc(color_scores, NULL, &color_score, NULL, &color_id); + cv::minMaxLoc(num_scores, NULL, &class_score, NULL, &class_id); + + float x_1 = (output_buffer.at(anchor_idx, 0) + grid0) * stride; + float y_1 = (output_buffer.at(anchor_idx, 1) + grid1) * stride; + float x_2 = (output_buffer.at(anchor_idx, 2) + grid0) * stride; + float y_2 = (output_buffer.at(anchor_idx, 3) + grid1) * stride; + float x_3 = (output_buffer.at(anchor_idx, 4) + grid0) * stride; + float y_3 = (output_buffer.at(anchor_idx, 5) + grid1) * stride; + float x_4 = (output_buffer.at(anchor_idx, 6) + grid0) * stride; + float y_4 = (output_buffer.at(anchor_idx, 7) + grid1) * stride; + float x_5 = (output_buffer.at(anchor_idx, 8) + grid0) * stride; + float y_5 = (output_buffer.at(anchor_idx, 9) + grid1) * stride; + + Eigen::Matrix apex_norm; + Eigen::Matrix apex_dst; + + /* clang-format off */ + /* *INDENT-OFF* */ + apex_norm << x_1, x_2, x_3, x_4, x_5, + y_1, y_2, y_3, y_4, y_5, + 1, 1, 1, 1, 1; + /* *INDENT-ON* */ + /* clang-format on */ + + apex_dst = transform_matrix * apex_norm; + + RuneObject obj; + + obj.pts.r_center = cv::Point2f(apex_dst(0, 0), apex_dst(1, 0)); + obj.pts.bottom_left = cv::Point2f(apex_dst(0, 1), apex_dst(1, 1)); + obj.pts.top_left = cv::Point2f(apex_dst(0, 2), apex_dst(1, 2)); + obj.pts.top_right = cv::Point2f(apex_dst(0, 3), apex_dst(1, 3)); + obj.pts.bottom_right = cv::Point2f(apex_dst(0, 4), apex_dst(1, 4)); + + auto rect = cv::boundingRect(obj.pts.toVector2f()); + + obj.box = rect; + obj.color = DNN_COLOR_TO_ENEMY_COLOR[color_id.x]; + obj.type = static_cast(class_id.x); + obj.prob = confidence; + + rects.push_back(rect); + scores.push_back(confidence); + output_objs.push_back(std::move(obj)); + } +} + +// Calculate intersection area between Object a and Object b. +static inline float intersectionArea(const RuneObject &a, const RuneObject &b) { + cv::Rect_ inter = a.box & b.box; + return inter.area(); +} + +static void nmsMergeSortedBboxes(std::vector &faceobjects, + std::vector &indices, + float nms_threshold) { + indices.clear(); + + const int n = faceobjects.size(); + + std::vector areas(n); + for (int i = 0; i < n; i++) { + areas[i] = faceobjects[i].box.area(); + } + + for (int i = 0; i < n; i++) { + RuneObject &a = faceobjects[i]; + + int keep = 1; + for (size_t j = 0; j < indices.size(); j++) { + RuneObject &b = faceobjects[indices[j]]; + + // intersection over union + float inter_area = intersectionArea(a, b); + float union_area = areas[i] + areas[indices[j]] - inter_area; + float iou = inter_area / union_area; + if (iou > nms_threshold || isnan(iou)) { + keep = 0; + // Stored for Merge + if (a.type == b.type && a.color == b.color && iou > MERGE_MIN_IOU && + abs(a.prob - b.prob) < MERGE_CONF_ERROR) { + a.pts.children.push_back(b.pts); + } + // cout<(); + } + + auto model = ov_core_->read_model(model_path_); + + // Set infer type + ov::preprocess::PrePostProcessor ppp(model); + // Set input output precision + auto elem_type = device_name_ == "GPU" ? ov::element::f16 : ov::element::f32; + auto perf_mode = + device_name_ == "GPU" + ? ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT) + : ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY); + ppp.input().tensor().set_element_type(elem_type); + ppp.output().tensor().set_element_type(elem_type); + + // Compile model + compiled_model_ = std::make_unique( + ov_core_->compile_model(model, device_name_, perf_mode)); + + strides_ = {8, 16, 32}; + generateGridsAndStride(INPUT_W, INPUT_H, strides_, grid_strides_); +} + +std::future RuneDetector::pushInput(const cv::Mat &rgb_img, + int64_t timestamp_nanosec) { + if (rgb_img.empty()) { + // return false when img is empty + return std::async([]() { return false; }); + } + + // Reprocess + Eigen::Matrix3f + transform_matrix; // transform matrix from resized image to source image. + cv::Mat resized_img = letterbox(rgb_img, transform_matrix); + + // Start async detect + return std::async(std::launch::async, &RuneDetector::processCallback, this, + resized_img, transform_matrix, timestamp_nanosec, rgb_img); +} + +void RuneDetector::setCallback(CallbackType callback) { + infer_callback_ = callback; +} + +bool RuneDetector::processCallback(const cv::Mat resized_img, + Eigen::Matrix3f transform_matrix, + int64_t timestamp_nanosec, + const cv::Mat &src_img) { + // BGR->RGB, u8(0-255)->f32(0.0-1.0), HWC->NCHW + // note: TUP's model no need to normalize + cv::Mat blob = cv::dnn::blobFromImage( + resized_img, 1., cv::Size(INPUT_W, INPUT_H), cv::Scalar(0, 0, 0), true); + + // Feed blob into input + auto input_port = compiled_model_->input(); + ov::Tensor input_tensor( + input_port.get_element_type(), + ov::Shape(std::vector{1, 3, INPUT_W, INPUT_H}), blob.ptr(0)); + + // Start inference + // Lock because of the thread race condition within the openvino library + mtx_.lock(); + auto infer_request = compiled_model_->create_infer_request(); + infer_request.set_input_tensor(input_tensor); + infer_request.infer(); + mtx_.unlock(); + + auto output = infer_request.get_output_tensor(); + + // Process output data + auto output_shape = output.get_shape(); + // 3549 x 21 Matrix + cv::Mat output_buffer(output_shape[1], output_shape[2], CV_32F, + output.data()); + + // Parsed variable + std::vector objs_tmp, objs_result; + std::vector rects; + std::vector scores; + std::vector indices; + + // Parse YOLO output + generateProposals(objs_tmp, scores, rects, output_buffer, transform_matrix, + this->conf_threshold_, this->grid_strides_); + + // TopK + std::sort( + objs_tmp.begin(), objs_tmp.end(), + [](const RuneObject &a, const RuneObject &b) { return a.prob > b.prob; }); + if (objs_tmp.size() > static_cast(this->top_k_)) { + objs_tmp.resize(this->top_k_); + } + + nmsMergeSortedBboxes(objs_tmp, indices, this->nms_threshold_); + + for (size_t i = 0; i < indices.size(); i++) { + objs_result.push_back(std::move(objs_tmp[indices[i]])); + + if (objs_result[i].pts.children.size() > 0) { + const float N = + static_cast(objs_result[i].pts.children.size() + 1); + FeaturePoints pts_final = std::accumulate( + objs_result[i].pts.children.begin(), + objs_result[i].pts.children.end(), objs_result[i].pts); + objs_result[i].pts = pts_final / N; + } + } + + // NMS & TopK + // cv::dnn::NMSBoxes( + // rects, scores, this->conf_threshold_, this->nms_threshold_, indices, 1.0, + // this->top_k_); + // for (size_t i = 0; i < indices.size(); ++i) { + // objs_result.push_back(std::move(objs_tmp[i])); + // } + + // Call callback function + if (this->infer_callback_) { + this->infer_callback_(objs_result, timestamp_nanosec, src_img); + return true; + } + + return false; +} + +std::tuple +RuneDetector::detectRTag(const cv::Mat &img, int binary_thresh, + const cv::Point2f &prior) { + if (prior.x < 0 || prior.x > img.cols || prior.y < 0 || prior.y > img.rows) { + return {prior, cv::Mat::zeros(cv::Size(200, 200), CV_8UC3)}; + } + + // Create ROI + cv::Rect roi = cv::Rect(prior.x - 100, prior.y - 100, 200, 200) & + cv::Rect(0, 0, img.cols, img.rows); + const cv::Point2f prior_in_roi = prior - cv::Point2f(roi.tl()); + + cv::Mat img_roi = img(roi); + + // Gray -> Binary -> Dilate + cv::Mat gray_img; + cv::cvtColor(img_roi, gray_img, cv::COLOR_BGR2GRAY); + cv::Mat binary_img; + cv::threshold(gray_img, binary_img, 0, 255, + cv::THRESH_BINARY | cv::THRESH_OTSU); + cv::Mat kernel = cv::getStructuringElement(cv::MORPH_RECT, cv::Size(3, 3)); + cv::dilate(binary_img, binary_img, kernel); + + // Find contours + std::vector> contours; + cv::findContours(binary_img, contours, cv::RETR_EXTERNAL, + cv::CHAIN_APPROX_NONE); + + auto it = std::find_if( + contours.begin(), contours.end(), + [p = prior_in_roi](const std::vector &contour) -> bool { + return cv::boundingRect(contour).contains(p); + }); + + // For visualization + cv::cvtColor(binary_img, binary_img, cv::COLOR_GRAY2BGR); + + if (it == contours.end()) { + return {prior, binary_img}; + } + + cv::drawContours(binary_img, contours, it - contours.begin(), + cv::Scalar(0, 255, 0), 2); + + cv::Point2f center = + std::accumulate(it->begin(), it->end(), cv::Point(0, 0)); + center /= static_cast(it->size()); + center += cv::Point2f(roi.tl()); + + return {center, binary_img}; +} + +} // namespace fyt::rune diff --git a/src/rm_rune/rune_detector/src/rune_detector_node.cpp b/src/rm_rune/rune_detector/src/rune_detector_node.cpp new file mode 100644 index 0000000..2329396 --- /dev/null +++ b/src/rm_rune/rune_detector/src/rune_detector_node.cpp @@ -0,0 +1,342 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rune_detector/rune_detector_node.hpp" +// ros2 +#include +#include + +#include +// std +#include +#include +#include +#include +#include +// third party +#include +// project +#include "rm_utils/assert.hpp" +#include "rm_utils/common.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/url_resolver.hpp" +#include "rune_detector/types.hpp" + +namespace fyt::rune { +RuneDetectorNode::RuneDetectorNode(const rclcpp::NodeOptions &options) +: Node("rune_detector", options), is_rune_(false) { + FYT_REGISTER_LOGGER("rune_detector", "~/fyt2024-log", INFO); + FYT_INFO("rune_detector", "Starting RuneDetectorNode!"); + + frame_id_ = declare_parameter("frame_id", "camera_optical_frame"); + detect_r_tag_ = declare_parameter("detect_r_tag", true); + binary_thresh_ = declare_parameter("min_lightness", 100); + requests_limit_ = declare_parameter("requests_limit", 5); + + // Detector + rune_detector_ = initDetector(); + // Rune Publisher + rune_pub_ = this->create_publisher("rune_detector/rune_target", + rclcpp::SensorDataQoS()); + + // Debug Publishers + this->debug_ = declare_parameter("debug", true); + if (this->debug_) { + createDebugPublishers(); + } + auto qos = rclcpp::SensorDataQoS(); + qos.keep_last(1); + img_sub_ = this->create_subscription( + "image_raw", qos, std::bind(&RuneDetectorNode::imageCallback, this, std::placeholders::_1)); + set_rune_mode_srv_ = this->create_service( + "rune_detector/set_mode", + std::bind( + &RuneDetectorNode::setModeCallback, this, std::placeholders::_1, std::placeholders::_2)); + + // Heartbeat + heartbeat_ = HeartBeatPublisher::create(this); +} + +std::unique_ptr RuneDetectorNode::initDetector() { + std::string model_path = + this->declare_parameter("detector.model", "package://rune_detector/model/yolox_rune_3.6m.onnx"); + std::string device_type = this->declare_parameter("detector.device_type", "AUTO"); + FYT_ASSERT(!model_path.empty()); + FYT_INFO("rune_detector", "model : {}, device : {}", model_path, device_type); + + float conf_threshold = this->declare_parameter("detector.confidence_threshold", 0.50); + int top_k = this->declare_parameter("detector.top_k", 128); + float nms_threshold = this->declare_parameter("detector.nms_threshold", 0.3); + + namespace fs = std::filesystem; + fs::path resolved_path = utils::URLResolver::getResolvedPath(model_path); + FYT_ASSERT_MSG(fs::exists(resolved_path), resolved_path.string() + " Not Found"); + + // Set dynamic parameter callback + rcl_interfaces::msg::SetParametersResult onSetParameters( + std::vector parameters); + on_set_parameters_callback_handle_ = this->add_on_set_parameters_callback( + std::bind(&RuneDetectorNode::onSetParameters, this, std::placeholders::_1)); + + // Create detector + auto rune_detector = std::make_unique( + resolved_path, device_type, conf_threshold, top_k, nms_threshold); + // Set detect callback + rune_detector->setCallback(std::bind(&RuneDetectorNode::inferResultCallback, + this, + std::placeholders::_1, + std::placeholders::_2, + std::placeholders::_3)); + // init detector + rune_detector->init(); + return rune_detector; +} + +void RuneDetectorNode::imageCallback(const sensor_msgs::msg::Image::ConstSharedPtr msg) { + if (is_rune_ == false) { + return; + } + + // Limits request size + while (detect_requests_.size() > static_cast(requests_limit_)) { + detect_requests_.front().get(); + detect_requests_.pop(); + } + + auto timestamp = rclcpp::Time(msg->header.stamp); + frame_id_ = msg->header.frame_id; + auto img = cv_bridge::toCvCopy(msg, "rgb8")->image; + + // Push image to detector + detect_requests_.push(rune_detector_->pushInput(img, timestamp.nanoseconds())); +}; + +rcl_interfaces::msg::SetParametersResult RuneDetectorNode::onSetParameters( + std::vector parameters) { + rcl_interfaces::msg::SetParametersResult result; + for (const auto ¶m : parameters) { + if (param.get_name() == "binary_thresh") { + binary_thresh_ = param.as_int(); + } + } + result.successful = true; + return result; +} + +void RuneDetectorNode::inferResultCallback(std::vector &objs, + int64_t timestamp_nanosec, + const cv::Mat &src_img) { + auto timestamp = rclcpp::Time(timestamp_nanosec); + // Used to draw debug info + cv::Mat debug_img; + if (debug_) { + debug_img = src_img.clone(); + } + + rm_interfaces::msg::RuneTarget rune_msg; + rune_msg.header.frame_id = frame_id_; + rune_msg.header.stamp = timestamp; + rune_msg.is_big_rune = is_big_rune_; + + // Erase all object that not match the color + objs.erase( + std::remove_if(objs.begin(), + objs.end(), + [c = detect_color_](const auto &obj) -> bool { return obj.color != c; }), + objs.end()); + + if (!objs.empty()) { + // Sort by probability + std::sort(objs.begin(), objs.end(), [](const RuneObject &a, const RuneObject &b) { + return a.prob > b.prob; + }); + + cv::Point2f r_tag; + cv::Mat binary_roi = cv::Mat::zeros(1, 1, CV_8UC3); + if (detect_r_tag_) { + // Detect R tag using traditional method + std::tie(r_tag, binary_roi) = + rune_detector_->detectRTag(src_img, binary_thresh_, objs.at(0).pts.r_center); + } else { + // Use the average center of all objects as the center of the R tag + r_tag = std::accumulate(objs.begin(), + objs.end(), + cv::Point2f(0, 0), + [n = static_cast(objs.size())](cv::Point2f p, auto &o) { + return p + o.pts.r_center / n; + }); + } + // Assign the center of the R tag to all objects + std::for_each(objs.begin(), objs.end(), [r = r_tag](RuneObject &obj) { obj.pts.r_center = r; }); + + // Draw binary roi + if (debug_ && !debug_img.empty()) { + cv::Rect roi = + cv::Rect(debug_img.cols - binary_roi.cols, 0, binary_roi.cols, binary_roi.rows); + binary_roi.copyTo(debug_img(roi)); + cv::rectangle(debug_img, roi, cv::Scalar(150, 150, 150), 2); + } + + // The final target is the inactivated rune with the highest probability + auto result_it = + std::find_if(objs.begin(), objs.end(), [c = detect_color_](const auto &obj) -> bool { + return obj.type == RuneType::INACTIVATED && obj.color == c; + }); + + if (result_it != objs.end()) { + // FYT_DEBUG("rune_detector", "Detected!"); + rune_msg.is_lost = false; + rune_msg.pts[0].x = result_it->pts.r_center.x; + rune_msg.pts[0].y = result_it->pts.r_center.y; + rune_msg.pts[1].x = result_it->pts.bottom_left.x; + rune_msg.pts[1].y = result_it->pts.bottom_left.y; + rune_msg.pts[2].x = result_it->pts.top_left.x; + rune_msg.pts[2].y = result_it->pts.top_left.y; + rune_msg.pts[3].x = result_it->pts.top_right.x; + rune_msg.pts[3].y = result_it->pts.top_right.y; + rune_msg.pts[4].x = result_it->pts.bottom_right.x; + rune_msg.pts[4].y = result_it->pts.bottom_right.y; + } else { + // All runes are activated + rune_msg.is_lost = true; + } + } else { + // All runes are not the target color + rune_msg.is_lost = true; + } + + rune_pub_->publish(std::move(rune_msg)); + + if (debug_) { + if (debug_img.empty()) { + // Avoid debug_mode change in processing + return; + } + + // Draw detection result + for (auto &obj : objs) { + auto pts = obj.pts.toVector2f(); + cv::Point2f aim_point = std::accumulate(pts.begin() + 1, pts.end(), cv::Point2f(0, 0)) / 4; + + cv::Scalar line_color = + obj.type == RuneType::INACTIVATED ? cv::Scalar(50, 255, 50) : cv::Scalar(255, 50, 255); + cv::putText(debug_img, + fmt::format("{:.2f}", obj.prob), + cv::Point2i(pts[1]), + cv::FONT_HERSHEY_SIMPLEX, + 0.8, + line_color, + 2); + cv::polylines(debug_img, obj.pts.toVector2i(), true, line_color, 2); + cv::circle(debug_img, aim_point, 5, line_color, -1); + + std::string rune_type = obj.type == RuneType::INACTIVATED ? "_HIT" : "_OK"; + std::string rune_color = enemyColorToString(obj.color); + cv::putText(debug_img, + rune_color + rune_type, + cv::Point2i(pts[2]), + cv::FONT_HERSHEY_SIMPLEX, + 0.8, + line_color, + 2); + } + + auto end = this->get_clock()->now(); + auto duration = end.seconds() - timestamp.seconds(); + std::string letency = fmt::format("Latency: {:.3f}ms", duration * 1000); + cv::putText(debug_img, + letency, + cv::Point2i(10, 30), + cv::FONT_HERSHEY_SIMPLEX, + 0.8, + cv::Scalar(0, 255, 255), + 2); + result_img_pub_.publish(cv_bridge::CvImage(rune_msg.header, "rgb8", debug_img).toImageMsg()); + } +} + +void RuneDetectorNode::setModeCallback( + const std::shared_ptr request, + std::shared_ptr response) { + response->success = true; + + VisionMode mode = static_cast(request->mode); + std::string mode_name = visionModeToString(mode); + if (mode_name == "UNKNOWN") { + FYT_ERROR("rune_detector", "Invalid mode: {}", request->mode); + return; + } + + auto createImageSub = [this]() { + if (img_sub_ == nullptr) { + img_sub_ = this->create_subscription( + "image_raw", + rclcpp::SensorDataQoS(), + std::bind(&RuneDetectorNode::imageCallback, this, std::placeholders::_1)); + } + }; + + switch (mode) { + case VisionMode::SMALL_RUNE_RED: { + is_rune_ = true; + is_big_rune_ = false; + detect_color_ = EnemyColor::RED; + createImageSub(); + break; + } + case VisionMode::SMALL_RUNE_BLUE: { + is_rune_ = true; + is_big_rune_ = false; + detect_color_ = EnemyColor::BLUE; + createImageSub(); + break; + } + case VisionMode::BIG_RUNE_RED: { + is_rune_ = true; + is_big_rune_ = true; + detect_color_ = EnemyColor::RED; + createImageSub(); + break; + } + case VisionMode::BIG_RUNE_BLUE: { + is_rune_ = true; + is_big_rune_ = true; + detect_color_ = EnemyColor::BLUE; + createImageSub(); + break; + } + default: { + is_rune_ = false; + is_big_rune_ = false; + img_sub_.reset(); + break; + } + } + + FYT_WARN("rune_detector", "Set Rune Mode: {}", visionModeToString(mode)); +} + +void RuneDetectorNode::createDebugPublishers() { + result_img_pub_ = image_transport::create_publisher(this, "rune_detector/result_img"); +} + +void RuneDetectorNode::destroyDebugPublishers() { result_img_pub_.shutdown(); } + +} // namespace fyt::rune +#include "rclcpp_components/register_node_macro.hpp" + +// Register the component with class_loader. +// This acts as a sort of entry point, allowing the component to be discoverable when its library +// is being loaded into a running process. +RCLCPP_COMPONENTS_REGISTER_NODE(fyt::rune::RuneDetectorNode) diff --git a/src/rm_rune/rune_detector/test/test_detector.cpp b/src/rm_rune/rune_detector/test/test_detector.cpp new file mode 100644 index 0000000..b2444f7 --- /dev/null +++ b/src/rm_rune/rune_detector/test/test_detector.cpp @@ -0,0 +1,75 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// gest +#include +// ros2 +#include +#include +#include +#include +// std +#include +// opencv +#include +// project +#include "rm_utils/common.hpp" +#include "rm_utils/url_resolver.hpp" +#include "rune_detector/rune_detector.hpp" +#include "rune_detector/types.hpp" + +using namespace fyt; +using namespace fyt::rune; +TEST(RuneDetectorNodeTest, NodeStartupTest) { + // Init Params + std::string model_path = "package://rune_detector/model/yolox_rune_3.6m.onnx"; + std::string device_type = "AUTO"; + + float conf_threshold = 0.5; + int top_k = 128; + float nms_threshold = 0.3; + + namespace fs = std::filesystem; + fs::path resolved_path = utils::URLResolver::getResolvedPath(model_path); + + // Create detector + auto rune_detector = std::make_unique( + resolved_path, device_type, conf_threshold, top_k, nms_threshold); + + // Set detect callback + std::vector runes; + rune_detector->setCallback([&runes](std::vector &objs, + int64_t timestamp_nanosec, + const cv::Mat &src_img) { runes = objs; }); + + // init detector + rune_detector->init(); + + // Load test image + fs::path test_image_path = + utils::URLResolver::getResolvedPath("package://rune_detector/docs/test.png"); + cv::Mat test_image = cv::imread(test_image_path.string(), cv::IMREAD_COLOR); + cv::cvtColor(test_image, test_image, cv::COLOR_BGR2RGB); + + auto future = rune_detector->pushInput(test_image, 0); + future.get(); + + EXPECT_EQ(runes.size(), static_cast(3)); + std::sort(runes.begin(), runes.end(), [](const RuneObject &a, const RuneObject &b) { + return a.type < b.type; + }); + EXPECT_EQ(runes[0].type, RuneType::INACTIVATED); + EXPECT_EQ(runes[1].type, RuneType::ACTIVATED); + EXPECT_EQ(runes[2].type, RuneType::ACTIVATED); +} diff --git a/src/rm_rune/rune_detector/test/test_node_startup.cpp b/src/rm_rune/rune_detector/test/test_node_startup.cpp new file mode 100644 index 0000000..7500828 --- /dev/null +++ b/src/rm_rune/rune_detector/test/test_node_startup.cpp @@ -0,0 +1,28 @@ +// Copyright 2022 Chen Jun + +#include + +#include +#include +#include + +// STD +#include + +#include "rune_detector/rune_detector_node.hpp" + +TEST(RuneDetectorNodeTest, NodeStartupTest) +{ + rclcpp::NodeOptions options; + auto node = std::make_shared(options); + node.reset(); +} + +int main(int argc, char ** argv) +{ + testing::InitGoogleTest(&argc, argv); + rclcpp::init(argc, argv); + auto result = RUN_ALL_TESTS(); + rclcpp::shutdown(); + return result; +} diff --git a/src/rm_rune/rune_solver/CMakeLists.txt b/src/rm_rune/rune_solver/CMakeLists.txt new file mode 100644 index 0000000..b27d9d6 --- /dev/null +++ b/src/rm_rune/rune_solver/CMakeLists.txt @@ -0,0 +1,60 @@ +cmake_minimum_required(VERSION 3.10) +project(rune_solver) + +## Use C++17 +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +## By adding -Wall and -Werror, the compiler does not ignore warnings anymore, +## enforcing cleaner code. +add_definitions(-Wall -Werror -O3) + +## Export compile commands for clangd +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +####################### +## Find dependencies ## +####################### +find_package(ament_cmake_auto REQUIRED) +find_package(OpenCV REQUIRED) +find_package(Ceres REQUIRED) +ament_auto_find_build_dependencies() + + +########### +## Build ## +########### + +ament_auto_add_library(${PROJECT_NAME} SHARED + DIRECTORY src +) + + +target_include_directories(${PROJECT_NAME} PUBLIC ${OpenCV_INCLUDE_DIRS} ${CERES_INCLUDE_DIRS}) +target_link_libraries(${PROJECT_NAME} + ${OpenCV_LIBS} + ${CERES_LIBRARIES} +) + + +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN fyt::rune::RuneSolverNode + EXECUTABLE ${PROJECT_NAME}_node +) + + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + list(APPEND AMENT_LINT_AUTO_EXCLUDE + ament_cmake_copyright + ament_cmake_uncrustify + ament_cmake_cpplint + ) + ament_lint_auto_find_test_dependencies() + find_package(ament_cmake_gtest) +endif() + +ament_auto_package( + INSTALL_TO_SHARE +) + diff --git a/src/rm_rune/rune_solver/README.md b/src/rm_rune/rune_solver/README.md new file mode 100644 index 0000000..5d01965 --- /dev/null +++ b/src/rm_rune/rune_solver/README.md @@ -0,0 +1,32 @@ +# rune_solver + +FYT视觉24赛季能量机关解算和预测ROS2包。 + +## fyt::rune::RuneSolverNode + +1. 计算能量机关的三维坐标 +2. 对坐标进行卡尔曼滤波消除抖动 +3. 拟合角度变化曲线,预测$\Delta t$后的坐标 +4. 解算出云台的角度发送给电控 + +### 发布话题 + +* `cmd_gimbal` (`rm_interfaces/msg/GimbalCmd`) - 最终发送到下位机的角度信息 +* `predict_target` (`geometry_msgs/msg/PointStamped`) - 预测的靶心坐标 +* `observed_angle` (`rm_interfaces/msg/DebugRuneAngle`) - 当前识别到的能量机关角度 +* `predict_angle` (`rm_interfaces/msg/DebugRuneAngle`) - 预测的能量机关角度 +* `markers` (`visualization_markers/msg/MarkerArray`) - 用于Debug的可视化Marker,包括当前识别到的靶心坐标可视化、R标坐标可视化和预测的靶心坐标可视化 + +### 订阅话题 + +* `rune_target` (`rm_interfaces/msg/RuneTarget`) - 识别到的待击打能量机关五个关键点 + +### 参数 + +* `debug` (bool, default: true) - 是否开启debug模式. +* `predict_time` (double, default: "0.0") - 预测时间补偿,最终预测时间为$\Delta t = t(子弹飞行) + t(传输延迟) + predict\_time$. +* `compensator_type` (string, default: resistance) - 弹道补偿模型 +* `auto_type_determined` (bool, default: true) - 设为true后会自动判断大符还是小符,设为false则用串口设定的模式判断 +* `ekf.q` (double[]) - 卡尔曼滤波的状态转移噪声 +* `ekf.r` (double[]) - 卡尔曼滤波的观测噪声 + \ No newline at end of file diff --git a/src/rm_rune/rune_solver/include/rune_solver/curve_fitter.hpp b/src/rm_rune/rune_solver/include/rune_solver/curve_fitter.hpp new file mode 100644 index 0000000..33060c0 --- /dev/null +++ b/src/rm_rune/rune_solver/include/rune_solver/curve_fitter.hpp @@ -0,0 +1,119 @@ +// Created by Labor 2024.1.28 +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RUNE_SOLVER_CURVE_FITTER_HPP_ +#define RUNE_SOLVER_CURVE_FITTER_HPP_ + +// std +#include +// third party +#include +// project +#include "rune_solver/types.hpp" + +namespace fyt::rune { + +class CurveFitter { +public: + explicit CurveFitter(const MotionType &t) : type_(t), fitting_future_(nullptr) { + // Init parameters to be fitted + fitting_param_ = {1.045, 0, 0, 0, 0}; + direction_ = Direction::UNKNOWN; + }; + + // Perform angle predict + double predict(double time); + + // Update data to be fitted + void update(double time, double angle); + + // Reset fitter + void reset(); + + // Check the state of fitter + bool statusVerified(); + + // Set the type of fitter + void setType(const MotionType &t); + + void setAutoTypeDetermined(bool auto_type_determined); + + MotionType getType() const; + + // Get the string of the fitting result + std::string getDebugText(); + +private: + // Perform double curve fitting + // automated determination of the type of curve + void fitDoubleCurve(); + + // Perform curve fitting + void fitCurve(); + + // Status value + MotionType type_; + bool is_static_ = false; + bool auto_type_determined_ = false; + int direction_; + + // Data to be fitted + static constexpr int QUEUE_UPPER_LIMIT = 500; + static constexpr int QUEUE_LOWER_LIMIT = 50; + struct Data { + double time; + double angle; + }; + std::deque data_history_queue_; + + // Parameters to be fitted + std::array fitting_param_; + std::unique_ptr> fitting_future_; + +private: + // Fitting Curve +#define BIG_RUNE_CURVE(x, a, omega, b, c, d, sign) \ + ((-((a) / (omega) * ceres::cos((omega) * ((x) + (d)))) + (b) * ((x) + (d)) + (c)) * (sign)) + +#define SMALL_RUNE_CURVE(x, a, b, c, sign) (((a) * ((x) + (b)) + (c)) * (sign)) + + // Fitting Cost + struct BigRuneFittingCost { + BigRuneFittingCost(double x, double y, int m) : x_(x), y_(y), mov_(static_cast(m)) {} + template + bool operator()(const T *const p, T *residual) const { + residual[0] = y_ - BIG_RUNE_CURVE(x_, p[0], p[1], p[2], p[3], p[4], mov_); + return true; + } + + const double x_, y_; + const double mov_; + }; + + struct SmallRuneFittingCost { + SmallRuneFittingCost(double x, double y, int m) : x_(x), y_(y), mov_(static_cast(m)) {} + template + bool operator()(const T *const p, T *residual) const { + residual[0] = y_ - SMALL_RUNE_CURVE(x_, p[0], p[1], p[2], mov_); + return true; + } + + const double x_, y_; + const double mov_; + }; +}; +} //namespace fyt::rune +#endif // RUNE_SOLVER_CURVE_FITTER_HPP_ diff --git a/src/rm_rune/rune_solver/include/rune_solver/motion_model.hpp b/src/rm_rune/rune_solver/include/rune_solver/motion_model.hpp new file mode 100644 index 0000000..5b8d6e9 --- /dev/null +++ b/src/rm_rune/rune_solver/include/rune_solver/motion_model.hpp @@ -0,0 +1,47 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RUNE_SOLVER_EKF_FUNCTIONS_HPP_ +#define RUNE_SOLVER_EKF_FUNCTIONS_HPP_ + +#include + +#include "rm_utils/math/extended_kalman_filter.hpp" + +namespace fyt::rune { + +constexpr int X_N = 4, Z_N = 4; + +struct Predict { + template + void operator()(const T x0[X_N], T x1[X_N]) { + for (int i = 0; i < X_N; ++i) { + x1[i] = x0[i]; + } + } +}; + +struct Measure { + template + void operator()(const T x[Z_N], T z[Z_N]) { + for (int i = 0; i < Z_N; ++i) { + z[i] = x[i]; + } + } +}; + +using RuneCenterEKF = ExtendedKalmanFilter; + +} // namespace fyt::rune +#endif diff --git a/src/rm_rune/rune_solver/include/rune_solver/rune_solver.hpp b/src/rm_rune/rune_solver/include/rune_solver/rune_solver.hpp new file mode 100644 index 0000000..cbc4b39 --- /dev/null +++ b/src/rm_rune/rune_solver/include/rune_solver/rune_solver.hpp @@ -0,0 +1,139 @@ +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RUNE_SOLVER_RUNE_SOLVER_HPP_ +#define RUNE_SOLVER_RUNE_SOLVER_HPP_ + +// std +#include +#include +#include +#include +#include +#include +#include +// ros2 +#include +#include +#include + +#include +#include +#include +#include +#include +#include +// project +#include "rm_interfaces/msg/gimbal_cmd.hpp" +#include "rm_interfaces/msg/rune_target.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/extended_kalman_filter.hpp" +#include "rm_utils/math/pnp_solver.hpp" +#include "rm_utils/math/trajectory_compensator.hpp" +#include "rm_utils/math/manual_compensator.hpp" +#include "rune_solver/curve_fitter.hpp" +#include "rune_solver/motion_model.hpp" +#include "rune_solver/motion_model.hpp" +#include "rune_solver/types.hpp" + +namespace fyt::rune { + +// Usage: +// 1. init(msg), if tracker_state == LOST +// 2. update(msg), if tracker_state == DETECTING or TRACKING +// 3. p = predictTarget(timestamp), to get the predicted position +// 4. cmd = solveGimbalCmd(p), to get the gimbal command +class RuneSolver { +public: + struct RuneSolverParams { + std::string compensator_type; + double gravity; + double bullet_speed; + double angle_offset_thres; + double lost_time_thres; + bool auto_type_determined; + }; + + enum State { + LOST, + DETECTING, + TRACKING, + } tracker_state; + + RuneSolver(const RuneSolverParams &sr_params, std::shared_ptr tf2_buffer); + + // Return: initial angle + double init(const rm_interfaces::msg::RuneTarget::SharedPtr received_target); + + // Return: normalized angle + double update(const rm_interfaces::msg::RuneTarget::SharedPtr receive_target); + + // Return: normalized predicted angle + double predictTarget(Eigen::Vector3d &predicted_position, double timestamp); + + // Return: transormation matrix from rune to odom + // Throws: tf2::TransformException or std::runtime_error + Eigen::Matrix4d solvePose(const rm_interfaces::msg::RuneTarget &target); + + rm_interfaces::msg::GimbalCmd solveGimbalCmd(const Eigen::Vector3d &target); + + // Return: 3d position of R tag + Eigen::Vector3d getCenterPosition() const; + + // Param: angle_diff: how much the angle target should prerotate, 0 for no prediction + // Return: 3d position of target to be aimed at + Eigen::Vector3d getTargetPosition(double angle_diff) const; + + double getCurAngle() const; + + // Solvers + std::unique_ptr pnp_solver; + std::unique_ptr trajectory_compensator; + std::unique_ptr curve_fitter; + std::unique_ptr ekf; + std::unique_ptr manual_compensator; + + RuneSolverParams rune_solver_params; + +private: + double getNormalAngle(const rm_interfaces::msg::RuneTarget::SharedPtr received_target); + + double getObservedAngle(double normal_angle); + + // Return the centroid of the input armor points + cv::Point2f getCenterPoint(const std::array &armor_points); + + // Return ekf state + Eigen::Vector4d getStateFromTransform(const Eigen::Matrix4d &transform) const; + + // Observation data + + // last_observed_angle_ is continuously increasing (or decreasing) + // from the first detection (call init()) of the target without + // any abrupt change in between. + double last_observed_angle_; + + // last_angle_ would change (N * DEG_72) when the target jumps + double last_angle_; + double start_time_; + double last_time_; + + Eigen::Vector4d ekf_state_; + + std::shared_ptr tf2_buffer_; +}; + +} // namespace fyt::rune +#endif // RUNE_SOLVER_SOLVER_HPP_ diff --git a/src/rm_rune/rune_solver/include/rune_solver/rune_solver_node.hpp b/src/rm_rune/rune_solver/include/rune_solver/rune_solver_node.hpp new file mode 100644 index 0000000..577097d --- /dev/null +++ b/src/rm_rune/rune_solver/include/rune_solver/rune_solver_node.hpp @@ -0,0 +1,106 @@ +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RUNE_SOLVER_RUNE_SOLVER_NODE_HPP_ +#define RUNE_SOLVER_RUNE_SOLVER_NODE_HPP_ + +// std +#include +#include +#include +#include +#include +#include +#include +#include +// ros2 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// third party +#include +// project +#include "rm_interfaces/msg/debug_rune_angle.hpp" +#include "rm_interfaces/msg/gimbal_cmd.hpp" +#include "rm_interfaces/msg/rune_target.hpp" +#include "rm_interfaces/srv/set_mode.hpp" +#include "rm_utils/heartbeat.hpp" +#include "rune_solver/rune_solver.hpp" + +namespace fyt::rune { +class RuneSolverNode : public rclcpp::Node { +public: + RuneSolverNode(const rclcpp::NodeOptions &options); + +private: + void runeTargetCallback(const rm_interfaces::msg::RuneTarget::SharedPtr rune_target_msg); + + void setModeCallback(const std::shared_ptr request, + std::shared_ptr response); + + // Heartbeat + HeartBeatPublisher::SharedPtr heartbeat_; + + // Rune solver + std::unique_ptr rune_solver_; + double predict_offset_; + + // Tf message + std::shared_ptr tf2_buffer_; + std::shared_ptr tf2_listener_; + + // Target Subscriber + rclcpp::Subscription::SharedPtr rune_target_sub_; + rm_interfaces::msg::RuneTarget last_rune_target_; + + // Predict Target publisher + rclcpp::Publisher::SharedPtr target_pub_; + rclcpp::Publisher::SharedPtr gimbal_pub_; + rclcpp::TimerBase::SharedPtr pub_timer_; + void timerCallback(); + + // Enable/Disable Rune Solver + bool enable_; + rclcpp::Service::SharedPtr set_mode_srv_; + + // Dynamic Parameter + rcl_interfaces::msg::SetParametersResult onSetParameters( + std::vector parameters); + rclcpp::Node::OnSetParametersCallbackHandle::SharedPtr on_set_parameters_callback_handle_; + + // Camera info part + std::shared_ptr cam_info_; + rclcpp::Subscription::SharedPtr cam_info_sub_; + + // Debug info + bool debug_; + rclcpp::Publisher::SharedPtr observed_angle_pub_; + rclcpp::Publisher::SharedPtr predicted_angle_pub_; + rclcpp::Publisher::SharedPtr fitter_text_pub_; + visualization_msgs::msg::Marker obs_pos_marker_; + visualization_msgs::msg::Marker r_tag_pos_marker_; + visualization_msgs::msg::Marker pred_pos_marker_; + visualization_msgs::msg::Marker aimming_line_marker_; + rclcpp::Publisher::SharedPtr marker_pub_; +}; +} // namespace fyt::rune +#endif diff --git a/src/rm_rune/rune_solver/include/rune_solver/types.hpp b/src/rm_rune/rune_solver/include/rune_solver/types.hpp new file mode 100644 index 0000000..2a86137 --- /dev/null +++ b/src/rm_rune/rune_solver/include/rune_solver/types.hpp @@ -0,0 +1,62 @@ +// Created by Labor 2024.1.27 +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RUNE_SOLVER_TYPES_HPP_ +#define RUNE_SOLVER_TYPES_HPP_ + +// STD +#include + +// 3rd party +#include + +#include + +namespace fyt::rune { + +constexpr double DEG_72 = 0.4 * CV_PI; +constexpr int ARMOR_KEYPOINTS_NUM = 4; +constexpr int KEYPOINTS_NUM = 5; + +// Motion type +enum class MotionType { SMALL, BIG, UNKNOWN }; + +// Moving direction +enum Direction { CLOCKWISE = -1, ANTI_CLOCKWISE = 1, UNKNOWN = 0 }; + +// Rune arm length, Unit: m +constexpr double ARM_LENGTH = 0.700; + +// Acceptable distance between robot and rune, Unit: m +// True value = 6.436 m +constexpr double MIN_RUNE_DISTANCE = 4.0; +constexpr double MAX_RUNE_DISTANCE = 9.0; + +// Rune object points +// r_tag, bottom_left, top_left, top_right, bottom_right +const std::vector RUNE_OBJECT_POINTS = {cv::Point3f(0, 0, 0) / 1000, + cv::Point3f(0, -541.5, 186) / 1000, + cv::Point3f(0, -858.5, 160) / 1000, + cv::Point3f(0, -858.5, -160) / 1000, + cv::Point3f(0, -541.5, -186) / 1000}; + +#define BIG_RUNE_CURVE(x, a, omega, b, c, d, sign) \ + ((-((a) / (omega) * ceres::cos((omega) * ((x) + (d)))) + (b) * ((x) + (d)) + (c)) * (sign)) + +#define SMALL_RUNE_CURVE(x, a, b, c, sign) (((a) * ((x) + (b)) + (c)) * (sign)) + +} // namespace fyt::rune +#endif // RUNE_SOLVER_TYPES_HPP_ diff --git a/src/rm_rune/rune_solver/package.xml b/src/rm_rune/rune_solver/package.xml new file mode 100644 index 0000000..d5f8a27 --- /dev/null +++ b/src/rm_rune/rune_solver/package.xml @@ -0,0 +1,36 @@ + + + + rune_solver + 0.0.0 + TODO: Package description + uu + TODO: License declaration + + ament_cmake + + rclcpp + rclcpp_components + geometry_msgs + sensor_msgs + eigen + angles + visualization_msgs + tf2_geometry_msgs + rm_interfaces + image_transport + image_transport_plugins + vision_opencv + cv_bridge + ceres + tf2 + tf2_ros + rm_utils + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/src/rm_rune/rune_solver/src/curve_fitter.cpp b/src/rm_rune/rune_solver/src/curve_fitter.cpp new file mode 100644 index 0000000..ad8a4ac --- /dev/null +++ b/src/rm_rune/rune_solver/src/curve_fitter.cpp @@ -0,0 +1,334 @@ +// Created by Labor 2024.1.28 +// Maintained by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rune_solver/curve_fitter.hpp" +// std +#include +#include +#include +// third party +#include +// project +#include "rm_utils/logger/log.hpp" +#include "rune_solver/types.hpp" + +namespace fyt::rune { + +// Fit two curves simultaneously and choose the one with lower cost +// This function will change the type_ automatically +void CurveFitter::fitDoubleCurve() { + if (is_static_) { + // Treat the static target as a small rune + type_ = MotionType::SMALL; + return; + } + + constexpr int PARALLEL_THRESHOLD = 300; + bool is_parallel = data_history_queue_.size() > PARALLEL_THRESHOLD; + + auto t1 = std::chrono::high_resolution_clock::now(); + + ceres::Problem small_fitting_problem; + ceres::Problem big_fitting_problem; + + std::array small_param; + std::array big_param; + + // Set the initial parameters in different cases + switch (type_) { + case MotionType::UNKNOWN: { + small_param = {1.045, 0, 0, 0, 0}; + big_param = {0.9125, 1.942, 2.090 - 0.9125, 0, 0}; + break; + } + case MotionType::BIG: { + small_param = {1.045, 0, 0, 0, 0}; + big_param = fitting_param_; + break; + } + case MotionType::SMALL: { + small_param = fitting_param_; + big_param = {0.9125, 1.942, 2.090 - 0.9125, 0, 0}; + break; + } + } + + // Add residuals to the problems + double *big_param_ptr = big_param.data(); + double *small_param_ptr = small_param.data(); + std::for_each(data_history_queue_.begin(), data_history_queue_.end(), [&](const auto &data) { + small_fitting_problem.AddResidualBlock( + new ceres::AutoDiffCostFunction( + new SmallRuneFittingCost(data.time, data.angle, direction_)), + new ceres::CauchyLoss(0.5), + small_param_ptr); + + big_fitting_problem.AddResidualBlock( + new ceres::AutoDiffCostFunction( + new BigRuneFittingCost(data.time, data.angle, direction_)), + new ceres::CauchyLoss(0.5), + big_param_ptr); + }); + + // Set the bounds of the parameters + big_fitting_problem.SetParameterLowerBound(big_param_ptr, 0, 0.780 * 0.5); + big_fitting_problem.SetParameterUpperBound(big_param_ptr, 0, 1.045 * 1.5); + big_fitting_problem.SetParameterLowerBound(big_param_ptr, 1, 1.884 * 0.5); + big_fitting_problem.SetParameterUpperBound(big_param_ptr, 1, 2.000 * 1.5); + big_fitting_problem.SetParameterLowerBound(big_param_ptr, 2, (2.090 - 1.045) * 0.5); + big_fitting_problem.SetParameterUpperBound(big_param_ptr, 2, (2.090 - 0.780) * 1.5); + small_fitting_problem.SetParameterLowerBound(small_param_ptr, 0, 1.045 * 0.5); + small_fitting_problem.SetParameterUpperBound(small_param_ptr, 0, 1.045 * 1.5); + + ceres::Solver::Options options; + options.linear_solver_type = ceres::DENSE_QR; + ceres::Solver::Summary small_summary; + ceres::Solver::Summary big_summary; + + // Start the optimization + if (is_parallel) { + auto f1 = std::async(std::launch::async, + [&]() { ceres::Solve(options, &small_fitting_problem, &small_summary); }); + auto f2 = std::async(std::launch::async, + [&]() { ceres::Solve(options, &big_fitting_problem, &big_summary); }); + f1.get(); + f2.get(); + } else { + ceres::Solve(options, &small_fitting_problem, &small_summary); + ceres::Solve(options, &big_fitting_problem, &big_summary); + } + + double small_cost = small_summary.final_cost; + double big_cost = big_summary.final_cost; + // Choose the curve with lower cost + if (small_cost < big_cost) { + fitting_param_ = small_param; + type_ = MotionType::SMALL; + } else { + fitting_param_ = big_param; + type_ = MotionType::BIG; + } + auto t2 = std::chrono::high_resolution_clock::now(); + FYT_DEBUG("rune_solver", + "Fitting time: {} ms", + std::chrono::duration_cast(t2 - t1).count()); +} + +// Fit the curve with the determined type +void CurveFitter::fitCurve() { + if (is_static_) { + return; + } + + auto t1 = std::chrono::high_resolution_clock::now(); + ceres::Problem problem; + + // Copy the fitting parameters to a temporary array + // to avoid using the variables that are being optimized + std::array temp_param = fitting_param_; + + // If the target is static, set the initial parameters, optimize the curve from scratch + if (type_ == MotionType::BIG) { + temp_param = {0.9125, 1.942, 2.090 - 0.9125, 0, 0}; + } else if (type_ == MotionType::SMALL) { + temp_param = {1.045, 0, 0, 0, 0}; + } + + double *param_ptr = temp_param.data(); + + // Add residuals to the problem + std::for_each(data_history_queue_.begin(), data_history_queue_.end(), [&](const auto &data) { + if (type_ == MotionType::BIG) { + problem.AddResidualBlock( + new ceres::AutoDiffCostFunction( + new BigRuneFittingCost(data.time, data.angle, direction_)), + new ceres::CauchyLoss(0.5), + param_ptr); + } else if (type_ == MotionType::SMALL) { + problem.AddResidualBlock( + new ceres::AutoDiffCostFunction( + new SmallRuneFittingCost(data.time, data.angle, direction_)), + new ceres::CauchyLoss(0.5), + param_ptr); + } + }); + + // Set the bounds of the parameters + if (type_ == MotionType::BIG) { + problem.SetParameterLowerBound(param_ptr, 0, 0.780 * 0.5); + problem.SetParameterUpperBound(param_ptr, 0, 1.045 * 1.5); + problem.SetParameterLowerBound(param_ptr, 1, 1.884 * 0.5); + problem.SetParameterUpperBound(param_ptr, 1, 2.000 * 1.5); + problem.SetParameterLowerBound(param_ptr, 2, (2.090 - 1.045) * 0.5); + problem.SetParameterUpperBound(param_ptr, 2, (2.090 - 0.780) * 1.5); + } else if (type_ == MotionType::SMALL) { + problem.SetParameterLowerBound(param_ptr, 0, 1.045 * 0.5); + problem.SetParameterUpperBound(param_ptr, 0, 1.045 * 1.5); + } + + // Start the optimization + ceres::Solver::Options options; + options.linear_solver_type = ceres::DENSE_QR; + ceres::Solver::Summary summary; + ceres::Solve(options, &problem, &summary); + auto t2 = std::chrono::high_resolution_clock::now(); + FYT_DEBUG("rune_solver", + "Fitting time: {} ms", + std::chrono::duration_cast(t2 - t1).count()); + + // Save the optimized parameters + fitting_param_ = temp_param; +} + +double CurveFitter::predict(double current_time) { + // If the target is static, return the last angle + if (is_static_) { + return data_history_queue_.back().angle; + } + + double pred_angle = 0; + if (type_ == MotionType::BIG) { + pred_angle = BIG_RUNE_CURVE(current_time, + fitting_param_[0], + fitting_param_[1], + fitting_param_[2], + fitting_param_[3], + fitting_param_[4], + direction_); + } else if (type_ == MotionType::SMALL) { + pred_angle = SMALL_RUNE_CURVE( + current_time, fitting_param_[0], fitting_param_[1], fitting_param_[2], direction_); + } + + return pred_angle; +} + +void CurveFitter::reset() { + if (fitting_future_ != nullptr && fitting_future_->valid()) { + fitting_future_->wait(); + fitting_future_.reset(); + } + type_ = MotionType::UNKNOWN; + direction_ = Direction::UNKNOWN; + data_history_queue_.clear(); +} + +void CurveFitter::setType(const MotionType &t) { + // Only available when the auto_type_determined_ is false + if (type_ == t || auto_type_determined_) { + return; + } + + if (fitting_future_ != nullptr && fitting_future_->valid()) { + fitting_future_->wait(); + } + + type_ = t; + if (t == MotionType::BIG) { + fitting_param_ = {0.9125, 1.942, 2.090 - 0.9125, 0, 0}; + } else if (t == MotionType::SMALL) { + fitting_param_ = {1.045, 0, 0, 0, 0}; + } +} + +MotionType CurveFitter::getType() const { return type_; } + +void CurveFitter::setAutoTypeDetermined(bool auto_type_determined) { + auto_type_determined_ = auto_type_determined; +} + +std::string CurveFitter::getDebugText() { + std::string t = "Unknown"; + + if (type_ == MotionType::BIG) { + double a = fitting_param_[0]; + double omega = fitting_param_[1]; + double b = fitting_param_[2]; + // double c = fitting_param_[3]; + double d = fitting_param_[4]; + t = fmt::format("V: {}( {:.2f} sin( {:.2f} (x {} {:.2f}) ) {} {:.2f} )", + direction_ == Direction::CLOCKWISE ? "-" : " ", + a, + omega, + (d > 0 ? "+" : "-"), + std::abs(d), + (b > 0 ? "+" : "-"), + std::abs(b)); + + } else if (type_ == MotionType::SMALL) { + double v = is_static_ ? 0 : fitting_param_[0]; + t = fmt::format("V: {:.2f}", direction_ * v); + } + return t; +} + +void CurveFitter::update(double time, double angle) { + data_history_queue_.emplace_back(Data{.time = time, .angle = angle}); + + // Start fitting when the queue size reaches the lower limit + if (data_history_queue_.size() < QUEUE_LOWER_LIMIT) { + return; + } + + // Limit the size of the queue + if (data_history_queue_.size() > QUEUE_UPPER_LIMIT) { + data_history_queue_.pop_front(); + } + + // Check if the target is moving or static + double angle_diff = data_history_queue_.back().angle - data_history_queue_.front().angle; + if (std::abs(angle_diff) < 2 * CV_PI / 180) { + is_static_ = true; + data_history_queue_.pop_front(); + } else { + is_static_ = false; + } + + // Determine the direction of rotation + direction_ = static_cast(angle_diff < 0 ? Direction::CLOCKWISE : Direction::ANTI_CLOCKWISE); + + auto startFitting = [this]() { + if (auto_type_determined_) { + fitting_future_ = std::make_unique>( + std::async(std::launch::async, &CurveFitter::fitDoubleCurve, this)); + } else { + fitting_future_ = std::make_unique>( + std::async(std::launch::async, &CurveFitter::fitCurve, this)); + } + }; + + if (fitting_future_ == nullptr) { + // First fitting + startFitting(); + // Wait for the first fitting to finish in case the fitting is not finished when the first prediction is needed + fitting_future_->wait(); + } else if (fitting_future_->wait_for(std::chrono::seconds(0)) == std::future_status::ready) { + // Start a new fitting asynchronously + startFitting(); + } else { + // If fitting is in progess or has been completed, do not start a new fitting + FYT_WARN("rune_solver", "Fitting is in progress, do not start a new fitting"); + } +} + +bool CurveFitter::statusVerified() { + if (type_ == MotionType::UNKNOWN || direction_ == Direction::UNKNOWN || + fitting_future_ == nullptr) { + return false; + } + return true; +} +} //namespace fyt::rune diff --git a/src/rm_rune/rune_solver/src/rune_solver.cpp b/src/rm_rune/rune_solver/src/rune_solver.cpp new file mode 100644 index 0000000..56ef41d --- /dev/null +++ b/src/rm_rune/rune_solver/src/rune_solver.cpp @@ -0,0 +1,383 @@ +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rune_solver/rune_solver.hpp" + +// ros2 +#include +#include +#include + +#include +#include +// std +#include +// third party +#include + +#include +// project +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/utils.hpp" +#include "rune_solver/types.hpp" + +namespace fyt::rune { +RuneSolver::RuneSolver(const RuneSolverParams &rsp, std::shared_ptr buffer) +: rune_solver_params(rsp), tf2_buffer_(buffer) { + // Init + tracker_state = LOST; + curve_fitter = std::make_unique(MotionType::UNKNOWN); + curve_fitter->setAutoTypeDetermined(rsp.auto_type_determined); + trajectory_compensator = CompensatorFactory::createCompensator(rsp.compensator_type); + trajectory_compensator->gravity = rsp.gravity; + trajectory_compensator->velocity = rsp.bullet_speed; + trajectory_compensator->resistance = 0.01; + ekf_state_ = Eigen::Vector4d::Zero(); + manual_compensator = std::make_unique(); +} + +double RuneSolver::init(const rm_interfaces::msg::RuneTarget::SharedPtr received_target) { + if (received_target->is_lost) { + return 0; + } + + FYT_INFO("rune_solver", "Init!"); + + // Init EKF + try { + Eigen::Matrix4d T_odom_2_rune = solvePose(*received_target); + + // Filter out outliers + Eigen::Vector3d t = T_odom_2_rune.block(0, 3, 3, 1); + if (t.norm() < MIN_RUNE_DISTANCE || t.norm() > MAX_RUNE_DISTANCE) { + FYT_ERROR("rune_solver", "Rune position is out of range"); + return 0; + } + + ekf_state_ = getStateFromTransform(T_odom_2_rune); + ekf->setState(ekf_state_); + } catch (...) { + FYT_ERROR("rune_solver", "Init failed"); + return 0; + } + + // Init observation variables + tracker_state = DETECTING; + double observed_angle = getNormalAngle(received_target); + double observed_time = 0; + curve_fitter->update(observed_time, observed_angle); + + last_observed_angle_ = observed_angle; + last_angle_ = last_observed_angle_; + start_time_ = rclcpp::Time(received_target->header.stamp).seconds(); + last_time_ = start_time_; + + return observed_angle; +} + +double RuneSolver::update(const rm_interfaces::msg::RuneTarget::SharedPtr received_target) { + double now_time = rclcpp::Time(received_target->header.stamp).seconds(); + double delta_time = now_time - last_time_; + + if (received_target->is_big_rune) { + curve_fitter->setType(MotionType::BIG); + } else { + curve_fitter->setType(MotionType::SMALL); + } + + if (!received_target->is_lost) { + // Update EKF + try { + Eigen::Matrix4d T_odom_2_rune = solvePose(*received_target); + + // Filter out outliers + Eigen::Vector3d t = T_odom_2_rune.block(0, 3, 3, 1); + if (t.norm() < MIN_RUNE_DISTANCE || t.norm() > MAX_RUNE_DISTANCE) { + FYT_ERROR("rune_solver", "Rune position is out of range"); + return 0; + } + + Eigen::Vector4d measurement = getStateFromTransform(T_odom_2_rune); + ekf->predict(); + ekf_state_ = ekf->update(measurement); + } catch (...) { + FYT_ERROR("rune_solver", "EKF update failed"); + return 0; + } + + // Get the data to be fitted + double observed_time = now_time - start_time_; + double normal_angle = getNormalAngle(received_target); + double observed_angle = getObservedAngle(normal_angle); + + // Update fitter + curve_fitter->update(observed_time, observed_angle); + + last_time_ = now_time; + last_angle_ = normal_angle; + last_observed_angle_ = observed_angle; + } + + // Update tracker state + switch (tracker_state) { + case DETECTING: { + if (received_target->is_lost && delta_time > rune_solver_params.lost_time_thres) { + tracker_state = LOST; + curve_fitter->reset(); + } else if (curve_fitter->statusVerified()) { + tracker_state = TRACKING; + } + break; + } + case TRACKING: { + if (received_target->is_lost && delta_time > rune_solver_params.lost_time_thres) { + tracker_state = LOST; + curve_fitter->reset(); + } + break; + } + case LOST: { + if (!received_target->is_lost) { + tracker_state = DETECTING; + } + break; + } + } + return last_observed_angle_; +} + +double RuneSolver::predictTarget(Eigen::Vector3d &predicted_position, double timestamp) { + double t1 = timestamp - start_time_; + double t0 = last_time_ - start_time_; + double predict_angle_diff = curve_fitter->predict(t1) - curve_fitter->predict(t0); + + // Get the predicted position + predicted_position = getTargetPosition(predict_angle_diff); + + return predict_angle_diff + last_observed_angle_; +} + +Eigen::Matrix4d RuneSolver::solvePose(const rm_interfaces::msg::RuneTarget &predicted_target) { + Eigen::Matrix4d pose = Eigen::Matrix4d::Identity(); + std::vector image_points(predicted_target.pts.size()); + std::transform(predicted_target.pts.begin(), + predicted_target.pts.end(), + image_points.begin(), + [](const auto &pt) { return cv::Point2f(pt.x, pt.y); }); + + cv::Mat rvec(3, 1, CV_64F), tvec(3, 1, CV_64F); + if (pnp_solver && pnp_solver->solvePnP(image_points, rvec, tvec, "rune")) { + // Get the transformation matrix from rune to odom + try { + // Get rotation matrix from rvec + cv::Mat rmat; + cv::Rodrigues(rvec, rmat); + Eigen::Matrix3d rot; + // clang-format off + rot << rmat.at(0, 0), rmat.at(0, 1), rmat.at(0, 2), + rmat.at(1, 0), rmat.at(1, 1), rmat.at(1, 2), + rmat.at(2, 0), rmat.at(2, 1), rmat.at(2, 2); + // clang-format on + Eigen::Quaterniond quat(rot); + + // Init pose msg + geometry_msgs::msg::PoseStamped ps; + ps.header.frame_id = "camera_optical_frame"; + ps.header.stamp = predicted_target.header.stamp; + + // Fill pose msg + ps.pose.orientation.x = quat.x(); + ps.pose.orientation.y = quat.y(); + ps.pose.orientation.z = quat.z(); + ps.pose.orientation.w = quat.w(); + ps.pose.position.x = tvec.at(0); + ps.pose.position.y = tvec.at(1); + ps.pose.position.z = tvec.at(2); + + // Transform to odom + ps = tf2_buffer_->transform(ps, "odom"); + + // Fill pose + pose(0, 3) = ps.pose.position.x; + pose(1, 3) = ps.pose.position.y; + pose(2, 3) = ps.pose.position.z; + + Eigen::Quaterniond quat_odom; + quat_odom.x() = ps.pose.orientation.x; + quat_odom.y() = ps.pose.orientation.y; + quat_odom.z() = ps.pose.orientation.z; + quat_odom.w() = ps.pose.orientation.w; + + Eigen::Matrix3d rot_odom = quat_odom.toRotationMatrix(); + pose.block(0, 0, 3, 3) = rot_odom; + + } catch (tf2::TransformException &ex) { + FYT_ERROR("rune_solver", "rune to odom error: {}", ex.what()); + throw ex; + } + } else { + FYT_ERROR("rune_solver", "PnP failed"); + throw std::runtime_error("PnP failed"); + } + return pose; +} + +rm_interfaces::msg::GimbalCmd RuneSolver::solveGimbalCmd(const Eigen::Vector3d &target) { + // Get current yaw and pitch of gimbal + double current_yaw = 0.0, current_pitch = 0.0; + try { + auto gimbal_tf = tf2_buffer_->lookupTransform("odom", "pitch_link", tf2::TimePointZero); + auto msg_q = gimbal_tf.transform.rotation; + + tf2::Quaternion tf_q; + tf2::fromMsg(msg_q, tf_q); + double roll; + tf2::Matrix3x3(tf_q).getRPY(roll, current_pitch, current_yaw); + current_pitch = -current_pitch; + } catch (tf2::TransformException &ex) { + FYT_ERROR("rune_solver", "{}", ex.what()); + throw ex; + } + + // Calculate yaw and pitch + double yaw = atan2(target.y(), target.x()); + double pitch = atan2(target.z(), target.head(2).norm()); + + // Set parameters of compensator + trajectory_compensator->velocity = rune_solver_params.bullet_speed; + trajectory_compensator->gravity = rune_solver_params.gravity; + trajectory_compensator->iteration_times = 30; + + if (double temp_pitch = pitch; trajectory_compensator->compensate(target, temp_pitch)) { + pitch = temp_pitch; + } + double distance = target.norm(); + + // Compensate angle by angle_offset_map + auto angle_offset = manual_compensator->angleHardCorrect(target.head(2).norm(), target.z()); + double pitch_offset = angle_offset[0] * M_PI / 180; + double yaw_offset = angle_offset[1] * M_PI / 180; + double cmd_pitch = pitch + pitch_offset; + double cmd_yaw = angles::normalize_angle(yaw + yaw_offset); + + rm_interfaces::msg::GimbalCmd gimbal_cmd; + gimbal_cmd.yaw = cmd_yaw * 180 / M_PI; + gimbal_cmd.pitch = cmd_pitch * 180 / M_PI; + gimbal_cmd.yaw_diff = (cmd_yaw - current_yaw) * 180 / M_PI; + gimbal_cmd.pitch_diff = (cmd_pitch - current_pitch) * 180 / M_PI; + gimbal_cmd.distance = distance; + + // Judge whether to shoot + constexpr double TARGET_RADIUS = 0.308; + double shooting_range_yaw = std::abs(atan2(TARGET_RADIUS / 2, distance)) * 180 / M_PI; + double shooting_range_pitch = std::abs(atan2(TARGET_RADIUS / 2, distance)) * 180 / M_PI; + // Limit the shooting area to 1 degree to avoid not shooting when distance is + // too large + shooting_range_yaw = std::max(shooting_range_yaw, 1.0); + shooting_range_pitch = std::max(shooting_range_pitch, 1.0); + if (std::abs(gimbal_cmd.yaw_diff) < shooting_range_yaw && + std::abs(gimbal_cmd.pitch_diff) < shooting_range_pitch) { + gimbal_cmd.fire_advice = true; + FYT_DEBUG("rune_solver", "You Can Fire!"); + } else { + gimbal_cmd.fire_advice = false; + } + + return gimbal_cmd; +} + +double RuneSolver::getNormalAngle(const rm_interfaces::msg::RuneTarget::SharedPtr received_target) { + auto center_point = cv::Point2f(received_target->pts[0].x, received_target->pts[0].y); + std::array armor_points; + std::transform(received_target->pts.begin() + 1, + received_target->pts.end(), + armor_points.begin(), + [](const auto &pt) { return cv::Point2f(pt.x, pt.y); }); + + cv::Point2f armor_center = getCenterPoint(armor_points); + double x_diff = armor_center.x - center_point.x; + double y_diff = -(armor_center.y - center_point.y); + double normal_angle = std::atan2(y_diff, x_diff); + // Normalize angle + normal_angle = angles::normalize_angle_positive(normal_angle); + + return normal_angle; +} + +double RuneSolver::getObservedAngle(double normal_angle) { + double angle_diff = angles::shortest_angular_distance(last_angle_, normal_angle); + // Handle rune target switch + if (std::abs(angle_diff) > rune_solver_params.angle_offset_thres) { + angle_diff = normal_angle - last_angle_; + int offset = std::round(double(angle_diff / DEG_72)); + angle_diff -= offset * DEG_72; + } + + double observed_angle = last_observed_angle_ + angle_diff; + + return observed_angle; +} + +Eigen::Vector3d RuneSolver::getCenterPosition() const { return ekf_state_.head(3); } + +Eigen::Vector3d RuneSolver::getTargetPosition(double angle_diff) const { + Eigen::Vector3d t_odom_2_rune = ekf_state_.head(3); + + // Considering the large error and jitter(抖动) in the orientation obtained from PnP, + // and the fact that the position of the Rune are static in the odom frame, + // it is advisable to reconstruct the rotation matrix using geometric information + double yaw = ekf_state_(3); + double pitch = 0; + double roll = -last_angle_; + Eigen::Matrix3d R_odom_2_rune = + utils::eulerToMatrix(Eigen::Vector3d{roll, pitch, yaw}, utils::EulerOrder::XYZ); + + // Calculate the position of the armor in rune frame + Eigen::Vector3d p_rune = Eigen::AngleAxisd(-angle_diff, Eigen::Vector3d::UnitX()).matrix() * + Eigen::Vector3d(0, -ARM_LENGTH, 0); + + // Transform to odom frame + Eigen::Vector3d p_odom = R_odom_2_rune * p_rune + t_odom_2_rune; + + return p_odom; +} + +Eigen::Vector4d RuneSolver::getStateFromTransform(const Eigen::Matrix4d &transform) const { + // Get yaw + Eigen::Matrix3d R_odom_2_rune = transform.block(0, 0, 3, 3); + Eigen::Quaterniond q_eigen = Eigen::Quaterniond(R_odom_2_rune); + tf2::Quaternion q_tf = tf2::Quaternion(q_eigen.x(), q_eigen.y(), q_eigen.z(), q_eigen.w()); + double roll, pitch, yaw; + tf2::Matrix3x3(q_tf).getRPY(roll, pitch, yaw); + yaw = angles::normalize_angle(yaw); + + // Make yaw continuos + yaw = ekf_state_(3) + angles::shortest_angular_distance(ekf_state_(3), yaw); + + Eigen::Vector4d state; + state << transform(0, 3), transform(1, 3), transform(2, 3), yaw; + return state; +} + +double RuneSolver::getCurAngle() const { return last_angle_; } + +cv::Point2f RuneSolver::getCenterPoint( + const std::array &armor_points) { + return std::accumulate(armor_points.begin(), armor_points.end(), cv::Point2f(0, 0)) / + ARMOR_KEYPOINTS_NUM; +} + +} // namespace fyt::rune + diff --git a/src/rm_rune/rune_solver/src/rune_solver_node.cpp b/src/rm_rune/rune_solver/src/rune_solver_node.cpp new file mode 100644 index 0000000..507f6d4 --- /dev/null +++ b/src/rm_rune/rune_solver/src/rune_solver_node.cpp @@ -0,0 +1,390 @@ +// Maintained by Chengfu Zou, Labor +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rune_solver/rune_solver_node.hpp" +// ros2 +#include +#include + +#include +// third party +#include +#include +#include +// project +#include "rm_utils/common.hpp" +#include "rm_utils/logger/log.hpp" +#include "rm_utils/math/pnp_solver.hpp" +#include "rune_solver/motion_model.hpp" + +namespace fyt::rune { +RuneSolverNode::RuneSolverNode(const rclcpp::NodeOptions &options) : Node("rune_solver", options) { + FYT_REGISTER_LOGGER("rune_solver", "~/fyt2024-log", INFO); + FYT_INFO("rune_solver", "Starting RuneSolverNode!"); + + predict_offset_ = declare_parameter("predict_time", 0.1); + + // Tf2 info + tf2_buffer_ = std::make_shared(this->get_clock()); + tf2_listener_ = std::make_shared(*tf2_buffer_); + + // RuneSolver + auto rune_solver_params = RuneSolver::RuneSolverParams{ + .compensator_type = declare_parameter("compensator_type", "ideal"), + .gravity = declare_parameter("gravity", 9.8), + .bullet_speed = declare_parameter("bullet_speet", 28.0), + .angle_offset_thres = declare_parameter("angle_offset_thres", 0.78), + .lost_time_thres = declare_parameter("lost_time_thres", 0.5), + .auto_type_determined = declare_parameter("auto_type_determined", true), + }; + rune_solver_ = std::make_unique(rune_solver_params, tf2_buffer_); + + // Init manual compensator + auto angle_offset = declare_parameter("angle_offset", std::vector{}); + rune_solver_->manual_compensator->updateMapFlow(angle_offset); + + // EKF for filtering the position of R tag + // state: x, y, z, yaw + // measurement: x, y, z, yaw + // f - Process function + auto f = Predict(); + // h - Observation function + auto h = Measure(); + // update_Q - process noise covariance matrix + std::vector q_vec = + declare_parameter("ekf.q", std::vector{0.001, 0.001, 0.001, 0.001}); + auto u_q = [q_vec]() { + Eigen::Matrix q = Eigen::MatrixXd::Zero(4, 4); + q.diagonal() << q_vec[0], q_vec[1], q_vec[2], q_vec[3]; + return q; + }; + // update_R - measurement noise covariance matrix + std::vector r_vec = declare_parameter("ekf.r", std::vector{0.1, 0.1, 0.1, 0.1}); + auto u_r = [r_vec](const Eigen::Matrix &z) { + Eigen::Matrix r = Eigen::MatrixXd::Zero(4, 4); + r.diagonal() << r_vec[0], r_vec[1], r_vec[2], r_vec[3]; + return r; + }; + // P - error estimate covariance matrix + Eigen::MatrixXd p0 = Eigen::MatrixXd::Identity(4, 4); + rune_solver_->ekf = std::make_unique(f, h, u_q, u_r, p0); + + // Target subscriber + rune_target_sub_ = this->create_subscription( + "rune_detector/rune_target", + rclcpp::SensorDataQoS(), + std::bind(&RuneSolverNode::runeTargetCallback, this, std::placeholders::_1)); + + // Publisher + gimbal_pub_ = this->create_publisher("rune_solver/cmd_gimbal", + rclcpp::SensorDataQoS()); + target_pub_ = this->create_publisher( + "rune_solver/predict_target", rclcpp::SensorDataQoS()); + + // Set dynamic parameter callback + on_set_parameters_callback_handle_ = this->add_on_set_parameters_callback( + std::bind(&RuneSolverNode::onSetParameters, this, std::placeholders::_1)); + + // Camera info + cam_info_sub_ = this->create_subscription( + "camera_info", + rclcpp::SensorDataQoS(), + [this](sensor_msgs::msg::CameraInfo::ConstSharedPtr camera_info) { + cam_info_ = std::make_shared(*camera_info); + rune_solver_->pnp_solver = std::make_unique(camera_info->k, camera_info->d); + rune_solver_->pnp_solver->setObjectPoints("rune", RUNE_OBJECT_POINTS); + cam_info_sub_.reset(); + }); + + // Enable/Disable Rune Solver + set_mode_srv_ = this->create_service( + "rune_solver/set_mode", + std::bind( + &RuneSolverNode::setModeCallback, this, std::placeholders::_1, std::placeholders::_2)); + + // Debug info + debug_ = this->declare_parameter("debug", true); + if (debug_) { + observed_angle_pub_ = this->create_publisher( + "rune_solver/observed_angle", rclcpp::SensorDataQoS()); + predicted_angle_pub_ = this->create_publisher( + "rune_solver/predicted_angle", rclcpp::SensorDataQoS()); + fitter_text_pub_ = this->create_publisher("rune_solver/fitting_info", + rclcpp::SensorDataQoS()); + // Marker + r_tag_pos_marker_.ns = "r_tag_position"; + r_tag_pos_marker_.type = visualization_msgs::msg::Marker::TEXT_VIEW_FACING; + r_tag_pos_marker_.scale.x = r_tag_pos_marker_.scale.y = r_tag_pos_marker_.scale.z = 0.15; + r_tag_pos_marker_.text = "R"; + r_tag_pos_marker_.color.a = 1.0; + r_tag_pos_marker_.color.r = 1.0; + r_tag_pos_marker_.color.g = 1.0; + obs_pos_marker_.ns = "observed_position"; + obs_pos_marker_.type = visualization_msgs::msg::Marker::SPHERE; + obs_pos_marker_.scale.x = obs_pos_marker_.scale.y = obs_pos_marker_.scale.z = 0.308; + obs_pos_marker_.color.a = 1.0; + obs_pos_marker_.color.r = 1.0; + pred_pos_marker_.ns = "predicted_position"; + pred_pos_marker_.type = visualization_msgs::msg::Marker::SPHERE; + pred_pos_marker_.scale.x = pred_pos_marker_.scale.y = pred_pos_marker_.scale.z = 0.308; + pred_pos_marker_.color.a = 1.0; + pred_pos_marker_.color.g = 1.0; + aimming_line_marker_.ns = "aimming_line"; + aimming_line_marker_.type = visualization_msgs::msg::Marker::ARROW; + aimming_line_marker_.scale.x = 0.03; + aimming_line_marker_.scale.y = 0.05; + aimming_line_marker_.color.a = 0.5; + aimming_line_marker_.color.r = 1.0; + aimming_line_marker_.color.b = 1.0; + aimming_line_marker_.color.g = 1.0; + marker_pub_ = this->create_publisher( + "rune_solver/marker", rclcpp::SensorDataQoS()); + } + last_rune_target_.header.frame_id = ""; + // Timer 250 Hz + pub_timer_ = this->create_wall_timer(std::chrono::milliseconds(4), + std::bind(&RuneSolverNode::timerCallback, this)); + + // Heartbeat + heartbeat_ = HeartBeatPublisher::create(this); +} + +void RuneSolverNode::timerCallback() { + // rune_solver_->pnp_solver is nullptr when camera_info is not received + if (rune_solver_->pnp_solver == nullptr) { + return; + } + + // Return if not enable + if (!enable_) { + return; + } + + // Init message + rm_interfaces::msg::GimbalCmd control_msg; + geometry_msgs::msg::PointStamped target_msg; + target_msg.header.frame_id = "odom"; + + // If target never detected + if (last_rune_target_.header.frame_id.empty()) { + control_msg.yaw_diff = 0; + control_msg.pitch_diff = 0; + control_msg.distance = -1; + control_msg.pitch = 0; + control_msg.yaw = 0; + control_msg.fire_advice = false; + gimbal_pub_->publish(control_msg); + return; + } + + double predict_angle = 0; + + // Calculate predict time + Eigen::Vector3d cur_pos = rune_solver_->getTargetPosition(0); + double flying_time = rune_solver_->trajectory_compensator->getFlyingTime(cur_pos); + rclcpp::Time predict_timestamp = this->now() + rclcpp::Duration::from_seconds(predict_offset_) + + rclcpp::Duration::from_seconds(flying_time); + + Eigen::Vector3d pred_pos = Eigen::Vector3d::Zero(); + + if (rune_solver_->tracker_state == RuneSolver::TRACKING) { + // Predict target + predict_angle = rune_solver_->predictTarget(pred_pos, predict_timestamp.seconds()); + + target_msg.header.stamp = predict_timestamp; + target_msg.point.x = pred_pos.x(); + target_msg.point.y = pred_pos.y(); + target_msg.point.z = pred_pos.z(); + target_pub_->publish(target_msg); + try { + control_msg = rune_solver_->solveGimbalCmd(pred_pos); + } catch (...) { + FYT_ERROR("rune_solver", "solveGimbalCmd error"); + control_msg.yaw_diff = 0; + control_msg.pitch_diff = 0; + control_msg.distance = -1; + control_msg.pitch = 0; + control_msg.yaw = 0; + control_msg.fire_advice = false; + } + } else { + control_msg.yaw_diff = 0; + control_msg.pitch_diff = 0; + control_msg.distance = -1; + control_msg.pitch = 0; + control_msg.yaw = 0; + control_msg.fire_advice = false; + } + gimbal_pub_->publish(control_msg); + + if (debug_) { + // Publish fitting info + std_msgs::msg::String fitter_text_msg; + fitter_text_msg.data = fmt::format("{} | predict_time: {:.3f}s", + rune_solver_->curve_fitter->getDebugText(), + predict_offset_ + flying_time); + fitter_text_pub_->publish(fitter_text_msg); + + // Publish visualization marker + visualization_msgs::msg::MarkerArray marker_array; + if (rune_solver_->tracker_state == RuneSolver::LOST) { + obs_pos_marker_.action = visualization_msgs::msg::Marker::DELETEALL; + pred_pos_marker_.action = visualization_msgs::msg::Marker::DELETEALL; + r_tag_pos_marker_.action = visualization_msgs::msg::Marker::DELETEALL; + aimming_line_marker_.action = visualization_msgs::msg::Marker::DELETEALL; + marker_array.markers.push_back(obs_pos_marker_); + marker_array.markers.push_back(pred_pos_marker_); + marker_array.markers.push_back(r_tag_pos_marker_); + marker_array.markers.push_back(aimming_line_marker_); + marker_pub_->publish(marker_array); + } else { + obs_pos_marker_.header.frame_id = "odom"; + obs_pos_marker_.header.stamp = last_rune_target_.header.stamp; + obs_pos_marker_.action = visualization_msgs::msg::Marker::ADD; + obs_pos_marker_.lifetime = rclcpp::Duration::from_seconds(0.1); + obs_pos_marker_.pose.position.x = cur_pos.x(); + obs_pos_marker_.pose.position.y = cur_pos.y(); + obs_pos_marker_.pose.position.z = cur_pos.z(); + + Eigen::Vector3d r_tag_pos = rune_solver_->getCenterPosition(); + r_tag_pos_marker_.header.frame_id = "odom"; + r_tag_pos_marker_.header.stamp = last_rune_target_.header.stamp; + r_tag_pos_marker_.action = visualization_msgs::msg::Marker::ADD; + r_tag_pos_marker_.lifetime = rclcpp::Duration::from_seconds(0.1); + r_tag_pos_marker_.pose.position.x = r_tag_pos.x(); + r_tag_pos_marker_.pose.position.y = r_tag_pos.y(); + r_tag_pos_marker_.pose.position.z = r_tag_pos.z(); + + marker_array.markers.push_back(obs_pos_marker_); + marker_array.markers.push_back(r_tag_pos_marker_); + if (rune_solver_->tracker_state == RuneSolver::TRACKING) { + pred_pos_marker_.header.frame_id = "odom"; + pred_pos_marker_.header.stamp = predict_timestamp; + pred_pos_marker_.action = visualization_msgs::msg::Marker::ADD; + pred_pos_marker_.lifetime = rclcpp::Duration::from_seconds(0.1); + pred_pos_marker_.pose.position.x = pred_pos.x(); + pred_pos_marker_.pose.position.y = pred_pos.y(); + pred_pos_marker_.pose.position.z = pred_pos.z(); + marker_array.markers.push_back(pred_pos_marker_); + + aimming_line_marker_.action = visualization_msgs::msg::Marker::ADD; + aimming_line_marker_.points.clear(); + aimming_line_marker_.header.frame_id = "odom"; + aimming_line_marker_.header.stamp = this->now(); + aimming_line_marker_.lifetime = rclcpp::Duration::from_seconds(0.1); + geometry_msgs::msg::Point aimming_line_start, aimming_line_end; + aimming_line_marker_.points.emplace_back(aimming_line_start); + aimming_line_end.y = 15 * sin(control_msg.yaw * M_PI / 180); + aimming_line_end.x = 15 * cos(control_msg.yaw * M_PI / 180); + aimming_line_end.z = 15 * sin(control_msg.pitch * M_PI / 180); + aimming_line_marker_.points.emplace_back(aimming_line_end); + marker_array.markers.push_back(aimming_line_marker_); + + rm_interfaces::msg::DebugRuneAngle predict_angle_msg; + predict_angle_msg.header = last_rune_target_.header; + predict_angle_msg.header.stamp = predict_timestamp; + predict_angle_msg.data = predict_angle; + predicted_angle_pub_->publish(predict_angle_msg); + } + marker_pub_->publish(marker_array); + } + } +} + +void RuneSolverNode::runeTargetCallback( + const rm_interfaces::msg::RuneTarget::SharedPtr rune_target_msg) { + // rune_solver_->pnp_solver is nullptr when camera_info is not received + if (rune_solver_->pnp_solver == nullptr) { + return; + } + + // Keep the last detected target + if (!rune_target_msg->is_lost) { + last_rune_target_ = *rune_target_msg; + } + double observed_angle = 0; + if (rune_solver_->tracker_state == RuneSolver::LOST) { + observed_angle = rune_solver_->init(rune_target_msg); + } else { + observed_angle = rune_solver_->update(rune_target_msg); + + if (debug_) { + rm_interfaces::msg::DebugRuneAngle observed_angle_msg; + observed_angle_msg.header = rune_target_msg->header; + observed_angle_msg.data = observed_angle; + observed_angle_pub_->publish(observed_angle_msg); + } + } +} + +rcl_interfaces::msg::SetParametersResult RuneSolverNode::onSetParameters( + std::vector parameters) { + rcl_interfaces::msg::SetParametersResult result; + result.successful = true; + for (const auto ¶m : parameters) { + if (param.get_name() == "predict_time") { + predict_offset_ = param.as_double(); + } else if (param.get_name() == "debug") { + debug_ = param.as_bool(); + } else if (param.get_name() == "gravity") { + rune_solver_->rune_solver_params.gravity = param.as_double(); + } else if (param.get_name() == "bullet_speed") { + rune_solver_->rune_solver_params.bullet_speed = param.as_double(); + } else if (param.get_name() == "angle_offset_thres") { + rune_solver_->rune_solver_params.angle_offset_thres = param.as_double(); + } else if (param.get_name() == "lost_time_thres") { + rune_solver_->rune_solver_params.lost_time_thres = param.as_double(); + } + } + return result; +} + +void RuneSolverNode::setModeCallback( + const std::shared_ptr request, + std::shared_ptr response) { + response->success = true; + + VisionMode mode = static_cast(request->mode); + std::string mode_name = visionModeToString(mode); + if (mode_name == "UNKNOWN") { + FYT_ERROR("rune_solver", "Invalid mode: {}", request->mode); + return; + } + + switch (mode) { + case VisionMode::SMALL_RUNE_RED: + case VisionMode::SMALL_RUNE_BLUE: + case VisionMode::BIG_RUNE_RED: + case VisionMode::BIG_RUNE_BLUE: { + enable_ = true; + break; + } + default: { + enable_ = false; + break; + } + } + + FYT_WARN("rune_solver", "Set Rune Mode: {}", visionModeToString(mode)); +} + +} // namespace fyt::rune + +#include "rclcpp_components/register_node_macro.hpp" + +// Register the component with class_loader. +// This acts as a sort of entry point, allowing the component to be discoverable when its library +// is being loaded into a running process. +RCLCPP_COMPONENTS_REGISTER_NODE(fyt::rune::RuneSolverNode) diff --git a/src/rm_rune/rune_solver/test/test_node_startup.cpp b/src/rm_rune/rune_solver/test/test_node_startup.cpp new file mode 100644 index 0000000..aa7b74d --- /dev/null +++ b/src/rm_rune/rune_solver/test/test_node_startup.cpp @@ -0,0 +1,40 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// gest +#include +// ros2 +#include +#include +#include +// std +#include +// project +#include "rune_solver/rune_solver_node.hpp" + +TEST(RuneSolverrNodeTest, NodeStartupTest) +{ + rclcpp::NodeOptions options; + auto node = std::make_shared(options); + node.reset(); +} + +int main(int argc, char ** argv) +{ + testing::InitGoogleTest(&argc, argv); + rclcpp::init(argc, argv); + auto result = RUN_ALL_TESTS(); + rclcpp::shutdown(); + return result; +} diff --git a/src/rm_upstart/README.md b/src/rm_upstart/README.md new file mode 100644 index 0000000..25aa04f --- /dev/null +++ b/src/rm_upstart/README.md @@ -0,0 +1,9 @@ +# rm_upstart + +看门狗程序及自启动服务 + +## 看门狗 + +每个节点都会以1s一次的频率发布heartbeat话题,看门狗程序(rm_watch_dog.sh)通过ros2 topic echo监听这些话题,如果有一个节点在TIMEOUT(10s)内都没有更新心跳数据,看门狗程序会重启它自己拉起的 bringup 进程树。 + +不会再使用全局 `pkill -f ros`,因此不会误杀在其它终端手动启动的 ROS2 进程(例如 `foxglove_bridge`)。 \ No newline at end of file diff --git a/src/rm_upstart/register_service.sh b/src/rm_upstart/register_service.sh new file mode 100755 index 0000000..26668c7 --- /dev/null +++ b/src/rm_upstart/register_service.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# 获取当前用户的用户名和家目录 +USER_NAME=${SUDO_USER:-$(whoami)} +HOME_DIR=$(eval echo ~$USER_NAME) +SERVICE_NAME="rm_1229.service" +SERVICE_PATH="/etc/systemd/system/$SERVICE_NAME" + +# 检查是否为 root 用户,因为修改 systemd 配置需要 root 权限 +if [ "$(id -u)" -ne 0 ]; then + echo "This script must be run as root." + exit 1 +fi + +# 复制脚本到目标路径 +chmod +x ./rm_clean_up.sh +chmod +x ./rm_watch_dog.sh +cp ./rm_clean_up.sh /usr/sbin/ +cp ./rm_watch_dog.sh /usr/sbin/ + +# 动态创建 systemd service 文件内容 +read -r -d '' SERVICE_CONTENT << EOF +[Unit] +Description=YQ 2026 Vision Project +After=network.target + +[Service] +User=$USER_NAME +Type=simple +Environment=ROS_DOMAIN_ID=10 +ExecStart=/usr/sbin/rm_watch_dog.sh +ExecStop=/usr/sbin/rm_clean_up.sh +Restart=always +TimeoutStopSec=10 +RestartSec=10s + +[Install] +WantedBy=multi-user.target +EOF + +# 创建/覆写 systemd service 文件 +echo "Creating systemd service file at $SERVICE_PATH..." +echo "$SERVICE_CONTENT" > "$SERVICE_PATH" + +# 重新加载 systemd 配置 +echo "Reloading systemd daemon..." +systemctl daemon-reload + +# 启用服务 +echo "Enabling service $SERVICE_NAME..." +systemctl enable "$SERVICE_NAME" + +# 启动服务 +echo "Starting service $SERVICE_NAME..." +systemctl start "$SERVICE_NAME" + +echo "Service $SERVICE_NAME has been registered and started." diff --git a/src/rm_upstart/rm_clean_up.sh b/src/rm_upstart/rm_clean_up.sh new file mode 100755 index 0000000..6da7251 --- /dev/null +++ b/src/rm_upstart/rm_clean_up.sh @@ -0,0 +1,34 @@ +#!/bin/bash + +export ROS_HOSTNAME=$(hostname) +export ROS_HOME=${ROS_HOME:=$HOME_DIR/.ros} +export ROS_LOG_DIR="/tmp" +source /opt/ros/humble/setup.bash +pkill rm_watch_dog.sh # 杀掉看门狗 + +PID_FILE="$HOME/yq_2026/.rm_bringup.pid" + +kill_process_tree() { + local pid="$1" + local child + + for child in $(pgrep -P "$pid" 2>/dev/null); do + kill_process_tree "$child" + done + + kill -TERM "$pid" 2>/dev/null || true +} + +if [[ -f "$PID_FILE" ]]; then + launch_pid=$(cat "$PID_FILE") + if [[ -n "$launch_pid" ]] && kill -0 "$launch_pid" 2>/dev/null; then + kill_process_tree "$launch_pid" + sleep 2 + kill -KILL "$launch_pid" 2>/dev/null || true + fi + rm -f "$PID_FILE" +fi + +ros2 daemon stop +ros2 daemon start +sleep 1 diff --git a/src/rm_upstart/rm_watch_dog.sh b/src/rm_upstart/rm_watch_dog.sh new file mode 100755 index 0000000..a7c5e85 --- /dev/null +++ b/src/rm_upstart/rm_watch_dog.sh @@ -0,0 +1,156 @@ +#!/bin/bash +# watch_dog.sh + +TIMEOUT=10 # 设定超时时间为10秒 +NAMESPACE="" # 命名空间 例如 "/infantry_3" 注意要有"/";留空则自动从 rm_bringup/config/launch_params.yaml 读取 +CORE_NODE_NAMES=("armor_detector" "armor_solver" "serial_driver") # 固定监控节点 +CAMERA_NODE_NAME="hik_camera" # 相机节点默认名(视频模式会改为 video_player) +NODE_NAMES=() +USER="$(whoami)" #用户名 +HOME_DIR=$(eval echo ~$USER) +WORKING_DIR="$HOME_DIR/yq_2026" # 代码目录 +LAUNCH_FILE="rm_bringup bringup.launch.py" # launch 文件 +OUTPUT_FILE="$WORKING_DIR/screen.output" # 终端输出记录文件 +PID_FILE="$WORKING_DIR/.rm_bringup.pid" # 记录由看门狗启动的 bringup 主进程 PID + +rmw="rmw_fastrtps_cpp" #RMW +export RMW_IMPLEMENTATION="$rmw" # RMW实现 + +# ROS Domain ID (默认 10,可通过环境变量覆盖) +export ROS_DOMAIN_ID=${ROS_DOMAIN_ID:=10} + +export ROS_HOSTNAME=$(hostname) +export ROS_HOME=${ROS_HOME:=$HOME_DIR/.ros} +export ROS_LOG_DIR="/tmp" + +source /opt/ros/humble/setup.bash +source $WORKING_DIR/install/setup.bash + +# 如果未手动指定 NAMESPACE,则从 bringup 的 launch_params.yaml 自动读取 +if [[ -z "$NAMESPACE" ]]; then + launch_params_yaml="$WORKING_DIR/src/rm_bringup/config/launch_params.yaml" + if [[ -f "$launch_params_yaml" ]]; then + readarray -t _launch_vals < <(python3 - "$launch_params_yaml" << 'PY' +import sys +import yaml + +path = sys.argv[1] +with open(path, "r", encoding="utf-8") as file: + data = yaml.safe_load(file) or {} + +namespace = data.get("namespace", "") +if namespace is None: + namespace = "" +video_play = bool(data.get("video_play", False)) +print(str(namespace).strip()) +print("true" if video_play else "false") +PY +) + NAMESPACE="${_launch_vals[0]}" + if [[ "${_launch_vals[1]}" == "true" ]]; then + CAMERA_NODE_NAME="video_player" + fi + fi +fi + +NODE_NAMES=("${CORE_NODE_NAMES[@]}" "$CAMERA_NODE_NAME") + +# 规范化命名空间 +NAMESPACE=$(echo "$NAMESPACE" | tr -d "\r" | xargs) +NAMESPACE="${NAMESPACE%/}" +if [[ -n "$NAMESPACE" ]] && [[ "${NAMESPACE:0:1}" != "/" ]]; then + NAMESPACE="/$NAMESPACE" +fi +if [[ "$NAMESPACE" == "/" ]]; then + NAMESPACE="" +fi + +rmw_config="" +if [[ "$rmw" == "rmw_fastrtps_cpp" ]] +then + if [[ ! -z $rmw_config ]] + then + export FASTRTPS_DEFAULT_PROFILES_FILE=$rmw_config + fi +elif [[ "$rmw" == "rmw_cyclonedds_cpp" ]] +then + if [[ ! -z $rmw_config ]] + then + export CYCLONEDDS_URI=$rmw_config + fi +fi + +function bringup() { + source /opt/ros/humble/setup.bash + source $WORKING_DIR/install/setup.bash + nohup ros2 launch $LAUNCH_FILE > "$OUTPUT_FILE" 2>&1 & + launch_pid=$! + echo "$launch_pid" > "$PID_FILE" +} + +function kill_process_tree() { + local pid="$1" + local child + + for child in $(pgrep -P "$pid" 2>/dev/null); do + kill_process_tree "$child" + done + + kill -TERM "$pid" 2>/dev/null || true +} + +function stop_bringup() { + local launch_pid="" + + if [[ -f "$PID_FILE" ]]; then + launch_pid=$(cat "$PID_FILE") + fi + + if [[ -n "$launch_pid" ]] && kill -0 "$launch_pid" 2>/dev/null; then + kill_process_tree "$launch_pid" + sleep 2 + kill -KILL "$launch_pid" 2>/dev/null || true + fi + + rm -f "$PID_FILE" +} + +function restart() { + stop_bringup + ros2 daemon stop + ros2 daemon start + bringup +} + +bringup +sleep $TIMEOUT +sleep $TIMEOUT + +# 监控每个节点的心跳 +while true; do + for node in "${NODE_NAMES[@]}"; do + if [[ -n "$NAMESPACE" ]]; then + topic="$NAMESPACE/$node/heartbeat" + else + topic="/$node/heartbeat" + fi + echo "- Check $node" + if ros2 topic list 2>/dev/null | grep -q -F "$topic" 2>/dev/null; then + data_value=$(timeout 10 ros2 topic echo "$topic" --once | grep -o "data: [0-9]*" | awk '{print $2}' 2>/dev/null) + if [ ! -z "$data_value" ]; then + echo " $node is OK! Heartbeat Count: $data_value" + else + echo " Heartbeat lost for $topic, restarting all nodes..." + restart + break + + fi + else + echo " Heartbeat topic $topic does not exist, restarting all nodes..." + restart + break + fi + done + sleep $TIMEOUT +done + diff --git a/src/rm_utils/CMakeLists.txt b/src/rm_utils/CMakeLists.txt new file mode 100644 index 0000000..b97c717 --- /dev/null +++ b/src/rm_utils/CMakeLists.txt @@ -0,0 +1,101 @@ +cmake_minimum_required(VERSION 3.5) +project(rm_utils) + +# Default to C++17 +if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) +endif() + +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic -O3) +endif() + +set(CMAKE_EXPORT_COMPILE_COMMANDS ON) + +# find package +find_package(ament_cmake REQUIRED) +find_package(rclcpp REQUIRED) +find_package(eigen3_cmake_module REQUIRED) +find_package(Eigen3 REQUIRED) +find_package(geometry_msgs REQUIRED) +find_package(OpenCV 4 REQUIRED) +find_package(Ceres REQUIRED) +find_package(rcpputils REQUIRED) +find_package(fmt REQUIRED) + +# include +include_directories(include) + +add_library(fytlogger SHARED + src/logger/logger_impl.cpp + src/logger/writer.cpp + src/logger/logger_pool.cpp +) +target_link_libraries(fytlogger fmt::fmt) +ament_target_dependencies(fytlogger fmt) + +# create rm_utils lib +add_library(${PROJECT_NAME} SHARED + src/math/utils.cpp + src/math/pnp_solver.cpp + src/math/trajectory_compensator.cpp + src/math/manual_compensator.cpp + src/math/extended_kalman_filter.cpp + src/url_resolver.cpp + src/heartbeat.cpp +) + +set(dependencies + rclcpp + rcpputils + Eigen3 + eigen3_cmake_module + geometry_msgs + Ceres + OpenCV +) + +ament_target_dependencies(${PROJECT_NAME} ${dependencies}) +target_include_directories(${PROJECT_NAME} PUBLIC ${OpenCV_INCLUDE_DIRS} ${CERES_INCLUDE_DIRS}) +target_link_libraries(${PROJECT_NAME} + ${OpenCV_LIBS} + ${CERES_LIBRARIES} +) +# Install include directories +install(DIRECTORY include/ + DESTINATION include +) + +# Install libraries +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME} + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include +) +install(TARGETS fytlogger + EXPORT fytlogger + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include +) + +# export lib lib +ament_export_targets(${PROJECT_NAME} HAS_LIBRARY_TARGET) +ament_export_targets(fytlogger HAS_LIBRARY_TARGET) +ament_export_dependencies(${dependencies} fmt) + +# test +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + list(APPEND AMENT_LINT_AUTO_EXCLUDE + ament_cmake_copyright + ament_cmake_uncrustify + ament_cmake_cpplint + ) + ament_lint_auto_find_test_dependencies() +endif() + +ament_package() \ No newline at end of file diff --git a/src/rm_utils/README.md b/src/rm_utils/README.md new file mode 100644 index 0000000..4708181 --- /dev/null +++ b/src/rm_utils/README.md @@ -0,0 +1,121 @@ +# rm_utils + +## 1. 介绍 +该模块提供通用的工具类以及函数,包括: +* 扩展卡尔曼滤波器 ExtendedKalmanFilter +* PnP解算器 PnPSolver +* 弹道补偿器 TrajectoryCompensator +* FYT日志库 +* URL路径解析器 URLResolver +* 心跳发布者 HeartBeatPublisher + +## 2. 使用方法 + +### 2.0 扩展卡尔曼滤波 + +见armor_solver/src/armor_solver_node.cpp + +### 2.1 PnP解算 + +示例: +```cpp +#include "rm_utils/math/pnp_solver.hpp" + +// 1. 创建PnP解算器 +// 构造函数参数(cv::Mat, cv::Mat, cv::PnPMethod):相机内参矩阵、畸变系数、解算方法(默认是IPPE) +auto pnp_solver = PnPSolver(camera_matrix, distortion_coefficients); +// 2. 为PnPSolver设置一个物体坐标系 +std::vector object_points = { + cv::Point3f(-1.0f, 1.0f, 0.0f), + cv::Point3f(1.0f, 1.0f, 0.0f), + cv::Point3f(1.0f, -1.0f, 0.0f), + cv::Point3f(-1.0f, -1.0f, 0.0f) +}; +pnp_solver.setObjectPoints(object_points, "object_frame"); +// 3. PnP解算 +cv::Mat rvec, tvec; +pnp_solver.solvePnP(image_points, rvec, tvec, "object_frame"); + +// 对于打符来说,因为以前的PnP是直接返回一个表示位姿的Eigen::VectorXd,所以这里也提供了一个函数,用于将rvec和tvec转换为VectorXd +// 4. 获取位姿 +Eigen::VectorXd pose = pnp_solver.getPose(rvec, tvec); +``` + +### 2.2 弹道补偿 + +示例: +```cpp +#include "rm_utils/math/trajectory_compensator.hpp" + +auto compensator = CompensatorFactory::createCompensator("ideal"); +double pitch = 0; +Eigen::Vector3d p = Eigen::Vector3d(1.0, 0, 0); +double temp_pitch = pitch; +if (trajectory_compensator_->compensate(p, temp_pitch)) { + pitch = temp_pitch; +} +``` + +### 2.3 Eigen和cv::Mat的相互转换 + +示例: +```cpp +#include "rm_utils/math/utils.hpp" + +cv::Mat mat = cv::Mat::eye(3, 3, CV_32FC1); +Eigen::Matrix3f eigen_mat = utils::cvToEigen(mat); +cv::Mat mat2 = utils::eigenToCv(eigen_mat); +``` + +### 2.4 FYT日志库 + +示例: +```cpp +#include "rm_utils/logger/log.hpp" + +// 1. 初始化 +// 参数:日志名称、日志文件路径、日志级别 +FYT_REGISTER_LOGGER("test_logger", "/tmp/test_logger.log", INFO); + +// 2. 使用 +FYT_INFO("test_logger", "This is a test log"); +int a = 1; +FYT_WARN("test_logger", "a = {}", a); +``` + +### 2.5 URL Resolver + +能够用很方便的方式(类camera_info_url)访问文件和或ros2包的install目录 + +示例: +```cpp +#include "rm_utils/url_resolver.hpp" + +namespace fs = std::filesystem; +fs::path model_path = + utils::URLResolver::getResolvedPath("package://armor_detector/model/lenet.onnx"); + +if (fs::exists(model_path)) { + std::cout< +#include + +#define FYT_ASSERT(condition) \ + do { \ + if (!(condition)) { \ + std::ostringstream oss; \ + oss << "Assertion failed: (" << #condition << ")"; \ + std::cerr << oss.str() << std::endl; \ + std::abort(); \ + } \ + } while (0) + +#define FYT_ASSERT_MSG(condition, msg) \ + do { \ + if (!(condition)) { \ + std::ostringstream oss; \ + oss << "Assertion failed: (" << #condition << ") " << msg; \ + std::cerr << oss.str() << std::endl; \ + std::abort(); \ + } \ + } while (0) + +#endif \ No newline at end of file diff --git a/src/rm_utils/include/rm_utils/common.hpp b/src/rm_utils/include/rm_utils/common.hpp new file mode 100644 index 0000000..b1bdaa0 --- /dev/null +++ b/src/rm_utils/include/rm_utils/common.hpp @@ -0,0 +1,71 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_COMMON_HPP_ +#define RM_UTILS_COMMON_HPP_ + +#include + +namespace fyt { + +enum class EnemyColor { + RED = 0, + BLUE = 1, + WHITE = 2, +}; + +inline std::string enemyColorToString(EnemyColor color) { + switch (color) { + case EnemyColor::RED: + return "RED"; + case EnemyColor::BLUE: + return "BLUE"; + case EnemyColor::WHITE: + return "WHITE"; + default: + return "UNKNOWN"; + } +} + +enum VisionMode { + AUTO_AIM_RED = 0, + AUTO_AIM_BLUE = 1, + SMALL_RUNE_RED = 2, + SMALL_RUNE_BLUE = 3, + BIG_RUNE_RED = 4, + BIG_RUNE_BLUE = 5, +}; + +inline std::string visionModeToString(VisionMode mode) { + switch (mode) { + case VisionMode::AUTO_AIM_RED: + return "AUTO_AIM_RED"; + case VisionMode::AUTO_AIM_BLUE: + return "AUTO_AIM_BLUE"; + case VisionMode::SMALL_RUNE_RED: + return "SMALL_RUNE_RED"; + case VisionMode::SMALL_RUNE_BLUE: + return "SMALL_RUNE_BLUE"; + case VisionMode::BIG_RUNE_RED: + return "BIG_RUNE_RED"; + case VisionMode::BIG_RUNE_BLUE: + return "BIG_RUNE_BLUE"; + default: + return "UNKNOWN"; + } +} + +} // namespace fyt +#endif diff --git a/src/rm_utils/include/rm_utils/heartbeat.hpp b/src/rm_utils/include/rm_utils/heartbeat.hpp new file mode 100644 index 0000000..e268b65 --- /dev/null +++ b/src/rm_utils/include/rm_utils/heartbeat.hpp @@ -0,0 +1,42 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#ifndef RM_UTILS_HEARTBEAT_HPP_ +#define RM_UTILS_HEARTBEAT_HPP_ + +// std +#include +#include +// ros2 +#include +#include + +namespace fyt { +class HeartBeatPublisher { +public: + using SharedPtr = std::shared_ptr; + + static SharedPtr create(rclcpp::Node *node); + + ~HeartBeatPublisher(); +private: + explicit HeartBeatPublisher(rclcpp::Node *node); + + std_msgs::msg::Int64 message_; + rclcpp::Publisher::SharedPtr publisher_; + std::thread pub_thread_; +}; +} // namespace fyt + +#endif // RM_UTILS_HEARTBEAT_HPP_ diff --git a/src/rm_utils/include/rm_utils/logger/README.md b/src/rm_utils/include/rm_utils/logger/README.md new file mode 100644 index 0000000..6f2b8dd --- /dev/null +++ b/src/rm_utils/include/rm_utils/logger/README.md @@ -0,0 +1,3 @@ +# FYT Logger + +一个基于fmt的简单日志库 \ No newline at end of file diff --git a/src/rm_utils/include/rm_utils/logger/exception.hpp b/src/rm_utils/include/rm_utils/logger/exception.hpp new file mode 100644 index 0000000..f2d2c39 --- /dev/null +++ b/src/rm_utils/include/rm_utils/logger/exception.hpp @@ -0,0 +1,43 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_LOGGER_EXCEPTION_HPP_ +#define RM_UTILS_LOGGER_EXCEPTION_HPP_ + +#include + +namespace fyt::logger { +class LoggerNotFoundError : public std::exception { +public: + explicit LoggerNotFoundError(std::string_view name) { + msg = fmt::format("Logger {} Not Found", name); + } + const char *what() const noexcept override { return msg.data(); } + +private: + std::string msg; +}; + +class WriteError : public std::exception { +public: + explicit WriteError(std::string_view name) { msg = fmt::format("Write to {} Error", name); } + const char *what() const noexcept override { return msg.data(); } + +private: + std::string msg; +}; + +} // namespace fyt::logger +#endif // RM_UTILS_LOGGER_EXCEPTION_HPP_ diff --git a/src/rm_utils/include/rm_utils/logger/impl/global_mutex.hpp b/src/rm_utils/include/rm_utils/logger/impl/global_mutex.hpp new file mode 100644 index 0000000..33c57dc --- /dev/null +++ b/src/rm_utils/include/rm_utils/logger/impl/global_mutex.hpp @@ -0,0 +1,44 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_LOGGER_GLOBAL_MUTEX_HPP_ +#define RM_UTILS_LOGGER_GLOBAL_MUTEX_HPP_ + +#include +#include + +namespace fyt::logger { + +static std::mutex g_mutex_; + +class GlobalMutex { +public: + inline static std::mutex &getConsoleMutex() { + static std::mutex s_mutex; + return s_mutex; + } + + inline static std::mutex &getFileMutex(const std::string &filename) { + static std::unordered_map file_mutex_map; + std::lock_guard lock(g_mutex_); + return file_mutex_map[filename]; + } + +private: + GlobalMutex() = default; + ~GlobalMutex() = default; +}; +} // namespace fyt::logger +#endif diff --git a/src/rm_utils/include/rm_utils/logger/impl/logger_impl.hpp b/src/rm_utils/include/rm_utils/logger/impl/logger_impl.hpp new file mode 100644 index 0000000..c5abcc6 --- /dev/null +++ b/src/rm_utils/include/rm_utils/logger/impl/logger_impl.hpp @@ -0,0 +1,106 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_LOGGER_LOGGER_IMPL_HPP_ +#define RM_UTILS_LOGGER_LOGGER_IMPL_HPP_ + +// std +#include +#include +#include +#include +#include + +// fmt +#include +#include + +// project +#include "rm_utils/logger/impl/writer.hpp" +#include "rm_utils/logger/types.hpp" + +namespace fyt::logger { + +namespace internal { +class Logger { +public: + Logger(std::string name, std::string path, LogLevel level, LogOptions ops); + + template + void log(LogLevel level, const std::string &format, Args... args) { + std::string log_info = fmt::format(format, args...); + std::string level_prefix = fmt::format("[{}] ", LogNameTable[static_cast(level)]); + std::string name_prefix = fmt::format("[{}] ", name_); + std::string log_time = fmt::format("[{}] ", getLocalTime()); + std::string message = + fmt::format("{} {} {}: {}", level_prefix, name_prefix, log_time, log_info); + + if (level >= this->level_) { + std::string colored_message = + fmt::format(LogColorTable[static_cast(level)], message); + writer_->write(colored_message); + + std::lock_guard lock(consle_mutex_); + fmt::print(fg(LogFmtColorTable[static_cast(level)]), "{}\n", message); + } + } + + template + void debug(const std::string &format, Args... args) { + log(LogLevel::DEBUG, format, args...); + } + + template + void info(const std::string &format, Args... args) { + log(LogLevel::INFO, format, args...); + } + + template + void warn(const std::string &format, Args... args) { + log(LogLevel::WARN, format, args...); + } + + template + void error(const std::string &format, Args... args) { + log(LogLevel::ERROR, format, args...); + } + + template + void fatal(const std::string &format, Args... args) { + log(LogLevel::FATAL, format, args...); + } + + template + void print(const std::string &format, Args... args) { + std::lock_guard lock(consle_mutex_); + fmt::print(format, args...); + } + + void setLevel(LogLevel level); + + void flush(); + +private: + std::string getLocalTime(); + + std::mutex &consle_mutex_; + std::string name_; + LogLevel level_; + std::unique_ptr writer_; +}; +} // namespace internal + +} // namespace fyt::logger +#endif // RM_UTILS_LOGGER_LOGGER_IMPL_HPP_ diff --git a/src/rm_utils/include/rm_utils/logger/impl/writer.hpp b/src/rm_utils/include/rm_utils/logger/impl/writer.hpp new file mode 100644 index 0000000..0bb663c --- /dev/null +++ b/src/rm_utils/include/rm_utils/logger/impl/writer.hpp @@ -0,0 +1,40 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_LOGGER_WRITER_HPP_ +#define RM_UTILS_LOGGER_WRITER_HPP_ + +// std +#include +#include + +namespace fyt::logger { + +class Writer { +public: + explicit Writer(const std::string &filename); + + ~Writer(); + + void write(const std::string &message); + + void flush(); + +private: + std::ofstream file_; + std::mutex &r_mutex_; +}; +} // namespace fyt::logger +#endif // RM_UTILS_LOGGER_WRITER_HPP_ diff --git a/src/rm_utils/include/rm_utils/logger/log.hpp b/src/rm_utils/include/rm_utils/logger/log.hpp new file mode 100644 index 0000000..cc691de --- /dev/null +++ b/src/rm_utils/include/rm_utils/logger/log.hpp @@ -0,0 +1,43 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_LOGGER_LOGGER_HPP_ +#define RM_UTILS_LOGGER_LOGGER_HPP_ + +#include +#include + +#define FYT_REGISTER_LOGGER(name, path, level) \ + do { \ + fyt::logger::LoggerPool::registerLogger( \ + name, path, fyt::logger::LogLevel::level, DATE_DIR | DATE_SUFFIX); \ + } while (0) + +#define FYT_LOG(name, level, ...) \ + do { \ + fyt::logger::LoggerPool::getLogger(name).log(level, __VA_ARGS__); \ + } while (0) + +#define FYT_DEBUG(name, ...) FYT_LOG(name, fyt::logger::LogLevel::DEBUG, __VA_ARGS__) + +#define FYT_INFO(name, ...) FYT_LOG(name, fyt::logger::LogLevel::INFO, __VA_ARGS__) + +#define FYT_WARN(name, ...) FYT_LOG(name, fyt::logger::LogLevel::WARN, __VA_ARGS__) + +#define FYT_ERROR(name, ...) FYT_LOG(name, fyt::logger::LogLevel::ERROR, __VA_ARGS__) + +#define FYT_FATAL(name, ...) FYT_LOG(name, fyt::logger::LogLevel::FATAL, __VA_ARGS__) + +#endif // RM_UTILS_LOGGER_LOGGER_HPP_ diff --git a/src/rm_utils/include/rm_utils/logger/logger_pool.hpp b/src/rm_utils/include/rm_utils/logger/logger_pool.hpp new file mode 100644 index 0000000..bfed25d --- /dev/null +++ b/src/rm_utils/include/rm_utils/logger/logger_pool.hpp @@ -0,0 +1,47 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_LOGGER_POOL_HPP_ +#define RM_UTILS_LOGGER_POOL_HPP_ + +#include +#include +#include +#include + +#include "rm_utils/logger/impl/logger_impl.hpp" + +namespace fyt::logger { +class LoggerPool { +public: + static internal::Logger &getLogger(const std::string &name); + + static void registerLogger(const std::string &name, + const std::string &path, + LogLevel level, + LogOptions = DEFAULT_OPTIONS); + +private: + LoggerPool() = default; + ~LoggerPool() = default; + LoggerPool(const LoggerPool &) = delete; + LoggerPool &operator=(const LoggerPool &) = delete; + LoggerPool(LoggerPool &&) = delete; + + static std::mutex l_mutex_; + static std::unordered_map> loggers_; +}; +} // namespace fyt::logger +#endif // RM_UTILS?LOGGER_POOL_HPP_ diff --git a/src/rm_utils/include/rm_utils/logger/types.hpp b/src/rm_utils/include/rm_utils/logger/types.hpp new file mode 100644 index 0000000..52042e3 --- /dev/null +++ b/src/rm_utils/include/rm_utils/logger/types.hpp @@ -0,0 +1,56 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_LOGGER_TYPES_HPP_ +#define RM_UTILS_LOGGER_TYPES_HPP_ + +// std +#include +#include +#include +#include +#include + +// fmt +#include +#include + +namespace fyt::logger { + +enum class LogLevel : std::uint8_t { DEBUG, INFO, WARN, ERROR, FATAL }; + +constexpr const char *LogNameTable[5] = {"DEBUG", "INFO", "WARN", "ERROR", "FATAL"}; + +// DEBUG = gray, INFO = white, WARN = yellow, ERROR = red, FATAL = blue +constexpr const char *LogColorTable[5] = {"{}", + "{}", + "{}", + "{}", + "{}"}; + +constexpr fmt::color LogFmtColorTable[5] = { + fmt::color::gray, fmt::color::white, fmt::color::yellow, fmt::color::red, fmt::color::blue}; + +using LogOptions = unsigned char; + +// default options: without date named directory, without date named suffix, append to file +#define DEFAULT_OPTIONS 0b00000000 +#define DATE_DIR 0b00000001 +#define DATE_SUFFIX 0b00000010 +#define OVER_WRITE 0b00000100 + +} // namespace fyt::logger +#endif // RM_UTILS_LOGGER_TYPES_HPP_ + \ No newline at end of file diff --git a/src/rm_utils/include/rm_utils/math/extended_kalman_filter.hpp b/src/rm_utils/include/rm_utils/math/extended_kalman_filter.hpp new file mode 100644 index 0000000..cfbe443 --- /dev/null +++ b/src/rm_utils/include/rm_utils/math/extended_kalman_filter.hpp @@ -0,0 +1,145 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// Copyright xinyang 2021. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_KALMAN_FILTER_HPP_ +#define RM_UTILS_KALMAN_FILTER_HPP_ + +// std +#include +// Eigen +#include +// ceres +#include + +namespace fyt { + +// Extended Kalman Filter with auto differentiation +// N_X: state vector dimension +// N_Z: measurement vector dimension +// PredicFunc: process nonlinear vector function +// MeasureFunc: observation nonlinear vector function +template +class ExtendedKalmanFilter { +public: + ExtendedKalmanFilter() = default; + + using MatrixXX = Eigen::Matrix; + using MatrixZX = Eigen::Matrix; + using MatrixXZ = Eigen::Matrix; + using MatrixZZ = Eigen::Matrix; + using MatrixX1 = Eigen::Matrix; + using MatrixZ1 = Eigen::Matrix; + + using UpdateQFunc = std::function; + using UpdateRFunc = std::function; + + explicit ExtendedKalmanFilter(const PredicFunc &f, + const MeasureFunc &h, + const UpdateQFunc &u_q, + const UpdateRFunc &u_r, + const MatrixXX &P0) noexcept + : f(f), h(h), update_Q(u_q), update_R(u_r), P_post(P0) { + F = MatrixXX::Zero(); + H = MatrixZX::Zero(); + } + + // Set the initial state + void setState(const MatrixX1 &x0) noexcept { x_post = x0; } + + void setPredictFunc(const PredicFunc &f) noexcept { this->f = f; } + + void setMeasureFunc(const MeasureFunc &h) noexcept { this->h = h; } + + // Compute a predicted state + MatrixX1 predict() noexcept { + ceres::Jet x_e_jet[N_X]; + for (int i = 0; i < N_X; ++i) { + x_e_jet[i].a = x_post[i]; + x_e_jet[i].v[i] = 1.; + // a 对自己的偏导数为 1. + } + ceres::Jet x_p_jet[N_X]; + f(x_e_jet, x_p_jet); + + for (int i = 0; i < N_X; ++i) { + x_pri[i] = x_p_jet[i].a; + F.block(i, 0, 1, N_X) = x_p_jet[i].v.transpose(); + } + + Q = update_Q(); + P_pri = F * P_post * F.transpose() + Q; + x_post = x_pri; + + return x_pri; + } + + // Update the estimated state based on measurement + MatrixX1 update(const MatrixZ1 &z) noexcept { + ceres::Jet x_p_jet[N_X]; + for (int i = 0; i < N_X; i++) { + x_p_jet[i].a = x_pri[i]; + x_p_jet[i].v[i] = 1; + } + ceres::Jet z_p_jet[N_Z]; + h(x_p_jet, z_p_jet); + + MatrixZ1 z_pri; + for (int i = 0; i < N_Z; i++) { + z_pri[i] = z_p_jet[i].a; + H.block(i, 0, 1, N_X) = z_p_jet[i].v.transpose(); + } + + R = update_R(z); + K = P_pri * H.transpose() * (H * P_pri * H.transpose() + R).inverse(); + x_post = x_post + K * (z - z_pri); + P_post = (MatrixXX::Identity() - K * H) * P_pri; + return x_post; + } + +private: + // Process nonlinear vector function + PredicFunc f; + MatrixXX F; + // Observation nonlinear vector function + MeasureFunc h; + MatrixZX H; + // Process noise covariance matrix + UpdateQFunc update_Q; + MatrixXX Q; + // Measurement noise covariance matrix + UpdateRFunc update_R; + MatrixZZ R; + + // Priori error estimate covariance matrix + MatrixXX P_pri; + // Posteriori error estimate covariance matrix + MatrixXX P_post; + + // Kalman gain + MatrixXZ K; + + // Priori state + MatrixX1 x_pri; + // Posteriori state + MatrixX1 x_post; +}; + +} // namespace fyt + +#endif // RM_UTILS_KALMAN_FILTER_HPP_ diff --git a/src/rm_utils/include/rm_utils/math/manual_compensator.hpp b/src/rm_utils/include/rm_utils/math/manual_compensator.hpp new file mode 100644 index 0000000..823ca4c --- /dev/null +++ b/src/rm_utils/include/rm_utils/math/manual_compensator.hpp @@ -0,0 +1,94 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_MANUAL_COMPENSATOR_HPP_ +#define RM_UTILS_MANUAL_COMPENSATOR_HPP_ + +#include +#include +#include +#include + +namespace fyt { + constexpr size_t NORMAL_STR_NUM = 6; + + class LineRegion{ + public: + LineRegion(const double l, const double u): + lowwer_(l), upper_(u) {} + + bool checkPoint(const double p) const { + if (p > lowwer_ && p < upper_ ) { + return true; + } + return false; + } + + bool checkIntersection(const LineRegion& l) const { + if (checkPoint(l.lowwer_) || + checkPoint(l.upper_)) { + return true; + } + return false; + } + + private: + double lowwer_; + double upper_; + }; + + class ManualCompensator { + public: + struct HeightMapNode { + HeightMapNode(const LineRegion ®ion, const double pitch, const double yaw): + height_region(region), pitch_offset(pitch), yaw_offset(yaw) {} + LineRegion height_region; + double pitch_offset; + double yaw_offset; + }; + + struct DistMapNode { + DistMapNode(const LineRegion ®ion, const std::vector h_nodes): + dist_region(region), height_map(h_nodes) {} + LineRegion dist_region; + std::vector height_map; + }; + + ManualCompensator() = default; + + std::vector angleHardCorrect(const double dist, const double height); + + bool updateMap(const LineRegion& d_region, + const LineRegion& h_region, + const double pitch_offset, + const double yaw_offset); + + bool updateMapByStr(const std::string& str); + + bool updateMapFlow(const std::vector strs) { + for (const auto& str: strs) { + if (!updateMapByStr(str)) { + return false; + } + } + return true; + } + + private: + bool parseStr(const std::string& str, std::vector& nums); + + std::vector angle_offset_map_; + }; +} // namespace fyt +#endif \ No newline at end of file diff --git a/src/rm_utils/include/rm_utils/math/particle_filter.hpp b/src/rm_utils/include/rm_utils/math/particle_filter.hpp new file mode 100644 index 0000000..961e199 --- /dev/null +++ b/src/rm_utils/include/rm_utils/math/particle_filter.hpp @@ -0,0 +1,168 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_MATH_PARTICLE_FILTER_HPP_ +#define RM_UTILS_MATH_PARTICLE_FILTER_HPP_ + +#include +#include +#include + +namespace fyt { + +template +// 粒子滤波器,目前实现的版本效率不高,可以考虑使用OpenMP等并行计算库进行优化 +class ParticleFilter { + using Particles = Eigen::Matrix; + using Weights = Eigen::Matrix; + using VectorX = Eigen::Matrix; + using VectorZ = Eigen::Matrix; + using MatrixXX = Eigen::Matrix; + using MatrixZZ = Eigen::Matrix; + + using PredictFunc = std::function; + using MeasureFunc = std::function; + using UpdateQFunc = std::function; + using UpdateRFunc = std::function; + +public: + explicit ParticleFilter(const PredictFunc &f, + const MeasureFunc &h, + const UpdateQFunc &u_q, + const UpdateRFunc &u_r) noexcept + : f(f), h(h), update_q(u_q), update_r(u_r) { + particles_ = Particles::Zero(); + weights_ = Weights::Zero(); + } + + void initState(const VectorX &x0) noexcept { + auto noise = generateRandomNoise(update_q()); + + particles_ = x0.replicate(1, P_NUM) + noise; + weights_ = Weights::Ones() / P_NUM; + } + + void setDim(size_t dim, double val) { + std::random_device rd; + auto gen = std::default_random_engine(rd()); + auto process_cov = update_q(); + auto normal_distribution = std::normal_distribution(val, process_cov(dim, dim)); + + for (int i = 0; i < P_NUM; ++i) { + particles_(dim, i) = normal_distribution(gen); + } + } + + VectorX predict() { + Particles pred_particles = Particles::Zero(); + // 根据状态转移方程进行预测 + for (int i = 0; i < P_NUM; i++) { + pred_particles.col(i) = f(particles_.col(i)); + } + particles_ = pred_particles; + return particles_ * weights_; + } + + VectorX update(const VectorZ &z) { + Weights w = Weights::Zero(); + MatrixZZ measurement_cov = update_r(z); + + // 基于高斯分布计算权重 + for (int i = 0; i < P_NUM; i++) { + VectorZ z_hat = h(particles_.col(i)); + double prob = gaussainLikelyhood(z, z_hat, measurement_cov); + + w(i) = prob * weights_(i); + } + + weights_ = w / w.sum(); + VectorX pred = particles_ * weights_; + + // n_eff: 有效粒子数 + double n_eff = 1.0 / (weights_.transpose() * weights_).value(); + // 有效粒子数小于一半时重采样 + if (n_eff < P_NUM * 0.5) { + resample(); + } + + return pred; + } + +private: + void resample() { + Particles new_particles = Particles::Zero(); + Weights new_weights = Weights::Zero(); + Particles noise = generateRandomNoise(update_q()); + + std::random_device rd; + auto gen = std::default_random_engine(rd()); + // 根据权重进行重采样,每个粒子出现概率等于其权重 + auto discrete_distribution = + std::discrete_distribution(weights_.data(), weights_.data() + P_NUM); + + std::set idx_set; + for (int i = 0; i < P_NUM; i++) { + int idx = discrete_distribution(gen); + new_particles.col(i) = particles_.col(idx); + + // 只对已经采样过的粒子添加噪声 + // 保证原来的优秀粒子能存活下来,不被噪声覆盖 + if (idx_set.find(idx) != idx_set.end()) { + new_particles.col(i) += noise.col(i); + } + + new_weights(i) = 1.0 / P_NUM; + idx_set.insert(idx); + } + particles_ = new_particles; + weights_ = new_weights; + } + + template + double gaussainLikelyhood(const Eigen::Matrix &x, + const Eigen::Matrix &mean, + const Eigen::Matrix &cov) { + // 在服从均值为mean,协方差为cov的高斯分布下,x出现的概率 + auto diff = x - mean; + auto exponent = -0.5 * diff.transpose() * cov.inverse() * diff; + return std::exp(exponent) / std::sqrt(std::pow(2 * M_PI, dim) * cov.determinant()); + } + + // 生成服从高斯分布的随机噪声,假设各个维度之间相互独立 + Particles generateRandomNoise(const MatrixXX &cov) { + std::random_device rd; + auto gen = std::default_random_engine(rd()); + auto distributions = std::vector>(N_X); + for (int i = 0; i < N_X; ++i) { + distributions[i] = std::normal_distribution(0, cov(i, i)); + } + Particles noise = Particles::Zero(); + for (int i = 0; i < N_X; ++i) { + for (int j = 0; j < P_NUM; ++j) { + noise(i, j) = distributions[i](gen); + } + } + return noise; + } + +private: + PredictFunc f; + MeasureFunc h; + UpdateQFunc update_q; + UpdateRFunc update_r; + Particles particles_; + Weights weights_; +}; +} // namespace fyt +#endif \ No newline at end of file diff --git a/src/rm_utils/include/rm_utils/math/pnp_solver.hpp b/src/rm_utils/include/rm_utils/math/pnp_solver.hpp new file mode 100644 index 0000000..a5b7458 --- /dev/null +++ b/src/rm_utils/include/rm_utils/math/pnp_solver.hpp @@ -0,0 +1,96 @@ +// Created by Chengfu Zou on 2024.1.19 +// Copyright(C) FYT Vision Group. All rights resevred. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_PNP_SOLVER_HPP_ +#define RM_UTILS_PNP_SOLVER_HPP_ + +#include +#include +#include +#include +#include + +namespace fyt { +class PnPSolver { +public: + PnPSolver(const std::array &camera_matrix, + const std::vector &distortion_coefficients, + cv::SolvePnPMethod method = cv::SOLVEPNP_IPPE); + + // Set an object coord system + void setObjectPoints(const std::string &coord_frame_name, + const std::vector &object_points) noexcept; + + // Get 3d position of the object coord system using PnP algorithm + template + bool solvePnPGeneric(const InputArray &image_points, + std::vector &rvecs, + std::vector &tvecs, + const std::string &coord_frame_name) { + rvecs.clear(); + tvecs.clear(); + if (object_points_map_.find(coord_frame_name) != object_points_map_.end()) { + const auto &object_points = object_points_map_[coord_frame_name]; + int solutions = cv::solvePnPGeneric(object_points, + image_points, + camera_matrix_, + distortion_coefficients_, + rvecs, + tvecs, + false, + method_); + return solutions > 0; + } else { + return false; + } + } + + // Get 3d position of the object coord system using PnP algorithm + template + bool solvePnP(const InputArray &image_points, + cv::Mat &rvec, + cv::Mat &tvec, + const std::string &coord_frame_name) { + if (object_points_map_.find(coord_frame_name) != object_points_map_.end()) { + const auto &object_points = object_points_map_[coord_frame_name]; + return cv::solvePnP(object_points, + image_points, + camera_matrix_, + distortion_coefficients_, + rvec, + tvec, + false, + method_); + } else { + return false; + } + } + + // Calculate the distance between armor center and image center + float calculateDistanceToCenter(const cv::Point2f &image_point) const noexcept; + + double calculateReprojectionError(const std::vector &image_points, + const cv::Mat &rvec, + const cv::Mat &tvec, + const std::string &coord_frame_name) const noexcept; + +private: + std::unordered_map> object_points_map_; + cv::Mat camera_matrix_; + cv::Mat distortion_coefficients_; + cv::SolvePnPMethod method_; +}; +} // namespace fyt +#endif // RM_UTILS_PNP_SOLVER_HPP_ diff --git a/src/rm_utils/include/rm_utils/math/trajectory_compensator.hpp b/src/rm_utils/include/rm_utils/math/trajectory_compensator.hpp new file mode 100644 index 0000000..b97093a --- /dev/null +++ b/src/rm_utils/include/rm_utils/math/trajectory_compensator.hpp @@ -0,0 +1,85 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_TRAJECTORY_COMPENSATOR_HPP_ +#define RM_UTILS_TRAJECTORY_COMPENSATOR_HPP_ + +#include +#include +#include + +namespace fyt { + +class TrajectoryCompensator { +public: + TrajectoryCompensator() = default; + virtual ~TrajectoryCompensator() = default; + + // Compensate the trajectory of the bullet, return the pitch increment + bool compensate(const Eigen::Vector3d &target_position, double &pitch) const noexcept; + + virtual double getFlyingTime(const Eigen::Vector3d &target_position) const noexcept = 0; + + std::vector> getTrajectory(double distance, + double angle) const noexcept; + + double velocity = 15.0; + int iteration_times = 20; + double gravity = 9.8; + double resistance = 0.01; + +protected: + // Calculate the trajectory of the bullet, return the vertical impact point + virtual double calculateTrajectory(const double x, const double angle) const noexcept = 0; +}; + +// IdealCompensator does not consider the air resistance +class IdealCompensator : public TrajectoryCompensator { +public: + double getFlyingTime(const Eigen::Vector3d &target_position) const noexcept override; + +protected: + double calculateTrajectory(const double x, const double angle) const noexcept override; +}; + +// ResistanceCompensator considers the air resistance +class ResistanceCompensator : public TrajectoryCompensator { +public: + double getFlyingTime(const Eigen::Vector3d &target_position) const noexcept override; + +protected: + double calculateTrajectory(const double x, const double angle) const noexcept override; +}; + +// Factory class for trajectory compensator +class CompensatorFactory { +public: + static std::unique_ptr createCompensator(const std::string &type) { + if (type == "ideal") { + return std::make_unique(); + } else if (type == "resistance") { + return std::make_unique(); + } else { + return nullptr; + } + } + +private: + CompensatorFactory() = delete; + ~CompensatorFactory() = delete; +}; + +} // namespace fyt +#endif diff --git a/src/rm_utils/include/rm_utils/math/utils.hpp b/src/rm_utils/include/rm_utils/math/utils.hpp new file mode 100644 index 0000000..d8f1f4f --- /dev/null +++ b/src/rm_utils/include/rm_utils/math/utils.hpp @@ -0,0 +1,97 @@ +// Created by Chengfu Zou on 2024.1.19 +// Copyright(C) FYT Vision Group. All rights resevred. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef RM_UTILS_UTILS_HPP_ +#define RM_UTILS_UTILS_HPP_ + + +#include +#include +#include +#include + +namespace fyt { + +// util functions +namespace utils { +// Convert euler angles to rotation matrix +enum class EulerOrder { XYZ, XZY, YXZ, YZX, ZXY, ZYX }; +template +Eigen::Matrix3d eulerToMatrix(const Vec3Like &euler, EulerOrder order = EulerOrder::XYZ) { + auto r = Eigen::AngleAxisd(euler[0], Eigen::Vector3d::UnitX()); + auto p = Eigen::AngleAxisd(euler[1], Eigen::Vector3d::UnitY()); + auto y = Eigen::AngleAxisd(euler[2], Eigen::Vector3d::UnitZ()); + switch (order) { + case EulerOrder::XYZ: + return (y * p * r).matrix(); + case EulerOrder::XZY: + return (p * y * r).matrix(); + case EulerOrder::YXZ: + return (y * r * p).matrix(); + case EulerOrder::YZX: + return (r * y * p).matrix(); + case EulerOrder::ZXY: + return (p * r * y).matrix(); + case EulerOrder::ZYX: + return (r * p * y).matrix(); + } +} + +inline Eigen::Vector3d matrixToEuler(const Eigen::Matrix3d &R, + EulerOrder order = EulerOrder::XYZ) noexcept { + switch (order) { + case EulerOrder::XYZ: + return R.eulerAngles(0, 1, 2); + case EulerOrder::XZY: + return R.eulerAngles(0, 2, 1); + case EulerOrder::YXZ: + return R.eulerAngles(1, 0, 2); + case EulerOrder::YZX: + return R.eulerAngles(1, 2, 0); + case EulerOrder::ZXY: + return R.eulerAngles(2, 0, 1); + case EulerOrder::ZYX: + return R.eulerAngles(2, 1, 0); + } +} + +inline Eigen::Vector3d getRPY(const Eigen::Matrix3d &R) { + double yaw = atan2(R(0, 1), R(0, 0)); + double c2 = Eigen::Vector2d(R(2, 2), R(1, 2)).norm(); + double pitch = atan2(-R(0, 2), c2); + + double s1 = sin(yaw); + double c1 = cos(yaw); + double roll = atan2(s1 * R(2, 0) - c1 * R(2, 1), c1 * R(1, 1) - s1 * R(1, 0)); + + return -Eigen::Vector3d(roll, pitch, yaw); +} + +template +cv::Mat eigenToCv(const Eigen::Matrix<_Tp, _rows, _cols, _options, _maxRows, _maxCols> &eigen_mat) { + cv::Mat cv_mat; + cv::eigen2cv(eigen_mat, cv_mat); + return cv_mat; +} + +inline Eigen::MatrixXd cvToEigen(const cv::Mat &cv_mat) noexcept { + Eigen::MatrixXd eigen_mat = Eigen::MatrixXd::Zero(cv_mat.rows, cv_mat.cols); + cv::cv2eigen(cv_mat, eigen_mat); + return eigen_mat; +} + +} // namespace utils +} // namespace fyt +#endif diff --git a/src/rm_utils/include/rm_utils/url_resolver.hpp b/src/rm_utils/include/rm_utils/url_resolver.hpp new file mode 100644 index 0000000..45ccfca --- /dev/null +++ b/src/rm_utils/include/rm_utils/url_resolver.hpp @@ -0,0 +1,47 @@ +// Copyright (C) 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Additional modifications and features by Chengfu Zou, 2024. +// +// Copyright (C) FYT Vision Group. All rights reserved. + +#ifndef RM_UTILS_URL_RESOLVER_HPP_ +#define RM_UTILS_URL_RESOLVER_HPP_ + +#include +#include + +namespace fyt::utils { +class URLResolver { +public: + static std::filesystem::path getResolvedPath(const std::string &url); + +private: + static std::string resolveUrl(const std::string &url); + + URLResolver() = delete; + + enum class UrlType { + EMPTY = 0, // empty string + FILE, // file + PACKAGE, // package + INVALID, // anything >= is invalid + }; + static UrlType parseUrl(const std::string &url); + + static std::string getPackageFileName(const std::string &url); +}; +} // namespace fyt::utils + +#endif // RM_UTILS_URL_RESOLVER_HPP_ diff --git a/src/rm_utils/package.xml b/src/rm_utils/package.xml new file mode 100644 index 0000000..57e1bdb --- /dev/null +++ b/src/rm_utils/package.xml @@ -0,0 +1,29 @@ + + + + rm_utils + 0.9.0 + + robomaster tool package for projectile motion,it's helpful to develop application like Auto-Aim,etc. + + zhenpeng ge + Apache License 2.0 + + ament_cmake + + rclcpp + geometry_msgs + fmt + eigen + opencv + ceres + rcpputils + + + ament_lint_auto + ament_lint_common + + + ament_cmake + + diff --git a/src/rm_utils/src/heartbeat.cpp b/src/rm_utils/src/heartbeat.cpp new file mode 100644 index 0000000..b072bcb --- /dev/null +++ b/src/rm_utils/src/heartbeat.cpp @@ -0,0 +1,47 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/heartbeat.hpp" + +namespace fyt { +HeartBeatPublisher::SharedPtr HeartBeatPublisher::create(rclcpp::Node *node) { + return std::shared_ptr(new HeartBeatPublisher(node)); +} + +HeartBeatPublisher::HeartBeatPublisher(rclcpp::Node *node) { + // Initialize message + message_.data = 0; + // Create publisher + std::string node_name = node->get_name(); + std::string topic_name = node_name + "/heartbeat"; + publisher_ = node->create_publisher(topic_name, 1); + + + // Start publishing thread + pub_thread_ = std::thread([this]() { + while (rclcpp::ok()) { + message_.data++; + publisher_->publish(message_); + std::this_thread::sleep_for(std::chrono::seconds(1)); + } + }); +} + +HeartBeatPublisher::~HeartBeatPublisher() { + if (pub_thread_.joinable()) { + pub_thread_.join(); + } +} + +} // namespace fyt diff --git a/src/rm_utils/src/logger/logger_impl.cpp b/src/rm_utils/src/logger/logger_impl.cpp new file mode 100644 index 0000000..5ae8e65 --- /dev/null +++ b/src/rm_utils/src/logger/logger_impl.cpp @@ -0,0 +1,72 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/logger/impl/logger_impl.hpp" + +#include +#include +#include +#include + +#include "rm_utils/logger/impl/global_mutex.hpp" +#include "rm_utils/logger/types.hpp" + +namespace fyt::logger { + +namespace internal { + +#define CHECK_OPTION(OPS, OPTION) ((OPS & OPTION) == OPTION) + +Logger::Logger(std::string name, std::string filename, LogLevel level, LogOptions ops) +: consle_mutex_(GlobalMutex::getConsoleMutex()), name_(name), level_(level) { + std::string cur_date = getLocalTime().substr(0, 10); + + if (filename.empty()) { + filename = "./"; + } + if (filename.back() != '/') { + filename.append("/"); + } + if (filename.front() == '~') { + std::string home_path = std::getenv("HOME"); + filename.replace(0, 1, home_path); + } + + if (CHECK_OPTION(ops, DATE_DIR)) { + filename.append(cur_date + "/"); + } + if (CHECK_OPTION(ops, DATE_SUFFIX)) { + filename.append(name + "_" + cur_date + ".log.md"); + } else { + filename.append(name + ".log.md"); + } + + writer_ = std::make_unique(filename); +} + +void Logger::setLevel(LogLevel level) { level_ = level; } + +void Logger::flush() { writer_->flush(); } + +std::string Logger::getLocalTime() { + std::time_t tt = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); + // std::tm tm = *std::gmtime(&tt); //GMT (UTC) + std::tm tm = *std::localtime(&tt); //Locale time-zone, usually UTC by default. + std::stringstream ss; + ss << std::put_time(&tm, "%Y-%m-%d %H:%M:%S"); + return ss.str(); +} +} // namespace internal +} // namespace fyt::logger diff --git a/src/rm_utils/src/logger/logger_pool.cpp b/src/rm_utils/src/logger/logger_pool.cpp new file mode 100644 index 0000000..7f1db4f --- /dev/null +++ b/src/rm_utils/src/logger/logger_pool.cpp @@ -0,0 +1,55 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/logger/logger_pool.hpp" + +#include + +#include "rm_utils/logger/exception.hpp" + +namespace fyt::logger { +internal::Logger &LoggerPool::getLogger(const std::string &name) { + std::lock_guard lock(l_mutex_); + if (auto iter = loggers_.find(name); iter != loggers_.end()) { + return *iter->second; + } + + constexpr const char *kDefaultLogPath = "~/fyt2024-log"; + constexpr LogOptions kDefaultOptions = DATE_DIR | DATE_SUFFIX; + auto logger = std::make_shared( + name, kDefaultLogPath, LogLevel::INFO, kDefaultOptions); + auto [iter, _] = loggers_.emplace(name, logger); + + fmt::print( + stderr, + "[WARN] [logger] Logger '{}' not registered, auto-registered with default config\n", + name); + + return *iter->second; +} + +void LoggerPool::registerLogger(const std::string &name, + const std::string &path, + LogLevel level, + LogOptions ops) { + std::lock_guard lock(l_mutex_); + if (auto iter = loggers_.find(name); iter == loggers_.end()) { + loggers_[name] = std::make_shared(name, path, level, ops); + } +} + +std::mutex LoggerPool::l_mutex_; +std::unordered_map> LoggerPool::loggers_; +} // namespace fyt::logger diff --git a/src/rm_utils/src/logger/writer.cpp b/src/rm_utils/src/logger/writer.cpp new file mode 100644 index 0000000..aada917 --- /dev/null +++ b/src/rm_utils/src/logger/writer.cpp @@ -0,0 +1,50 @@ +// Created by Chengfu Zou +// Copyright (c) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/logger/impl/writer.hpp" + +#include +#include + +#include "rm_utils/logger/impl/global_mutex.hpp" + +namespace fyt::logger { + +Writer::Writer(const std::string &filename) : r_mutex_(GlobalMutex::getFileMutex(filename)) { + auto parent_path = std::filesystem::path(filename).parent_path(); + parent_path = parent_path.empty() ? "." : parent_path; + if (!std::filesystem::exists(parent_path)) { + std::filesystem::create_directories(parent_path); + } + file_.open(filename, std::ios::out | std::ios::app); +} + +void Writer::write(const std::string &message) { + std::lock_guard lock(r_mutex_); + file_ << message << "\n\n"; + file_.flush(); +} + +void Writer::flush() { + std::lock_guard lock(r_mutex_); + file_.flush(); +} + +Writer::~Writer() { + std::lock_guard lock(r_mutex_); + file_.close(); +} + +} // namespace fyt::logger diff --git a/src/rm_utils/src/math/extended_kalman_filter.cpp b/src/rm_utils/src/math/extended_kalman_filter.cpp new file mode 100644 index 0000000..b2b1f3c --- /dev/null +++ b/src/rm_utils/src/math/extended_kalman_filter.cpp @@ -0,0 +1,20 @@ +// Copyright Chen Jun 2023. Licensed under the MIT License. +// +// Additional modifications and features by Chengfu Zou, Labor. Licensed under Apache License 2.0. +// +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/math/extended_kalman_filter.hpp" + diff --git a/src/rm_utils/src/math/manual_compensator.cpp b/src/rm_utils/src/math/manual_compensator.cpp new file mode 100644 index 0000000..2d34f58 --- /dev/null +++ b/src/rm_utils/src/math/manual_compensator.cpp @@ -0,0 +1,105 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/math/manual_compensator.hpp" + +namespace fyt { +bool ManualCompensator::updateMap(const LineRegion& d_region, + const LineRegion& h_region, + const double pitch_offset, + const double yaw_offset) { + auto target_dist_node = + std::find_if(angle_offset_map_.begin(), + angle_offset_map_.end(), + [&](const DistMapNode& dist_node) { + return dist_node.dist_region.checkIntersection(d_region); + }); + + if (target_dist_node == angle_offset_map_.end()) { + HeightMapNode height_node(h_region, pitch_offset, yaw_offset); + std::vector h_nodes{height_node}; + DistMapNode dist_node(d_region, h_nodes); + angle_offset_map_.emplace_back(dist_node); + } else { + auto target_height_node = + std::find_if(target_dist_node->height_map.begin(), + target_dist_node->height_map.end(), + [&](const HeightMapNode& height_node) { + return height_node.height_region.checkIntersection(h_region); + }); + + if (target_height_node == target_dist_node->height_map.end()) { + HeightMapNode height_node(h_region, pitch_offset, yaw_offset); + target_dist_node->height_map.emplace_back(height_node); + } else { + return false; + } + } + return true; + } + +std::vector ManualCompensator::angleHardCorrect(const double dist, + const double height) { + auto target_dist_node = + std::find_if(angle_offset_map_.begin(), + angle_offset_map_.end(), + [&](const DistMapNode& dist_node) { + return dist_node.dist_region.checkPoint(dist); + }); + + if (target_dist_node != angle_offset_map_.end()) { + auto target_height_node = + std::find_if(target_dist_node->height_map.begin(), + target_dist_node->height_map.end(), + [&](const HeightMapNode& height_node) { + return height_node.height_region.checkPoint(height); + }); + + if (target_height_node != target_dist_node->height_map.end()) { + return {target_height_node->pitch_offset, target_height_node->yaw_offset}; + } + } + return {0.0, 0.0}; +} + +bool ManualCompensator::parseStr(const std::string& str, + std::vector& nums) { + std::stringstream ss(str); + double num; + while (!ss.eof()) { + ss >> num; + nums.emplace_back(num); + } + + if (nums.size() != NORMAL_STR_NUM) { + return false; + } + return true; +} + +bool ManualCompensator::updateMapByStr(const std::string &str) { + std::vector nums; + + if (!parseStr(str, nums)) { + return false; + } + + LineRegion d_region(nums[0], nums[1]); + LineRegion h_region(nums[2], nums[3]); + if (!updateMap(d_region, h_region, nums[4], nums[5])) { + return false; + } + return true; +} +} // namespace fyt \ No newline at end of file diff --git a/src/rm_utils/src/math/particle_filter.cpp b/src/rm_utils/src/math/particle_filter.cpp new file mode 100644 index 0000000..e7ef731 --- /dev/null +++ b/src/rm_utils/src/math/particle_filter.cpp @@ -0,0 +1,15 @@ +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/math/particle_filter.hpp" diff --git a/src/rm_utils/src/math/pnp_solver.cpp b/src/rm_utils/src/math/pnp_solver.cpp new file mode 100644 index 0000000..ff88036 --- /dev/null +++ b/src/rm_utils/src/math/pnp_solver.cpp @@ -0,0 +1,59 @@ +// Created by Chengfu Zou on 2024.1.19 +// Copyright(C) FYT Vision Group. All rights resevred. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/math/pnp_solver.hpp" + +#include + +namespace fyt { +PnPSolver::PnPSolver(const std::array &camera_matrix, + const std::vector &distortion_coefficients, + cv::SolvePnPMethod method) +: camera_matrix_(cv::Mat(3, 3, CV_64F, const_cast(camera_matrix.data())).clone()) +, distortion_coefficients_( + cv::Mat(1, 5, CV_64F, const_cast(distortion_coefficients.data())).clone()) +, method_(method) {} + +void PnPSolver::setObjectPoints(const std::string &coord_frame_name, + const std::vector &object_points) noexcept { + object_points_map_[coord_frame_name] = object_points; +} + +float PnPSolver::calculateDistanceToCenter(const cv::Point2f &image_point) const noexcept { + float cx = camera_matrix_.at(0, 2); + float cy = camera_matrix_.at(1, 2); + return cv::norm(image_point - cv::Point2f(cx, cy)); +} + +double PnPSolver::calculateReprojectionError(const std::vector &image_points, + const cv::Mat &rvec, + const cv::Mat &tvec, + const std::string &coord_frame_name) const noexcept { + if (object_points_map_.find(coord_frame_name) != object_points_map_.end()) { + const auto &object_points = object_points_map_.at(coord_frame_name); + std::vector reprojected_points; + cv::projectPoints( + object_points, rvec, tvec, camera_matrix_, distortion_coefficients_, reprojected_points); + double error = 0; + for (size_t i = 0; i < image_points.size(); ++i) { + error += cv::norm(image_points[i] - reprojected_points[i]); + } + return error; + } else { + return 0; + } +} + +} // namespace fyt diff --git a/src/rm_utils/src/math/trajectory_compensator.cpp b/src/rm_utils/src/math/trajectory_compensator.cpp new file mode 100644 index 0000000..77449bf --- /dev/null +++ b/src/rm_utils/src/math/trajectory_compensator.cpp @@ -0,0 +1,94 @@ +// Created by Chengfu Zou +// Copyright (C) FYT Vision Group. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/math/trajectory_compensator.hpp" + +namespace fyt { +bool TrajectoryCompensator::compensate(const Eigen::Vector3d &target_position, + double &pitch) const noexcept { + double target_height = target_position(2); + // The iterative_height is used to calculate angle in each iteration + double iterative_height = target_height; + double impact_height = 0; + double distance = + std::sqrt(target_position(0) * target_position(0) + target_position(1) * target_position(1)); + double angle = std::atan2(target_height, distance); + double dh = 0; + // Iterate to find the right angle, which makes the impact height equal to the + // target height + for (int i = 0; i < iteration_times; ++i) { + angle = std::atan2(iterative_height, distance); + if (std::abs(angle) > M_PI / 2.5) { + break; + } + impact_height = calculateTrajectory(distance, angle); + dh = target_height - impact_height; + if (std::abs(dh) < 0.01) { + break; + } + iterative_height += dh; + } + if (std::abs(dh) > 0.01 || std::abs(angle) > M_PI / 2.5) { + return false; + } + pitch = angle; + return true; +} + +std::vector> TrajectoryCompensator::getTrajectory( + double distance, double angle) const noexcept { + std::vector> trajectory; + + if (distance < 0) { + return trajectory; + } + + for (double x = 0; x < distance; x += 0.03) { + trajectory.emplace_back(x, calculateTrajectory(x, angle)); + } + return trajectory; +} + +double IdealCompensator::calculateTrajectory(const double x, const double angle) const noexcept { + double t = x / (velocity * cos(angle)); + double y = velocity * sin(angle) * t - 0.5 * gravity * t * t; + return y; +} + +double IdealCompensator::getFlyingTime(const Eigen::Vector3d &target_position) const noexcept { + double distance = + sqrt(target_position(0) * target_position(0) + target_position(1) * target_position(1)); + double angle = atan2(target_position(2), distance); + double t = distance / (velocity * cos(angle)); + return t; +} + +double ResistanceCompensator::calculateTrajectory(const double x, + const double angle) const noexcept { + double r = resistance < 1e-4 ? 1e-4 : resistance; + double t = (exp(r * x) - 1) / (r * velocity * cos(angle)); + double y = velocity * sin(angle) * t - 0.5 * gravity * t * t; + return y; +} + +double ResistanceCompensator::getFlyingTime(const Eigen::Vector3d &target_position) const noexcept { + double r = resistance < 1e-4 ? 1e-4 : resistance; + double distance = + sqrt(target_position(0) * target_position(0) + target_position(1) * target_position(1)); + double angle = atan2(target_position(2), distance); + double t = (exp(r * distance) - 1) / (r * velocity * cos(angle)); + return t; +} +} // namespace fyt diff --git a/src/rm_utils/src/math/utils.cpp b/src/rm_utils/src/math/utils.cpp new file mode 100644 index 0000000..a9d598b --- /dev/null +++ b/src/rm_utils/src/math/utils.cpp @@ -0,0 +1,17 @@ +// Created by Chengfu Zou on 2024.1.19 +// Copyright(C) FYT Vision Group. All rights resevred. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "rm_utils/math/utils.hpp" + diff --git a/src/rm_utils/src/url_resolver.cpp b/src/rm_utils/src/url_resolver.cpp new file mode 100644 index 0000000..d9d0f1a --- /dev/null +++ b/src/rm_utils/src/url_resolver.cpp @@ -0,0 +1,144 @@ +// Copyright (C) 2021 RoboMaster-OSS +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// Additional modifications and features by Chengfu Zou, 2024. +// +// Copyright (C) FYT Vision Group. All rights reserved. + +#include "rm_utils/url_resolver.hpp" + +#include + +#include "ament_index_cpp/get_package_share_directory.hpp" +#include "rcpputils/env.hpp" +#include "rcpputils/filesystem_helper.hpp" + +namespace fyt::utils { +std::filesystem::path URLResolver::getResolvedPath(const std::string &url) { + const std::string resolved_url = resolveUrl(url); + UrlType url_type = parseUrl(url); + + std::string res; + + switch (url_type) { + case UrlType::EMPTY: { + break; + } + case UrlType::FILE: { + res = resolved_url.substr(7); + break; + } + case UrlType::PACKAGE: { + res = getPackageFileName(resolved_url); + break; + } + default: { + break; + } + } + + return std::filesystem::path(res); +} + +std::string URLResolver::resolveUrl(const std::string &url) { + std::string resolved; + size_t rest = 0; + + while (true) { + // find the next '$' in the URL string + size_t dollar = url.find('$', rest); + + if (dollar >= url.length()) { + // no more variables left in the URL + resolved += url.substr(rest); + break; + } + + // copy characters up to the next '$' + resolved += url.substr(rest, dollar - rest); + + if (url.substr(dollar + 1, 1) != "{") { + // no '{' follows, so keep the '$' + resolved += "$"; + } else if (url.substr(dollar + 1, 10) == "{ROS_HOME}") { + // substitute $ROS_HOME + std::string ros_home; + std::string ros_home_env = rcpputils::get_env_var("ROS_HOME"); + std::string home_env = rcpputils::get_env_var("HOME"); + if (!ros_home_env.empty()) { + // use environment variable + ros_home = ros_home_env; + } else if (!home_env.empty()) { + // use "$HOME/.ros" + ros_home = home_env + "/.ros"; + } + resolved += ros_home; + dollar += 10; + } else { + // not a valid substitution variable + resolved += "$"; // keep the bogus '$' + } + + // look for next '$' + rest = dollar + 1; + } + + return resolved; +} + +URLResolver::UrlType URLResolver::parseUrl(const std::string &url) { + if (url == "") { + return UrlType::EMPTY; + } + + // Easy C++14 replacement for boost::iequals from : + // https://stackoverflow.com/a/4119881 + auto iequals = [](const std::string &a, const std::string &b) { + return std::equal(a.begin(), a.end(), b.begin(), b.end(), [](char a, char b) { + return tolower(a) == tolower(b); + }); + }; + + if (iequals(url.substr(0, 8), "file:///")) { + return UrlType::FILE; + } + if (iequals(url.substr(0, 10), "package://")) { + // look for a '/' following the package name, make sure it is + // there, the name is not empty, and something follows it + size_t rest = url.find('/', 10); + if (rest < url.length() - 1 && rest > 10) { + return UrlType::PACKAGE; + } + } + return UrlType::INVALID; +} + +std::string URLResolver::getPackageFileName(const std::string &url) { + // Scan URL from after "package://" until next '/' and extract + // package name. The parseURL() already checked that it's present. + size_t prefix_len = std::string("package://").length(); + size_t rest = url.find('/', prefix_len); + std::string package(url.substr(prefix_len, rest - prefix_len)); + + // Look up the ROS package path name. + std::string pkg_path = ament_index_cpp::get_package_share_directory(package); + if (pkg_path.empty()) { // package not found? + return pkg_path; + } else { + // Construct file name from package location and remainder of URL. + return pkg_path + url.substr(rest); + } +} + +} // namespace fyt::utils