From 49b60dcda6cd741bb09234576d1c7416bc62c5b1 Mon Sep 17 00:00:00 2001 From: Fumiya Watanabe Date: Thu, 6 Jun 2024 19:26:25 +0900 Subject: [PATCH] refactor(rtc_interface): add autoware prefix Signed-off-by: Fumiya Watanabe --- planning/.pages | 2 +- .../package.xml | 2 +- .../interface/scene_module_interface.hpp | 4 ++-- .../package.xml | 2 +- .../package.xml | 2 +- .../package.xml | 2 +- .../package.xml | 2 +- .../scene_module_interface.hpp | 4 ++-- .../package.xml | 2 +- .../CMakeLists.txt | 4 ++-- .../README.md | 18 +++++++++--------- .../autoware_rtc_interface}/rtc_interface.hpp | 10 +++++----- .../package.xml | 4 ++-- .../src/rtc_interface.cpp | 6 +++--- .../package.xml | 2 +- .../package.xml | 2 +- .../package.xml | 2 +- 17 files changed, 35 insertions(+), 35 deletions(-) rename planning/{rtc_interface => autoware_rtc_interface}/CMakeLists.txt (85%) rename planning/{rtc_interface => autoware_rtc_interface}/README.md (79%) rename planning/{rtc_interface/include/rtc_interface => autoware_rtc_interface/include/autoware_rtc_interface}/rtc_interface.hpp (94%) rename planning/{rtc_interface => autoware_rtc_interface}/package.xml (88%) rename planning/{rtc_interface => autoware_rtc_interface}/src/rtc_interface.cpp (98%) diff --git a/planning/.pages b/planning/.pages index 6e3c6d5d49104..2decfad30e0da 100644 --- a/planning/.pages +++ b/planning/.pages @@ -77,7 +77,7 @@ nav: - 'External Velocity Limit Selector': planning/autoware_external_velocity_limit_selector - 'Objects of Interest Marker Interface': planning/objects_of_interest_marker_interface - 'Route Handler': planning/route_handler - - 'RTC Interface': planning/rtc_interface + - 'RTC Interface': planning/autoware_rtc_interface - 'Additional Tools': - 'Remaining Distance Time Calculator': planning/autoware_remaining_distance_time_calculator - 'RTC Replayer': planning/rtc_replayer diff --git a/planning/autoware_behavior_path_external_request_lane_change_module/package.xml b/planning/autoware_behavior_path_external_request_lane_change_module/package.xml index 26b78f5cf8cf1..9410be5a0011c 100644 --- a/planning/autoware_behavior_path_external_request_lane_change_module/package.xml +++ b/planning/autoware_behavior_path_external_request_lane_change_module/package.xml @@ -19,12 +19,12 @@ eigen3_cmake_module autoware_behavior_path_planner_common + autoware_rtc_interface behavior_path_lane_change_module behavior_path_planner motion_utils pluginlib rclcpp - rtc_interface tier4_autoware_utils tier4_planning_msgs visualization_msgs diff --git a/planning/autoware_behavior_path_planner_common/include/autoware_behavior_path_planner_common/interface/scene_module_interface.hpp b/planning/autoware_behavior_path_planner_common/include/autoware_behavior_path_planner_common/interface/scene_module_interface.hpp index 97f249e0e7d6e..ebbb795a699b5 100644 --- a/planning/autoware_behavior_path_planner_common/include/autoware_behavior_path_planner_common/interface/scene_module_interface.hpp +++ b/planning/autoware_behavior_path_planner_common/include/autoware_behavior_path_planner_common/interface/scene_module_interface.hpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -29,7 +30,6 @@ #include #include #include -#include #include #include #include @@ -56,11 +56,11 @@ namespace behavior_path_planner { +using autoware::rtc_interface::RTCInterface; using autoware_adapi_v1_msgs::msg::PlanningBehavior; using autoware_adapi_v1_msgs::msg::SteeringFactor; using objects_of_interest_marker_interface::ColorName; using objects_of_interest_marker_interface::ObjectsOfInterestMarkerInterface; -using rtc_interface::RTCInterface; using steering_factor_interface::SteeringFactorInterface; using tier4_autoware_utils::calcOffsetPose; using tier4_autoware_utils::generateUUID; diff --git a/planning/autoware_behavior_path_planner_common/package.xml b/planning/autoware_behavior_path_planner_common/package.xml index 21da8dcef1c2d..fc12a112affd6 100644 --- a/planning/autoware_behavior_path_planner_common/package.xml +++ b/planning/autoware_behavior_path_planner_common/package.xml @@ -45,6 +45,7 @@ autoware_adapi_v1_msgs autoware_perception_msgs autoware_planning_msgs + autoware_rtc_interface freespace_planning_algorithms geometry_msgs interpolation @@ -56,7 +57,6 @@ objects_of_interest_marker_interface rclcpp route_handler - rtc_interface tf2 tier4_autoware_utils tier4_planning_msgs diff --git a/planning/autoware_behavior_path_start_planner_module/package.xml b/planning/autoware_behavior_path_start_planner_module/package.xml index 8504241c908ce..e4d6de4324bfe 100644 --- a/planning/autoware_behavior_path_start_planner_module/package.xml +++ b/planning/autoware_behavior_path_start_planner_module/package.xml @@ -21,11 +21,11 @@ eigen3_cmake_module autoware_behavior_path_planner_common + autoware_rtc_interface behavior_path_planner motion_utils pluginlib rclcpp - rtc_interface tier4_autoware_utils tier4_planning_msgs visualization_msgs diff --git a/planning/autoware_behavior_path_static_obstacle_avoidance_module/package.xml b/planning/autoware_behavior_path_static_obstacle_avoidance_module/package.xml index a36a5c73729cb..e3699306df1f3 100644 --- a/planning/autoware_behavior_path_static_obstacle_avoidance_module/package.xml +++ b/planning/autoware_behavior_path_static_obstacle_avoidance_module/package.xml @@ -23,6 +23,7 @@ autoware_behavior_path_planner_common autoware_perception_msgs + autoware_rtc_interface behavior_path_planner geometry_msgs lanelet2_extension @@ -32,7 +33,6 @@ pluginlib rclcpp route_handler - rtc_interface sensor_msgs signal_processing tf2 diff --git a/planning/autoware_behavior_velocity_intersection_module/package.xml b/planning/autoware_behavior_velocity_intersection_module/package.xml index 401e53586c649..0655867951ed8 100644 --- a/planning/autoware_behavior_velocity_intersection_module/package.xml +++ b/planning/autoware_behavior_velocity_intersection_module/package.xml @@ -21,6 +21,7 @@ autoware_behavior_velocity_planner_common autoware_perception_msgs autoware_planning_msgs + autoware_rtc_interface fmt geometry_msgs interpolation @@ -32,7 +33,6 @@ pluginlib rclcpp route_handler - rtc_interface tf2_geometry_msgs tier4_autoware_utils tier4_planning_msgs diff --git a/planning/autoware_behavior_velocity_planner_common/include/autoware_behavior_velocity_planner_common/scene_module_interface.hpp b/planning/autoware_behavior_velocity_planner_common/include/autoware_behavior_velocity_planner_common/scene_module_interface.hpp index 53b6e064d73b4..a97346297c9ac 100644 --- a/planning/autoware_behavior_velocity_planner_common/include/autoware_behavior_velocity_planner_common/scene_module_interface.hpp +++ b/planning/autoware_behavior_velocity_planner_common/include/autoware_behavior_velocity_planner_common/scene_module_interface.hpp @@ -16,11 +16,11 @@ #define AUTOWARE_BEHAVIOR_VELOCITY_PLANNER_COMMON__SCENE_MODULE_INTERFACE_HPP_ #include +#include #include #include #include #include -#include #include #include @@ -48,12 +48,12 @@ namespace autoware::behavior_velocity_planner { +using autoware::rtc_interface::RTCInterface; using builtin_interfaces::msg::Time; using motion_utils::PlanningBehavior; using motion_utils::VelocityFactor; using objects_of_interest_marker_interface::ColorName; using objects_of_interest_marker_interface::ObjectsOfInterestMarkerInterface; -using rtc_interface::RTCInterface; using tier4_autoware_utils::DebugPublisher; using tier4_autoware_utils::getOrDeclareParameter; using tier4_debug_msgs::msg::Float64Stamped; diff --git a/planning/autoware_behavior_velocity_planner_common/package.xml b/planning/autoware_behavior_velocity_planner_common/package.xml index 524387034e4b6..7ab991a247a63 100644 --- a/planning/autoware_behavior_velocity_planner_common/package.xml +++ b/planning/autoware_behavior_velocity_planner_common/package.xml @@ -23,6 +23,7 @@ autoware_map_msgs autoware_perception_msgs autoware_planning_msgs + autoware_rtc_interface autoware_velocity_smoother diagnostic_msgs eigen @@ -36,7 +37,6 @@ rclcpp rclcpp_components route_handler - rtc_interface sensor_msgs tf2 tf2_eigen diff --git a/planning/rtc_interface/CMakeLists.txt b/planning/autoware_rtc_interface/CMakeLists.txt similarity index 85% rename from planning/rtc_interface/CMakeLists.txt rename to planning/autoware_rtc_interface/CMakeLists.txt index fda6025b84e86..cd36121e6aee8 100644 --- a/planning/rtc_interface/CMakeLists.txt +++ b/planning/autoware_rtc_interface/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -project(rtc_interface) +project(autoware_rtc_interface) ### Compile options if(NOT CMAKE_CXX_STANDARD) @@ -12,7 +12,7 @@ endif() find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() -ament_auto_add_library(rtc_interface SHARED +ament_auto_add_library(autoware_rtc_interface SHARED src/rtc_interface.cpp ) diff --git a/planning/rtc_interface/README.md b/planning/autoware_rtc_interface/README.md similarity index 79% rename from planning/rtc_interface/README.md rename to planning/autoware_rtc_interface/README.md index 7f8f73edcc6b2..19d200592bcf3 100644 --- a/planning/rtc_interface/README.md +++ b/planning/autoware_rtc_interface/README.md @@ -10,7 +10,7 @@ RTC Interface is an interface to publish the decision status of behavior plannin ```c++ // Generate instance (in this example, "intersection" is selected) -rtc_interface::RTCInterface rtc_interface(node, "intersection"); +autoware::rtc_interface::RTCInterface rtc_interface(node, "intersection"); // Generate UUID const unique_identifier_msgs::msg::UUID uuid = generateUUID(getModuleId()); @@ -51,12 +51,12 @@ rtc_interface.removeCooperateStatus(uuid); ### RTCInterface (Constructor) ```c++ -rtc_interface::RTCInterface(rclcpp::Node & node, const std::string & name); +autoware::rtc_interface::RTCInterface(rclcpp::Node & node, const std::string & name); ``` #### Description -A constructor for `rtc_interface::RTCInterface`. +A constructor for `autoware::rtc_interface::RTCInterface`. #### Input @@ -72,7 +72,7 @@ An instance of `RTCInterface` ### publishCooperateStatus ```c++ -rtc_interface::publishCooperateStatus(const rclcpp::Time & stamp) +autoware::rtc_interface::publishCooperateStatus(const rclcpp::Time & stamp) ``` #### Description @@ -90,7 +90,7 @@ Nothing ### updateCooperateStatus ```c++ -rtc_interface::updateCooperateStatus(const unique_identifier_msgs::msg::UUID & uuid, const bool safe, const double start_distance, const double finish_distance, const rclcpp::Time & stamp) +autoware::rtc_interface::updateCooperateStatus(const unique_identifier_msgs::msg::UUID & uuid, const bool safe, const double start_distance, const double finish_distance, const rclcpp::Time & stamp) ``` #### Description @@ -113,7 +113,7 @@ Nothing ### removeCooperateStatus ```c++ -rtc_interface::removeCooperateStatus(const unique_identifier_msgs::msg::UUID & uuid) +autoware::rtc_interface::removeCooperateStatus(const unique_identifier_msgs::msg::UUID & uuid) ``` #### Description @@ -131,7 +131,7 @@ Nothing ### clearCooperateStatus ```c++ -rtc_interface::clearCooperateStatus() +autoware::rtc_interface::clearCooperateStatus() ``` #### Description @@ -149,7 +149,7 @@ Nothing ### isActivated ```c++ -rtc_interface::isActivated(const unique_identifier_msgs::msg::UUID & uuid) +autoware::rtc_interface::isActivated(const unique_identifier_msgs::msg::UUID & uuid) ``` #### Description @@ -169,7 +169,7 @@ If not, return `false`. ### isRegistered ```c++ -rtc_interface::isRegistered(const unique_identifier_msgs::msg::UUID & uuid) +autoware::rtc_interface::isRegistered(const unique_identifier_msgs::msg::UUID & uuid) ``` #### Description diff --git a/planning/rtc_interface/include/rtc_interface/rtc_interface.hpp b/planning/autoware_rtc_interface/include/autoware_rtc_interface/rtc_interface.hpp similarity index 94% rename from planning/rtc_interface/include/rtc_interface/rtc_interface.hpp rename to planning/autoware_rtc_interface/include/autoware_rtc_interface/rtc_interface.hpp index 7ab796321e041..8b435a6f8ed51 100644 --- a/planning/rtc_interface/include/rtc_interface/rtc_interface.hpp +++ b/planning/autoware_rtc_interface/include/autoware_rtc_interface/rtc_interface.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RTC_INTERFACE__RTC_INTERFACE_HPP_ -#define RTC_INTERFACE__RTC_INTERFACE_HPP_ +#ifndef AUTOWARE_RTC_INTERFACE__RTC_INTERFACE_HPP_ +#define AUTOWARE_RTC_INTERFACE__RTC_INTERFACE_HPP_ #include "rclcpp/rclcpp.hpp" @@ -33,7 +33,7 @@ #include #include -namespace rtc_interface +namespace autoware::rtc_interface { using tier4_rtc_msgs::msg::AutoModeStatus; using tier4_rtc_msgs::msg::Command; @@ -101,6 +101,6 @@ class RTCInterface mutable std::mutex mutex_; }; -} // namespace rtc_interface +} // namespace autoware::rtc_interface -#endif // RTC_INTERFACE__RTC_INTERFACE_HPP_ +#endif // AUTOWARE_RTC_INTERFACE__RTC_INTERFACE_HPP_ diff --git a/planning/rtc_interface/package.xml b/planning/autoware_rtc_interface/package.xml similarity index 88% rename from planning/rtc_interface/package.xml rename to planning/autoware_rtc_interface/package.xml index 753e4df13908e..d08467d8f15a9 100644 --- a/planning/rtc_interface/package.xml +++ b/planning/autoware_rtc_interface/package.xml @@ -1,8 +1,8 @@ - rtc_interface + autoware_rtc_interface 0.1.0 - The rtc_interface package + The autoware_rtc_interface package Fumiya Watanabe Taiki Tanaka diff --git a/planning/rtc_interface/src/rtc_interface.cpp b/planning/autoware_rtc_interface/src/rtc_interface.cpp similarity index 98% rename from planning/rtc_interface/src/rtc_interface.cpp rename to planning/autoware_rtc_interface/src/rtc_interface.cpp index 77fe29b41d893..3389d08b9015e 100644 --- a/planning/rtc_interface/src/rtc_interface.cpp +++ b/planning/autoware_rtc_interface/src/rtc_interface.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "rtc_interface/rtc_interface.hpp" +#include "autoware_rtc_interface/rtc_interface.hpp" #include @@ -78,7 +78,7 @@ Module getModuleType(const std::string & module_name) } // namespace -namespace rtc_interface +namespace autoware::rtc_interface { RTCInterface::RTCInterface(rclcpp::Node * node, const std::string & name, const bool enable_rtc) : clock_{node->get_clock()}, @@ -363,4 +363,4 @@ bool RTCInterface::isLocked() const return is_locked_; } -} // namespace rtc_interface +} // namespace autoware::rtc_interface diff --git a/planning/behavior_path_avoidance_by_lane_change_module/package.xml b/planning/behavior_path_avoidance_by_lane_change_module/package.xml index 1b11b6d8d445d..57e30bd628e08 100644 --- a/planning/behavior_path_avoidance_by_lane_change_module/package.xml +++ b/planning/behavior_path_avoidance_by_lane_change_module/package.xml @@ -20,13 +20,13 @@ autoware_behavior_path_planner_common autoware_behavior_path_static_obstacle_avoidance_module + autoware_rtc_interface behavior_path_lane_change_module behavior_path_planner lanelet2_extension motion_utils pluginlib rclcpp - rtc_interface tier4_autoware_utils tier4_planning_msgs visualization_msgs diff --git a/planning/behavior_path_goal_planner_module/package.xml b/planning/behavior_path_goal_planner_module/package.xml index c5201c1d2d9a2..75ca5c264b523 100644 --- a/planning/behavior_path_goal_planner_module/package.xml +++ b/planning/behavior_path_goal_planner_module/package.xml @@ -21,11 +21,11 @@ eigen3_cmake_module autoware_behavior_path_planner_common + autoware_rtc_interface behavior_path_planner motion_utils pluginlib rclcpp - rtc_interface tier4_autoware_utils tier4_planning_msgs visualization_msgs diff --git a/planning/behavior_path_lane_change_module/package.xml b/planning/behavior_path_lane_change_module/package.xml index ee4089375376f..23fc8f61af2f3 100644 --- a/planning/behavior_path_lane_change_module/package.xml +++ b/planning/behavior_path_lane_change_module/package.xml @@ -20,11 +20,11 @@ eigen3_cmake_module autoware_behavior_path_planner_common + autoware_rtc_interface behavior_path_planner motion_utils pluginlib rclcpp - rtc_interface tier4_autoware_utils tier4_planning_msgs visualization_msgs