Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 957ac7f

Browse files
committedMay 15, 2024·
switch to query points instead of lanelets
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
1 parent b5d8382 commit 957ac7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎map/map_height_fitter/src/map_height_fitter.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ double MapHeightFitter::Impl::get_ground_height(const Point & point) const
200200
}
201201
}
202202
} else if (fit_target_ == "vector_map") {
203-
const auto closest_lanelets = vector_map_->laneletLayer.nearest(lanelet::BasicPoint2d{x, y}, 1);
204-
if (closest_lanelets.empty()) {
203+
const auto closest_points = vector_map_->pointLayer.nearest(lanelet::BasicPoint2d{x, y}, 1);
204+
if (closest_points.empty()) {
205205
RCLCPP_WARN_STREAM(logger, "failed to get closest lanelet");
206206
return point.z;
207207
}
208-
height = closest_lanelets.front().centerline().back().z();
208+
height = closest_points.front().z();
209209
}
210210

211211
return std::isfinite(height) ? height : point.z;

0 commit comments

Comments
 (0)
Please sign in to comment.