GLIM
Loading...
Searching...
No Matches
map_cell.hpp
1#pragma once
2
3#include <gtsam_points/types/point_cloud_cpu.hpp>
4#include <glim/mapping/sub_map.hpp>
5
6namespace glim {
7
9struct MapCell {
10public:
11 using Ptr = std::shared_ptr<MapCell>;
12 using ConstPtr = std::shared_ptr<const MapCell>;
13
14 MapCell(double resolution, const Eigen::Vector3i& coord);
15 ~MapCell();
16
17 std::string name() const;
18
19 void clear();
20 void add_point(int submap_id, int point_id);
21 void add_points(int submap_id, const std::vector<int>& point_ids);
22
23 void remove_submap(int submap_id);
24 void remove_submaps(const std::vector<int>& submap_ids);
25
26public:
27 const double resolution; // Cell resolution [m]
28 const Eigen::Vector3i coord; // Cell coordinates in the map frame
29
30 std::vector<std::uint64_t> point_ids; // (submap_id << 32bit) | point_id
31};
32
33} // namespace glim
A cell to store submap point indices for quick indexing.
Definition map_cell.hpp:9