Skip to content

Commit 40fdb0e

Browse files
authored
check if lowest point has z coord less than zero (#60)
1 parent ee51bec commit 40fdb0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/map_closures/GroundAlign.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ std::vector<Eigen::Vector3d> ComputeLowestPoints(const std::vector<Eigen::Vector
8888
std::for_each(pointcloud.cbegin(), pointcloud.cend(), [&](const Eigen::Vector3d &point) {
8989
auto pixel = PointToPixel(point);
9090
if (lowest_point_hash_map.find(pixel) == lowest_point_hash_map.cend()) {
91-
lowest_point_hash_map.insert({pixel, point});
91+
if (point.z() < 0) {
92+
lowest_point_hash_map.insert({pixel, point});
93+
}
9294
} else if (point.z() < lowest_point_hash_map[pixel].z()) {
9395
lowest_point_hash_map[pixel] = point;
9496
}

0 commit comments

Comments
 (0)