@@ -76,7 +76,6 @@ NormalVehicleTracker::NormalVehicleTracker(
76
76
if (object.shape .type == autoware_perception_msgs::msg::Shape::BOUNDING_BOX) {
77
77
bounding_box_ = {
78
78
object.shape .dimensions .x , object.shape .dimensions .y , object.shape .dimensions .z };
79
- last_input_bounding_box_ = bounding_box_;
80
79
} else {
81
80
autoware_perception_msgs::msg::DetectedObject bbox_object;
82
81
if (!utils::convertConvexHullToBoundingBox (object, bbox_object)) {
@@ -90,7 +89,6 @@ NormalVehicleTracker::NormalVehicleTracker(
90
89
bbox_object.shape .dimensions .x , bbox_object.shape .dimensions .y ,
91
90
bbox_object.shape .dimensions .z };
92
91
}
93
- last_input_bounding_box_ = bounding_box_;
94
92
}
95
93
// set maximum and minimum size
96
94
constexpr double max_size = 20.0 ;
@@ -213,11 +211,11 @@ autoware_perception_msgs::msg::DetectedObject NormalVehicleTracker::getUpdatingO
213
211
}
214
212
215
213
// get offset measurement
216
- int nearest_corner_index = utils::getNearestCornerOrSurface (
214
+ const int nearest_corner_index = utils::getNearestCornerOrSurface (
217
215
tracked_x, tracked_y, tracked_yaw, bounding_box_.width , bounding_box_.length , self_transform);
218
216
utils::calcAnchorPointOffset (
219
- last_input_bounding_box_ .width , last_input_bounding_box_ .length , nearest_corner_index,
220
- bbox_object, tracked_yaw, updating_object, tracking_offset_);
217
+ bounding_box_ .width , bounding_box_ .length , nearest_corner_index, bbox_object, tracked_yaw ,
218
+ updating_object, tracking_offset_);
221
219
222
220
// UNCERTAINTY MODEL
223
221
if (!object.kinematics .has_position_covariance ) {
@@ -331,15 +329,13 @@ bool NormalVehicleTracker::measureWithShape(
331
329
return false ;
332
330
}
333
331
334
- constexpr double gain = 0.1 ;
332
+ constexpr double gain = 0.5 ;
335
333
constexpr double gain_inv = 1.0 - gain;
336
334
337
335
// update object size
338
336
bounding_box_.length = gain_inv * bounding_box_.length + gain * object.shape .dimensions .x ;
339
337
bounding_box_.width = gain_inv * bounding_box_.width + gain * object.shape .dimensions .y ;
340
338
bounding_box_.height = gain_inv * bounding_box_.height + gain * object.shape .dimensions .z ;
341
- last_input_bounding_box_ = {
342
- object.shape .dimensions .x , object.shape .dimensions .y , object.shape .dimensions .z };
343
339
344
340
// set maximum and minimum size
345
341
constexpr double max_size = 20.0 ;
0 commit comments