serialization_format_migration.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2018 The Cartographer Authors
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef CARTOGRAPHER_IO_SERIALIZATION_FORMAT_MIGRATION_H_
00018 #define CARTOGRAPHER_IO_SERIALIZATION_FORMAT_MIGRATION_H_
00019 
00020 #include "cartographer/io/proto_stream_interface.h"
00021 #include "cartographer/mapping/id.h"
00022 #include "cartographer/mapping/proto/serialization.pb.h"
00023 
00024 namespace cartographer {
00025 namespace io {
00026 
00027 // This helper function, migrates the input stream, which is supposed to match
00028 // to the "old" stream format order (PoseGraph, AllTrajectoryBuilderOptions,
00029 // SerializedData*) to the version 1 stream format (SerializationHeader,
00030 // SerializedData*).
00031 void MigrateStreamFormatToVersion1(
00032     cartographer::io::ProtoStreamReaderInterface* const input,
00033     cartographer::io::ProtoStreamWriterInterface* const output,
00034     bool migrate_grid_format);
00035 
00036 mapping::MapById<mapping::SubmapId, mapping::proto::Submap>
00037 MigrateSubmapFormatVersion1ToVersion2(
00038     const mapping::MapById<mapping::SubmapId, mapping::proto::Submap>&
00039         submap_id_to_submaps,
00040     mapping::MapById<mapping::NodeId, mapping::proto::Node>& node_id_to_nodes,
00041     const mapping::proto::PoseGraph& pose_graph_proto);
00042 
00043 }  // namespace io
00044 }  // namespace cartographer
00045 
00046 #endif  // CARTOGRAPHER_IO_SERIALIZATION_FORMAT_MIGRATION_H_


cartographer
Author(s): The Cartographer Authors
autogenerated on Thu May 9 2019 02:27:36