Skip to content

Graph SLAM Parameters

Every ROS parameter the graph_based_slam node declares, with its type and default, grouped as in graph_based_slam/src/graph_slam_config.hpp. graph_slam_offline_runner reads many of the same names (and some of its own); its source lists them. Presets that set these parameters are in lidarslam/param/.

This page is generated by scripts/generate_graph_slam_parameter_reference.py from the config sources: a description here is the comment above the member in the header. Edit the header, then run the script; a test fails while the page is out of date.

Parameter Type Default Description
registration_method std::string "NDT" Loop-closure registration: "NDT" (pclomp NDT), "GICP" (pclomp GICP) or "SMALL_GICP" (small_gicp GICP). Case-sensitive; any other value stops the node at startup.
voxel_leaf_size double 0.2 Voxel size (m) of the loop registration's source and target aggregates and of the clouds the place-recognition descriptors are computed from. The saved map uses map_leaf_size.
ndt_resolution double 5.0 NDT cell size (m) of the loop registration (registration_method NDT).
ndt_num_threads int 0 Threads of the NDT and SMALL_GICP loop registration; 0 or less leaves the library default (all OpenMP threads for NDT). GICP does not use it.
gicp_max_correspondence_distance double 30.0 GICP loop registration: largest point-to-point distance taken as a correspondence (m).
gicp_transformation_epsilon double 1e-8 GICP loop registration: converged once the transformation changes by less than this between iterations.
threshold_loop_closure_score double 1.0 A loop candidate is accepted only if its registration fitness (mean squared distance of the aligned source points to the target, m^2) is below this; the lowest fitness among the accepted candidates wins.
scan_context_loop_closure_score_threshold double -1.0
distance_loop_closure double 20.0 A submap is a loop candidate only if the trajectory travelled more than this (m) since it.
range_of_searching_loop_closure double 20.0 Distance candidates must lie closer than this (m) to the query submap's estimated position. ScanContext and triangle candidates are not limited by it.
search_submap_num int 3 Submaps aggregated for loop registration: the query and the N-1 before it as the source, the candidate and N on each side as the target. Each descriptor is computed on a submap and its N-1 predecessors.
loop_search_query_stride int 1 Loop search runs for every N-th new submap; descriptors are still computed for all.
max_loop_candidate_count int 3 Nearest distance candidates registered per query (also the ScanContext query's top-K; BEV and SOLiD rerank the nearest 4 x this).
loop_edge_dedup_index_window int 8 An accepted loop edge whose two submap indices are both within this many of an existing edge's replaces that edge only if its fitness is lower; otherwise it is dropped.
loop_max_translation_delta double 15.0 Rejects a loop whose registration correction translates by more than this (m). The correction is a world-frame transform, so its rotation also moves it in proportion to the distance from the map origin.
loop_max_rotation_delta_deg double 45.0 Rejects a loop whose registration correction rotates by more than this (deg).
loop_min_overlap_ratio double 0.0
loop_min_overlap_ratio_large_correction double 0.0
loop_overlap_large_correction_translation_m double 0.0
loop_overlap_max_distance_m double 0.5
loop_max_drift_ratio double 0.0 If above 0, rejects a loop that moves the query submap by more than loop_max_drift_offset_m + this x the distance travelled between the two submaps.
loop_max_drift_offset_m double 0.5 Constant term (m) of the drift check (loop_max_drift_ratio).
loop_max_translation_delta_descriptor double -1.0
loop_max_rotation_delta_deg_descriptor double -1.0

Pose graph optimization

Parameter Type Default Description
num_adjacent_pose_cnstraints int 5 Each submap gets odometry edges to its previous N submaps; an edge across k submaps has 1/k of the information.
use_save_map_in_loop bool true Write the whole map bundle (map, pose graph, trajectory, loop edges) to map_save_dir after every accepted loop edge, not only on the map_save service.
debug_flag bool false Extra loop-search logging; it changes no result.
adjacent_edge_info_weight double 1000.0 Information (times the identity) of an odometry edge between neighbouring submaps. The starting value when adjacent_edge_info_auto_scale is on.
adjacent_edge_info_auto_scale bool false
adjacent_edge_info_auto_scale_target_nis double 6.0
adjacent_edge_info_auto_scale_ema_alpha double 0.3
adjacent_edge_info_auto_scale_min double 1.0
adjacent_edge_info_auto_scale_max double 1.0e6
adjacent_edge_info_auto_scale_split_trans_rot bool false Odometry edges take separate translation and rotation information (adjacent_edge_info_weight_trans / _rot), each auto-scaled on its own when adjacent_edge_info_auto_scale is on.
adjacent_edge_info_weight_trans double -1.0 Translation information of odometry edges with split_trans_rot; 0 or less: adjacent_edge_info_weight.
adjacent_edge_info_weight_rot double -1.0 Rotation information of odometry edges with split_trans_rot; 0 or less: adjacent_edge_info_weight.
adjacent_edge_info_auto_scale_target_nis_trans double 3.0
adjacent_edge_info_auto_scale_target_nis_rot double 3.0
loop_edge_info_weight double 100.0 Loop edge information: this / the registration fitness (times the identity), unless both loop_edge_info_constant_* are above 0.
loop_edge_info_constant_trans double 0.0 If this and loop_edge_info_constant_rot are both above 0, loop edges take this fixed translation information instead of the fitness-based one.
loop_edge_info_constant_rot double 0.0 Fixed rotation information of loop edges; see loop_edge_info_constant_trans.
loop_edge_robust_kernel_delta double 1.0 Delta of the robust kernel on loop edges (g2o setDelta).
loop_edge_robust_kernel_type std::string "huber" Robust kernel on loop edges: "huber", "dcs" or "cauchy" (any case); any other value means huber.

Place recognition and verification

Parameter Type Default Description
use_scan_context bool false Adds at most one ScanContext candidate per query (not range-limited), registered with its yaw hint.
use_bev_descriptor bool false Reranks the nearest distance candidates by a bird's-eye-view descriptor once there are more than 50 submaps; adds no candidates of its own.
use_solid_descriptor bool false Adds SOLiD candidates from the nearest distance-pool submaps once there are more than 50, registered with their yaw hint.
use_triangle_descriptor bool false Adds at most one triangle-descriptor candidate per query, from a vote over all earlier submaps verified by RANSAC (not range-limited).
triangle_descriptor_grid_size_m double 60.0
triangle_descriptor_grid_cells int 100
triangle_descriptor_max_keypoints int 40
triangle_descriptor_min_salience_m double 0.8
triangle_descriptor_min_edge_m double 2.0
triangle_descriptor_max_edge_m double 50.0
triangle_descriptor_max_triangles int 3000
triangle_descriptor_edge_bin_m double 0.5
triangle_descriptor_quad_feature_bin_m double 0.0
triangle_descriptor_keypoint_mode std::string "bev_max_height"
triangle_descriptor_edge_voxel_size_m double 0.4
triangle_descriptor_edge_neighbor_radius_m double 1.0
triangle_descriptor_edge_min_neighbors int 6
triangle_descriptor_edge_min_edgeness double 0.5
triangle_descriptor_edge_nms_radius_m double 2.0
triangle_descriptor_min_votes int 6
triangle_descriptor_min_inliers int 4
triangle_descriptor_min_inlier_ratio double 0.0
triangle_descriptor_max_pairs int 64
triangle_descriptor_min_4th_point_agreements int 0
triangle_descriptor_fourth_point_max_distance_m double 2.0
triangle_descriptor_refine_se3_with_all_inliers bool false
triangle_descriptor_skip_ransac bool false
triangle_descriptor_inlier_translation_m double 2.0
triangle_descriptor_inlier_rotation_deg double 5.0
triangle_descriptor_exclude_recent int 4
triangle_verify_with_bev bool false
triangle_verify_bev_max_distance double 0.30
scan_context_threshold double 0.3
scan_context_query_stride int 1
scan_context_exclude_recent int 50
bev_descriptor_threshold double 0.20
bev_descriptor_grid_size_m double 80.0
bev_descriptor_grid_cells int 40
bev_descriptor_yaw_bins int 24
bev_descriptor_sequence_window int 0
bev_descriptor_sequence_threshold double -1.0
bev_descriptor_pose_consistency_threshold_m double -1.0
bev_descriptor_max_euclidean_distance_m double -1.0
bev_descriptor_rerank_weight_m double 100.0
bev_use_mutual_visibility bool false
bev_mutual_visibility_min_overlap_ratio double 0.05
bev_mutual_visibility_occupancy_eps double 0.5
solid_descriptor_min_similarity double 0.70
solid_descriptor_sequence_window int 0
solid_descriptor_sequence_min_similarity double -1.0
solid_descriptor_pose_consistency_threshold_m double -1.0
solid_descriptor_max_euclidean_distance_m double -1.0
prefer_scan_context_candidates bool false
use_3d_bbs_for_scan_context bool false
three_d_bbs_min_level_res double 1.0
three_d_bbs_max_level int 3
three_d_bbs_score_threshold_percentage double 0.25
three_d_bbs_timeout_msec int 50
three_d_bbs_num_threads int 0
three_d_bbs_voxel_leaf_size double 1.0
three_d_bbs_source_submap_num int 2
three_d_bbs_target_submap_radius int 1
three_d_bbs_translation_search_margin_m double 15.0
three_d_bbs_roll_pitch_search_deg double 10.0
three_d_bbs_yaw_search_deg double 180.0

Map filtering, storage and export

Parameter Type Default Description
use_dynamic_object_filter bool false When the map is saved, drops voxels that too few submaps saw within a short index window (transient objects). Not applied to the published map.
dynamic_object_filter_voxel_size double 0.3 Voxel size (m) of the dynamic object filter; the saved points become voxel centroids.
dynamic_object_filter_min_observations int 2 A voxel within range is kept only if at least this many submaps saw it within the temporal window.
dynamic_object_filter_temporal_window int 5 Window of that count, in submap indices (not seconds).
dynamic_object_filter_max_range_from_sensor_m double 30.0 Points farther than this (m) from their submap's origin are always kept.
use_planar_map_filter bool false
planar_map_filter_voxel_size double 0.1
planar_map_filter_min_neighbors int 3
planar_map_filter_max_small_eigenvalue_ratio double 0.24
planar_map_filter_min_middle_eigenvalue_ratio double 0.0
planar_map_filter_min_retained_ratio double 0.90
use_pcd_cache bool false
pcd_cache_dir std::string "/tmp/graph_slam_pcd_cache"
map_save_dir std::string "."
save_pose_graph_path std::string "pose_graph.g2o"
map_grid_size_x double 20.0
map_grid_size_y double 20.0
map_leaf_size double 0.2 Voxel size (m) the saved map is downsampled to.
map_save_points_per_pass int 2000000 The saved map is downsampled from the submap clouds in passes of at most this many points, without assembling the whole map (map_saver::voxelGridFilterStreamed). 0: assemble it and downsample it with one VoxelGrid, as before Phase 4. Not used when the map is also published or the dynamic object filter is on (both need the whole map).

Optional absolute and inertial constraints

Parameter Type Default Description
use_gnss bool false
gnss_topic std::string "/gnss/fix"
gnss_info_weight double 1.0
gnss_use_covariance_weighting bool true
gnss_covariance_min_variance_m2 double 0.01
gnss_covariance_max_variance_m2 double 25.0
gnss_rtk_fix_max_horizontal_stddev_m double 0.3
gnss_rtk_fix_weight_scale double 3.0
gnss_non_rtk_weight_scale double 1.0
gnss_vertical_weight_scale double 0.1 Vertical GNSS information relative to horizontal (on top of the covariance): RTK height is about 2x noisier than position (~0.25); 0.1 trusts it less.
gnss_header_stamp_max_skew_sec double 30.0
gnss_align_yaw bool true
gnss_yaw_alignment_min_anchors int 10
gnss_yaw_alignment_min_baseline_m double 5.0
gnss_origin_min_samples int 3
gnss_origin_consistency_threshold_m double 20.0
gnss_antenna_offset_xyz std::vector<double> [0.0, 0.0, 0.0] GNSS antenna phase centre in the base frame [x, y, z] (m); the anchor then constrains that point of each submap instead of the base origin.
gnss_interpolation_max_gap_sec double 0.0 Interpolate the anchor between the fixes either side of a submap stamp when they are at most this far apart (s); 0 keeps the nearest fix within 1 s.
gnss_robust_kernel_delta double 0.0 > 0: Huber kernel on each GNSS anchor, in sigmas of its covariance (a wrong fix then pulls linearly instead of quadratically); 0 = no kernel.
gnss_subscriber_qos_reliable bool false Subscribe to the GNSS topic with reliable QoS; false: best effort, which also matches best-effort drivers. The offline bag pass-through publishes reliably and fast, and a best-effort reader can lose its first fixes, so the offline launch turns this on.
gravity_prior_info double 0.0 > 0: absolute roll/pitch prior on every submap from its odometry attitude (the frontend's frame must be gravity-aligned, as LIO's is), information per axis of the up-vector error (~rad^-2; 3300 ~ 1 deg). Keeps GNSS anchors from tilting the graph. 0 = off.
use_imu_preintegration bool false
imu_rotation_info_roll_pitch double 100.0
imu_rotation_info_yaw double 10.0

Direct odometry input and diagnostics

Parameter Type Default Description
use_odom_input bool false
submap_distance_threshold double 1.5 Odometry input (use_odom_input): a scan becomes a new submap once the odometry has moved this far (m) from the last submap.
odom_cloud_sync_queue_size int 100 Odometry input: queue size of the odometry/cloud synchronizer and history depth of both subscriptions.
odom_cloud_sync_use_exact_time bool false Odometry input: pair odometry and cloud only by identical stamps (ExactTime); false: ApproximateTime.
cloud_subscriber_qos_reliable bool true Odometry input: subscribe to the cloud with reliable QoS; false: best effort (sensor data).
extrinsic_lidar2base_quat_xyzw_xyz std::vector<double> [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0] LiDAR-to-base extrinsic of cloud_input, [qx, qy, qz, qw, x, y, z] as in RKO-LIO: its deskewed scan is in the LiDAR frame while the odometry pose is the base frame's (base_from_lidar: p_base = R p_lidar + t). The identity keeps the cloud unchanged.
degeneracy_diagnostics_csv_path std::string ""
save_degeneracy_report bool false

159 parameters.