6#include <Eigen/Geometry>
8#include <glim/odometry/estimation_frame.hpp>
18 using Ptr = std::shared_ptr<SubMap>;
19 using ConstPtr = std::shared_ptr<const SubMap>;
21 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
48 return reinterpret_cast<T*
>(found->second.get());
63 return reinterpret_cast<const T*
>(found->second.get());
70 void save(
const std::string& path)
const;
78 static SubMap::Ptr
load(
const std::string& path);
88 gtsam_points::PointCloud::Ptr
frame;
89 std::vector<gtsam_points::GaussianVoxelMap::Ptr>
voxelmaps;
91 std::vector<EstimationFrame::ConstPtr>
frames;
94 std::unordered_map<std::string, std::shared_ptr<void>>
custom_data;
SubMap.
Definition sub_map.hpp:16
const T * get_custom_data(const std::string &key) const
Get the custom data and cast it to the specified type.
Definition sub_map.hpp:58
std::vector< EstimationFrame::ConstPtr > odom_frames
Original odometry frames.
Definition sub_map.hpp:92
void drop_frame_points()
Remove point clouds of the odometry estimation frames (to save memory)
Eigen::Isometry3d T_origin_endpoint_L
frame.front() pose w.r.t. the origin
Definition sub_map.hpp:85
static SubMap::Ptr load(const std::string &path)
Load a submap from storage.
int id
submap ID
Definition sub_map.hpp:81
EstimationFrame::ConstPtr origin_frame() const
Get the origin frame.
Definition sub_map.hpp:31
gtsam_points::PointCloud::Ptr frame
Merged submap frame.
Definition sub_map.hpp:88
std::unordered_map< std::string, std::shared_ptr< void > > custom_data
User-defined custom data.
Definition sub_map.hpp:94
void save(const std::string &path) const
Save the submap.
T * get_custom_data(const std::string &key)
Get the custom data and cast it to the specified type.
Definition sub_map.hpp:43
int session_id
session ID (Used for only offline mapping)
Definition sub_map.hpp:82
EstimationFrame::ConstPtr origin_odom_frame() const
Get the origin odometry frame.
Definition sub_map.hpp:34
Eigen::Isometry3d T_origin_endpoint_R
frame.back() pose w.r.t. the origin
Definition sub_map.hpp:86
std::vector< gtsam_points::GaussianVoxelMap::Ptr > voxelmaps
Multi-resolution voxelmaps.
Definition sub_map.hpp:89
Eigen::Isometry3d T_world_origin
frame[frame.size() / 2] pose w.r.t. the world
Definition sub_map.hpp:84
std::vector< EstimationFrame::ConstPtr > frames
Optimized odometry frames.
Definition sub_map.hpp:91