From 1f55b18eb6bc0e8a4411f6514a9f532a2f44ea94 Mon Sep 17 00:00:00 2001 From: Kevin Daun Date: Tue, 17 Apr 2018 15:13:44 +0200 Subject: [PATCH] Enable rendering of submaps without a grid (#829) - related to https://github.com/googlecartographer/cartographer_ros/issues/819 --- cartographer_ros/cartographer_ros/map_builder_bridge.cc | 3 --- cartographer_ros/cartographer_ros/submap.cc | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cartographer_ros/cartographer_ros/map_builder_bridge.cc b/cartographer_ros/cartographer_ros/map_builder_bridge.cc index 207b871..f8658f8 100644 --- a/cartographer_ros/cartographer_ros/map_builder_bridge.cc +++ b/cartographer_ros/cartographer_ros/map_builder_bridge.cc @@ -178,9 +178,6 @@ void MapBuilderBridge::HandleSubmapQuery( return; } - CHECK(response_proto.textures_size() > 0) - << "empty textures given for submap: " << submap_id; - response.submap_version = response_proto.submap_version(); for (const auto& texture_proto : response_proto.textures()) { response.textures.emplace_back(); diff --git a/cartographer_ros/cartographer_ros/submap.cc b/cartographer_ros/cartographer_ros/submap.cc index c05ecfb..4a679f1 100644 --- a/cartographer_ros/cartographer_ros/submap.cc +++ b/cartographer_ros/cartographer_ros/submap.cc @@ -35,7 +35,9 @@ std::unique_ptr<::cartographer::io::SubmapTextures> FetchSubmapTextures( srv.response.status.code != ::cartographer_ros_msgs::StatusCode::OK) { return nullptr; } - CHECK(!srv.response.textures.empty()); + if (srv.response.textures.empty()) { + return nullptr; + } auto response = ::cartographer::common::make_unique<::cartographer::io::SubmapTextures>(); response->version = srv.response.submap_version;