cartographer trajectory_builder_2d.lua参数解析

概述:cartographer的地图由许多个submap构成,每个submap又由许多个Node构成,而每个Node是由一帧或多帧激光数据累积得到。

-- Copyright 2016 The Cartographer Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
--      http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.

TRAJECTORY_BUILDER_2D = {
    
    
  use_imu_data = true, --是否使用imu数据
  min_range = 0., --激光的最近距离
  max_range = 30., --激光的最远距离
  min_z = -0.8, --激光的最小高度
  max_z = 2., --激光的最大高度
  missing_data_ray_length = 5., --如果不在min_range和max_range之间,则默认给这个数值
  num_accumulated_range_data = 1, --积累几帧激光数据作为一个Node节点
  voxel_filter_size = 0.025, --一帧激光的网格滤波大小,单位为米。
  
  adaptive_voxel_filter = {
    
     --自适应滤波,就是自适应调整滤波网格的大小、使得点云数量刚刚好大于最小点云数量,同时又不过多。
    max_length = 0.5, -- 初始网格滤波的大小,单位为米
    min_num_points = 200, --最小点云数据
    max_range = 50., --点云的最远距离
  },

  loop_closure_adaptive_voxel_filter = {
    
     --闭环检测自适应滤波
    max_length = 0.9, --同上
    min_num_points = 100, --同上
    max_range = 50., --同上
  },

  use_online_correlative_scan_matching = false, --使用CSM激光匹配
  real_time_correlative_scan_matcher = {
    
     --快速CSN激光匹配
    linear_search_window = 0.1, --平移搜索范围
    angular_search_window = math.rad(20.), --角度搜索范围
    translation_delta_cost_weight = 1e-1, --平移代价权重,就是距离初始值越远,匹配得分要越高才能被信任
    rotation_delta_cost_weight = 1e-1, --旋转代价权重,同上
  },

  ceres_scan_matcher = {
    
     --使用ceres优化的方式进行激光匹配
    occupied_space_weight = 1., --占据空间权重
    translation_weight = 10., --平移权重
    rotation_weight = 40., --旋转权重
    ceres_solver_options = {
    
     --ceres优化参数
      use_nonmonotonic_steps = false, --使用非单调的步骤,这个功能再明确一下
      max_num_iterations = 20, --最大迭代次数
      num_threads = 1, --使用几个线程优化
    },
  },

  motion_filter = {
    
     --移动滤波,就是判断小车有没有动,就是检测2帧激光数据是否相似,要满足一下全部条件
    max_time_seconds = 5., --2帧激光时间戳小间隔
    max_distance_meters = 0.2, --2帧激光最小距离
    max_angle_radians = math.rad(1.), --2帧激光最小角度
  },

  -- TODO(schwoere,wohe): Remove this constant. This is only kept for ROS.
  imu_gravity_time_constant = 10., --imu的重力常数
  pose_extrapolator = {
    
     --位姿推断
    use_imu_based = false, --3d用来初始化位姿推断器的方式
    constant_velocity = {
    
    
      imu_gravity_time_constant = 10., --imu的重力常数
      pose_queue_duration = 0.001,
    },
    imu_based = {
    
     --这个还不清楚
      pose_queue_duration = 5.,
      gravity_constant = 9.806,
      pose_translation_weight = 1.,
      pose_rotation_weight = 1.,
      imu_acceleration_weight = 1.,
      imu_rotation_weight = 1.,
      odometry_translation_weight = 1.,
      odometry_rotation_weight = 1.,
      solver_options = {
    
    
        use_nonmonotonic_steps = false;
        max_num_iterations = 10;
        num_threads = 1;
      },
    },
  },

  submaps = {
    
     --子图
    num_range_data = 90, --子图中Node的数量
    grid_options_2d = {
    
    
      grid_type = "PROBABILITY_GRID", --概率栅格地图
      resolution = 0.05, --分辨率
    },
    range_data_inserter = {
    
     
      range_data_inserter_type = "PROBABILITY_GRID_INSERTER_2D",
      probability_grid_range_data_inserter = {
    
    
        insert_free_space = true,
        hit_probability = 0.55,
        miss_probability = 0.49,
      },
      tsdf_range_data_inserter = {
    
    
        truncation_distance = 0.3,
        maximum_weight = 10.,
        update_free_space = false,
        normal_estimation_options = {
    
    
          num_normal_samples = 4,
          sample_radius = 0.5,
        },
        project_sdf_distance_to_scan_normal = true,
        update_weight_range_exponent = 0,
        update_weight_angle_scan_normal_to_ray_kernel_bandwidth = 0.5,
        update_weight_distance_cell_to_hit_kernel_bandwidth = 0.5,
      },
    },
  },
}

居然还有一些参数不能明白,看来距离返攻cartographer的时间又要延长了

猜你喜欢

转载自blog.csdn.net/windxf/article/details/109851916