From e438fc5a950744f35676012a99a878ea9f5ce250 Mon Sep 17 00:00:00 2001 From: Yuki TAKAGI <141538661+yuki-takagi-66@users.noreply.github.com> Date: Tue, 11 Jun 2024 01:22:13 +0900 Subject: [PATCH] refactor(external cmd converter)!: add autoware_ prefix (#7361) * add prefix to the code Signed-off-by: Yuki Takagi * rename Signed-off-by: Yuki Takagi * fix Signed-off-by: Yuki Takagi * fix Signed-off-by: Yuki Takagi * fix Signed-off-by: Yuki Takagi * Update .github/CODEOWNERS --------- Signed-off-by: Yuki Takagi Co-authored-by: Takayuki Murooka --- .github/CODEOWNERS | 3 +-- .../launch/control.launch.py | 5 ++++- launch/tier4_control_launch/package.xml | 3 ++- .../CMakeLists.txt | 19 +++++++++++++++++++ .../README.md | 0 .../config/external_cmd_converter.param.yaml | 0 .../autoware_external_cmd_converter}/node.hpp | 10 +++++----- .../launch/external_cmd_converter.launch.py | 4 ++-- .../launch/external_cmd_converter.launch.xml | 4 ++-- .../package.xml | 4 ++-- .../schema/external_cmd_converter.json | 0 .../src/node.cpp | 8 ++++---- vehicle/external_cmd_converter/CMakeLists.txt | 19 ------------------- 13 files changed, 41 insertions(+), 38 deletions(-) create mode 100644 vehicle/autoware_external_cmd_converter/CMakeLists.txt rename vehicle/{external_cmd_converter => autoware_external_cmd_converter}/README.md (100%) rename vehicle/{external_cmd_converter => autoware_external_cmd_converter}/config/external_cmd_converter.param.yaml (100%) rename vehicle/{external_cmd_converter/include/external_cmd_converter => autoware_external_cmd_converter/include/autoware_external_cmd_converter}/node.hpp (93%) rename vehicle/{external_cmd_converter => autoware_external_cmd_converter}/launch/external_cmd_converter.launch.py (97%) rename vehicle/{external_cmd_converter => autoware_external_cmd_converter}/launch/external_cmd_converter.launch.xml (89%) rename vehicle/{external_cmd_converter => autoware_external_cmd_converter}/package.xml (90%) rename vehicle/{external_cmd_converter => autoware_external_cmd_converter}/schema/external_cmd_converter.json (100%) rename vehicle/{external_cmd_converter => autoware_external_cmd_converter}/src/node.cpp (97%) delete mode 100644 vehicle/external_cmd_converter/CMakeLists.txt diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8732f11d14202..9fb7aa21d74b7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -244,9 +244,8 @@ system/system_monitor/** fumihito.ito@tier4.jp tetsuhiro.kawaguchi@tier4.jp system/topic_state_monitor/** ryohsuke.mitsudome@tier4.jp system/velodyne_monitor/** fumihito.ito@tier4.jp tools/reaction_analyzer/** berkay@leodrive.ai -vehicle/autoware_steer_offset_estimator/** taiki.tanaka@tier4.jp vehicle/autoware_accel_brake_map_calibrator/** taiki.tanaka@tier4.jp takeshi.miura@tier4.jp tomoya.kimura@tier4.jp -vehicle/external_cmd_converter/** takamasa.horibe@tier4.jp +vehicle/autoware_external_cmd_converter/** takamasa.horibe@tier4.jp vehicle/autoware_raw_vehicle_cmd_converter/** makoto.kurihara@tier4.jp taiki.tanaka@tier4.jp takamasa.horibe@tier4.jp vehicle/autoware_steer_offset_estimator/** taiki.tanaka@tier4.jp vehicle/autoware_vehicle_info_utils/** shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp diff --git a/launch/tier4_control_launch/launch/control.launch.py b/launch/tier4_control_launch/launch/control.launch.py index 2dd12b1705dd3..c9de43aa38165 100644 --- a/launch/tier4_control_launch/launch/control.launch.py +++ b/launch/tier4_control_launch/launch/control.launch.py @@ -290,7 +290,10 @@ def launch_setup(context, *args, **kwargs): # external cmd converter external_cmd_converter_loader = IncludeLaunchDescription( PythonLaunchDescriptionSource( - [FindPackageShare("external_cmd_converter"), "/launch/external_cmd_converter.launch.py"] + [ + FindPackageShare("autoware_external_cmd_converter"), + "/launch/external_cmd_converter.launch.py", + ] ), launch_arguments=[ ("use_intra_process", LaunchConfiguration("use_intra_process")), diff --git a/launch/tier4_control_launch/package.xml b/launch/tier4_control_launch/package.xml index f02ec0aee47b6..33f0ea5318654 100644 --- a/launch/tier4_control_launch/package.xml +++ b/launch/tier4_control_launch/package.xml @@ -11,11 +11,12 @@ ament_cmake_auto autoware_cmake + autoware_external_cmd_converter autoware_external_cmd_selector autoware_lane_departure_checker autoware_vehicle_cmd_gate control_evaluator - external_cmd_converter + external_cmd_selector shift_decider trajectory_follower_node diff --git a/vehicle/autoware_external_cmd_converter/CMakeLists.txt b/vehicle/autoware_external_cmd_converter/CMakeLists.txt new file mode 100644 index 0000000000000..27a256ea775c5 --- /dev/null +++ b/vehicle/autoware_external_cmd_converter/CMakeLists.txt @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.14) +project(autoware_external_cmd_converter) + +find_package(autoware_cmake REQUIRED) +autoware_package() + +ament_auto_add_library(autoware_external_cmd_converter SHARED + src/node.cpp +) + +rclcpp_components_register_node(autoware_external_cmd_converter + PLUGIN "autoware::external_cmd_converter::ExternalCmdConverterNode" + EXECUTABLE external_cmd_converter_node +) + +ament_auto_package(INSTALL_TO_SHARE + launch + config +) diff --git a/vehicle/external_cmd_converter/README.md b/vehicle/autoware_external_cmd_converter/README.md similarity index 100% rename from vehicle/external_cmd_converter/README.md rename to vehicle/autoware_external_cmd_converter/README.md diff --git a/vehicle/external_cmd_converter/config/external_cmd_converter.param.yaml b/vehicle/autoware_external_cmd_converter/config/external_cmd_converter.param.yaml similarity index 100% rename from vehicle/external_cmd_converter/config/external_cmd_converter.param.yaml rename to vehicle/autoware_external_cmd_converter/config/external_cmd_converter.param.yaml diff --git a/vehicle/external_cmd_converter/include/external_cmd_converter/node.hpp b/vehicle/autoware_external_cmd_converter/include/autoware_external_cmd_converter/node.hpp similarity index 93% rename from vehicle/external_cmd_converter/include/external_cmd_converter/node.hpp rename to vehicle/autoware_external_cmd_converter/include/autoware_external_cmd_converter/node.hpp index b491cb3db5484..97ee325ecdcca 100644 --- a/vehicle/external_cmd_converter/include/external_cmd_converter/node.hpp +++ b/vehicle/autoware_external_cmd_converter/include/autoware_external_cmd_converter/node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef EXTERNAL_CMD_CONVERTER__NODE_HPP_ -#define EXTERNAL_CMD_CONVERTER__NODE_HPP_ +#ifndef AUTOWARE_EXTERNAL_CMD_CONVERTER__NODE_HPP_ +#define AUTOWARE_EXTERNAL_CMD_CONVERTER__NODE_HPP_ #include "tier4_autoware_utils/ros/polling_subscriber.hpp" @@ -32,7 +32,7 @@ #include #include -namespace external_cmd_converter +namespace autoware::external_cmd_converter { using GearCommand = autoware_vehicle_msgs::msg::GearCommand; using autoware_control_msgs::msg::Control; @@ -104,6 +104,6 @@ class ExternalCmdConverterNode : public rclcpp::Node double get_shift_velocity_sign(const GearCommand & cmd); }; -} // namespace external_cmd_converter +} // namespace autoware::external_cmd_converter -#endif // EXTERNAL_CMD_CONVERTER__NODE_HPP_ +#endif // AUTOWARE_EXTERNAL_CMD_CONVERTER__NODE_HPP_ diff --git a/vehicle/external_cmd_converter/launch/external_cmd_converter.launch.py b/vehicle/autoware_external_cmd_converter/launch/external_cmd_converter.launch.py similarity index 97% rename from vehicle/external_cmd_converter/launch/external_cmd_converter.launch.py rename to vehicle/autoware_external_cmd_converter/launch/external_cmd_converter.launch.py index e3f5ec20e6165..91dfde42046a7 100644 --- a/vehicle/external_cmd_converter/launch/external_cmd_converter.launch.py +++ b/vehicle/autoware_external_cmd_converter/launch/external_cmd_converter.launch.py @@ -105,8 +105,8 @@ def generate_launch_description(): ] component = ComposableNode( - package="external_cmd_converter", - plugin="external_cmd_converter::ExternalCmdConverterNode", + package="autoware_external_cmd_converter", + plugin="autoware::external_cmd_converter::ExternalCmdConverterNode", name="external_cmd_converter", remappings=[ _create_mapping_tuple("in/external_control_cmd"), diff --git a/vehicle/external_cmd_converter/launch/external_cmd_converter.launch.xml b/vehicle/autoware_external_cmd_converter/launch/external_cmd_converter.launch.xml similarity index 89% rename from vehicle/external_cmd_converter/launch/external_cmd_converter.launch.xml rename to vehicle/autoware_external_cmd_converter/launch/external_cmd_converter.launch.xml index b2ac46297b044..8e38a5d529ca7 100644 --- a/vehicle/external_cmd_converter/launch/external_cmd_converter.launch.xml +++ b/vehicle/autoware_external_cmd_converter/launch/external_cmd_converter.launch.xml @@ -1,6 +1,6 @@ - + @@ -24,7 +24,7 @@ - + diff --git a/vehicle/external_cmd_converter/package.xml b/vehicle/autoware_external_cmd_converter/package.xml similarity index 90% rename from vehicle/external_cmd_converter/package.xml rename to vehicle/autoware_external_cmd_converter/package.xml index 5627616971e26..f98c14f4fd2c3 100644 --- a/vehicle/external_cmd_converter/package.xml +++ b/vehicle/autoware_external_cmd_converter/package.xml @@ -1,9 +1,9 @@ - external_cmd_converter + autoware_external_cmd_converter 0.1.0 - The external_cmd_converter package + The autoware_external_cmd_converter package Takamasa Horibe Eiki Nagata Apache License 2.0 diff --git a/vehicle/external_cmd_converter/schema/external_cmd_converter.json b/vehicle/autoware_external_cmd_converter/schema/external_cmd_converter.json similarity index 100% rename from vehicle/external_cmd_converter/schema/external_cmd_converter.json rename to vehicle/autoware_external_cmd_converter/schema/external_cmd_converter.json diff --git a/vehicle/external_cmd_converter/src/node.cpp b/vehicle/autoware_external_cmd_converter/src/node.cpp similarity index 97% rename from vehicle/external_cmd_converter/src/node.cpp rename to vehicle/autoware_external_cmd_converter/src/node.cpp index 49b4d80371eed..cbff8ab5ef2ce 100644 --- a/vehicle/external_cmd_converter/src/node.cpp +++ b/vehicle/autoware_external_cmd_converter/src/node.cpp @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "external_cmd_converter/node.hpp" +#include "autoware_external_cmd_converter/node.hpp" #include #include #include #include -namespace external_cmd_converter +namespace autoware::external_cmd_converter { ExternalCmdConverterNode::ExternalCmdConverterNode(const rclcpp::NodeOptions & node_options) : Node("external_cmd_converter", node_options) @@ -226,7 +226,7 @@ bool ExternalCmdConverterNode::check_remote_topic_rate() return true; } -} // namespace external_cmd_converter +} // namespace autoware::external_cmd_converter #include -RCLCPP_COMPONENTS_REGISTER_NODE(external_cmd_converter::ExternalCmdConverterNode) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::external_cmd_converter::ExternalCmdConverterNode) diff --git a/vehicle/external_cmd_converter/CMakeLists.txt b/vehicle/external_cmd_converter/CMakeLists.txt deleted file mode 100644 index 9624067bcf757..0000000000000 --- a/vehicle/external_cmd_converter/CMakeLists.txt +++ /dev/null @@ -1,19 +0,0 @@ -cmake_minimum_required(VERSION 3.14) -project(external_cmd_converter) - -find_package(autoware_cmake REQUIRED) -autoware_package() - -ament_auto_add_library(external_cmd_converter SHARED - src/node.cpp -) - -rclcpp_components_register_node(external_cmd_converter - PLUGIN "external_cmd_converter::ExternalCmdConverterNode" - EXECUTABLE external_cmd_converter_node -) - -ament_auto_package(INSTALL_TO_SHARE - launch - config -)