diff --git a/perception/detection_by_tracker/CMakeLists.txt b/perception/detection_by_tracker/CMakeLists.txt
index 3813f1ba4707f..112187551d924 100644
--- a/perception/detection_by_tracker/CMakeLists.txt
+++ b/perception/detection_by_tracker/CMakeLists.txt
@@ -26,22 +26,22 @@ include_directories(
# Generate exe file
set(DETECTION_BY_TRACKER_SRC
- src/detection_by_tracker_core.cpp
- src/utils.cpp
+ src/detection_by_tracker_node.cpp
+ src/utils/utils.cpp
)
-ament_auto_add_library(detection_by_tracker_node SHARED
+ament_auto_add_library(${PROJECT_NAME} SHARED
${DETECTION_BY_TRACKER_SRC}
)
-target_link_libraries(detection_by_tracker_node
+target_link_libraries(${PROJECT_NAME}
Eigen3::Eigen
${PCL_LIBRARIES}
)
-rclcpp_components_register_node(detection_by_tracker_node
- PLUGIN "DetectionByTracker"
- EXECUTABLE detection_by_tracker
+rclcpp_components_register_node(${PROJECT_NAME}
+ PLUGIN "autoware::detection_by_tracker::DetectionByTracker"
+ EXECUTABLE detection_by_tracker_node
)
ament_auto_package(
diff --git a/perception/detection_by_tracker/launch/detection_by_tracker.launch.xml b/perception/detection_by_tracker/launch/detection_by_tracker.launch.xml
index 95e7cbf16b388..3fba5cb58f8f3 100644
--- a/perception/detection_by_tracker/launch/detection_by_tracker.launch.xml
+++ b/perception/detection_by_tracker/launch/detection_by_tracker.launch.xml
@@ -4,7 +4,7 @@
-
+
diff --git a/perception/detection_by_tracker/package.xml b/perception/detection_by_tracker/package.xml
index 52d4d3fcdd7a2..50bd876ce0605 100644
--- a/perception/detection_by_tracker/package.xml
+++ b/perception/detection_by_tracker/package.xml
@@ -16,9 +16,7 @@
autoware_universe_utils
eigen
euclidean_cluster
- libpcl-all-dev
object_recognition_utils
- pcl_conversions
rclcpp
rclcpp_components
shape_estimation
diff --git a/perception/detection_by_tracker/include/detection_by_tracker/debugger.hpp b/perception/detection_by_tracker/src/debugger/debugger.hpp
similarity index 85%
rename from perception/detection_by_tracker/include/detection_by_tracker/debugger.hpp
rename to perception/detection_by_tracker/src/debugger/debugger.hpp
index 0169082a2253a..242056c3ca316 100644
--- a/perception/detection_by_tracker/include/detection_by_tracker/debugger.hpp
+++ b/perception/detection_by_tracker/src/debugger/debugger.hpp
@@ -12,22 +12,23 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef DETECTION_BY_TRACKER__DEBUGGER_HPP_
-#define DETECTION_BY_TRACKER__DEBUGGER_HPP_
+#ifndef DEBUGGER__DEBUGGER_HPP_
+#define DEBUGGER__DEBUGGER_HPP_
+
+#include "autoware/universe_utils/ros/debug_publisher.hpp"
+#include "autoware/universe_utils/system/stop_watch.hpp"
+#include "euclidean_cluster/euclidean_cluster.hpp"
+#include "euclidean_cluster/utils.hpp"
+#include "euclidean_cluster/voxel_grid_based_euclidean_cluster.hpp"
+#include "shape_estimation/shape_estimator.hpp"
-#include
-#include
-#include
-#include
-#include
#include
-#include
-#include
-#include
+#include "autoware_perception_msgs/msg/detected_objects.hpp"
+#include "autoware_perception_msgs/msg/tracked_objects.hpp"
+#include "tier4_perception_msgs/msg/detected_objects_with_feature.hpp"
#include
#include
-#include
#include
#include
@@ -46,6 +47,8 @@
#include
#include
+namespace autoware::detection_by_tracker
+{
class Debugger
{
public:
@@ -117,5 +120,6 @@ class Debugger
return objects;
}
};
+} // namespace autoware::detection_by_tracker
-#endif // DETECTION_BY_TRACKER__DEBUGGER_HPP_
+#endif // DEBUGGER__DEBUGGER_HPP_
diff --git a/perception/detection_by_tracker/src/detection_by_tracker_core.cpp b/perception/detection_by_tracker/src/detection_by_tracker_node.cpp
similarity index 98%
rename from perception/detection_by_tracker/src/detection_by_tracker_core.cpp
rename to perception/detection_by_tracker/src/detection_by_tracker_node.cpp
index 4e502b359120d..c41d6002d9266 100644
--- a/perception/detection_by_tracker/src/detection_by_tracker_core.cpp
+++ b/perception/detection_by_tracker/src/detection_by_tracker_node.cpp
@@ -12,12 +12,16 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#include "detection_by_tracker/detection_by_tracker_core.hpp"
+#define EIGEN_MPL2_ONLY
+
+#include "detection_by_tracker_node.hpp"
+#include "autoware/universe_utils/geometry/geometry.hpp"
+#include "autoware/universe_utils/math/unit_conversion.hpp"
#include "object_recognition_utils/object_recognition_utils.hpp"
-#include
-#include
+#include
+#include
#include
#include
@@ -25,10 +29,6 @@
#include
#include
-#define EIGEN_MPL2_ONLY
-#include
-#include
-
using Label = autoware_perception_msgs::msg::ObjectClassification;
namespace
{
@@ -80,6 +80,9 @@ boost::optional getReferenceShapeSizeInfo(
}
} // namespace
+namespace autoware::detection_by_tracker
+{
+
void TrackerHandler::onTrackedObjects(
const autoware_perception_msgs::msg::TrackedObjects::ConstSharedPtr msg)
{
@@ -466,5 +469,7 @@ void DetectionByTracker::mergeOverSegmentedObjects(
}
}
+} // namespace autoware::detection_by_tracker
+
#include
-RCLCPP_COMPONENTS_REGISTER_NODE(DetectionByTracker)
+RCLCPP_COMPONENTS_REGISTER_NODE(autoware::detection_by_tracker::DetectionByTracker)
diff --git a/perception/detection_by_tracker/include/detection_by_tracker/detection_by_tracker_core.hpp b/perception/detection_by_tracker/src/detection_by_tracker_node.hpp
similarity index 81%
rename from perception/detection_by_tracker/include/detection_by_tracker/detection_by_tracker_core.hpp
rename to perception/detection_by_tracker/src/detection_by_tracker_node.hpp
index d6d030aadb000..4e58d53fa71aa 100644
--- a/perception/detection_by_tracker/include/detection_by_tracker/detection_by_tracker_core.hpp
+++ b/perception/detection_by_tracker/src/detection_by_tracker_node.hpp
@@ -12,24 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef DETECTION_BY_TRACKER__DETECTION_BY_TRACKER_CORE_HPP_
-#define DETECTION_BY_TRACKER__DETECTION_BY_TRACKER_CORE_HPP_
+#ifndef DETECTION_BY_TRACKER_NODE_HPP_
+#define DETECTION_BY_TRACKER_NODE_HPP_
-#include "detection_by_tracker/debugger.hpp"
-#include "detection_by_tracker/utils.hpp"
+#include "autoware/universe_utils/ros/published_time_publisher.hpp"
+#include "debugger/debugger.hpp"
+#include "euclidean_cluster/euclidean_cluster.hpp"
+#include "euclidean_cluster/utils.hpp"
+#include "euclidean_cluster/voxel_grid_based_euclidean_cluster.hpp"
+#include "shape_estimation/shape_estimator.hpp"
+#include "utils/utils.hpp"
-#include
-#include
-#include
-#include
#include
-#include
-#include
-#include
+#include "autoware_perception_msgs/msg/detected_objects.hpp"
+#include "autoware_perception_msgs/msg/tracked_objects.hpp"
+#include "tier4_perception_msgs/msg/detected_objects_with_feature.hpp"
#include
#include
-#include
#include
#include
@@ -48,6 +48,10 @@
#include