Skip to content

Commit 79bddce

Browse files
committed
fix: adjust minimum sizes to 0.3 m
The minimum size is unified to a small number (0.3 m) to avoid side-effect of tracking. Signed-off-by: Taekjin LEE <taekjin.lee@tier4.jp>
1 parent c48e7d5 commit 79bddce

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

perception/multi_object_tracker/src/tracker/model/bicycle_tracker.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,9 @@ BicycleTracker::BicycleTracker(
141141
bounding_box_ = {1.0, 0.5, 1.7};
142142
}
143143
// set minimum size
144-
bounding_box_.length = std::max(bounding_box_.length, 0.5);
144+
bounding_box_.length = std::max(bounding_box_.length, 0.3);
145145
bounding_box_.width = std::max(bounding_box_.width, 0.3);
146-
bounding_box_.height = std::max(bounding_box_.height, 0.8);
146+
bounding_box_.height = std::max(bounding_box_.height, 0.3);
147147

148148
ekf_.init(X, P);
149149

@@ -426,9 +426,9 @@ bool BicycleTracker::measureWithShape(
426426
bbox_object.shape.dimensions.x, bbox_object.shape.dimensions.y, bbox_object.shape.dimensions.z};
427427

428428
// set minimum size
429-
bounding_box_.length = std::max(bounding_box_.length, 0.5);
429+
bounding_box_.length = std::max(bounding_box_.length, 0.3);
430430
bounding_box_.width = std::max(bounding_box_.width, 0.3);
431-
bounding_box_.height = std::max(bounding_box_.height, 0.8);
431+
bounding_box_.height = std::max(bounding_box_.height, 0.3);
432432

433433
// update lf, lr
434434
lf_ = std::max(bounding_box_.length * 0.3, 0.3); // 30% front from the center, minimum of 0.3m

perception/multi_object_tracker/src/tracker/model/big_vehicle_tracker.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ BigVehicleTracker::BigVehicleTracker(
158158
setNearestCornerOrSurfaceIndex(self_transform); // this index is used in next measure step
159159

160160
// set minimum size
161-
bounding_box_.length = std::max(bounding_box_.length, 2.5);
162-
bounding_box_.width = std::max(bounding_box_.width, 1.0);
163-
bounding_box_.height = std::max(bounding_box_.height, 1.0);
161+
bounding_box_.length = std::max(bounding_box_.length, 0.3);
162+
bounding_box_.width = std::max(bounding_box_.width, 0.3);
163+
bounding_box_.height = std::max(bounding_box_.height, 0.3);
164164

165165
// Set lf, lr
166166
lf_ = std::max(bounding_box_.length * 0.3, 1.5); // 30% front from the center, minimum of 1.5m
@@ -461,9 +461,9 @@ bool BigVehicleTracker::measureWithShape(
461461
bbox_object.shape.dimensions.x, bbox_object.shape.dimensions.y, bbox_object.shape.dimensions.z};
462462

463463
// set minimum size
464-
bounding_box_.length = std::max(bounding_box_.length, 2.5);
465-
bounding_box_.width = std::max(bounding_box_.width, 1.0);
466-
bounding_box_.height = std::max(bounding_box_.height, 1.0);
464+
bounding_box_.length = std::max(bounding_box_.length, 0.3);
465+
bounding_box_.width = std::max(bounding_box_.width, 0.3);
466+
bounding_box_.height = std::max(bounding_box_.height, 0.3);
467467

468468
// update lf, lr
469469
lf_ = std::max(bounding_box_.length * 0.3, 1.5); // 30% front from the center, minimum of 1.5m

perception/multi_object_tracker/src/tracker/model/normal_vehicle_tracker.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ NormalVehicleTracker::NormalVehicleTracker(
158158
setNearestCornerOrSurfaceIndex(self_transform); // this index is used in next measure step
159159

160160
// set minimum size
161-
bounding_box_.length = std::max(bounding_box_.length, 1.5);
162-
bounding_box_.width = std::max(bounding_box_.width, 0.5);
163-
bounding_box_.height = std::max(bounding_box_.height, 1.0);
161+
bounding_box_.length = std::max(bounding_box_.length, 0.3);
162+
bounding_box_.width = std::max(bounding_box_.width, 0.3);
163+
bounding_box_.height = std::max(bounding_box_.height, 0.3);
164164

165165
// Set lf, lr
166166
lf_ = std::max(bounding_box_.length * 0.3, 1.0); // 30% front from the center, minimum of 1.0m
@@ -461,9 +461,9 @@ bool NormalVehicleTracker::measureWithShape(
461461
bbox_object.shape.dimensions.x, bbox_object.shape.dimensions.y, bbox_object.shape.dimensions.z};
462462

463463
// set minimum size
464-
bounding_box_.length = std::max(bounding_box_.length, 1.5);
465-
bounding_box_.width = std::max(bounding_box_.width, 0.5);
466-
bounding_box_.height = std::max(bounding_box_.height, 1.0);
464+
bounding_box_.length = std::max(bounding_box_.length, 0.3);
465+
bounding_box_.width = std::max(bounding_box_.width, 0.3);
466+
bounding_box_.height = std::max(bounding_box_.height, 0.3);
467467

468468
// update lf, lr
469469
lf_ = std::max(bounding_box_.length * 0.3, 1.0); // 30% front from the center, minimum of 1.0m

perception/multi_object_tracker/src/tracker/model/pedestrian_tracker.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ PedestrianTracker::PedestrianTracker(
146146
// set minimum size
147147
bounding_box_.length = std::max(bounding_box_.length, 0.3);
148148
bounding_box_.width = std::max(bounding_box_.width, 0.3);
149-
bounding_box_.height = std::max(bounding_box_.height, 0.8);
149+
bounding_box_.height = std::max(bounding_box_.height, 0.3);
150150
cylinder_.width = std::max(cylinder_.width, 0.3);
151-
cylinder_.height = std::max(cylinder_.height, 0.8);
151+
cylinder_.height = std::max(cylinder_.height, 0.3);
152152

153153
ekf_.init(X, P);
154154
}
@@ -327,9 +327,9 @@ bool PedestrianTracker::measureWithShape(
327327
// set minimum size
328328
bounding_box_.length = std::max(bounding_box_.length, 0.3);
329329
bounding_box_.width = std::max(bounding_box_.width, 0.3);
330-
bounding_box_.height = std::max(bounding_box_.height, 0.8);
330+
bounding_box_.height = std::max(bounding_box_.height, 0.3);
331331
cylinder_.width = std::max(cylinder_.width, 0.3);
332-
cylinder_.height = std::max(cylinder_.height, 0.8);
332+
cylinder_.height = std::max(cylinder_.height, 0.3);
333333

334334
return true;
335335
}

0 commit comments

Comments
 (0)