Skip to content

config_camera.yaml

Woosik Lee edited this page Dec 13, 2023 · 1 revision

This is a configuration file that contains camera configurations.

In general, this has general camera options (cam) and specific configurations for each camera (cam0, cam1, ...)

An example of general camera options (cam) is as follows:

cam:
  enabled: true           # Whether or not using cameras.
  max_n: 2                # The number of cameras to be used. Note the number of specific configurations (`cam0`, `cam1`, ...) should match.
  use_stereo: true        # Whether or not using stereo matching. `true` will make stereo camera pairs provided with `stereo_pair`.
  stereo_pair: [0, 1]     # Stereo camera pairs. The numbers should be smaller than `max_n`.
  do_calib_ext: false     # Do camera-to-IMU spatial extrinsic calibration.
  do_calib_int: false     # Do camera intrinsic calibration.
  do_calib_dt: false      # Do camera-to-IMU temporal extrinsic (timeoffset) calibration.
  n_pts: 200              # Number of features extracted from each image
  fast: 15                # FAST detection threshold
  grid_x: 20              # size of grid in the x-direction / u-direction
  grid_y: 20              # size of grid in the y-direction / v-direction
  min_px_dist: 15         # features need to be at least this number of pixels away from each other
  knn: 0.70               # matching ratio needed (smaller value forces top two descriptors during the match to be more different)
  downsample: false       # Whether or not downsample images (1/4 of original image). `true` will enable faster feat extraction and matching
  histogram_method: "HISTOGRAM" # Histogram method. Available options: NONE, HISTOGRAM, CLAHE
  max_slam: 50            # Number of maximum SLAM features in the state
  max_msckf: 10           # Number of maximum MSCKF features used at a camera update
  feat_rep: "GLOBAL_3D"   # Point feature representation. Only supports `GLOBAL_3D`
  init_cov_dt: 1e-4       # Initial covariance of timeoffset calibration parameter
  init_cov_ex_o: 1e-4     # Initial covariance of extrinsic (orientation) calibration parameter
  init_cov_ex_p: 1e-3     # Initial covariance of extrinsic (position) calibration parameter
  init_cov_in_k: 1e-0     # Initial covariance of intrinsic (k) calibration parameter
  init_cov_in_c: 1e-0     # Initial covariance of intrinsic (c) calibration parameter
  init_cov_in_r: 1e-5     # Initial covariance of intrinsic (r) calibration parameter
  sigma_px: 1             # Uncertainty (noise) of camera measurement. Unit pixel. 
  chi2_mult: 1            # Chi2 test multiplier. Small treats more features to be outliers, and large passes more features to update.
cam0:
  timeoffset: 0.0                                            # Camera-to-IMU timeoffset
  T_imu_cam:                                                 # Camera-to-IMU transformation.
    - [ 1.000,  0.000,  0.000, -0.010]                          # Rotation from camera to IMU (R_CtoI)
    - [ 0.000,  0.000, -1.000,  0.010]                          # Position of camera in IMU (p_CinI)
    - [ 0.000,  1.000,  0.000,  0.010]
    - [ 0.000,  0.000,  0.000,  1.000]
  intrinsics: [ 458.73774, 457.31996, 367.15827, 248.29340 ] # Intrinsic values 
  distortion_coeffs: [ -0.28361, 0.07408, 0.00022, 0.00007 ] # Distortion values 
  distortion_model: radtan                                   # Distortion model 
  resolution: [752, 480]                                     # Resolution of image
  topic: "cam0_topic"                                        # ROS topic of the camera (used when using subscriber or rosbag)
Clone this wiki locally