From 93259c25ac6a526f74dee6bba5ee251c1e5473d6 Mon Sep 17 00:00:00 2001 From: "Kem (TiankuiXian)" <1041084556@qq.com> Date: Tue, 12 Nov 2024 11:44:57 +0900 Subject: [PATCH] feat: tier4_metric_msgs (#149) * add tier4_metric_msgs * change metricList to metricArray * ci(pre-commit): autofix * update comments. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- tier4_metric_msgs/CMakeLists.txt | 23 +++++++++++++++++++++++ tier4_metric_msgs/msg/Metric.msg | 9 +++++++++ tier4_metric_msgs/msg/MetricArray.msg | 5 +++++ tier4_metric_msgs/package.xml | 26 ++++++++++++++++++++++++++ 4 files changed, 63 insertions(+) create mode 100644 tier4_metric_msgs/CMakeLists.txt create mode 100644 tier4_metric_msgs/msg/Metric.msg create mode 100644 tier4_metric_msgs/msg/MetricArray.msg create mode 100644 tier4_metric_msgs/package.xml diff --git a/tier4_metric_msgs/CMakeLists.txt b/tier4_metric_msgs/CMakeLists.txt new file mode 100644 index 0000000..130e167 --- /dev/null +++ b/tier4_metric_msgs/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.5) +project(tier4_metric_msgs) + +find_package(ament_cmake_auto REQUIRED) +find_package(builtin_interfaces REQUIRED) +find_package(rosidl_default_generators REQUIRED) + +ament_auto_find_build_dependencies() + +rosidl_generate_interfaces( + ${PROJECT_NAME} + "msg/Metric.msg" + "msg/MetricArray.msg" + DEPENDENCIES builtin_interfaces +) + + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package() diff --git a/tier4_metric_msgs/msg/Metric.msg b/tier4_metric_msgs/msg/Metric.msg new file mode 100644 index 0000000..b57297d --- /dev/null +++ b/tier4_metric_msgs/msg/Metric.msg @@ -0,0 +1,9 @@ +# name of the metric +string name + +# unit (or type) of the metric +# you can leave it empty or assign any identifier to the unit, such as "milliseconds", "m/s", "IoU", "battery percentage", etc. +string unit + +# value of the metric +string value diff --git a/tier4_metric_msgs/msg/MetricArray.msg b/tier4_metric_msgs/msg/MetricArray.msg new file mode 100644 index 0000000..cb5fd36 --- /dev/null +++ b/tier4_metric_msgs/msg/MetricArray.msg @@ -0,0 +1,5 @@ +# time stamp +builtin_interfaces/Time stamp + +# metrics list +Metric[] metric_array diff --git a/tier4_metric_msgs/package.xml b/tier4_metric_msgs/package.xml new file mode 100644 index 0000000..0c1ea78 --- /dev/null +++ b/tier4_metric_msgs/package.xml @@ -0,0 +1,26 @@ + + + + tier4_metric_msgs + 0.1.0 + The tier4_metric_msgs package + Temkei Kem + Apache License 2.0 + + ament_cmake_auto + + rosidl_default_generators + + rosidl_default_runtime + + builtin_interfaces + + ament_lint_auto + ament_lint_common + + rosidl_interface_packages + + + ament_cmake + +