From 1f9ebbc2dd99467bfec82e9570876c8b5d9338cd Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Mon, 24 Jun 2024 10:57:58 +0900 Subject: [PATCH 1/9] refactor: update include paths for object association modules Signed-off-by: Taekjin LEE --- perception/object_merger/CMakeLists.txt | 16 ++-- .../data_association/data_association.hpp | 21 +++--- .../data_association/solver/gnn_solver.hpp | 11 ++- .../solver/gnn_solver_interface.hpp | 6 +- .../solver/mu_successive_shortest_path.hpp | 8 +- .../solver/successive_shortest_path.hpp | 8 +- .../{ => autoware}/object_merger/node.hpp | 20 ++--- .../include/object_merger/utils/utils.hpp | 73 ------------------- .../data_association/data_association.cpp | 5 +- .../mu_successive_shortest_path_wrapper.cpp | 2 +- .../successive_shortest_path.cpp | 2 +- .../{object_association_merger => }/node.cpp | 18 ++--- 12 files changed, 58 insertions(+), 132 deletions(-) rename perception/object_merger/include/{ => autoware}/object_merger/data_association/data_association.hpp (82%) rename perception/object_merger/include/{ => autoware}/object_merger/data_association/solver/gnn_solver.hpp (57%) rename perception/object_merger/include/{ => autoware}/object_merger/data_association/solver/gnn_solver_interface.hpp (79%) rename perception/object_merger/include/{ => autoware}/object_merger/data_association/solver/mu_successive_shortest_path.hpp (73%) rename perception/object_merger/include/{ => autoware}/object_merger/data_association/solver/successive_shortest_path.hpp (73%) rename perception/object_merger/include/{ => autoware}/object_merger/node.hpp (85%) delete mode 100644 perception/object_merger/include/object_merger/utils/utils.hpp rename perception/object_merger/src/{object_association_merger => }/data_association/data_association.cpp (97%) rename perception/object_merger/src/{object_association_merger => }/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp (92%) rename perception/object_merger/src/{object_association_merger => }/data_association/successive_shortest_path/successive_shortest_path.cpp (99%) rename perception/object_merger/src/{object_association_merger => }/node.cpp (97%) diff --git a/perception/object_merger/CMakeLists.txt b/perception/object_merger/CMakeLists.txt index b02983db11af3..7de962e46bd2b 100644 --- a/perception/object_merger/CMakeLists.txt +++ b/perception/object_merger/CMakeLists.txt @@ -18,19 +18,19 @@ include_directories( ${EIGEN3_INCLUDE_DIR} ) -ament_auto_add_library(object_association_merger SHARED - src/object_association_merger/data_association/data_association.cpp - src/object_association_merger/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp - src/object_association_merger/node.cpp +ament_auto_add_library(${PROJECT_NAME} SHARED + src/data_association/data_association.cpp + src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp + src/node.cpp ) -target_link_libraries(object_association_merger +target_link_libraries(${PROJECT_NAME} Eigen3::Eigen ) -rclcpp_components_register_node(object_association_merger - PLUGIN "object_association::ObjectAssociationMergerNode" - EXECUTABLE object_association_merger_node +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN "autoware::object_merger::ObjectAssociationMergerNode" + EXECUTABLE ${PROJECT_NAME}_node ) ament_auto_package(INSTALL_TO_SHARE diff --git a/perception/object_merger/include/object_merger/data_association/data_association.hpp b/perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp similarity index 82% rename from perception/object_merger/include/object_merger/data_association/data_association.hpp rename to perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp index f8eec33f4a71e..23251e9b3996f 100644 --- a/perception/object_merger/include/object_merger/data_association/data_association.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp @@ -16,21 +16,22 @@ // Author: v1.0 Yukihiro Saito // -#ifndef OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ -#define OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ - -#include -#include -#include -#include +#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ +#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ #define EIGEN_MPL2_ONLY -#include "object_merger/data_association/solver/gnn_solver.hpp" + +#include "autoware/object_merger/data_association/solver/gnn_solver.hpp" #include #include -#include +#include "autoware_perception_msgs/msg/detected_objects.hpp" + +#include +#include +#include +#include class DataAssociation { @@ -56,4 +57,4 @@ class DataAssociation virtual ~DataAssociation() {} }; -#endif // OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ diff --git a/perception/object_merger/include/object_merger/data_association/solver/gnn_solver.hpp b/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver.hpp similarity index 57% rename from perception/object_merger/include/object_merger/data_association/solver/gnn_solver.hpp rename to perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver.hpp index cead11d516421..d800c92f4c768 100644 --- a/perception/object_merger/include/object_merger/data_association/solver/gnn_solver.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver.hpp @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ -#define OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ -#include "object_merger/data_association/solver/gnn_solver_interface.hpp" -#include "object_merger/data_association/solver/mu_successive_shortest_path.hpp" -#include "object_merger/data_association/solver/successive_shortest_path.hpp" +#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp" +#include "autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp" -#endif // OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ diff --git a/perception/object_merger/include/object_merger/data_association/solver/gnn_solver_interface.hpp b/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp similarity index 79% rename from perception/object_merger/include/object_merger/data_association/solver/gnn_solver_interface.hpp rename to perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp index 447f4fa2b7ce3..95e6c5531575c 100644 --- a/perception/object_merger/include/object_merger/data_association/solver/gnn_solver_interface.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ -#define OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ #include #include @@ -32,4 +32,4 @@ class GnnSolverInterface }; } // namespace gnn_solver -#endif // OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ diff --git a/perception/object_merger/include/object_merger/data_association/solver/mu_successive_shortest_path.hpp b/perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp similarity index 73% rename from perception/object_merger/include/object_merger/data_association/solver/mu_successive_shortest_path.hpp rename to perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp index 0464a29e6b2e5..d433b10650195 100644 --- a/perception/object_merger/include/object_merger/data_association/solver/mu_successive_shortest_path.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ -#define OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ +#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ -#include "object_merger/data_association/solver/gnn_solver_interface.hpp" +#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp" #include #include @@ -34,4 +34,4 @@ class MuSSP : public GnnSolverInterface }; } // namespace gnn_solver -#endif // OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ diff --git a/perception/object_merger/include/object_merger/data_association/solver/successive_shortest_path.hpp b/perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp similarity index 73% rename from perception/object_merger/include/object_merger/data_association/solver/successive_shortest_path.hpp rename to perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp index 618879a01866f..51f4c04ebff00 100644 --- a/perception/object_merger/include/object_merger/data_association/solver/successive_shortest_path.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ -#define OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ +#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ -#include "object_merger/data_association/solver/gnn_solver_interface.hpp" +#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp" #include #include @@ -34,4 +34,4 @@ class SSP : public GnnSolverInterface }; } // namespace gnn_solver -#endif // OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ diff --git a/perception/object_merger/include/object_merger/node.hpp b/perception/object_merger/include/autoware/object_merger/node.hpp similarity index 85% rename from perception/object_merger/include/object_merger/node.hpp rename to perception/object_merger/include/autoware/object_merger/node.hpp index 2f5918a9c7f17..4016bd2cd4a60 100644 --- a/perception/object_merger/include/object_merger/node.hpp +++ b/perception/object_merger/include/autoware/object_merger/node.hpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef OBJECT_MERGER__NODE_HPP_ -#define OBJECT_MERGER__NODE_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__NODE_HPP_ +#define AUTOWARE__OBJECT_MERGER__NODE_HPP_ -#include "object_merger/data_association/data_association.hpp" +#include "autoware/object_merger/data_association/data_association.hpp" +#include "autoware/universe_utils/ros/debug_publisher.hpp" +#include "autoware/universe_utils/ros/published_time_publisher.hpp" +#include "autoware/universe_utils/system/stop_watch.hpp" -#include -#include -#include #include -#include +#include "autoware_perception_msgs/msg/detected_objects.hpp" #include #include @@ -45,7 +45,7 @@ #include #include -namespace object_association +namespace autoware::object_merger { class ObjectAssociationMergerNode : public rclcpp::Node { @@ -89,6 +89,6 @@ class ObjectAssociationMergerNode : public rclcpp::Node std::unique_ptr published_time_publisher_; }; -} // namespace object_association +} // namespace autoware::object_merger -#endif // OBJECT_MERGER__NODE_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__NODE_HPP_ diff --git a/perception/object_merger/include/object_merger/utils/utils.hpp b/perception/object_merger/include/object_merger/utils/utils.hpp deleted file mode 100644 index bb167cbe20bd6..0000000000000 --- a/perception/object_merger/include/object_merger/utils/utils.hpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2020 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. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -// Author: v1.0 Yukihiro Saito -// - -#ifndef OBJECT_MERGER__UTILS__UTILS_HPP_ -#define OBJECT_MERGER__UTILS__UTILS_HPP_ - -#include -#include -#include -#include - -#include -#include -#include - -namespace utils -{ -enum MSG_COV_IDX { - X_X = 0, - X_Y = 1, - X_Z = 2, - X_ROLL = 3, - X_PITCH = 4, - X_YAW = 5, - Y_X = 6, - Y_Y = 7, - Y_Z = 8, - Y_ROLL = 9, - Y_PITCH = 10, - Y_YAW = 11, - Z_X = 12, - Z_Y = 13, - Z_Z = 14, - Z_ROLL = 15, - Z_PITCH = 16, - Z_YAW = 17, - ROLL_X = 18, - ROLL_Y = 19, - ROLL_Z = 20, - ROLL_ROLL = 21, - ROLL_PITCH = 22, - ROLL_YAW = 23, - PITCH_X = 24, - PITCH_Y = 25, - PITCH_Z = 26, - PITCH_ROLL = 27, - PITCH_PITCH = 28, - PITCH_YAW = 29, - YAW_X = 30, - YAW_Y = 31, - YAW_Z = 32, - YAW_ROLL = 33, - YAW_PITCH = 34, - YAW_YAW = 35 -}; -} // namespace utils - -#endif // OBJECT_MERGER__UTILS__UTILS_HPP_ diff --git a/perception/object_merger/src/object_association_merger/data_association/data_association.cpp b/perception/object_merger/src/data_association/data_association.cpp similarity index 97% rename from perception/object_merger/src/object_association_merger/data_association/data_association.cpp rename to perception/object_merger/src/data_association/data_association.cpp index c32fe480ff4af..69820e5cc5972 100644 --- a/perception/object_merger/src/object_association_merger/data_association/data_association.cpp +++ b/perception/object_merger/src/data_association/data_association.cpp @@ -12,11 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "object_merger/data_association/data_association.hpp" +#include "autoware/object_merger/data_association/data_association.hpp" +#include "autoware/object_merger/data_association/solver/gnn_solver.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" -#include "object_merger/data_association/solver/gnn_solver.hpp" -#include "object_merger/utils/utils.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" #include diff --git a/perception/object_merger/src/object_association_merger/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp b/perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp similarity index 92% rename from perception/object_merger/src/object_association_merger/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp rename to perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp index e7fa56fee88c5..3bc8160b3ea27 100644 --- a/perception/object_merger/src/object_association_merger/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp +++ b/perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "object_merger/data_association/solver/mu_successive_shortest_path.hpp" +#include "autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp" #include diff --git a/perception/object_merger/src/object_association_merger/data_association/successive_shortest_path/successive_shortest_path.cpp b/perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp similarity index 99% rename from perception/object_merger/src/object_association_merger/data_association/successive_shortest_path/successive_shortest_path.cpp rename to perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp index b38257d0188e0..93b98f2015ff8 100644 --- a/perception/object_merger/src/object_association_merger/data_association/successive_shortest_path/successive_shortest_path.cpp +++ b/perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "object_merger/data_association/solver/successive_shortest_path.hpp" +#include "autoware/object_merger/data_association/solver/successive_shortest_path.hpp" #include #include diff --git a/perception/object_merger/src/object_association_merger/node.cpp b/perception/object_merger/src/node.cpp similarity index 97% rename from perception/object_merger/src/object_association_merger/node.cpp rename to perception/object_merger/src/node.cpp index 2b806382382cf..175df7a5a7301 100644 --- a/perception/object_merger/src/object_association_merger/node.cpp +++ b/perception/object_merger/src/node.cpp @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "object_merger/node.hpp" +#define EIGEN_MPL2_ONLY + +#include "autoware/object_merger/node.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" -#include "object_merger/utils/utils.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" +#include +#include + #include #include #include -#define EIGEN_MPL2_ONLY -#include -#include - using Label = autoware_perception_msgs::msg::ObjectClassification; namespace @@ -70,7 +70,7 @@ std::map convertListToClassMap(const std::vector & distance } } // namespace -namespace object_association +namespace autoware::object_merger { ObjectAssociationMergerNode::ObjectAssociationMergerNode(const rclcpp::NodeOptions & node_options) : rclcpp::Node("object_association_merger_node", node_options), @@ -231,7 +231,7 @@ void ObjectAssociationMergerNode::objectsCallback( processing_time_publisher_->publish( "debug/processing_time_ms", stop_watch_ptr_->toc("processing_time", true)); } -} // namespace object_association +} // namespace autoware::object_merger #include -RCLCPP_COMPONENTS_REGISTER_NODE(object_association::ObjectAssociationMergerNode) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::object_merger::ObjectAssociationMergerNode) From 6ba7ad0d154f0180c97228842b3c2ebdda26d288 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Mon, 24 Jun 2024 11:14:59 +0900 Subject: [PATCH 2/9] refactor: update include paths for object association modules Signed-off-by: Taekjin LEE --- perception/object_merger/CMakeLists.txt | 2 +- .../object_merger/data_association/data_association.hpp | 7 ++++++- .../data_association/solver/gnn_solver_interface.hpp | 4 ++-- .../solver/mu_successive_shortest_path.hpp | 4 ++-- .../data_association/solver/successive_shortest_path.hpp | 4 ++-- .../src/data_association/data_association.cpp | 7 ++++++- .../mu_successive_shortest_path_wrapper.cpp | 4 ++-- .../successive_shortest_path/successive_shortest_path.cpp | 4 ++-- perception/object_merger/src/node.cpp | 2 +- 9 files changed, 24 insertions(+), 14 deletions(-) diff --git a/perception/object_merger/CMakeLists.txt b/perception/object_merger/CMakeLists.txt index 7de962e46bd2b..a4ee2d83c9f23 100644 --- a/perception/object_merger/CMakeLists.txt +++ b/perception/object_merger/CMakeLists.txt @@ -30,7 +30,7 @@ target_link_libraries(${PROJECT_NAME} rclcpp_components_register_node(${PROJECT_NAME} PLUGIN "autoware::object_merger::ObjectAssociationMergerNode" - EXECUTABLE ${PROJECT_NAME}_node + EXECUTABLE object_association_merger_node ) ament_auto_package(INSTALL_TO_SHARE diff --git a/perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp b/perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp index 23251e9b3996f..9679ddb0c45d0 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp @@ -33,6 +33,9 @@ #include #include +namespace autoware::object_merger +{ + class DataAssociation { private: @@ -41,7 +44,7 @@ class DataAssociation Eigen::MatrixXd max_rad_matrix_; Eigen::MatrixXd min_iou_matrix_; const double score_threshold_; - std::unique_ptr gnn_solver_ptr_; + std::unique_ptr gnn_solver_ptr_; public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW @@ -57,4 +60,6 @@ class DataAssociation virtual ~DataAssociation() {} }; +} // namespace autoware::object_merger + #endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp b/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp index 95e6c5531575c..6b1c5f43e051d 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp @@ -18,7 +18,7 @@ #include #include -namespace gnn_solver +namespace autoware::object_merger::gnn_solver { class GnnSolverInterface { @@ -30,6 +30,6 @@ class GnnSolverInterface const std::vector> & cost, std::unordered_map * direct_assignment, std::unordered_map * reverse_assignment) = 0; }; -} // namespace gnn_solver +} // namespace autoware::object_merger::gnn_solver #endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp b/perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp index d433b10650195..fd676862bc0f2 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp @@ -20,7 +20,7 @@ #include #include -namespace gnn_solver +namespace autoware::object_merger::gnn_solver { class MuSSP : public GnnSolverInterface { @@ -32,6 +32,6 @@ class MuSSP : public GnnSolverInterface const std::vector> & cost, std::unordered_map * direct_assignment, std::unordered_map * reverse_assignment) override; }; -} // namespace gnn_solver +} // namespace autoware::object_merger::gnn_solver #endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp b/perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp index 51f4c04ebff00..0ee05c9ca3ec1 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp +++ b/perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp @@ -20,7 +20,7 @@ #include #include -namespace gnn_solver +namespace autoware::object_merger::gnn_solver { class SSP : public GnnSolverInterface { @@ -32,6 +32,6 @@ class SSP : public GnnSolverInterface const std::vector> & cost, std::unordered_map * direct_assignment, std::unordered_map * reverse_assignment) override; }; -} // namespace gnn_solver +} // namespace autoware::object_merger::gnn_solver #endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ diff --git a/perception/object_merger/src/data_association/data_association.cpp b/perception/object_merger/src/data_association/data_association.cpp index 69820e5cc5972..d9f88d131c717 100644 --- a/perception/object_merger/src/data_association/data_association.cpp +++ b/perception/object_merger/src/data_association/data_association.cpp @@ -46,6 +46,9 @@ double getFormedYawAngle( } } // namespace +namespace autoware::object_merger +{ + DataAssociation::DataAssociation( std::vector can_assign_vector, std::vector max_dist_vector, std::vector max_rad_vector, std::vector min_iou_vector) @@ -76,7 +79,7 @@ DataAssociation::DataAssociation( min_iou_matrix_ = min_iou_matrix_tmp.transpose(); } - gnn_solver_ptr_ = std::make_unique(); + gnn_solver_ptr_ = std::make_unique(); } void DataAssociation::assign( @@ -171,3 +174,5 @@ Eigen::MatrixXd DataAssociation::calcScoreMatrix( return score_matrix; } + +} // namespace autoware::object_merger diff --git a/perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp b/perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp index 3bc8160b3ea27..76f137014d491 100644 --- a/perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp +++ b/perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp @@ -24,7 +24,7 @@ #include #include -namespace gnn_solver +namespace autoware::object_merger::gnn_solver { void MuSSP::maximizeLinearAssignment( const std::vector> & cost, std::unordered_map * direct_assignment, @@ -38,4 +38,4 @@ void MuSSP::maximizeLinearAssignment( // Solve DA by muSSP solve_muSSP(cost, direct_assignment, reverse_assignment); } -} // namespace gnn_solver +} // namespace autoware::object_merger::gnn_solver diff --git a/perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp b/perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp index 93b98f2015ff8..579fe77e1da24 100644 --- a/perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp +++ b/perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp @@ -22,7 +22,7 @@ #include #include -namespace gnn_solver +namespace autoware::object_merger::gnn_solver { struct ResidualEdge { @@ -367,4 +367,4 @@ void SSP::maximizeLinearAssignment( } #endif } -} // namespace gnn_solver +} // namespace autoware::object_merger::gnn_solver diff --git a/perception/object_merger/src/node.cpp b/perception/object_merger/src/node.cpp index 175df7a5a7301..88c247e43fcf8 100644 --- a/perception/object_merger/src/node.cpp +++ b/perception/object_merger/src/node.cpp @@ -104,7 +104,7 @@ ObjectAssociationMergerNode::ObjectAssociationMergerNode(const rclcpp::NodeOptio const auto max_dist_matrix = this->declare_parameter>("max_dist_matrix"); const auto max_rad_matrix = this->declare_parameter>("max_rad_matrix"); const auto min_iou_matrix = this->declare_parameter>("min_iou_matrix"); - data_association_ = std::make_unique( + data_association_ = std::make_unique( can_assign_matrix, max_dist_matrix, max_rad_matrix, min_iou_matrix); // Create publishers and subscribers From 77c22f189cc05f324dc89e003c4d57ac4d823484 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Mon, 24 Jun 2024 16:55:14 +0900 Subject: [PATCH 3/9] refactor: rename node.hpp to object_association_merger_node.hpp Signed-off-by: Taekjin LEE --- perception/object_merger/CMakeLists.txt | 2 +- .../{node.hpp => object_association_merger_node.hpp} | 6 +++--- .../src/{node.cpp => object_association_merger_node.cpp} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename perception/object_merger/include/autoware/object_merger/{node.hpp => object_association_merger_node.hpp} (94%) rename perception/object_merger/src/{node.cpp => object_association_merger_node.cpp} (99%) diff --git a/perception/object_merger/CMakeLists.txt b/perception/object_merger/CMakeLists.txt index a4ee2d83c9f23..13a92152561bb 100644 --- a/perception/object_merger/CMakeLists.txt +++ b/perception/object_merger/CMakeLists.txt @@ -21,7 +21,7 @@ include_directories( ament_auto_add_library(${PROJECT_NAME} SHARED src/data_association/data_association.cpp src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp - src/node.cpp + src/object_association_merger_node.cpp ) target_link_libraries(${PROJECT_NAME} diff --git a/perception/object_merger/include/autoware/object_merger/node.hpp b/perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp similarity index 94% rename from perception/object_merger/include/autoware/object_merger/node.hpp rename to perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp index 4016bd2cd4a60..55e49f2804f2f 100644 --- a/perception/object_merger/include/autoware/object_merger/node.hpp +++ b/perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__NODE_HPP_ -#define AUTOWARE__OBJECT_MERGER__NODE_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ +#define AUTOWARE__OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ #include "autoware/object_merger/data_association/data_association.hpp" #include "autoware/universe_utils/ros/debug_publisher.hpp" @@ -91,4 +91,4 @@ class ObjectAssociationMergerNode : public rclcpp::Node }; } // namespace autoware::object_merger -#endif // AUTOWARE__OBJECT_MERGER__NODE_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ diff --git a/perception/object_merger/src/node.cpp b/perception/object_merger/src/object_association_merger_node.cpp similarity index 99% rename from perception/object_merger/src/node.cpp rename to perception/object_merger/src/object_association_merger_node.cpp index 88c247e43fcf8..328ab81a5fea5 100644 --- a/perception/object_merger/src/node.cpp +++ b/perception/object_merger/src/object_association_merger_node.cpp @@ -14,7 +14,7 @@ #define EIGEN_MPL2_ONLY -#include "autoware/object_merger/node.hpp" +#include "autoware/object_merger/object_association_merger_node.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" From 438db023178e1b866f49abc7cc831efb599439bc Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Mon, 24 Jun 2024 18:09:05 +0900 Subject: [PATCH 4/9] refactor: update include paths for object association modules Signed-off-by: Taekjin LEE --- perception/object_merger/CMakeLists.txt | 2 +- .../data_association.hpp | 8 ++++---- .../solver/gnn_solver.hpp | 10 +++++----- .../solver/gnn_solver_interface.hpp | 6 +++--- .../solver/mu_ssp.hpp} | 8 ++++---- .../solver/ssp.hpp} | 8 ++++---- .../object_merger/object_association_merger_node.hpp | 2 +- .../src/data_association/data_association.cpp | 4 ++-- .../mu_successive_shortest_path_wrapper.cpp | 2 +- .../successive_shortest_path.cpp | 2 +- 10 files changed, 26 insertions(+), 26 deletions(-) rename perception/object_merger/include/autoware/object_merger/{data_association => association}/data_association.hpp (85%) rename perception/object_merger/include/autoware/object_merger/{data_association => association}/solver/gnn_solver.hpp (59%) rename perception/object_merger/include/autoware/object_merger/{data_association => association}/solver/gnn_solver_interface.hpp (80%) rename perception/object_merger/include/autoware/object_merger/{data_association/solver/mu_successive_shortest_path.hpp => association/solver/mu_ssp.hpp} (74%) rename perception/object_merger/include/autoware/object_merger/{data_association/solver/successive_shortest_path.hpp => association/solver/ssp.hpp} (74%) rename perception/object_merger/src/data_association/{mu_successive_shortest_path => mu_ssp}/mu_successive_shortest_path_wrapper.cpp (93%) rename perception/object_merger/src/data_association/{successive_shortest_path => ssp}/successive_shortest_path.cpp (99%) diff --git a/perception/object_merger/CMakeLists.txt b/perception/object_merger/CMakeLists.txt index 13a92152561bb..cc58676e7eee7 100644 --- a/perception/object_merger/CMakeLists.txt +++ b/perception/object_merger/CMakeLists.txt @@ -20,7 +20,7 @@ include_directories( ament_auto_add_library(${PROJECT_NAME} SHARED src/data_association/data_association.cpp - src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp + src/data_association/mu_ssp/mu_successive_shortest_path_wrapper.cpp src/object_association_merger_node.cpp ) diff --git a/perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp b/perception/object_merger/include/autoware/object_merger/association/data_association.hpp similarity index 85% rename from perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp rename to perception/object_merger/include/autoware/object_merger/association/data_association.hpp index 9679ddb0c45d0..16e154c83842b 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/data_association.hpp +++ b/perception/object_merger/include/autoware/object_merger/association/data_association.hpp @@ -16,12 +16,12 @@ // Author: v1.0 Yukihiro Saito // -#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ -#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ +#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ #define EIGEN_MPL2_ONLY -#include "autoware/object_merger/data_association/solver/gnn_solver.hpp" +#include "autoware/object_merger/association/solver/gnn_solver.hpp" #include #include @@ -62,4 +62,4 @@ class DataAssociation } // namespace autoware::object_merger -#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver.hpp b/perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver.hpp similarity index 59% rename from perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver.hpp rename to perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver.hpp index d800c92f4c768..0536d7bcd7acb 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver.hpp +++ b/perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver.hpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ -#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ -#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp" -#include "autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp" +#include "autoware/object_merger/association/solver/gnn_solver_interface.hpp" +#include "autoware/object_merger/association/solver/mu_ssp.hpp" -#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp b/perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver_interface.hpp similarity index 80% rename from perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp rename to perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver_interface.hpp index 6b1c5f43e051d..75f45b6eb5f3b 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/solver/gnn_solver_interface.hpp +++ b/perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver_interface.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ -#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ #include #include @@ -32,4 +32,4 @@ class GnnSolverInterface }; } // namespace autoware::object_merger::gnn_solver -#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp b/perception/object_merger/include/autoware/object_merger/association/solver/mu_ssp.hpp similarity index 74% rename from perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp rename to perception/object_merger/include/autoware/object_merger/association/solver/mu_ssp.hpp index fd676862bc0f2..4d8075874cbca 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp +++ b/perception/object_merger/include/autoware/object_merger/association/solver/mu_ssp.hpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ -#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ +#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ -#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp" +#include "autoware/object_merger/association/solver/gnn_solver_interface.hpp" #include #include @@ -34,4 +34,4 @@ class MuSSP : public GnnSolverInterface }; } // namespace autoware::object_merger::gnn_solver -#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp b/perception/object_merger/include/autoware/object_merger/association/solver/ssp.hpp similarity index 74% rename from perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp rename to perception/object_merger/include/autoware/object_merger/association/solver/ssp.hpp index 0ee05c9ca3ec1..94563981de011 100644 --- a/perception/object_merger/include/autoware/object_merger/data_association/solver/successive_shortest_path.hpp +++ b/perception/object_merger/include/autoware/object_merger/association/solver/ssp.hpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ -#define AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ +#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ +#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ -#include "autoware/object_merger/data_association/solver/gnn_solver_interface.hpp" +#include "autoware/object_merger/association/solver/gnn_solver_interface.hpp" #include #include @@ -34,4 +34,4 @@ class SSP : public GnnSolverInterface }; } // namespace autoware::object_merger::gnn_solver -#endif // AUTOWARE__OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ +#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp b/perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp index 55e49f2804f2f..3810bda7dc861 100644 --- a/perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp +++ b/perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp @@ -15,7 +15,7 @@ #ifndef AUTOWARE__OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ #define AUTOWARE__OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ -#include "autoware/object_merger/data_association/data_association.hpp" +#include "autoware/object_merger/association/data_association.hpp" #include "autoware/universe_utils/ros/debug_publisher.hpp" #include "autoware/universe_utils/ros/published_time_publisher.hpp" #include "autoware/universe_utils/system/stop_watch.hpp" diff --git a/perception/object_merger/src/data_association/data_association.cpp b/perception/object_merger/src/data_association/data_association.cpp index d9f88d131c717..8666064d62d05 100644 --- a/perception/object_merger/src/data_association/data_association.cpp +++ b/perception/object_merger/src/data_association/data_association.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "autoware/object_merger/data_association/data_association.hpp" +#include "autoware/object_merger/association/data_association.hpp" -#include "autoware/object_merger/data_association/solver/gnn_solver.hpp" +#include "autoware/object_merger/association/solver/gnn_solver.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" diff --git a/perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp b/perception/object_merger/src/data_association/mu_ssp/mu_successive_shortest_path_wrapper.cpp similarity index 93% rename from perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp rename to perception/object_merger/src/data_association/mu_ssp/mu_successive_shortest_path_wrapper.cpp index 76f137014d491..f852cfb62d419 100644 --- a/perception/object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp +++ b/perception/object_merger/src/data_association/mu_ssp/mu_successive_shortest_path_wrapper.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "autoware/object_merger/data_association/solver/mu_successive_shortest_path.hpp" +#include "autoware/object_merger/association/solver/mu_ssp.hpp" #include diff --git a/perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp b/perception/object_merger/src/data_association/ssp/successive_shortest_path.cpp similarity index 99% rename from perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp rename to perception/object_merger/src/data_association/ssp/successive_shortest_path.cpp index 579fe77e1da24..ba5cb66125627 100644 --- a/perception/object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp +++ b/perception/object_merger/src/data_association/ssp/successive_shortest_path.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "autoware/object_merger/data_association/solver/successive_shortest_path.hpp" +#include "autoware/object_merger/association/solver/ssp.hpp" #include #include From 7da3d82aeafcddd9974f0f534923af6f7d3f81ff Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Tue, 25 Jun 2024 17:27:21 +0900 Subject: [PATCH 5/9] refactor: update include paths for object association modules Signed-off-by: Taekjin LEE --- perception/object_merger/CMakeLists.txt | 4 ++-- .../{data_association => association}/data_association.cpp | 0 .../solver}/mu_successive_shortest_path_wrapper.cpp | 0 .../ssp => association/solver}/successive_shortest_path.cpp | 0 4 files changed, 2 insertions(+), 2 deletions(-) rename perception/object_merger/src/{data_association => association}/data_association.cpp (100%) rename perception/object_merger/src/{data_association/mu_ssp => association/solver}/mu_successive_shortest_path_wrapper.cpp (100%) rename perception/object_merger/src/{data_association/ssp => association/solver}/successive_shortest_path.cpp (100%) diff --git a/perception/object_merger/CMakeLists.txt b/perception/object_merger/CMakeLists.txt index cc58676e7eee7..2d9b490945caf 100644 --- a/perception/object_merger/CMakeLists.txt +++ b/perception/object_merger/CMakeLists.txt @@ -19,8 +19,8 @@ include_directories( ) ament_auto_add_library(${PROJECT_NAME} SHARED - src/data_association/data_association.cpp - src/data_association/mu_ssp/mu_successive_shortest_path_wrapper.cpp + src/association/data_association.cpp + src/association/solver/mu_successive_shortest_path_wrapper.cpp src/object_association_merger_node.cpp ) diff --git a/perception/object_merger/src/data_association/data_association.cpp b/perception/object_merger/src/association/data_association.cpp similarity index 100% rename from perception/object_merger/src/data_association/data_association.cpp rename to perception/object_merger/src/association/data_association.cpp diff --git a/perception/object_merger/src/data_association/mu_ssp/mu_successive_shortest_path_wrapper.cpp b/perception/object_merger/src/association/solver/mu_successive_shortest_path_wrapper.cpp similarity index 100% rename from perception/object_merger/src/data_association/mu_ssp/mu_successive_shortest_path_wrapper.cpp rename to perception/object_merger/src/association/solver/mu_successive_shortest_path_wrapper.cpp diff --git a/perception/object_merger/src/data_association/ssp/successive_shortest_path.cpp b/perception/object_merger/src/association/solver/successive_shortest_path.cpp similarity index 100% rename from perception/object_merger/src/data_association/ssp/successive_shortest_path.cpp rename to perception/object_merger/src/association/solver/successive_shortest_path.cpp From fa72dcd71e45942475deed3df6e8b6537c9b4a99 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Tue, 25 Jun 2024 17:47:51 +0900 Subject: [PATCH 6/9] refactor: remove unused dependency in package.xml Signed-off-by: Taekjin LEE --- perception/object_merger/package.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/perception/object_merger/package.xml b/perception/object_merger/package.xml index 0340a477936b8..5ca261b3ddf0e 100644 --- a/perception/object_merger/package.xml +++ b/perception/object_merger/package.xml @@ -22,7 +22,6 @@ rclcpp_components tf2 tf2_ros - tier4_perception_msgs ament_lint_auto autoware_lint_common From a46b0987cb7939be060717b9e503c0718bda8555 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Tue, 25 Jun 2024 18:15:27 +0900 Subject: [PATCH 7/9] refactor: update include paths for object association modules Signed-off-by: Taekjin LEE --- .../association/data_association.hpp | 8 ++++---- .../association/solver/gnn_solver.hpp | 10 +++++----- .../association/solver/gnn_solver_interface.hpp | 6 +++--- .../association/solver/mu_ssp.hpp | 8 ++++---- .../association/solver/ssp.hpp | 8 ++++---- .../object_association_merger_node.hpp | 8 ++++---- .../object_merger/src/association/data_association.cpp | 4 ++-- .../solver/mu_successive_shortest_path_wrapper.cpp | 2 +- .../association/solver/successive_shortest_path.cpp | 2 +- .../src/object_association_merger_node.cpp | 2 +- 10 files changed, 29 insertions(+), 29 deletions(-) rename perception/object_merger/include/{autoware/object_merger => autoware_object_merger}/association/data_association.hpp (86%) rename perception/object_merger/include/{autoware/object_merger => autoware_object_merger}/association/solver/gnn_solver.hpp (64%) rename perception/object_merger/include/{autoware/object_merger => autoware_object_merger}/association/solver/gnn_solver_interface.hpp (81%) rename perception/object_merger/include/{autoware/object_merger => autoware_object_merger}/association/solver/mu_ssp.hpp (79%) rename perception/object_merger/include/{autoware/object_merger => autoware_object_merger}/association/solver/ssp.hpp (80%) rename perception/object_merger/include/{autoware/object_merger => autoware_object_merger}/object_association_merger_node.hpp (92%) diff --git a/perception/object_merger/include/autoware/object_merger/association/data_association.hpp b/perception/object_merger/include/autoware_object_merger/association/data_association.hpp similarity index 86% rename from perception/object_merger/include/autoware/object_merger/association/data_association.hpp rename to perception/object_merger/include/autoware_object_merger/association/data_association.hpp index 16e154c83842b..8433e8f7af537 100644 --- a/perception/object_merger/include/autoware/object_merger/association/data_association.hpp +++ b/perception/object_merger/include/autoware_object_merger/association/data_association.hpp @@ -16,12 +16,12 @@ // Author: v1.0 Yukihiro Saito // -#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ -#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ +#ifndef AUTOWARE_OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ +#define AUTOWARE_OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ #define EIGEN_MPL2_ONLY -#include "autoware/object_merger/association/solver/gnn_solver.hpp" +#include "autoware_object_merger/association/solver/gnn_solver.hpp" #include #include @@ -62,4 +62,4 @@ class DataAssociation } // namespace autoware::object_merger -#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ +#endif // AUTOWARE_OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver.hpp b/perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver.hpp similarity index 64% rename from perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver.hpp rename to perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver.hpp index 0536d7bcd7acb..52aca85351c18 100644 --- a/perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver.hpp +++ b/perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver.hpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ -#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#ifndef AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#define AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ -#include "autoware/object_merger/association/solver/gnn_solver_interface.hpp" -#include "autoware/object_merger/association/solver/mu_ssp.hpp" +#include "autoware_object_merger/association/solver/gnn_solver_interface.hpp" +#include "autoware_object_merger/association/solver/mu_ssp.hpp" -#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#endif // AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver_interface.hpp b/perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver_interface.hpp similarity index 81% rename from perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver_interface.hpp rename to perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver_interface.hpp index 75f45b6eb5f3b..6a0702f056ba7 100644 --- a/perception/object_merger/include/autoware/object_merger/association/solver/gnn_solver_interface.hpp +++ b/perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver_interface.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ -#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#ifndef AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#define AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ #include #include @@ -32,4 +32,4 @@ class GnnSolverInterface }; } // namespace autoware::object_merger::gnn_solver -#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#endif // AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/association/solver/mu_ssp.hpp b/perception/object_merger/include/autoware_object_merger/association/solver/mu_ssp.hpp similarity index 79% rename from perception/object_merger/include/autoware/object_merger/association/solver/mu_ssp.hpp rename to perception/object_merger/include/autoware_object_merger/association/solver/mu_ssp.hpp index 4d8075874cbca..364e9306112a7 100644 --- a/perception/object_merger/include/autoware/object_merger/association/solver/mu_ssp.hpp +++ b/perception/object_merger/include/autoware_object_merger/association/solver/mu_ssp.hpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ -#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ +#ifndef AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ +#define AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ -#include "autoware/object_merger/association/solver/gnn_solver_interface.hpp" +#include "autoware_object_merger/association/solver/gnn_solver_interface.hpp" #include #include @@ -34,4 +34,4 @@ class MuSSP : public GnnSolverInterface }; } // namespace autoware::object_merger::gnn_solver -#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ +#endif // AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/association/solver/ssp.hpp b/perception/object_merger/include/autoware_object_merger/association/solver/ssp.hpp similarity index 80% rename from perception/object_merger/include/autoware/object_merger/association/solver/ssp.hpp rename to perception/object_merger/include/autoware_object_merger/association/solver/ssp.hpp index 94563981de011..41bf390829ade 100644 --- a/perception/object_merger/include/autoware/object_merger/association/solver/ssp.hpp +++ b/perception/object_merger/include/autoware_object_merger/association/solver/ssp.hpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ -#define AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ +#ifndef AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ +#define AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ -#include "autoware/object_merger/association/solver/gnn_solver_interface.hpp" +#include "autoware_object_merger/association/solver/gnn_solver_interface.hpp" #include #include @@ -34,4 +34,4 @@ class SSP : public GnnSolverInterface }; } // namespace autoware::object_merger::gnn_solver -#endif // AUTOWARE__OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ +#endif // AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ diff --git a/perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp b/perception/object_merger/include/autoware_object_merger/object_association_merger_node.hpp similarity index 92% rename from perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp rename to perception/object_merger/include/autoware_object_merger/object_association_merger_node.hpp index 3810bda7dc861..33edcd872a711 100644 --- a/perception/object_merger/include/autoware/object_merger/object_association_merger_node.hpp +++ b/perception/object_merger/include/autoware_object_merger/object_association_merger_node.hpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE__OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ -#define AUTOWARE__OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ +#ifndef AUTOWARE_OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ +#define AUTOWARE_OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ -#include "autoware/object_merger/association/data_association.hpp" #include "autoware/universe_utils/ros/debug_publisher.hpp" #include "autoware/universe_utils/ros/published_time_publisher.hpp" #include "autoware/universe_utils/system/stop_watch.hpp" +#include "autoware_object_merger/association/data_association.hpp" #include @@ -91,4 +91,4 @@ class ObjectAssociationMergerNode : public rclcpp::Node }; } // namespace autoware::object_merger -#endif // AUTOWARE__OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ +#endif // AUTOWARE_OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ diff --git a/perception/object_merger/src/association/data_association.cpp b/perception/object_merger/src/association/data_association.cpp index 8666064d62d05..c2f7d44fa779b 100644 --- a/perception/object_merger/src/association/data_association.cpp +++ b/perception/object_merger/src/association/data_association.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "autoware/object_merger/association/data_association.hpp" +#include "autoware_object_merger/association/data_association.hpp" -#include "autoware/object_merger/association/solver/gnn_solver.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" +#include "autoware_object_merger/association/solver/gnn_solver.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" #include diff --git a/perception/object_merger/src/association/solver/mu_successive_shortest_path_wrapper.cpp b/perception/object_merger/src/association/solver/mu_successive_shortest_path_wrapper.cpp index f852cfb62d419..6a5dd6473da1f 100644 --- a/perception/object_merger/src/association/solver/mu_successive_shortest_path_wrapper.cpp +++ b/perception/object_merger/src/association/solver/mu_successive_shortest_path_wrapper.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "autoware/object_merger/association/solver/mu_ssp.hpp" +#include "autoware_object_merger/association/solver/mu_ssp.hpp" #include diff --git a/perception/object_merger/src/association/solver/successive_shortest_path.cpp b/perception/object_merger/src/association/solver/successive_shortest_path.cpp index ba5cb66125627..782aa1ef4ac31 100644 --- a/perception/object_merger/src/association/solver/successive_shortest_path.cpp +++ b/perception/object_merger/src/association/solver/successive_shortest_path.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "autoware/object_merger/association/solver/ssp.hpp" +#include "autoware_object_merger/association/solver/ssp.hpp" #include #include diff --git a/perception/object_merger/src/object_association_merger_node.cpp b/perception/object_merger/src/object_association_merger_node.cpp index 328ab81a5fea5..c807dd58998fa 100644 --- a/perception/object_merger/src/object_association_merger_node.cpp +++ b/perception/object_merger/src/object_association_merger_node.cpp @@ -14,7 +14,7 @@ #define EIGEN_MPL2_ONLY -#include "autoware/object_merger/object_association_merger_node.hpp" +#include "autoware_object_merger/object_association_merger_node.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" From e001f569c077b042531c8509eacf7c27382be682 Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Tue, 25 Jun 2024 18:21:54 +0900 Subject: [PATCH 8/9] refactor: add ssp.hpp to object association solver includes Signed-off-by: Taekjin LEE --- .../autoware_object_merger/association/solver/gnn_solver.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver.hpp b/perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver.hpp index 52aca85351c18..6421dd6108a4a 100644 --- a/perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver.hpp +++ b/perception/object_merger/include/autoware_object_merger/association/solver/gnn_solver.hpp @@ -17,5 +17,6 @@ #include "autoware_object_merger/association/solver/gnn_solver_interface.hpp" #include "autoware_object_merger/association/solver/mu_ssp.hpp" +#include "autoware_object_merger/association/solver/ssp.hpp" #endif // AUTOWARE_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ From e7baa9e6fc7b31da7adcb352834e39c95886fa9d Mon Sep 17 00:00:00 2001 From: Taekjin LEE Date: Wed, 26 Jun 2024 11:27:35 +0900 Subject: [PATCH 9/9] refactor: update include paths for object association node Signed-off-by: Taekjin LEE --- .../object_merger/src/object_association_merger_node.cpp | 3 ++- .../object_association_merger_node.hpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) rename perception/object_merger/{include/autoware_object_merger => src}/object_association_merger_node.hpp (94%) diff --git a/perception/object_merger/src/object_association_merger_node.cpp b/perception/object_merger/src/object_association_merger_node.cpp index c807dd58998fa..321f1a8da8d9e 100644 --- a/perception/object_merger/src/object_association_merger_node.cpp +++ b/perception/object_merger/src/object_association_merger_node.cpp @@ -14,7 +14,7 @@ #define EIGEN_MPL2_ONLY -#include "autoware_object_merger/object_association_merger_node.hpp" +#include "object_association_merger_node.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" @@ -26,6 +26,7 @@ #include #include +#include using Label = autoware_perception_msgs::msg::ObjectClassification; diff --git a/perception/object_merger/include/autoware_object_merger/object_association_merger_node.hpp b/perception/object_merger/src/object_association_merger_node.hpp similarity index 94% rename from perception/object_merger/include/autoware_object_merger/object_association_merger_node.hpp rename to perception/object_merger/src/object_association_merger_node.hpp index 33edcd872a711..d5b5a1ae018a6 100644 --- a/perception/object_merger/include/autoware_object_merger/object_association_merger_node.hpp +++ b/perception/object_merger/src/object_association_merger_node.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef AUTOWARE_OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ -#define AUTOWARE_OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ +#ifndef OBJECT_ASSOCIATION_MERGER_NODE_HPP_ +#define OBJECT_ASSOCIATION_MERGER_NODE_HPP_ #include "autoware/universe_utils/ros/debug_publisher.hpp" #include "autoware/universe_utils/ros/published_time_publisher.hpp" @@ -91,4 +91,4 @@ class ObjectAssociationMergerNode : public rclcpp::Node }; } // namespace autoware::object_merger -#endif // AUTOWARE_OBJECT_MERGER__OBJECT_ASSOCIATION_MERGER_NODE_HPP_ +#endif // OBJECT_ASSOCIATION_MERGER_NODE_HPP_