simple_icp/
config.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Debug, Clone)]
4pub struct Config {
5    // map params
6    pub voxel_size: f32,
7    pub max_range: f32,
8    pub min_range: f32,
9    pub max_points_per_voxel: u16,
10
11    // th parms
12    pub min_motion_th: f64,
13    pub initial_threshold: f64,
14
15    // registration params
16    pub max_num_iterations: u16,
17    pub convergence_criterion: f64,
18    pub max_num_threads: u8,
19
20    // Motion compensation
21    pub deskew: bool,
22}
23impl Config {
24    pub fn default_values() -> Config {
25        Config {
26            voxel_size: 1.0,
27            max_range: 100.0,
28            min_range: 1.0,
29            max_points_per_voxel: 20,
30
31            // th parms
32            min_motion_th: 0.1,
33            initial_threshold: 2.0,
34
35            // registration params
36            max_num_iterations: 500,
37            convergence_criterion: 0.0001,
38            max_num_threads: 0,
39
40            // Motion compensation
41            deskew: false,
42        }
43    }
44}