From 578b5df9cea255362671343192df47283bb34db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20Sch=C3=BCtte?= Date: Wed, 19 Sep 2018 11:37:01 +0200 Subject: [PATCH] Follow googlecartographer/cartographer#1424 (#1014) --- cartographer_ros/cartographer_ros/map_builder_bridge.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cartographer_ros/cartographer_ros/map_builder_bridge.cc b/cartographer_ros/cartographer_ros/map_builder_bridge.cc index 0be2f08..26b89a2 100644 --- a/cartographer_ros/cartographer_ros/map_builder_bridge.cc +++ b/cartographer_ros/cartographer_ros/map_builder_bridge.cc @@ -162,9 +162,8 @@ void MapBuilderBridge::RunFinalOptimization() { bool MapBuilderBridge::SerializeState(const std::string& filename, const bool include_unfinished_submaps) { - cartographer::io::ProtoStreamWriter writer(filename); - map_builder_->SerializeState(include_unfinished_submaps, &writer); - return writer.Close(); + return map_builder_->SerializeStateToFile(include_unfinished_submaps, + filename); } void MapBuilderBridge::HandleSubmapQuery(