Skip to content

Commit 0b6cb3c

Browse files
Fixed comments
Signed-off-by: Shintaro Sakoda <shintaro.sakoda@tier4.jp>
1 parent ee19f39 commit 0b6cb3c

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

map/map_height_fitter/src/map_height_fitter.cpp

+7-8
Original file line numberDiff line numberDiff line change
@@ -231,19 +231,18 @@ std::optional<Point> MapHeightFitter::Impl::fit(const Point & position, const st
231231

232232
// prepare data
233233
if (fit_target_ == "pointcloud_map") {
234-
if (!cli_pcd_map_) {
235-
RCLCPP_WARN_STREAM(logger, "Partial map loading in pointcloud_map_loader is not enabled");
236-
return std::nullopt;
237-
}
238-
if (!get_partial_point_cloud_map(position)) {
239-
RCLCPP_WARN_STREAM(logger, "failed to get partial point cloud map");
240-
return std::nullopt;
241-
}
234+
if (cli_pcd_map_) { // if cli_pcd_map_ is available, prepare pointcloud map by partial loading
235+
if (!get_partial_point_cloud_map(position)) {
236+
RCLCPP_WARN_STREAM(logger, "failed to get partial point cloud map");
237+
return std::nullopt;
238+
}
239+
} // otherwise, pointcloud map should be already prepared by on_pcd_map
242240
if (!map_cloud_) {
243241
RCLCPP_WARN_STREAM(logger, "point cloud map is not ready");
244242
return std::nullopt;
245243
}
246244
} else if (fit_target_ == "vector_map") {
245+
// vector_map_ should be already prepared by on_vector_map
247246
if (!vector_map_) {
248247
RCLCPP_WARN_STREAM(logger, "vector map is not ready");
249248
return std::nullopt;

0 commit comments

Comments
 (0)