Class Settings

Class Documentation

class Settings

Loads and caches SLAM settings from YAML configuration files.

The loader merges a user-provided YAML file with the default settings and exposes strongly typed getters for all modules.

Public Types

typedef std::shared_ptr<Settings> shared_ptr

Shared-pointer alias for a settings instance.

Public Functions

Settings()

Construct a settings loader/cache with default-initialized values.

inline ~Settings()

Destroy the settings object.

void load(const fs::path &path_)

Load and merge settings from a YAML file path.

Reads defaults, applies user overrides from path_, and updates typed cached fields used by getters.

Parameters:

path_ – Filesystem path to the YAML settings file.

inline void load(const std::string &path_)

String-path overload of load(const fs::path&).

Parameters:

path_ – Path to the YAML settings file.

inline modes::SystemMode operation_mode() const

Returns the operation mode of the system.

inline modes::FeatureType feature_type() const

Returns the feature type used in SLAM.

Returns:

Configured value loaded from the merged settings files.

inline size_t maximum_features() const

Returns the maximum number of features to extract.

Returns:

Configured value loaded from the merged settings files.

inline int faiss_cuda_device_id() const

Returns the CUDA device used by FAISS feature matching.

Returns:

Configured value loaded from the merged settings files.

inline int border_cut_width() const

Returns the border cut width for feature extraction.

Returns:

Configured value loaded from the merged settings files.

inline int border_cut_height() const

Returns the border cut height for feature extraction.

Returns:

Configured value loaded from the merged settings files.

inline bool apply_rootsift() const

Returns whether RootSIFT is applied.

Returns:

Configured value loaded from the merged settings files.

inline modes::DepthInferenceModel depth_inference_model() const

Returns the depth inference model.

Returns:

Configured value loaded from the merged settings files.

inline std::string path_to_depth_onnx_model() const

Returns the path to the depth ONNX model.

Returns:

Configured value loaded from the merged settings files.

inline double depth_lowest_confidence() const

Returns the lowest confidence threshold for depth inference.

Returns:

Configured value loaded from the merged settings files.

inline int depth_inference_cuda_device_id() const

Returns the CUDA device used by depth inference.

Returns:

Configured value loaded from the merged settings files.

inline std::string aliked_model_name() const

Returns the name of the ALIKED model.

Returns:

Configured value loaded from the merged settings files.

inline float aliked_scores_th() const

Returns the ALIKED score threshold.

Returns:

Configured value loaded from the merged settings files.

inline int aliked_cuda_device_id() const

Returns the CUDA device used by ALIKED.

Returns:

Configured value loaded from the merged settings files.

inline int sift_num_octaves() const

Returns the number of octaves for SIFT.

Returns:

Configured value loaded from the merged settings files.

inline double sift_init_blur() const

Returns the initial blur for SIFT.

Returns:

Configured value loaded from the merged settings files.

inline double sift_peak_thresh() const

Returns the peak threshold for SIFT.

Returns:

Configured value loaded from the merged settings files.

inline double sift_min_scale() const

Returns the minimum scale for SIFT.

Returns:

Configured value loaded from the merged settings files.

inline bool sift_up_scale() const

Returns whether SIFT upscaling is enabled.

Returns:

Configured value loaded from the merged settings files.

inline int minimum_frame_features() const

Returns the minimum number of features per frame.

inline double frame_minimum_depth() const

Returns the minimum depth for frames.

Returns:

Configured value loaded from the merged settings files.

inline double frame_maximum_depth() const

Returns the maximum depth for frames.

Returns:

Configured value loaded from the merged settings files.

inline int temporal_buffer_size() const

Returns the temporal buffer size for point queries.

Returns:

Configured value loaded from the merged settings files.

inline int spatial_query_cells() const

Returns the number of spatial query cells.

Returns:

Configured value loaded from the merged settings files.

inline int pose_minimum_matches() const

Returns the minimum number of matches for pose estimation.

Returns:

Configured value loaded from the merged settings files.

inline int focal_length_estimates() const

Returns the maximum number of focal length estimates.

Returns:

Configured value loaded from the merged settings files.

inline double pose_minimum_inlier_ratio() const

Returns the minimum inlier ratio for pose estimation.

Returns:

Configured value loaded from the merged settings files.

inline int pose_minimum_inliers() const

Returns the minimum number of inliers for pose estimation.

Returns:

Configured value loaded from the merged settings files.

inline array2D_t pose_variation_limits() const

Returns the pose variation limits (rotation and translation).

Returns:

Configured value loaded from the merged settings files.

inline int pnp_ransac_maximum_iterations() const

Returns the maximum number of RANSAC iterations for PnP.

Returns:

Configured value loaded from the merged settings files.

inline int pnp_ransac_minimum_iterations() const

Returns the minimum number of RANSAC iterations for PnP.

Returns:

Configured value loaded from the merged settings files.

inline double pnp_ransac_dyn_num_trials_mult() const

Returns the dynamic number of trials multiplier for RANSAC.

Returns:

Configured value loaded from the merged settings files.

inline double pnp_ransac_success_prob() const

Returns the RANSAC success probability.

Returns:

Configured value loaded from the merged settings files.

inline int pnp_bundle_maximum_iterations() const

Returns the maximum number of bundle adjustment iterations for PnP.

Returns:

Configured value loaded from the merged settings files.

inline int minimum_frames_between_keyframes() const

Returns the minimum number of frames between keyframes.

Returns:

Configured value loaded from the merged settings files.

inline bool use_tracked_points_condition() const

Returns whether to use the tracked points condition for keyframe creation.

Returns:

Configured value loaded from the merged settings files.

inline int minimum_tracked_points() const

Returns the minimum number of tracked points for keyframe creation.

Returns:

Configured value loaded from the merged settings files.

inline bool use_image_coverage_condition() const

Returns whether to use the image coverage condition for keyframe creation.

Returns:

Configured value loaded from the merged settings files.

inline double image_coverage_threshold() const

Returns the image coverage threshold for keyframe creation.

Returns:

Configured value loaded from the merged settings files.

inline int image_coverage_grid_rows() const

Returns the number of grid rows for image coverage.

Returns:

Configured value loaded from the merged settings files.

inline int image_coverage_grid_cols() const

Returns the number of grid columns for image coverage.

Returns:

Configured value loaded from the merged settings files.

inline int image_coverage_minimum_points_per_grid() const

Returns the minimum number of points per grid for image coverage.

Returns:

Configured value loaded from the merged settings files.

inline int image_coverage_minimum_grids_filled() const

Returns the minimum number of grids filled for image coverage.

Returns:

Configured value loaded from the merged settings files.

inline bool use_kl_divergence_condition() const

Returns whether to use KL divergence condition for keyframe creation.

Returns:

Configured value loaded from the merged settings files.

inline double kl_divergence_threshold() const

Returns the KL divergence threshold for keyframe creation.

Returns:

Configured value loaded from the merged settings files.

inline double map_voxel_half_size() const

Returns the voxel half size for map representation.

inline double map_coarse_half_size() const

Returns the coarse half size for map representation.

Returns:

Configured value loaded from the merged settings files.

inline double map_scale_factor() const

Returns the map scale factor.

Returns:

Configured value loaded from the merged settings files.

inline double map_visibility_iou_threshold() const

Returns the IoU threshold for map visibility.

Returns:

Configured value loaded from the merged settings files.

inline size_t neighbors_points_per_keyframe() const

Returns the number of neighbor points per keyframe.

Returns:

Configured value loaded from the merged settings files.

inline int neighbors_search_radius() const

Returns the search radius for neighbors.

Returns:

Configured value loaded from the merged settings files.

inline double neighbors_distance_threshold() const

Returns the distance threshold for neighbors.

Returns:

Configured value loaded from the merged settings files.

inline utils::DescriptorModel::Type descriptor_model_type() const

Returns the descriptor model type.

Returns:

Configured value loaded from the merged settings files.

inline bool covisibility_use_similarity() const

Returns whether covisibility uses similarity-based optimization.

Returns:

Configured value loaded from the merged settings files.

inline int covisibility_module_fps() const

Returns the covisibility module FPS.

Returns:

Configured value loaded from the merged settings files.

inline double covisibility_relinearize_threshold() const

Returns the relinearize threshold for covisibility.

Returns:

Configured value loaded from the merged settings files.

inline int covisibility_relinearize_skip() const

Returns the relinearize skip value for covisibility.

Returns:

Configured value loaded from the merged settings files.

inline double covisibility_rigid_window_clamp_weight() const

Returns the rigid window clamp weight for covisibility.

Returns:

Configured value loaded from the merged settings files.

inline double projection_factor_sigma() const

Returns the sigma value for the projection factor.

Returns:

Configured value loaded from the merged settings files.

inline bool use_robust_projection_factor() const

Returns whether to use a robust projection factor.

Returns:

Configured value loaded from the merged settings files.

inline modes::RobustLossType robust_loss_for_projection_factor() const

Returns the robust loss type for the projection factor.

Returns:

Configured value loaded from the merged settings files.

inline double robust_loss_shape_for_projection_factor() const

Returns the robust loss shape for the projection factor.

Returns:

Configured value loaded from the merged settings files.

inline double distance_factor_sigma() const

Returns the sigma value for the distance factor.

Returns:

Configured value loaded from the merged settings files.

inline bool use_robust_distance_factor() const

Returns whether to use a robust distance factor.

Returns:

Configured value loaded from the merged settings files.

inline modes::RobustLossType robust_loss_for_distance_factor() const

Returns the robust loss type for the distance factor.

Returns:

Configured value loaded from the merged settings files.

inline double robust_loss_shape_for_distance_factor() const

Returns the robust loss shape for the distance factor.

Returns:

Configured value loaded from the merged settings files.

inline int odometry_edge_minimum_matches() const

Returns the minimum number of matches for the odometry edge.

Returns:

Configured value loaded from the merged settings files.

inline double odometry_factor_rotation_sigma() const

Returns the rotation sigma for the odometry factor.

Returns:

Configured value loaded from the merged settings files.

inline double odometry_factor_translation_sigma() const

Returns the translation sigma for the odometry factor.

Returns:

Configured value loaded from the merged settings files.

inline double odometry_factor_scale_sigma() const

Returns the scale sigma for the odometry factor.

Returns:

Configured value loaded from the merged settings files.

inline bool use_robust_odometry_factor() const

Returns whether to use a robust odometry factor.

Returns:

Configured value loaded from the merged settings files.

inline modes::RobustLossType robust_loss_for_odometry_factor() const

Returns the robust loss type for the odometry factor.

Returns:

Configured value loaded from the merged settings files.

inline double robust_loss_shape_for_odometry_factor() const

Returns the robust loss shape for the odometry factor.

Returns:

Configured value loaded from the merged settings files.

inline double loop_edge_weight() const

Returns the loop edge weight.

Returns:

Configured value loaded from the merged settings files.

inline std::array<unsigned int, 3> interface_image_default_point_color() const

Returns the default point color for the interface image.

inline std::array<unsigned int, 3> interface_image_inlier_point_color() const

Returns the inlier point color for the interface image.

Returns:

Configured value loaded from the merged settings files.

inline std::array<unsigned int, 3> interface_image_all_point_color() const

Returns the color for all points in the interface image.

Returns:

Configured value loaded from the merged settings files.

inline std::array<unsigned int, 3> interface_image_tracking_color() const

Returns the tracking feature color for the interface image.

Returns:

Configured value loaded from the merged settings files.

inline std::array<unsigned int, 3> interface_image_text_color() const

Returns the text color for the interface image.

Returns:

Configured value loaded from the merged settings files.

inline int interface_image_line_thickness() const

Returns the line thickness for the interface image.

Returns:

Configured value loaded from the merged settings files.

inline float interface_sparse_point_size() const

Returns the sparse point size for the interface.

Returns:

Configured value loaded from the merged settings files.

inline float interface_dense_point_size() const

Returns the dense point size for the interface.

Returns:

Configured value loaded from the merged settings files.

inline float interface_cell_thickness() const

Returns the cell thickness for the interface.

Returns:

Configured value loaded from the merged settings files.

inline float interface_cell_highlighted_thickness() const

Returns the highlighted cell thickness for the interface.

Returns:

Configured value loaded from the merged settings files.

inline std::array<unsigned int, 4> interface_cell_color() const

Returns the cell color for the interface.

Returns:

Configured value loaded from the merged settings files.

inline std::array<unsigned int, 4> interface_cell_highlighted_color() const

Returns the highlighted cell color for the interface.

Returns:

Configured value loaded from the merged settings files.

inline float interface_covisibility_line_thickness() const

Returns the covisibility line thickness for the interface.

Returns:

Configured value loaded from the merged settings files.

inline std::array<unsigned int, 4> interface_covisibility_line_color() const

Returns the covisibility line color for the interface.

Returns:

Configured value loaded from the merged settings files.

Public Static Functions

static inline Settings::shared_ptr make_shared()

Static factory method to create a shared pointer to a Settings instance.

Returns:

Shared pointer to a new Settings instance.

Private Members

fs::path _path

Path to the settings files.

settings::Config _cfg

All cached settings in a single structure.

YAML::Node _node

Keep YAML::Node for backward compatibility and debugging.