17 #ifndef CARTOGRAPHER_MAPPING_INTERNAL_SUBMAP_CONTROLLER_H 18 #define CARTOGRAPHER_MAPPING_INTERNAL_SUBMAP_CONTROLLER_H 23 #include "cartographer/mapping/proto/serialization.pb.h" 28 template <
class SubmapType>
32 const mapping::proto::Submap& proto) {
34 proto.submap_id().submap_index()};
35 std::shared_ptr<SubmapType> submap_ptr;
42 submap_ptr = submap_it->data;
44 submap_ptr->UpdateFromProto(proto);
48 if (submap_ptr->finished()) {
53 submap_ptr->set_num_range_data(0);
59 std::shared_ptr<SubmapType>
CreateSubmap(
const mapping::proto::Submap& proto);
66 std::shared_ptr<mapping::Submap2D>
68 const mapping::proto::Submap& proto);
70 std::shared_ptr<mapping::Submap3D>
72 const mapping::proto::Submap& proto);
77 #endif // CARTOGRAPHER_MAPPING_INTERNAL_SUBMAP_CONTROLLER_H
std::shared_ptr< SubmapType > CreateSubmap(const mapping::proto::Submap &proto)
mapping::MapById< mapping::SubmapId, std::shared_ptr< SubmapType > > unfinished_submaps_
std::shared_ptr< SubmapType > UpdateSubmap(const mapping::proto::Submap &proto)