Skip to content

Commit 4c71844

Browse files
authored
fix(multi_object_tracker): mot convexhull to bbox convert bug (#1322)
* fix: fix a bug of convertConvexHullToBoundingBox Signed-off-by: Taekjin LEE <[email protected]> * fix: clang format Signed-off-by: Taekjin LEE <[email protected]> --------- Signed-off-by: Taekjin LEE <[email protected]>
1 parent b515100 commit 4c71844

File tree

1 file changed

+6
-9
lines changed
  • perception/multi_object_tracker/include/multi_object_tracker/utils

1 file changed

+6
-9
lines changed

perception/multi_object_tracker/include/multi_object_tracker/utils/utils.hpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -313,15 +313,12 @@ inline void convertConvexHullToBoundingBox(
313313

314314
// look for bounding box boundary
315315
for (size_t i = 0; i < input_object.shape.footprint.points.size(); ++i) {
316-
Eigen::Vector2d vertex{
317-
input_object.shape.footprint.points.at(i).x, input_object.shape.footprint.points.at(i).y};
318-
319-
const Eigen::Vector2d local_vertex = R_inv * (vertex - center);
320-
max_x = std::max(max_x, local_vertex.x());
321-
max_y = std::max(max_y, local_vertex.y());
322-
min_x = std::min(min_x, local_vertex.x());
323-
min_y = std::min(min_y, local_vertex.y());
324-
316+
const double foot_x = input_object.shape.footprint.points.at(i).x;
317+
const double foot_y = input_object.shape.footprint.points.at(i).y;
318+
max_x = std::max(max_x, foot_x);
319+
max_y = std::max(max_y, foot_y);
320+
min_x = std::min(min_x, foot_x);
321+
min_y = std::min(min_y, foot_y);
325322
max_z = std::max(max_z, static_cast<double>(input_object.shape.footprint.points.at(i).z));
326323
}
327324

0 commit comments

Comments
 (0)