Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: apply autoware_ prefix for scenario_simulator_v2_adapter #9957

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.16.3) # Ubuntu 20.04 default CMake version

project(scenario_simulator_v2_adapter)
project(autoware_scenario_simulator_v2_adapter)

if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
Expand All @@ -16,24 +16,24 @@ find_package(pluginlib REQUIRED)
ament_auto_find_build_dependencies()


ament_auto_add_library(${PROJECT_NAME}_node SHARED
ament_auto_add_library(${PROJECT_NAME} SHARED
src/converter_node.cpp
)

rclcpp_components_register_node(${PROJECT_NAME}_node
PLUGIN "scenario_simulator_v2_adapter::MetricConverter"
EXECUTABLE ${PROJECT_NAME}
rclcpp_components_register_node(${PROJECT_NAME}
PLUGIN "autoware::scenario_simulator_v2_adapter::MetricConverter"
EXECUTABLE ${PROJECT_NAME}_node
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()

ament_add_gtest(test_${PROJECT_NAME}
ament_add_gtest(test_scenario_simulator_v2_adapter
test/test_converter_node.cpp
)
target_link_libraries(test_${PROJECT_NAME}
${PROJECT_NAME}_node
target_link_libraries(test_scenario_simulator_v2_adapter
${PROJECT_NAME}
)
endif()

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// Copyright 2023 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
#define SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
#ifndef AUTOWARE__SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
#define AUTOWARE__SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_

#include <rclcpp/rclcpp.hpp>

Expand All @@ -27,7 +27,7 @@
#include <unordered_map>
#include <vector>

namespace scenario_simulator_v2_adapter
namespace autoware::scenario_simulator_v2_adapter
{
using tier4_metric_msgs::msg::Metric;
using tier4_metric_msgs::msg::MetricArray;
Expand Down Expand Up @@ -61,6 +61,6 @@ class MetricConverter : public rclcpp::Node
std::vector<std::unordered_map<std::string, rclcpp::Publisher<UserDefinedValue>::SharedPtr>>
params_pub_;
};
} // namespace scenario_simulator_v2_adapter
} // namespace autoware::scenario_simulator_v2_adapter

#endif // SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
#endif // AUTOWARE__SCENARIO_SIMULATOR_V2_ADAPTER__CONVERTER_NODE_HPP_
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>scenario_simulator_v2_adapter</name>
<name>autoware_scenario_simulator_v2_adapter</name>
<version>0.40.0</version>
<description>Node for converting autoware's messages into UserDefinedValue messages</description>
<maintainer email="kyoichi.sugahara@tier4.jp">Kyoichi Sugahara</maintainer>
<maintainer email="maxime.clement@tier4.jp">Maxime CLEMENT</maintainer>
<maintainer email="takamasa.horibe@tier4.jp">Takamasa Horibe</maintainer>
<maintainer email="temkei.kem@tier4.jp">Takamasa Horibe</maintainer>
<maintainer email="junya.sasaki@tier4.jp">Junya Sasaki</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// Copyright 2023 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,13 +12,13 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "scenario_simulator_v2_adapter/converter_node.hpp"
#include "autoware/scenario_simulator_v2_adapter/converter_node.hpp"

#include <regex>
#include <string>
#include <vector>

namespace
namespace autoware::scenario_simulator_v2_adapter
{
std::string removeInvalidTopicString(const std::string & input_string)
{
Expand All @@ -31,10 +31,7 @@ std::string removeInvalidTopicString(const std::string & input_string)
}
return result;
}
} // namespace

namespace scenario_simulator_v2_adapter
{
MetricConverter::MetricConverter(const rclcpp::NodeOptions & node_options)
: Node("scenario_simulator_v2_adapter", node_options)
{
Expand Down Expand Up @@ -81,7 +78,7 @@ rclcpp::Publisher<UserDefinedValue>::SharedPtr MetricConverter::getPublisher(
}
return pubs.at(topic_name);
}
} // namespace scenario_simulator_v2_adapter
} // namespace autoware::scenario_simulator_v2_adapter

#include "rclcpp_components/register_node_macro.hpp"
RCLCPP_COMPONENTS_REGISTER_NODE(scenario_simulator_v2_adapter::MetricConverter)
RCLCPP_COMPONENTS_REGISTER_NODE(autoware::scenario_simulator_v2_adapter::MetricConverter)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2023 Tier IV, Inc.
// Copyright 2023 TIER IV, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "scenario_simulator_v2_adapter/converter_node.hpp"
#include "autoware/scenario_simulator_v2_adapter/converter_node.hpp"

#include <rclcpp/rclcpp.hpp>

Expand All @@ -28,7 +28,7 @@
#include <unordered_map>
#include <vector>

using ConverterNode = scenario_simulator_v2_adapter::MetricConverter;
using ConverterNode = autoware::scenario_simulator_v2_adapter::MetricConverter;
using tier4_metric_msgs::msg::Metric;
using tier4_metric_msgs::msg::MetricArray;
using tier4_simulation_msgs::msg::UserDefinedValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@

<!-- Simulator Adapter -->
<group if="$(var launch_scenario_simulator_v2_adapter)">
<node name="scenario_simulator_v2_adapter" exec="scenario_simulator_v2_adapter" pkg="scenario_simulator_v2_adapter" output="screen">
<node exec="autoware_scenario_simulator_v2_adapter_node" pkg="autoware_scenario_simulator_v2_adapter" output="screen">
<param name="metric_topic_list" value="[/planning/planning_evaluator/metrics, /control/control_evaluator/metrics, /system/processing_time_checker/metrics]"/>
</node>
</group>
Expand Down
Loading