17 #ifndef CARTOGRAPHER_MAPPING_2D_SUBMAP_2D_H_ 18 #define CARTOGRAPHER_MAPPING_2D_SUBMAP_2D_H_ 27 #include "cartographer/mapping/proto/2d/submaps_options_2d.pb.h" 28 #include "cartographer/mapping/proto/serialization.pb.h" 29 #include "cartographer/mapping/proto/submap_visualization.pb.h" 40 common::LuaParameterDictionary* parameter_dictionary);
44 Submap2D(
const Eigen::Vector2f& origin, std::unique_ptr<Grid2D>
grid);
45 explicit Submap2D(
const proto::Submap2D& proto);
47 void ToProto(proto::Submap* proto,
48 bool include_probability_grid_data)
const override;
52 proto::SubmapQuery::Response* response)
const override;
84 int matching_index()
const;
89 std::vector<std::shared_ptr<Submap2D>> submaps()
const;
92 std::unique_ptr<RangeDataInserterInterface> CreateRangeDataInserter();
93 std::unique_ptr<GridInterface> CreateGrid(
const Eigen::Vector2f& origin);
95 void AddSubmap(
const Eigen::Vector2f& origin);
98 int matching_submap_index_ = 0;
99 std::vector<std::shared_ptr<Submap2D>>
submaps_;
106 #endif // CARTOGRAPHER_MAPPING_2D_SUBMAP_2D_H_
void InsertRangeData(const sensor::RangeData &range_data, const RangeDataInserterInterface *range_data_inserter)
void ToProto(proto::Submap *proto, bool include_probability_grid_data) const override
std::unique_ptr< RangeDataInserterInterface > range_data_inserter_
proto::SubmapsOptions2D CreateSubmapsOptions2D(common::LuaParameterDictionary *const parameter_dictionary)
void ToResponseProto(const transform::Rigid3d &global_submap_pose, proto::SubmapQuery::Response *response) const override
const proto::SubmapsOptions2D options_
std::vector< std::shared_ptr< Submap2D > > submaps_
Submap2D(const Eigen::Vector2f &origin, std::unique_ptr< Grid2D > grid)
const Grid2D * grid() const
std::unique_ptr< Grid2D > grid_
void UpdateFromProto(const proto::Submap &proto) override