Skip to content

Commit e063f2d

Browse files
revert(map_loader): revert the change error handling when pcd_metadata file (#6294)
Revert "fix(map_loader): change error handling when pcd_metadata file not found (#6227)" This reverts commit 25bc636.
1 parent fa8424d commit e063f2d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

map/map_loader/src/pointcloud_map_loader/pointcloud_map_loader_node.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,8 @@ std::map<std::string, PCDFileMetadata> PointCloudMapLoaderNode::getPCDMetadata(
9090
{
9191
std::map<std::string, PCDFileMetadata> pcd_metadata_dict;
9292
if (pcd_paths.size() != 1) {
93-
while (!fs::exists(pcd_metadata_path)) {
94-
RCLCPP_ERROR_STREAM(get_logger(), "PCD metadata file not found: " << pcd_metadata_path);
95-
std::this_thread::sleep_for(std::chrono::seconds(1));
93+
if (!fs::exists(pcd_metadata_path)) {
94+
throw std::runtime_error("PCD metadata file not found: " + pcd_metadata_path);
9695
}
9796

9897
pcd_metadata_dict = loadPCDMetadata(pcd_metadata_path);

0 commit comments

Comments
 (0)