Skip to content

Commit f0c8170

Browse files
authored
feat: apply autoware_ prefix for scenario_simulator_v2_adapter (autowarefoundation#9957)
* feat(autoware_scenario_simulator_v2_adapter): apply `autoware_` prefix (see below): * In this commit, I did not organize a folder structure. The folder structure will be organized in the next some commits. * The changes will follow the Autoware's guideline as below: - https://autowarefoundation.github.io/autoware-documentation/main/contributing/coding-guidelines/ros-nodes/directory-structure/#package-folder Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp> * rename(scenario_simulator_v2_adapter): move headers under `include/autoware`: * Fixes due to this changes for .hpp/.cpp files will be applied in the next commit Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp> * fix(scenario_simulator_v2_adapter): fix include paths * To follow the previous commit Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp> * rename: `scenario_simulator_v2_adapter` => `autoware_scenario_simulator_v2_adapter` Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp> * bug(autoware_scenario_simulator_v2_adapter): revert wrongly updated copyrights Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp> * bug(autoware_scenario_simulator_v2_adapter): `autoware_` prefix is not needed here Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp> * bug(autoware_scenario_simulator_v2_adapter): wrong package name in launch side Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp> --------- Signed-off-by: Junya Sasaki <junya.sasaki@tier4.jp>
1 parent 47d55f4 commit f0c8170

File tree

10 files changed

+25
-27
lines changed

10 files changed

+25
-27
lines changed

evaluator/scenario_simulator_v2_adapter/CMakeLists.txt evaluator/autoware_scenario_simulator_v2_adapter/CMakeLists.txt

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.16.3) # Ubuntu 20.04 default CMake version
22

3-
project(scenario_simulator_v2_adapter)
3+
project(autoware_scenario_simulator_v2_adapter)
44

55
if(NOT CMAKE_CXX_STANDARD)
66
set(CMAKE_CXX_STANDARD 14)
@@ -16,24 +16,24 @@ find_package(pluginlib REQUIRED)
1616
ament_auto_find_build_dependencies()
1717

1818

19-
ament_auto_add_library(${PROJECT_NAME}_node SHARED
19+
ament_auto_add_library(${PROJECT_NAME} SHARED
2020
src/converter_node.cpp
2121
)
2222

23-
rclcpp_components_register_node(${PROJECT_NAME}_node
24-
PLUGIN "scenario_simulator_v2_adapter::MetricConverter"
25-
EXECUTABLE ${PROJECT_NAME}
23+
rclcpp_components_register_node(${PROJECT_NAME}
24+
PLUGIN "autoware::scenario_simulator_v2_adapter::MetricConverter"
25+
EXECUTABLE ${PROJECT_NAME}_node
2626
)
2727

2828
if(BUILD_TESTING)
2929
find_package(ament_lint_auto REQUIRED)
3030
ament_lint_auto_find_test_dependencies()
3131

32-
ament_add_gtest(test_${PROJECT_NAME}
32+
ament_add_gtest(test_scenario_simulator_v2_adapter
3333
test/test_converter_node.cpp
3434
)
35-
target_link_libraries(test_${PROJECT_NAME}
36-
${PROJECT_NAME}_node
35+
target_link_libraries(test_scenario_simulator_v2_adapter
36+
${PROJECT_NAME}
3737
)
3838
endif()
3939

evaluator/scenario_simulator_v2_adapter/include/scenario_simulator_v2_adapter/converter_node.hpp evaluator/autoware_scenario_simulator_v2_adapter/include/autoware/scenario_simulator_v2_adapter/converter_node.hpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 Tier IV, Inc.
1+
// Copyright 2023 TIER IV, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -12,8 +12,8 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#ifndef SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
16-
#define SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
15+
#ifndef AUTOWARE__SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
16+
#define AUTOWARE__SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
1717

1818
#include <rclcpp/rclcpp.hpp>
1919

@@ -27,7 +27,7 @@
2727
#include <unordered_map>
2828
#include <vector>
2929

30-
namespace scenario_simulator_v2_adapter
30+
namespace autoware::scenario_simulator_v2_adapter
3131
{
3232
using tier4_metric_msgs::msg::Metric;
3333
using tier4_metric_msgs::msg::MetricArray;
@@ -61,6 +61,6 @@ class MetricConverter : public rclcpp::Node
6161
std::vector<std::unordered_map<std::string, rclcpp::Publisher<UserDefinedValue>::SharedPtr>>
6262
params_pub_;
6363
};
64-
} // namespace scenario_simulator_v2_adapter
64+
} // namespace autoware::scenario_simulator_v2_adapter
6565

66-
#endif // SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
66+
#endif // AUTOWARE__SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_

evaluator/scenario_simulator_v2_adapter/package.xml evaluator/autoware_scenario_simulator_v2_adapter/package.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
<?xml version="1.0"?>
22
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
33
<package format="3">
4-
<name>scenario_simulator_v2_adapter</name>
4+
<name>autoware_scenario_simulator_v2_adapter</name>
55
<version>0.40.0</version>
66
<description>Node for converting autoware's messages into UserDefinedValue messages</description>
77
<maintainer email="kyoichi.sugahara@tier4.jp">Kyoichi Sugahara</maintainer>
88
<maintainer email="maxime.clement@tier4.jp">Maxime CLEMENT</maintainer>
99
<maintainer email="takamasa.horibe@tier4.jp">Takamasa Horibe</maintainer>
1010
<maintainer email="temkei.kem@tier4.jp">Takamasa Horibe</maintainer>
11+
<maintainer email="junya.sasaki@tier4.jp">Junya Sasaki</maintainer>
1112
<license>Apache License 2.0</license>
1213

1314
<buildtool_depend>ament_cmake_auto</buildtool_depend>

evaluator/scenario_simulator_v2_adapter/src/converter_node.cpp evaluator/autoware_scenario_simulator_v2_adapter/src/converter_node.cpp

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 Tier IV, Inc.
1+
// Copyright 2023 TIER IV, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -12,13 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "scenario_simulator_v2_adapter/converter_node.hpp"
15+
#include "autoware/scenario_simulator_v2_adapter/converter_node.hpp"
1616

1717
#include <regex>
1818
#include <string>
1919
#include <vector>
2020

21-
namespace
21+
namespace autoware::scenario_simulator_v2_adapter
2222
{
2323
std::string removeInvalidTopicString(const std::string & input_string)
2424
{
@@ -31,10 +31,7 @@ std::string removeInvalidTopicString(const std::string & input_string)
3131
}
3232
return result;
3333
}
34-
} // namespace
3534

36-
namespace scenario_simulator_v2_adapter
37-
{
3835
MetricConverter::MetricConverter(const rclcpp::NodeOptions & node_options)
3936
: Node("scenario_simulator_v2_adapter", node_options)
4037
{
@@ -81,7 +78,7 @@ rclcpp::Publisher<UserDefinedValue>::SharedPtr MetricConverter::getPublisher(
8178
}
8279
return pubs.at(topic_name);
8380
}
84-
} // namespace scenario_simulator_v2_adapter
81+
} // namespace autoware::scenario_simulator_v2_adapter
8582

8683
#include "rclcpp_components/register_node_macro.hpp"
87-
RCLCPP_COMPONENTS_REGISTER_NODE(scenario_simulator_v2_adapter::MetricConverter)
84+
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::scenario_simulator_v2_adapter::MetricConverter)

evaluator/scenario_simulator_v2_adapter/test/test_converter_node.cpp evaluator/autoware_scenario_simulator_v2_adapter/test/test_converter_node.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 Tier IV, Inc.
1+
// Copyright 2023 TIER IV, Inc.
22
//
33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
#include "scenario_simulator_v2_adapter/converter_node.hpp"
15+
#include "autoware/scenario_simulator_v2_adapter/converter_node.hpp"
1616

1717
#include <rclcpp/rclcpp.hpp>
1818

@@ -28,7 +28,7 @@
2828
#include <unordered_map>
2929
#include <vector>
3030

31-
using ConverterNode = scenario_simulator_v2_adapter::MetricConverter;
31+
using ConverterNode = autoware::scenario_simulator_v2_adapter::MetricConverter;
3232
using tier4_metric_msgs::msg::Metric;
3333
using tier4_metric_msgs::msg::MetricArray;
3434
using tier4_simulation_msgs::msg::UserDefinedValue;

launch/tier4_simulator_launch/launch/simulator.launch.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208

209209
<!-- Simulator Adapter -->
210210
<group if="$(var launch_scenario_simulator_v2_adapter)">
211-
<node name="scenario_simulator_v2_adapter" exec="scenario_simulator_v2_adapter" pkg="scenario_simulator_v2_adapter" output="screen">
211+
<node exec="autoware_scenario_simulator_v2_adapter_node" pkg="autoware_scenario_simulator_v2_adapter" output="screen">
212212
<param name="metric_topic_list" value="[/planning/planning_evaluator/metrics, /control/control_evaluator/metrics, /system/processing_time_checker/metrics]"/>
213213
</node>
214214
</group>

0 commit comments

Comments
 (0)