diff --git a/perception/tracking_object_merger/CMakeLists.txt b/perception/tracking_object_merger/CMakeLists.txt index 9c8e5a321d9be..7e7c698365922 100644 --- a/perception/tracking_object_merger/CMakeLists.txt +++ b/perception/tracking_object_merger/CMakeLists.txt @@ -22,22 +22,22 @@ include_directories( ${EIGEN3_INCLUDE_DIR} ) -ament_auto_add_library(decorative_tracker_merger_node SHARED - src/data_association/data_association.cpp - src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp - src/decorative_tracker_merger.cpp +ament_auto_add_library(${PROJECT_NAME} SHARED + src/association/data_association.cpp + src/association/solver/mu_successive_shortest_path_wrapper.cpp + src/decorative_tracker_merger_node.cpp src/utils/utils.cpp src/utils/tracker_state.cpp ) -target_link_libraries(decorative_tracker_merger_node +target_link_libraries(${PROJECT_NAME} Eigen3::Eigen glog::glog ) -rclcpp_components_register_node(decorative_tracker_merger_node - PLUGIN "tracking_object_merger::DecorativeTrackerMergerNode" - EXECUTABLE decorative_tracker_merger +rclcpp_components_register_node(${PROJECT_NAME} + PLUGIN "autoware::tracking_object_merger::DecorativeTrackerMergerNode" + EXECUTABLE decorative_tracker_merger_node ) ament_auto_package(INSTALL_TO_SHARE diff --git a/perception/tracking_object_merger/include/tracking_object_merger/data_association/data_association.hpp b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/data_association.hpp similarity index 77% rename from perception/tracking_object_merger/include/tracking_object_merger/data_association/data_association.hpp rename to perception/tracking_object_merger/include/autoware_tracking_object_merger/association/data_association.hpp index 96a474f9dac95..a272e42a74e80 100644 --- a/perception/tracking_object_merger/include/tracking_object_merger/data_association/data_association.hpp +++ b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/data_association.hpp @@ -16,26 +16,28 @@ // Author: v1.0 Yukihiro Saito // -#ifndef TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ -#define TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ - -#include -#include -#include -#include +#ifndef AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ +#define AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ #define EIGEN_MPL2_ONLY -#include "tracking_object_merger/data_association/solver/gnn_solver.hpp" -#include "tracking_object_merger/utils/tracker_state.hpp" + +#include "autoware_tracking_object_merger/association/solver/gnn_solver.hpp" +#include "autoware_tracking_object_merger/utils/tracker_state.hpp" #include #include -#include -#include +#include "autoware_perception_msgs/msg/detected_objects.hpp" +#include "autoware_perception_msgs/msg/tracked_objects.hpp" +#include +#include #include +#include +#include +namespace autoware::tracking_object_merger +{ class DataAssociation { private: @@ -68,4 +70,6 @@ class DataAssociation virtual ~DataAssociation() {} }; -#endif // TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__DATA_ASSOCIATION_HPP_ +} // namespace autoware::tracking_object_merger + +#endif // AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__DATA_ASSOCIATION_HPP_ diff --git a/perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/gnn_solver.hpp b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/gnn_solver.hpp similarity index 55% rename from perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/gnn_solver.hpp rename to perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/gnn_solver.hpp index 31240848f1977..4cea0e3cbe96f 100644 --- a/perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/gnn_solver.hpp +++ b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/gnn_solver.hpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ -#define TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#ifndef AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#define AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ -#include "tracking_object_merger/data_association/solver/gnn_solver_interface.hpp" -#include "tracking_object_merger/data_association/solver/mu_successive_shortest_path.hpp" -#include "tracking_object_merger/data_association/solver/successive_shortest_path.hpp" +#include "autoware_tracking_object_merger/association/solver/gnn_solver_interface.hpp" +#include "autoware_tracking_object_merger/association/solver/mu_ssp.hpp" +#include "autoware_tracking_object_merger/association/solver/ssp.hpp" -#endif // TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ +#endif // AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_HPP_ diff --git a/perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/gnn_solver_interface.hpp b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/gnn_solver_interface.hpp similarity index 71% rename from perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/gnn_solver_interface.hpp rename to perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/gnn_solver_interface.hpp index e915b5d2a9e7b..d751075773a09 100644 --- a/perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/gnn_solver_interface.hpp +++ b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/gnn_solver_interface.hpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ -#define TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#ifndef AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#define AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ #include #include -namespace gnn_solver +namespace autoware::tracking_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::tracking_object_merger::gnn_solver -#endif // TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ +#endif // AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__GNN_SOLVER_INTERFACE_HPP_ diff --git a/perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/mu_successive_shortest_path.hpp b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/mu_ssp.hpp similarity index 68% rename from perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/mu_successive_shortest_path.hpp rename to perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/mu_ssp.hpp index 5c0ebc04fdde3..47c23bc8eb1b1 100644 --- a/perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/mu_successive_shortest_path.hpp +++ b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/mu_ssp.hpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ -#define TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ +#ifndef AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ +#define AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ -#include "tracking_object_merger/data_association/solver/gnn_solver_interface.hpp" +#include "autoware_tracking_object_merger/association/solver/gnn_solver_interface.hpp" #include #include -namespace gnn_solver +namespace autoware::tracking_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::tracking_object_merger::gnn_solver -#endif // TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__MU_SUCCESSIVE_SHORTEST_PATH_HPP_ +#endif // AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__MU_SSP_HPP_ diff --git a/perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/successive_shortest_path.hpp b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/ssp.hpp similarity index 68% rename from perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/successive_shortest_path.hpp rename to perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/ssp.hpp index 47a737cf58298..bcfac73f3e43b 100644 --- a/perception/tracking_object_merger/include/tracking_object_merger/data_association/solver/successive_shortest_path.hpp +++ b/perception/tracking_object_merger/include/autoware_tracking_object_merger/association/solver/ssp.hpp @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ -#define TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ +#ifndef AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ +#define AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ -#include "tracking_object_merger/data_association/solver/gnn_solver_interface.hpp" +#include "autoware_tracking_object_merger/association/solver/gnn_solver_interface.hpp" #include #include -namespace gnn_solver +namespace autoware::tracking_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::tracking_object_merger::gnn_solver -#endif // TRACKING_OBJECT_MERGER__DATA_ASSOCIATION__SOLVER__SUCCESSIVE_SHORTEST_PATH_HPP_ +#endif // AUTOWARE_TRACKING_OBJECT_MERGER__ASSOCIATION__SOLVER__SSP_HPP_ diff --git a/perception/tracking_object_merger/include/tracking_object_merger/utils/tracker_state.hpp b/perception/tracking_object_merger/include/autoware_tracking_object_merger/utils/tracker_state.hpp similarity index 90% rename from perception/tracking_object_merger/include/tracking_object_merger/utils/tracker_state.hpp rename to perception/tracking_object_merger/include/autoware_tracking_object_merger/utils/tracker_state.hpp index a92cd9194b26a..ed1f69191b652 100644 --- a/perception/tracking_object_merger/include/tracking_object_merger/utils/tracker_state.hpp +++ b/perception/tracking_object_merger/include/autoware_tracking_object_merger/utils/tracker_state.hpp @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef TRACKING_OBJECT_MERGER__UTILS__TRACKER_STATE_HPP_ -#define TRACKING_OBJECT_MERGER__UTILS__TRACKER_STATE_HPP_ +#ifndef AUTOWARE_TRACKING_OBJECT_MERGER__UTILS__TRACKER_STATE_HPP_ +#define AUTOWARE_TRACKING_OBJECT_MERGER__UTILS__TRACKER_STATE_HPP_ #include #include #include -#include -#include -#include -#include +#include "autoware_perception_msgs/msg/object_classification.hpp" +#include "autoware_perception_msgs/msg/tracked_object.hpp" +#include "autoware_perception_msgs/msg/tracked_object_kinematics.hpp" +#include "autoware_perception_msgs/msg/tracked_objects.hpp" #include #include @@ -32,6 +32,9 @@ #include #include #include + +namespace autoware::tracking_object_merger +{ using autoware_perception_msgs::msg::TrackedObject; using autoware_perception_msgs::msg::TrackedObjects; @@ -144,5 +147,6 @@ class TrackerState TrackedObjects getTrackedObjectsFromTrackerStates( std::vector & tracker_states, const rclcpp::Time & time); +} // namespace autoware::tracking_object_merger -#endif // TRACKING_OBJECT_MERGER__UTILS__TRACKER_STATE_HPP_ +#endif // AUTOWARE_TRACKING_OBJECT_MERGER__UTILS__TRACKER_STATE_HPP_ diff --git a/perception/tracking_object_merger/include/tracking_object_merger/utils/utils.hpp b/perception/tracking_object_merger/include/autoware_tracking_object_merger/utils/utils.hpp similarity index 73% rename from perception/tracking_object_merger/include/tracking_object_merger/utils/utils.hpp rename to perception/tracking_object_merger/include/autoware_tracking_object_merger/utils/utils.hpp index 03352512d5545..eb288c4e853ad 100644 --- a/perception/tracking_object_merger/include/tracking_object_merger/utils/utils.hpp +++ b/perception/tracking_object_merger/include/autoware_tracking_object_merger/utils/utils.hpp @@ -14,19 +14,18 @@ // // -#ifndef TRACKING_OBJECT_MERGER__UTILS__UTILS_HPP_ -#define TRACKING_OBJECT_MERGER__UTILS__UTILS_HPP_ +#ifndef AUTOWARE_TRACKING_OBJECT_MERGER__UTILS__UTILS_HPP_ +#define AUTOWARE_TRACKING_OBJECT_MERGER__UTILS__UTILS_HPP_ -// #include #include "autoware/universe_utils/geometry/geometry.hpp" #include -#include -#include -#include -#include -#include +#include "autoware_perception_msgs/msg/object_classification.hpp" +#include "autoware_perception_msgs/msg/shape.hpp" +#include "autoware_perception_msgs/msg/tracked_object.hpp" +#include "autoware_perception_msgs/msg/tracked_object_kinematics.hpp" +#include "autoware_perception_msgs/msg/tracked_objects.hpp" #include #include #include @@ -42,49 +41,13 @@ #include #include +namespace autoware::tracking_object_merger +{ using autoware_perception_msgs::msg::TrackedObject; using autoware_perception_msgs::msg::TrackedObjects; + 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 -}; - // linear interpolation for tracked objects TrackedObject linearInterpolationForTrackedObject( const TrackedObject & obj1, const TrackedObject & obj2); @@ -103,6 +66,9 @@ TrackedObjects interpolateTrackedObjects( namespace merger_utils { +using autoware_perception_msgs::msg::TrackedObject; +using autoware_perception_msgs::msg::TrackedObjects; + // merge policy enum MergePolicy : int { SKIP = 0, OVERWRITE = 1, FUSION = 2 }; @@ -132,4 +98,6 @@ void updateWholeTrackedObject(TrackedObject & main_obj, const TrackedObject & su } // namespace merger_utils -#endif // TRACKING_OBJECT_MERGER__UTILS__UTILS_HPP_ +} // namespace autoware::tracking_object_merger + +#endif // AUTOWARE_TRACKING_OBJECT_MERGER__UTILS__UTILS_HPP_ diff --git a/perception/tracking_object_merger/launch/decorative_tracker_merger.launch.xml b/perception/tracking_object_merger/launch/decorative_tracker_merger.launch.xml index 52b0841f97e97..2cc2a69e295e6 100644 --- a/perception/tracking_object_merger/launch/decorative_tracker_merger.launch.xml +++ b/perception/tracking_object_merger/launch/decorative_tracker_merger.launch.xml @@ -7,7 +7,7 @@ - + diff --git a/perception/tracking_object_merger/package.xml b/perception/tracking_object_merger/package.xml index 370f5beb3e3b3..cc23578773fe2 100644 --- a/perception/tracking_object_merger/package.xml +++ b/perception/tracking_object_merger/package.xml @@ -23,7 +23,6 @@ rclcpp_components tf2 tf2_ros - tier4_perception_msgs ament_lint_auto autoware_lint_common diff --git a/perception/tracking_object_merger/src/data_association/data_association.cpp b/perception/tracking_object_merger/src/association/data_association.cpp similarity index 96% rename from perception/tracking_object_merger/src/data_association/data_association.cpp rename to perception/tracking_object_merger/src/association/data_association.cpp index 4d10a415df7da..e77a71744fe9b 100644 --- a/perception/tracking_object_merger/src/data_association/data_association.cpp +++ b/perception/tracking_object_merger/src/association/data_association.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tracking_object_merger/data_association/data_association.hpp" +#include "autoware_tracking_object_merger/association/data_association.hpp" #include "autoware/universe_utils/geometry/geometry.hpp" +#include "autoware_tracking_object_merger/association/solver/gnn_solver.hpp" +#include "autoware_tracking_object_merger/utils/utils.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" -#include "tracking_object_merger/data_association/solver/gnn_solver.hpp" -#include "tracking_object_merger/utils/utils.hpp" #include #include @@ -47,6 +47,8 @@ double getFormedYawAngle( } } // namespace +namespace autoware::tracking_object_merger +{ DataAssociation::DataAssociation( std::vector can_assign_vector, std::vector max_dist_vector, std::vector max_rad_vector, std::vector min_iou_vector, @@ -229,3 +231,5 @@ double DataAssociation::calcScoreBetweenObjects( } return score; } + +} // namespace autoware::tracking_object_merger diff --git a/perception/tracking_object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp b/perception/tracking_object_merger/src/association/solver/mu_successive_shortest_path_wrapper.cpp similarity index 85% rename from perception/tracking_object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp rename to perception/tracking_object_merger/src/association/solver/mu_successive_shortest_path_wrapper.cpp index fcc79c0a3cbd7..d2db6eba068ec 100644 --- a/perception/tracking_object_merger/src/data_association/mu_successive_shortest_path/mu_successive_shortest_path_wrapper.cpp +++ b/perception/tracking_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 "tracking_object_merger/data_association/solver/mu_successive_shortest_path.hpp" +#include "autoware_tracking_object_merger/association/solver/mu_ssp.hpp" #include @@ -24,7 +24,7 @@ #include #include -namespace gnn_solver +namespace autoware::tracking_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::tracking_object_merger::gnn_solver diff --git a/perception/tracking_object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp b/perception/tracking_object_merger/src/association/solver/successive_shortest_path.cpp similarity index 98% rename from perception/tracking_object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp rename to perception/tracking_object_merger/src/association/solver/successive_shortest_path.cpp index 133f0d377373f..7be715b24bd5f 100644 --- a/perception/tracking_object_merger/src/data_association/successive_shortest_path/successive_shortest_path.cpp +++ b/perception/tracking_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 "tracking_object_merger/data_association/solver/successive_shortest_path.hpp" +#include "autoware_tracking_object_merger/association/solver/ssp.hpp" #include #include @@ -22,7 +22,7 @@ #include #include -namespace gnn_solver +namespace autoware::tracking_object_merger::gnn_solver { struct ResidualEdge { @@ -367,4 +367,4 @@ void SSP::maximizeLinearAssignment( } #endif } -} // namespace gnn_solver +} // namespace autoware::tracking_object_merger::gnn_solver diff --git a/perception/tracking_object_merger/src/decorative_tracker_merger.cpp b/perception/tracking_object_merger/src/decorative_tracker_merger_node.cpp similarity index 97% rename from perception/tracking_object_merger/src/decorative_tracker_merger.cpp rename to perception/tracking_object_merger/src/decorative_tracker_merger_node.cpp index 99dccab3ff72c..6f65941c0a747 100644 --- a/perception/tracking_object_merger/src/decorative_tracker_merger.cpp +++ b/perception/tracking_object_merger/src/decorative_tracker_merger_node.cpp @@ -12,11 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tracking_object_merger/decorative_tracker_merger.hpp" +#define EIGEN_MPL2_ONLY + +#include "decorative_tracker_merger_node.hpp" +#include "autoware_tracking_object_merger/association/solver/ssp.hpp" +#include "autoware_tracking_object_merger/utils/utils.hpp" #include "object_recognition_utils/object_recognition_utils.hpp" -#include "tracking_object_merger/data_association/solver/successive_shortest_path.hpp" -#include "tracking_object_merger/utils/utils.hpp" + +#include +#include #include @@ -25,13 +30,9 @@ #include #include -#define EIGEN_MPL2_ONLY -#include -#include - using Label = autoware_perception_msgs::msg::ObjectClassification; -namespace tracking_object_merger +namespace autoware::tracking_object_merger { using autoware_perception_msgs::msg::TrackedObject; @@ -419,7 +420,7 @@ TrackerState DecorativeTrackerMergerNode::createNewTracker( return new_tracker; } -} // namespace tracking_object_merger +} // namespace autoware::tracking_object_merger #include -RCLCPP_COMPONENTS_REGISTER_NODE(tracking_object_merger::DecorativeTrackerMergerNode) +RCLCPP_COMPONENTS_REGISTER_NODE(autoware::tracking_object_merger::DecorativeTrackerMergerNode) diff --git a/perception/tracking_object_merger/include/tracking_object_merger/decorative_tracker_merger.hpp b/perception/tracking_object_merger/src/decorative_tracker_merger_node.hpp similarity index 87% rename from perception/tracking_object_merger/include/tracking_object_merger/decorative_tracker_merger.hpp rename to perception/tracking_object_merger/src/decorative_tracker_merger_node.hpp index 3683ba02b38cd..ae19f51876490 100644 --- a/perception/tracking_object_merger/include/tracking_object_merger/decorative_tracker_merger.hpp +++ b/perception/tracking_object_merger/src/decorative_tracker_merger_node.hpp @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef TRACKING_OBJECT_MERGER__DECORATIVE_TRACKER_MERGER_HPP_ -#define TRACKING_OBJECT_MERGER__DECORATIVE_TRACKER_MERGER_HPP_ +#ifndef DECORATIVE_TRACKER_MERGER_NODE_HPP_ +#define DECORATIVE_TRACKER_MERGER_NODE_HPP_ -#include "tracking_object_merger/data_association/data_association.hpp" -#include "tracking_object_merger/utils/tracker_state.hpp" -#include "tracking_object_merger/utils/utils.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_tracking_object_merger/association/data_association.hpp" +#include "autoware_tracking_object_merger/utils/tracker_state.hpp" +#include "autoware_tracking_object_merger/utils/utils.hpp" -#include -#include -#include #include -#include +#include "autoware_perception_msgs/msg/tracked_objects.hpp" #include #ifdef ROS_DISTRO_GALACTIC @@ -43,7 +43,7 @@ #include #include -namespace tracking_object_merger +namespace autoware::tracking_object_merger { class DecorativeTrackerMergerNode : public rclcpp::Node @@ -131,6 +131,6 @@ class DecorativeTrackerMergerNode : public rclcpp::Node } logging_; }; -} // namespace tracking_object_merger +} // namespace autoware::tracking_object_merger -#endif // TRACKING_OBJECT_MERGER__DECORATIVE_TRACKER_MERGER_HPP_ +#endif // DECORATIVE_TRACKER_MERGER_NODE_HPP_ diff --git a/perception/tracking_object_merger/src/utils/tracker_state.cpp b/perception/tracking_object_merger/src/utils/tracker_state.cpp index 36da060a962c3..54b1d73c375a5 100644 --- a/perception/tracking_object_merger/src/utils/tracker_state.cpp +++ b/perception/tracking_object_merger/src/utils/tracker_state.cpp @@ -12,9 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tracking_object_merger/utils/tracker_state.hpp" +#include "autoware_tracking_object_merger/utils/tracker_state.hpp" -#include "tracking_object_merger/utils/utils.hpp" +#include "autoware_tracking_object_merger/utils/utils.hpp" + +namespace autoware::tracking_object_merger +{ using autoware_perception_msgs::msg::TrackedObject; using autoware_perception_msgs::msg::TrackedObjects; @@ -325,3 +328,5 @@ TrackedObjects getTrackedObjectsFromTrackerStates( tracked_objects.header.frame_id = "map"; // TODO(yoshiri): get frame_id from input return tracked_objects; } + +} // namespace autoware::tracking_object_merger diff --git a/perception/tracking_object_merger/src/utils/utils.cpp b/perception/tracking_object_merger/src/utils/utils.cpp index 90437d3ebd7aa..1ae705aa38f15 100644 --- a/perception/tracking_object_merger/src/utils/utils.cpp +++ b/perception/tracking_object_merger/src/utils/utils.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tracking_object_merger/utils/utils.hpp" +#include "autoware_tracking_object_merger/utils/utils.hpp" -#include -#include -#include +#include "autoware_perception_msgs/msg/shape.hpp" +#include "autoware_perception_msgs/msg/tracked_object.hpp" +#include "autoware_perception_msgs/msg/tracked_objects.hpp" #include #include @@ -25,7 +25,7 @@ using autoware_perception_msgs::msg::TrackedObject; using autoware_perception_msgs::msg::TrackedObjects; -namespace utils +namespace autoware::tracking_object_merger::utils { /** @@ -243,9 +243,9 @@ TrackedObjects interpolateTrackedObjects( return output_objects; } -} // namespace utils +} // namespace autoware::tracking_object_merger::utils -namespace merger_utils +namespace autoware::tracking_object_merger::merger_utils { double mean(const double a, const double b) @@ -513,4 +513,4 @@ void updateWholeTrackedObject(TrackedObject & main_obj, const TrackedObject & su main_obj = sub_obj; } -} // namespace merger_utils +} // namespace autoware::tracking_object_merger::merger_utils