From 8ac725d9ee35d9c4f82b7e73da7a771d8925b664 Mon Sep 17 00:00:00 2001 From: Masaki Baba Date: Fri, 23 Aug 2024 13:44:45 +0900 Subject: [PATCH] refactor(pose_instability_detector)!: prefix package and namespace with autoware (#8568) * add autoware_ prefix Signed-off-by: a-maumau * add autoware_ prefix Signed-off-by: a-maumau --------- Signed-off-by: a-maumau Co-authored-by: SakodaShintaro --- .github/CODEOWNERS | 2 +- .../pose_twist_fusion_filter.launch.xml | 4 ++-- launch/tier4_localization_launch/package.xml | 2 +- .../CMakeLists.txt | 4 ++-- .../README.md | 4 ++-- .../config/pose_instability_detector.param.yaml | 0 .../pose_instability_detector.hpp | 3 +++ .../launch/pose_instability_detector.launch.xml | 4 ++-- .../media/how_to_snip_twist.png | Bin .../media/lateral_threshold_calculation.png | Bin .../media/pose_instability_detector_overview.png | Bin .../media/pose_instabilty_detector_procedure.svg | 0 .../media/rqt_runtime_monitor.png | Bin .../media/timeline.drawio.svg | 0 .../package.xml | 4 ++-- .../schema/pose_instability_detector.schema.json | 0 .../src/pose_instability_detector.cpp | 5 ++++- .../test/test.cpp | 7 ++++--- .../test/test_message_helper_node.hpp | 0 19 files changed, 23 insertions(+), 16 deletions(-) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/CMakeLists.txt (82%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/README.md (98%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/config/pose_instability_detector.param.yaml (100%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/include/autoware/pose_instability_detector/pose_instability_detector.hpp (97%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/launch/pose_instability_detector.launch.xml (58%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/media/how_to_snip_twist.png (100%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/media/lateral_threshold_calculation.png (100%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/media/pose_instability_detector_overview.png (100%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/media/pose_instabilty_detector_procedure.svg (100%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/media/rqt_runtime_monitor.png (100%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/media/timeline.drawio.svg (100%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/package.xml (91%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/schema/pose_instability_detector.schema.json (100%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/src/pose_instability_detector.cpp (98%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/test/test.cpp (96%) rename localization/{pose_instability_detector => autoware_pose_instability_detector}/test/test_message_helper_node.hpp (100%) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 277255d529fe7..403fe7e0f728f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -93,7 +93,7 @@ localization/localization_util/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.j localization/ndt_scan_matcher/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp localization/pose_estimator_arbiter/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp localization/pose_initializer/** anh.nguyen.2@tier4.jp isamu.takagi@tier4.jp kento.yabuuchi.2@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp -localization/pose_instability_detector/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp +localization/autoware_pose_instability_detector/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp localization/yabloc/yabloc_common/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp localization/yabloc/yabloc_image_processing/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp localization/yabloc/yabloc_monitor/** anh.nguyen.2@tier4.jp kento.yabuuchi.2@tier4.jp masahiro.sakamoto@tier4.jp ryu.yamamoto@tier4.jp shintaro.sakoda@tier4.jp taiki.yamada@tier4.jp yamato.ando@tier4.jp diff --git a/launch/tier4_localization_launch/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml b/launch/tier4_localization_launch/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml index fa479c71dcbac..dda9c1f2c97ce 100644 --- a/launch/tier4_localization_launch/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml +++ b/launch/tier4_localization_launch/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml @@ -35,10 +35,10 @@ - + - + diff --git a/launch/tier4_localization_launch/package.xml b/launch/tier4_localization_launch/package.xml index efeecd3e37f61..870fc66c1e2e4 100644 --- a/launch/tier4_localization_launch/package.xml +++ b/launch/tier4_localization_launch/package.xml @@ -23,13 +23,13 @@ autoware_gyro_odometer autoware_pointcloud_preprocessor autoware_pose_estimator_arbiter + autoware_pose_instability_detector eagleye_geo_pose_fusion eagleye_gnss_converter eagleye_rt ekf_localizer ndt_scan_matcher pose_initializer - pose_instability_detector topic_tools yabloc_common yabloc_image_processing diff --git a/localization/pose_instability_detector/CMakeLists.txt b/localization/autoware_pose_instability_detector/CMakeLists.txt similarity index 82% rename from localization/pose_instability_detector/CMakeLists.txt rename to localization/autoware_pose_instability_detector/CMakeLists.txt index c6f94ab7df16e..9e7a1d15ee0f2 100644 --- a/localization/pose_instability_detector/CMakeLists.txt +++ b/localization/autoware_pose_instability_detector/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(pose_instability_detector) +project(autoware_pose_instability_detector) find_package(autoware_cmake REQUIRED) autoware_package() @@ -9,7 +9,7 @@ ament_auto_add_library(${PROJECT_NAME} SHARED ) rclcpp_components_register_node(${PROJECT_NAME} - PLUGIN "PoseInstabilityDetector" + PLUGIN "autoware::pose_instability_detector::PoseInstabilityDetector" EXECUTABLE ${PROJECT_NAME}_node EXECUTOR SingleThreadedExecutor ) diff --git a/localization/pose_instability_detector/README.md b/localization/autoware_pose_instability_detector/README.md similarity index 98% rename from localization/pose_instability_detector/README.md rename to localization/autoware_pose_instability_detector/README.md index 4ced0fa8eb97b..5beb796f46e12 100644 --- a/localization/pose_instability_detector/README.md +++ b/localization/autoware_pose_instability_detector/README.md @@ -1,4 +1,4 @@ -# pose_instability_detector +# autoware_pose_instability_detector The `pose_instability_detector` is a node designed to monitor the stability of `/localization/kinematic_state`, which is an output topic of the Extended Kalman Filter (EKF). @@ -109,7 +109,7 @@ $$ ## Parameters -{{ json_to_markdown("localization/pose_instability_detector/schema/pose_instability_detector.schema.json") }} +{{ json_to_markdown("localization/autoware_pose_instability_detector/schema/pose_instability_detector.schema.json") }} ## Input diff --git a/localization/pose_instability_detector/config/pose_instability_detector.param.yaml b/localization/autoware_pose_instability_detector/config/pose_instability_detector.param.yaml similarity index 100% rename from localization/pose_instability_detector/config/pose_instability_detector.param.yaml rename to localization/autoware_pose_instability_detector/config/pose_instability_detector.param.yaml diff --git a/localization/pose_instability_detector/include/autoware/pose_instability_detector/pose_instability_detector.hpp b/localization/autoware_pose_instability_detector/include/autoware/pose_instability_detector/pose_instability_detector.hpp similarity index 97% rename from localization/pose_instability_detector/include/autoware/pose_instability_detector/pose_instability_detector.hpp rename to localization/autoware_pose_instability_detector/include/autoware/pose_instability_detector/pose_instability_detector.hpp index febff8c2ee244..615b818a2bde0 100644 --- a/localization/pose_instability_detector/include/autoware/pose_instability_detector/pose_instability_detector.hpp +++ b/localization/autoware_pose_instability_detector/include/autoware/pose_instability_detector/pose_instability_detector.hpp @@ -26,6 +26,8 @@ #include #include +namespace autoware::pose_instability_detector +{ class PoseInstabilityDetector : public rclcpp::Node { using Quaternion = geometry_msgs::msg::Quaternion; @@ -93,5 +95,6 @@ class PoseInstabilityDetector : public rclcpp::Node std::optional prev_odometry_ = std::nullopt; std::deque twist_buffer_; }; +} // namespace autoware::pose_instability_detector #endif // AUTOWARE__POSE_INSTABILITY_DETECTOR__POSE_INSTABILITY_DETECTOR_HPP_ diff --git a/localization/pose_instability_detector/launch/pose_instability_detector.launch.xml b/localization/autoware_pose_instability_detector/launch/pose_instability_detector.launch.xml similarity index 58% rename from localization/pose_instability_detector/launch/pose_instability_detector.launch.xml rename to localization/autoware_pose_instability_detector/launch/pose_instability_detector.launch.xml index 5ebe7d7e429e0..716f2b165bb9b 100644 --- a/localization/pose_instability_detector/launch/pose_instability_detector.launch.xml +++ b/localization/autoware_pose_instability_detector/launch/pose_instability_detector.launch.xml @@ -1,12 +1,12 @@ - + - + diff --git a/localization/pose_instability_detector/media/how_to_snip_twist.png b/localization/autoware_pose_instability_detector/media/how_to_snip_twist.png similarity index 100% rename from localization/pose_instability_detector/media/how_to_snip_twist.png rename to localization/autoware_pose_instability_detector/media/how_to_snip_twist.png diff --git a/localization/pose_instability_detector/media/lateral_threshold_calculation.png b/localization/autoware_pose_instability_detector/media/lateral_threshold_calculation.png similarity index 100% rename from localization/pose_instability_detector/media/lateral_threshold_calculation.png rename to localization/autoware_pose_instability_detector/media/lateral_threshold_calculation.png diff --git a/localization/pose_instability_detector/media/pose_instability_detector_overview.png b/localization/autoware_pose_instability_detector/media/pose_instability_detector_overview.png similarity index 100% rename from localization/pose_instability_detector/media/pose_instability_detector_overview.png rename to localization/autoware_pose_instability_detector/media/pose_instability_detector_overview.png diff --git a/localization/pose_instability_detector/media/pose_instabilty_detector_procedure.svg b/localization/autoware_pose_instability_detector/media/pose_instabilty_detector_procedure.svg similarity index 100% rename from localization/pose_instability_detector/media/pose_instabilty_detector_procedure.svg rename to localization/autoware_pose_instability_detector/media/pose_instabilty_detector_procedure.svg diff --git a/localization/pose_instability_detector/media/rqt_runtime_monitor.png b/localization/autoware_pose_instability_detector/media/rqt_runtime_monitor.png similarity index 100% rename from localization/pose_instability_detector/media/rqt_runtime_monitor.png rename to localization/autoware_pose_instability_detector/media/rqt_runtime_monitor.png diff --git a/localization/pose_instability_detector/media/timeline.drawio.svg b/localization/autoware_pose_instability_detector/media/timeline.drawio.svg similarity index 100% rename from localization/pose_instability_detector/media/timeline.drawio.svg rename to localization/autoware_pose_instability_detector/media/timeline.drawio.svg diff --git a/localization/pose_instability_detector/package.xml b/localization/autoware_pose_instability_detector/package.xml similarity index 91% rename from localization/pose_instability_detector/package.xml rename to localization/autoware_pose_instability_detector/package.xml index 7e0237cbaf780..d59baf5817233 100644 --- a/localization/pose_instability_detector/package.xml +++ b/localization/autoware_pose_instability_detector/package.xml @@ -1,9 +1,9 @@ - pose_instability_detector + autoware_pose_instability_detector 0.1.0 - The pose_instability_detector package + The autoware_pose_instability_detector package Yamato Ando Kento Yabuuchi Masahiro Sakamoto diff --git a/localization/pose_instability_detector/schema/pose_instability_detector.schema.json b/localization/autoware_pose_instability_detector/schema/pose_instability_detector.schema.json similarity index 100% rename from localization/pose_instability_detector/schema/pose_instability_detector.schema.json rename to localization/autoware_pose_instability_detector/schema/pose_instability_detector.schema.json diff --git a/localization/pose_instability_detector/src/pose_instability_detector.cpp b/localization/autoware_pose_instability_detector/src/pose_instability_detector.cpp similarity index 98% rename from localization/pose_instability_detector/src/pose_instability_detector.cpp rename to localization/autoware_pose_instability_detector/src/pose_instability_detector.cpp index 23362dd13c6bc..36aa4f6d7d73e 100644 --- a/localization/pose_instability_detector/src/pose_instability_detector.cpp +++ b/localization/autoware_pose_instability_detector/src/pose_instability_detector.cpp @@ -25,6 +25,8 @@ #include #include +namespace autoware::pose_instability_detector +{ PoseInstabilityDetector::PoseInstabilityDetector(const rclcpp::NodeOptions & options) : rclcpp::Node("pose_instability_detector", options), timer_period_(this->declare_parameter("timer_period")), @@ -409,6 +411,7 @@ PoseInstabilityDetector::clip_out_necessary_twist( } return result_deque; } +} // namespace autoware::pose_instability_detector #include -RCLCPP_COMPONENTS_REGISTER_NODE(PoseInstabilityDetector) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::pose_instability_detector::PoseInstabilityDetector) diff --git a/localization/pose_instability_detector/test/test.cpp b/localization/autoware_pose_instability_detector/test/test.cpp similarity index 96% rename from localization/pose_instability_detector/test/test.cpp rename to localization/autoware_pose_instability_detector/test/test.cpp index 482e659e7a13c..bd663a2406903 100644 --- a/localization/pose_instability_detector/test/test.cpp +++ b/localization/autoware_pose_instability_detector/test/test.cpp @@ -36,7 +36,7 @@ class TestPoseInstabilityDetector : public ::testing::Test void SetUp() override { const std::string yaml_path = - ament_index_cpp::get_package_share_directory("pose_instability_detector") + + ament_index_cpp::get_package_share_directory("autoware_pose_instability_detector") + "/config/pose_instability_detector.param.yaml"; rcl_params_t * params_st = rcl_yaml_node_struct_init(rcl_get_default_allocator()); @@ -53,7 +53,8 @@ class TestPoseInstabilityDetector : public ::testing::Test } } - subject_ = std::make_shared(node_options); + subject_ = + std::make_shared(node_options); executor_.add_node(subject_); helper_ = std::make_shared(); @@ -69,7 +70,7 @@ class TestPoseInstabilityDetector : public ::testing::Test } rclcpp::executors::SingleThreadedExecutor executor_; - std::shared_ptr subject_; + std::shared_ptr subject_; std::shared_ptr helper_; }; diff --git a/localization/pose_instability_detector/test/test_message_helper_node.hpp b/localization/autoware_pose_instability_detector/test/test_message_helper_node.hpp similarity index 100% rename from localization/pose_instability_detector/test/test_message_helper_node.hpp rename to localization/autoware_pose_instability_detector/test/test_message_helper_node.hpp