Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #include "cartographer/mapping/internal/submap_controller.h"
00018
00019 namespace cartographer {
00020 namespace mapping {
00021
00022 template <>
00023 std::shared_ptr<mapping::Submap2D>
00024 SubmapController<mapping::Submap2D>::CreateSubmap(
00025 const mapping::proto::Submap& proto) {
00026 if (proto.submap_2d().num_range_data() != 1) {
00027 LOG(WARNING) << "Refusing to create partially filled submap: "
00028 << proto.submap_2d().num_range_data();
00029 return nullptr;
00030 }
00031 return std::make_shared<mapping::Submap2D>(proto.submap_2d(),
00032 &conversion_tables_);
00033 }
00034
00035 template <>
00036 std::shared_ptr<mapping::Submap3D>
00037 SubmapController<mapping::Submap3D>::CreateSubmap(
00038 const mapping::proto::Submap& proto) {
00039 if (proto.submap_3d().num_range_data() != 1) {
00040 LOG(INFO) << "Refusing to create partially filled submap: "
00041 << proto.submap_3d().num_range_data();
00042 return nullptr;
00043 }
00044 return std::make_shared<mapping::Submap3D>(proto.submap_3d());
00045 }
00046
00047 }
00048 }