struct mola::LidarOdometry::Parameters::MapUpdateOptions
Overview
Keyframe-creation policy for the LOCAL METRIC MAP. The distance thresholds, the occupancy count and the temporal window all come from mola::KeyframeDecisionOptions, shared with SimpleMapOptions; they stay plain (non-nested) YAML keys of the local_map_updates section.
#include <LidarOdometry.h> struct MapUpdateOptions: public mola::KeyframeDecisionOptions { // fields bool enabled = true; double max_distance_to_keep_keyframes = 0; uint32_t check_for_removal_every_n = 100; uint32_t publish_map_updates_every_n = 5; bool rebuild_on_corrections = true; double rebuild_keyframe_spacing = 1.0; bool publish_local_map = true; std::string load_existing_local_map; std::string save_final_local_map; bool load_map_after_gui_init = false; // methods void initialize( const Yaml& c, Parameters& parent ); };
Inherited Members
public: // fields double min_translation_between_keyframes = 1.0; double min_rotation_between_keyframes = 30.0; bool measure_from_last_kf_only = false; uint32_t min_nearby_poses_occupied = 1; double nearby_keyframe_time_window = 0;
Fields
bool enabled = true
If set to false, the odometry system can be used as localization-only.
double max_distance_to_keep_keyframes = 0
Should match the “remove farther than” option of the local metric map. 0 means deletion of distant keyframes is disabled. In meters.
uint32_t check_for_removal_every_n = 100
If max_distance_to_keep_keyframes is not zero, this indicates how often to do the distant keyframes clean up.
uint32_t publish_map_updates_every_n = 5
Publish updated map via mola::MapSourceBase once every N frames
bool rebuild_on_corrections = true
If a mola::LocalMapCorrectionSource (e.g. a global mapper) is present and keyframes are pushed to it, rebuild the local map after each of its corrections (loop closures), from its keyframes within max_distance_to_keep_keyframes, including those of earlier visits. The map is anchored at the newest pushed keyframe, so the vehicle pose does not jump.
double rebuild_keyframe_spacing = 1.0
Minimum distance between the keyframes used in a rebuild [m] (the newest ones are kept): denser keyframes mostly repeat points, and each one costs a scan preprocessing.
bool publish_local_map = true
Whether to publish the local map at all via mola::MapSourceBase.
Publishing deep-copies the whole local map, which on a large
scene costs a noticeable fraction of the per-scan budget, and
it is done unconditionally: there is deliberately no check for
whether anyone is subscribed, so that a subscriber arriving
late still receives a map. That trade is right for a live node
and wrong for a batch run, where no subscriber will ever
appear, so the offline CLI defaults this off.
std::string load_existing_local_map
If non-empty, the local map will be loaded from the given *.mm file instead of generating it from scratch. This can be used for multi-session SLAM, or for localization-only.
std::string save_final_local_map
If not empty, saves the final local metric map to a “.mm” file
bool load_map_after_gui_init = false
If true, map loading from file is deferred until after the GUI is first rendered, so the GUI appears before the (potentially long) file I/O. Can also be enabled via the env var MOLA_LO_LOAD_MAP_AFTER_GUI=1.