diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 0097a386e47a7..df6be468e726f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -25,6 +25,7 @@ common/autoware_test_utils/** kyoichi.sugahara@tier4.jp mamoru.sobue@tier4.jp ta common/autoware_testing/** adam.dabrowski@robotec.ai satoshi.ota@tier4.jp shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp common/autoware_time_utils/** christopherj.ho@gmail.com shumpei.wakabayashi@tier4.jp tomoya.kimura@tier4.jp common/autoware_trajectory/** mamoru.sobue@tier4.jp takayuki.murooka@tier4.jp yukinari.hisaki.2@tier4.jp +common/autoware_traffic_light_utils/** kotaro.uetake@tier4.jp satoshi.ota@tier4.jp shunsuke.miura@tier4.jp common/autoware_universe_utils/** mamoru.sobue@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp common/autoware_vehicle_info_utils/** mamoru.sobue@tier4.jp shumpei.wakabayashi@tier4.jp taiki.tanaka@tier4.jp tomoya.kimura@tier4.jp common/bag_time_manager_rviz_plugin/** taiki.tanaka@tier4.jp @@ -41,7 +42,6 @@ common/tier4_system_rviz_plugin/** koji.minoda@tier4.jp common/tier4_traffic_light_rviz_plugin/** satoshi.ota@tier4.jp common/tier4_vehicle_rviz_plugin/** yukihiro.saito@tier4.jp common/traffic_light_recognition_marker_publisher/** shumpei.wakabayashi@tier4.jp takeshi.miura@tier4.jp tomoya.kimura@tier4.jp -common/traffic_light_utils/** kotaro.uetake@tier4.jp satoshi.ota@tier4.jp shunsuke.miura@tier4.jp control/autoware_autonomous_emergency_braking/** daniel.sanchez@tier4.jp kyoichi.sugahara@tier4.jp mamoru.sobue@tier4.jp takamasa.horibe@tier4.jp tomoya.kimura@tier4.jp control/autoware_collision_detector/** go.sakayori@tier4.jp kyoichi.sugahara@tier4.jp tomohito.ando@tier4.jp control/autoware_control_validator/** kyoichi.sugahara@tier4.jp makoto.kurihara@tier4.jp mamoru.sobue@tier4.jp takamasa.horibe@tier4.jp takayuki.murooka@tier4.jp diff --git a/common/.pages b/common/.pages index cd0423fa8de79..2ca956927b905 100644 --- a/common/.pages +++ b/common/.pages @@ -22,8 +22,8 @@ nav: - 'Signal Processing': - 'Introduction': common/autoware_signal_processing - 'Butterworth Filter': common/autoware_signal_processing/documentation/ButterworthFilter + - 'autoware_traffic_light_utils': common/autoware_traffic_light_utils - 'autoware_universe_utils': common/autoware_universe_utils - - 'traffic_light_utils': common/traffic_light_utils - 'RVIZ2 Plugins': - 'autoware_perception_rviz_plugin': common/autoware_perception_rviz_plugin - 'autoware_overlay_rviz_plugin': common/autoware_overlay_rviz_plugin/autoware_overlay_rviz_plugin diff --git a/common/traffic_light_utils/CHANGELOG.rst b/common/autoware_traffic_light_utils/CHANGELOG.rst similarity index 100% rename from common/traffic_light_utils/CHANGELOG.rst rename to common/autoware_traffic_light_utils/CHANGELOG.rst diff --git a/common/traffic_light_utils/CMakeLists.txt b/common/autoware_traffic_light_utils/CMakeLists.txt similarity index 76% rename from common/traffic_light_utils/CMakeLists.txt rename to common/autoware_traffic_light_utils/CMakeLists.txt index 741bdd585ed7f..2c9d11994290e 100644 --- a/common/traffic_light_utils/CMakeLists.txt +++ b/common/autoware_traffic_light_utils/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.14) -project(traffic_light_utils) +project(autoware_traffic_light_utils) find_package(autoware_cmake REQUIRED) autoware_package() @@ -7,7 +7,7 @@ autoware_package() find_package(Boost REQUIRED) find_package(autoware_cmake REQUIRED) -ament_auto_add_library(traffic_light_utils SHARED +ament_auto_add_library(${PROJECT_NAME} SHARED src/traffic_light_utils.cpp ) @@ -16,7 +16,7 @@ if(BUILD_TESTING) file(GLOB_RECURSE TEST_SOURCES test/*.cpp) ament_add_ros_isolated_gtest(test_traffic_light_utils ${TEST_SOURCES}) target_include_directories(test_traffic_light_utils PRIVATE src/include) - target_link_libraries(test_traffic_light_utils traffic_light_utils) + target_link_libraries(test_traffic_light_utils ${PROJECT_NAME}) endif() ament_auto_package() diff --git a/common/traffic_light_utils/README.md b/common/autoware_traffic_light_utils/README.md similarity index 90% rename from common/traffic_light_utils/README.md rename to common/autoware_traffic_light_utils/README.md index 0963a33bc1c4e..d13fddd35f987 100644 --- a/common/traffic_light_utils/README.md +++ b/common/autoware_traffic_light_utils/README.md @@ -1,4 +1,4 @@ -# traffic_light_utils +# autoware_traffic_light_utils ## Purpose diff --git a/common/traffic_light_utils/include/traffic_light_utils/traffic_light_utils.hpp b/common/autoware_traffic_light_utils/include/autoware/traffic_light_utils/traffic_light_utils.hpp similarity index 92% rename from common/traffic_light_utils/include/traffic_light_utils/traffic_light_utils.hpp rename to common/autoware_traffic_light_utils/include/autoware/traffic_light_utils/traffic_light_utils.hpp index 3a40c0c3b1d51..bb2500c5d9f63 100644 --- a/common/traffic_light_utils/include/traffic_light_utils/traffic_light_utils.hpp +++ b/common/autoware_traffic_light_utils/include/autoware/traffic_light_utils/traffic_light_utils.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef TRAFFIC_LIGHT_UTILS__TRAFFIC_LIGHT_UTILS_HPP_ -#define TRAFFIC_LIGHT_UTILS__TRAFFIC_LIGHT_UTILS_HPP_ +#ifndef AUTOWARE__TRAFFIC_LIGHT_UTILS__TRAFFIC_LIGHT_UTILS_HPP_ +#define AUTOWARE__TRAFFIC_LIGHT_UTILS__TRAFFIC_LIGHT_UTILS_HPP_ #include "autoware_perception_msgs/msg/traffic_light_element.hpp" #include "autoware_perception_msgs/msg/traffic_light_group.hpp" @@ -27,7 +27,7 @@ #include #include -namespace traffic_light_utils +namespace autoware::traffic_light_utils { void setSignalUnknown(tier4_perception_msgs::msg::TrafficLight & signal, float confidence = -1); @@ -79,6 +79,6 @@ tf2::Vector3 getTrafficLightBottomRight(const lanelet::ConstLineString3d & traff tf2::Vector3 getTrafficLightCenter(const lanelet::ConstLineString3d & traffic_light); -} // namespace traffic_light_utils +} // namespace autoware::traffic_light_utils -#endif // TRAFFIC_LIGHT_UTILS__TRAFFIC_LIGHT_UTILS_HPP_ +#endif // AUTOWARE__TRAFFIC_LIGHT_UTILS__TRAFFIC_LIGHT_UTILS_HPP_ diff --git a/common/traffic_light_utils/package.xml b/common/autoware_traffic_light_utils/package.xml similarity index 88% rename from common/traffic_light_utils/package.xml rename to common/autoware_traffic_light_utils/package.xml index 82955eb4c82c4..384839d1c91d4 100644 --- a/common/traffic_light_utils/package.xml +++ b/common/autoware_traffic_light_utils/package.xml @@ -1,9 +1,9 @@ - traffic_light_utils + autoware_traffic_light_utils 0.38.0 - The traffic_light_utils package + The autoware_traffic_light_utils package Kotaro Uetake Shunsuke Miura Satoshi Ota diff --git a/common/traffic_light_utils/src/traffic_light_utils.cpp b/common/autoware_traffic_light_utils/src/traffic_light_utils.cpp similarity index 95% rename from common/traffic_light_utils/src/traffic_light_utils.cpp rename to common/autoware_traffic_light_utils/src/traffic_light_utils.cpp index a3da21c1bb578..4ba7e1c1d57d8 100644 --- a/common/traffic_light_utils/src/traffic_light_utils.cpp +++ b/common/autoware_traffic_light_utils/src/traffic_light_utils.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "traffic_light_utils/traffic_light_utils.hpp" +#include "autoware/traffic_light_utils/traffic_light_utils.hpp" -namespace traffic_light_utils +namespace autoware::traffic_light_utils { void setSignalUnknown(tier4_perception_msgs::msg::TrafficLight & signal, float confidence) @@ -105,4 +105,4 @@ tf2::Vector3 getTrafficLightCenter(const lanelet::ConstLineString3d & traffic_li return (top_left + bottom_right) / 2; } -} // namespace traffic_light_utils +} // namespace autoware::traffic_light_utils diff --git a/common/traffic_light_utils/test/test_traffic_light_utils.cpp b/common/autoware_traffic_light_utils/test/test_traffic_light_utils.cpp similarity index 93% rename from common/traffic_light_utils/test/test_traffic_light_utils.cpp rename to common/autoware_traffic_light_utils/test/test_traffic_light_utils.cpp index a9e601370945d..856e8b5e9828b 100644 --- a/common/traffic_light_utils/test/test_traffic_light_utils.cpp +++ b/common/autoware_traffic_light_utils/test/test_traffic_light_utils.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. +#include "autoware/traffic_light_utils/traffic_light_utils.hpp" #include "gtest/gtest.h" -#include "traffic_light_utils/traffic_light_utils.hpp" -namespace traffic_light_utils +namespace autoware::traffic_light_utils { TEST(setSignalUnknown, set_signal_element) @@ -53,4 +53,4 @@ TEST(getTrafficLightCenter, get_signal) EXPECT_FLOAT_EQ(getTrafficLightCenter(test_light).z(), (float)1.5); } -} // namespace traffic_light_utils +} // namespace autoware::traffic_light_utils diff --git a/perception/autoware_traffic_light_occlusion_predictor/package.xml b/perception/autoware_traffic_light_occlusion_predictor/package.xml index 8817ec2c97647..bebe2ae189e74 100644 --- a/perception/autoware_traffic_light_occlusion_predictor/package.xml +++ b/perception/autoware_traffic_light_occlusion_predictor/package.xml @@ -15,6 +15,7 @@ autoware_lanelet2_extension autoware_map_msgs + autoware_traffic_light_utils autoware_universe_utils geometry_msgs image_geometry @@ -27,7 +28,6 @@ tf2_eigen tf2_ros tier4_perception_msgs - traffic_light_utils ament_lint_auto autoware_lint_common diff --git a/perception/autoware_traffic_light_occlusion_predictor/src/node.cpp b/perception/autoware_traffic_light_occlusion_predictor/src/node.cpp index 8bc11fdea2aad..16498eb4d7094 100644 --- a/perception/autoware_traffic_light_occlusion_predictor/src/node.cpp +++ b/perception/autoware_traffic_light_occlusion_predictor/src/node.cpp @@ -117,7 +117,8 @@ void TrafficLightOcclusionPredictorNode::mapCallback( continue; } lanelet::ConstLineString3d string3d = static_cast(lsp); - traffic_light_position_map_[lsp.id()] = traffic_light_utils::getTrafficLightCenter(string3d); + traffic_light_position_map_[lsp.id()] = + autoware::traffic_light_utils::getTrafficLightCenter(string3d); } } } @@ -166,7 +167,7 @@ void TrafficLightOcclusionPredictorNode::syncCallback( out_msg_.signals.push_back(in_signal_msg->signals.at(i)); if (occlusion_ratios[i] >= config_.max_occlusion_ratio) { - traffic_light_utils::setSignalUnknown(out_msg_.signals.at(predicted_num + i), 0.0); + autoware::traffic_light_utils::setSignalUnknown(out_msg_.signals.at(predicted_num + i), 0.0); } } diff --git a/perception/autoware_traffic_light_occlusion_predictor/src/node.hpp b/perception/autoware_traffic_light_occlusion_predictor/src/node.hpp index 5ee4876a6abbf..bc3afcac8db13 100644 --- a/perception/autoware_traffic_light_occlusion_predictor/src/node.hpp +++ b/perception/autoware_traffic_light_occlusion_predictor/src/node.hpp @@ -17,9 +17,9 @@ #include "occlusion_predictor.hpp" +#include #include #include -#include #include #include diff --git a/planning/behavior_path_planner/autoware_behavior_path_planner_common/package.xml b/planning/behavior_path_planner/autoware_behavior_path_planner_common/package.xml index dea42c692b880..5b925bd5ffd8e 100644 --- a/planning/behavior_path_planner/autoware_behavior_path_planner_common/package.xml +++ b/planning/behavior_path_planner/autoware_behavior_path_planner_common/package.xml @@ -54,6 +54,7 @@ autoware_planning_msgs autoware_route_handler autoware_rtc_interface + autoware_traffic_light_utils autoware_universe_utils autoware_vehicle_info_utils geometry_msgs @@ -61,7 +62,6 @@ rclcpp tf2 tier4_planning_msgs - traffic_light_utils visualization_msgs ament_cmake_ros diff --git a/planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/traffic_light_utils.cpp b/planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/traffic_light_utils.cpp index 14332d953819e..19c9bbcf365a3 100644 --- a/planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/traffic_light_utils.cpp +++ b/planning/behavior_path_planner/autoware_behavior_path_planner_common/src/utils/traffic_light_utils.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include namespace autoware::behavior_path_planner::utils::traffic_light { @@ -91,7 +91,7 @@ std::optional calcDistanceToRedTrafficLight( continue; } - if (!traffic_light_utils::isTrafficSignalStop( + if (!autoware::traffic_light_utils::isTrafficSignalStop( lanelet, traffic_signal_stamped.value().signal)) { continue; } @@ -143,7 +143,7 @@ bool isTrafficSignalStop( continue; } - if (traffic_light_utils::isTrafficSignalStop( + if (autoware::traffic_light_utils::isTrafficSignalStop( lanelet, traffic_signal_stamped.value().signal)) { return true; } diff --git a/planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/package.xml b/planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/package.xml index 9cff5fb92b54b..244d03553351b 100644 --- a/planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/package.xml +++ b/planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/package.xml @@ -25,6 +25,7 @@ autoware_perception_msgs autoware_planning_msgs autoware_route_handler + autoware_traffic_light_utils autoware_universe_utils eigen geometry_msgs @@ -34,7 +35,6 @@ tf2_eigen tf2_geometry_msgs tier4_planning_msgs - traffic_light_utils visualization_msgs ament_cmake_ros diff --git a/planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/src/scene.cpp b/planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/src/scene.cpp index 4b17f95358be6..c59071f2043bb 100644 --- a/planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/src/scene.cpp +++ b/planning/behavior_velocity_planner/autoware_behavior_velocity_traffic_light_module/src/scene.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include @@ -177,7 +177,7 @@ bool TrafficLightModule::isStopSignal() } // Check if the current traffic signal state requires stopping - return traffic_light_utils::isTrafficSignalStop(lane_, looking_tl_state_); + return autoware::traffic_light_utils::isTrafficSignalStop(lane_, looking_tl_state_); } void TrafficLightModule::updateTrafficSignal() diff --git a/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/package.xml b/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/package.xml index 6c8122e816555..18e072191905e 100644 --- a/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/package.xml +++ b/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/package.xml @@ -21,6 +21,7 @@ autoware_perception_msgs autoware_planning_msgs autoware_route_handler + autoware_traffic_light_utils autoware_universe_utils autoware_vehicle_info_utils geometry_msgs @@ -29,7 +30,6 @@ rclcpp tf2 tier4_planning_msgs - traffic_light_utils visualization_msgs ament_cmake_ros diff --git a/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/src/filter_predicted_objects.cpp b/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/src/filter_predicted_objects.cpp index 652e941e905e4..f9ba7f4af9877 100644 --- a/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/src/filter_predicted_objects.cpp +++ b/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/src/filter_predicted_objects.cpp @@ -15,8 +15,8 @@ #include "filter_predicted_objects.hpp" #include +#include #include -#include #include #include diff --git a/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/src/out_of_lane_module.cpp b/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/src/out_of_lane_module.cpp index 03a8468d19b3a..63ca1b5784fe8 100644 --- a/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/src/out_of_lane_module.cpp +++ b/planning/motion_velocity_planner/autoware_motion_velocity_out_of_lane_module/src/out_of_lane_module.cpp @@ -26,11 +26,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include @@ -179,7 +179,8 @@ void prepare_stop_lines_rtree( const auto traffic_signal_stamped = planner_data.get_traffic_signal(element->id()); if ( traffic_signal_stamped.has_value() && element->stopLine().has_value() && - traffic_light_utils::isTrafficSignalStop(ll, traffic_signal_stamped.value().signal)) { + autoware::traffic_light_utils::isTrafficSignalStop( + ll, traffic_signal_stamped.value().signal)) { stop_line_node.second.stop_line.clear(); for (const auto & p : element->stopLine()->basicLineString()) { stop_line_node.second.stop_line.emplace_back(p.x(), p.y());