From 59cf24a2fa44b433d9d7ba016af3c195883ac735 Mon Sep 17 00:00:00 2001 From: Yoshi Ri Date: Mon, 27 Nov 2023 17:26:09 +0900 Subject: [PATCH] feat(shape_estimation): fix truck filter max size is too small problem (#5650) fix truck size filtering Signed-off-by: yoshiri --- .../include/shape_estimation/corrector/truck_corrector.hpp | 6 +++--- perception/shape_estimation/lib/filter/truck_filter.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/perception/shape_estimation/include/shape_estimation/corrector/truck_corrector.hpp b/perception/shape_estimation/include/shape_estimation/corrector/truck_corrector.hpp index 93d9683ba2939..3b2475286fa61 100644 --- a/perception/shape_estimation/include/shape_estimation/corrector/truck_corrector.hpp +++ b/perception/shape_estimation/include/shape_estimation/corrector/truck_corrector.hpp @@ -26,11 +26,11 @@ class TruckCorrector : public VehicleCorrector { corrector_utils::CorrectionBBParameters params; params.min_width = 1.5; - params.max_width = 3.2; + params.max_width = 3.5; params.default_width = (params.min_width + params.max_width) * 0.5; params.min_length = 4.0; - params.max_length = 7.9; - params.default_length = (params.min_length + params.max_length) * 0.5; + params.max_length = 18.0; + params.default_length = 7.0; // 7m is the most common length of a truck in Japan setParams(params); } diff --git a/perception/shape_estimation/lib/filter/truck_filter.cpp b/perception/shape_estimation/lib/filter/truck_filter.cpp index 672082fe305fd..b7d75c6c8acdf 100644 --- a/perception/shape_estimation/lib/filter/truck_filter.cpp +++ b/perception/shape_estimation/lib/filter/truck_filter.cpp @@ -19,7 +19,7 @@ bool TruckFilter::filter( [[maybe_unused]] const geometry_msgs::msg::Pose & pose) { constexpr float min_width = 1.5; - constexpr float max_width = 3.2; - constexpr float max_length = 7.9; // upto 12m in japanese law + constexpr float max_width = 3.5; + constexpr float max_length = 18.0; // upto 12m in japanese law return utils::filterVehicleBoundingBox(shape, min_width, max_width, max_length); }