From 4cd1528ffb65ab6b144f63085d6cdc233a54d9fd Mon Sep 17 00:00:00 2001 From: Michael Grupp Date: Thu, 2 Aug 2018 19:35:19 +0200 Subject: [PATCH] Replace CHECK() by a warning in MapBuilderStub::SerializeState() (#1364) See discussion in https://github.com/googlecartographer/cartographer_ros/pull/966 --- cartographer/cloud/client/map_builder_stub.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cartographer/cloud/client/map_builder_stub.cc b/cartographer/cloud/client/map_builder_stub.cc index 038bfb2..0fdcfb8 100644 --- a/cartographer/cloud/client/map_builder_stub.cc +++ b/cartographer/cloud/client/map_builder_stub.cc @@ -125,8 +125,10 @@ std::string MapBuilderStub::SubmapToProto( void MapBuilderStub::SerializeState(bool include_unfinished_submaps, io::ProtoStreamWriterInterface* writer) { - CHECK(!include_unfinished_submaps) - << "Writing of unfinished submaps is unsupported."; + if (!include_unfinished_submaps) { + LOG(WARNING) << "Serializing unfinished submaps is currently unsupported. " + "Proceeding to write the state without them."; + } google::protobuf::Empty request; async_grpc::Client client(client_channel_); CHECK(client.Write(request));