RealSenseD435i (三):IMU,Camera以及IMU-Camera的参数标定

一、Kalibr 软件运行


说明:时间有限,我先去干其他的事情,本博客后面会详细写
 

标定的结果

  • 435i_imu_param.yaml
%YAML:1.0
---
type: IMU
name: d435i
Gyr:
   unit: " rad/s"
   avg-axis: #取平均值作为标定结果
      gyr_n: 2.1732068912927271e-03 #白噪声
      gyr_w: 1.7797900203083191e-05 #偏置
   x-axis:
      gyr_n: 2.1391701666780305e-03
      gyr_w: 1.9895954849984289e-05
   y-axis:
      gyr_n: 2.5929821451625827e-03
      gyr_w: 1.9897115334756576e-05
   z-axis:
      gyr_n: 1.7874683620375685e-03
      gyr_w: 1.3600630424508712e-05
Acc:
   unit: " m/s^2"
   avg-axis:  #取平均值作为标定结果
      acc_n: 2.3786845794688424e-02  #白噪声
      acc_w: 5.9166889270489845e-04  #偏置
   x-axis:
      acc_n: 2.1534587157119929e-02
      acc_w: 6.2088900106164286e-04
   y-axis:
      acc_n: 2.2044805094743814e-02
      acc_w: 6.2033852597901415e-04
   z-axis:
      acc_n: 2.7781145132201524e-02
      acc_w: 5.3377915107403855e-04
  • Camera-system parameters
Calibration results 
====================
Camera-system parameters:
	cam0 (/infra_left):
	 type: <class 'aslam_cv.libaslam_cv_python.EquidistantDistortedPinholeCameraGeometry'>
	 distortion: [ 0.40059551 -0.73828444  4.12512287 -6.18517722] +- [ 0.0096611   0.06314745  0.09801433  0.08414741]
	 projection: [ 386.71250573  387.18240561  320.55905537  239.8204248 ] +- [ 0.14888357  0.16540833  0.34725177  0.27395728]
	 reprojection error: [-0.000012, -0.000007] +- [0.148506, 0.106890]

	cam1 (/infra_right):
	 type: <class 'aslam_cv.libaslam_cv_python.EquidistantDistortedPinholeCameraGeometry'>
	 distortion: [ 0.36572062 -0.38257775  3.28883181 -6.72070632] +- [ 0.01450564  0.12847927  0.29582794  0.15893508]
	 projection: [ 386.94988374  387.35006645  321.07250734  240.44316048] +- [ 0.13223764  0.16242541  0.3057414   0.26940346]
	 reprojection error: [0.000004, -0.000005] +- [0.164897, 0.108821]

	cam2 (/color):
	 type: <class 'aslam_cv.libaslam_cv_python.EquidistantDistortedPinholeCameraGeometry'>
	 distortion: [  0.24904226   2.8043341  -15.57145308  26.7679881 ] +- [ 0.0099252   0.09318402  0.2472954   0.11722548]
	 projection: [ 611.67156667  611.71826379  323.28627384  240.57596379] +- [ 0.10541019  0.13846652  0.29617104  0.23250236]
	 reprojection error: [0.000003, -0.000001] +- [0.207269, 0.167030]

	baseline T_1_0:
	 q: [-0.00053684  0.00066745  0.00003144  0.99999963] +- [ 0.00122298  0.00096443  0.00015755]
	 t: [ 0.04996444  0.00001392  0.0000511 ] +- [ 0.00013475  0.00012981  0.00032963]

	baseline T_2_1:
	 q: [ 0.00164081 -0.00396511  0.00180494  0.99998916] +- [ 0.00097517  0.00060299  0.00012675]
	 t: [ 0.01598901 -0.00016613  0.00066788] +- [ 0.00010335  0.00010625  0.00027807]



Target configuration
====================

  Type: aprilgrid
  Tags: 
    Rows: 6
    Cols: 6
    Size: 0.021 [m]
    Spacing 0.00614285721 [m]
  • IMU+相机联合标定

Calibration results
===================
Normalized Residuals
----------------------------
Reprojection error (cam0):     mean 0.309357318376, median 0.251843164322, std: 0.230997537619
Gyroscope error (imu0):        mean 0.265159164537, median 0.228561532289, std: 0.176229173919
Accelerometer error (imu0):    mean 0.221421363455, median 0.195499299021, std: 0.128105231257

Residuals
----------------------------
Reprojection error (cam0) [px]:     mean 0.309357318376, median 0.251843164322, std: 0.230997537619
Gyroscope error (imu0) [rad/s]:     mean 0.00814934517662, median 0.00702456135722, std: 0.00541618982304
Accelerometer error (imu0) [m/s^2]: mean 0.0744854379606, median 0.065765338454, std: 0.0430941897671

Transformation (cam0):
-----------------------
T_ci:  (imu0 to cam0): 
[[ 0.99996271 -0.00181009  0.00844446  0.02651246]
 [ 0.00171691  0.9999377   0.01102943  0.00830124]
 [-0.0084639  -0.01101452  0.99990352 -0.01286511]
 [ 0.          0.          0.          1.        ]]

T_ic:  (cam0 to imu0): 
[[ 0.99996271  0.00171691 -0.0084639  -0.02663461]
 [-0.00181009  0.9999377  -0.01101452 -0.00839444]
 [ 0.00844446  0.01102943  0.99990352  0.01254843]
 [ 0.          0.          0.          1.        ]]

timeshift cam0 to imu0: [s] (t_imu = t_cam + shift)
-0.0253737394755


Gravity vector in target coords: [m/s^2]
[ 0.25486723 -9.78147004 -0.65292373]


Calibration configuration
=========================

cam0
-----
  Camera model: pinhole
  Focal length: [611.6715666677603, 611.7182637869023]
  Principal point: [323.2862738374678, 240.57596378988336]
  Distortion model: equidistant
  Distortion coefficients: [0.24904225693789128, 2.804334100694488, -15.571453079619436, 26.767988102446466]
  Type: aprilgrid
  Tags: 
    Rows: 6
    Cols: 6
    Size: 0.021 [m]
    Spacing 0.00614285721 [m]



IMU configuration
=================

IMU0:
----------------------------
  Model: calibrated
  Update rate: 200.0
  Accelerometer:
    Noise density: 0.0237868457947 
    Noise density (discrete): 0.336396799289 
    Random walk: 0.000591668892705
  Gyroscope:
    Noise density: 0.00217320689129
    Noise density (discrete): 0.0307337865951 
    Random walk: 1.77979002031e-05
  T_i_b
    [[ 1.  0.  0.  0.]
     [ 0.  1.  0.  0.]
     [ 0.  0.  1.  0.]
     [ 0.  0.  0.  1.]]
  time offset with respect to IMU0: 0.0 [s]

VINS Yaml文件配置

%YAML:1.0

#common parameters
imu_topic: "/camera/imu"
image_topic: "/camera/color/image_raw"
output_path: "/home/fb/output/"

#camera calibration
model_type: PINHOLE
camera_name: camera
image_width: 640
image_height: 480
  #TODO modify distortion

distortion_parameters:
   k1: 0.10364469
   k2: -0.1823355
   p1: 0.002330617
   p2: 0.0037446
projection_parameters:
   fx: 601.226091
   fy: 601.3432164
   cx: 332.171979
   cy: 240.5101526

# Extrinsic parameter between IMU and Camera.
estimate_extrinsic: 0   # 0  Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.
                        # 1  Have an initial guess about extrinsic parameters. We will optimize around your initial guess.
                        # 2  Don't know anything about extrinsic parameters. You don't need to give R,T. We will try to calibrate it. Do some rotation movement at beginning.
#If you choose 0 or 1, you should write down the following matrix.
#Rotation from camera frame to imu frame, imu^R_cam
extrinsicRotation: !!opencv-matrix
   rows: 3
   cols: 3
   dt: d
   # data: [  0.99977841,  0.00412757,  0.02064201,
   #         -0.00374241,  0.99981883, -0.01866291,
   #          -0.0207153,   0.01858152,  0.99961273 ] 
   data: [ 0.99998318, -0.00302186, -0.00495021,
           0.00296347,  0.99992645, -0.01176032,
           0.00498539,  0.01174545,  0.99991859 ]   
#Translation from camera frame to imu frame, imu^T_cam
extrinsicTranslation: !!opencv-matrix
   rows: 3
   cols: 1
   dt: d
   # data: [-0.02154582, 0.00681016, 0.02740755]
   data: [-0.0132516, -0.00082214, 0.01535377]



#feature traker paprameters
max_cnt: 200           # max feature number in feature tracking
min_dist: 15            # min distance between two features
freq: 10                # frequence (Hz) of publish tracking result. At least 10Hz for good estimation. If set 0, the frequence will be same as raw image
F_threshold: 1.0        # ransac threshold (pixel)
show_track: 1           # publish tracking image as topic
equalize: 0             # if image is too dark or light, trun on equalize to find enough features
fisheye: 0              # if using fisheye, trun on it. A circle mask will be loaded to remove edge noisy points

#optimization parameters
max_solver_time: 0.04  # max solver itration time (ms), to guarantee real time
max_num_iterations: 8   # max solver itrations, to guarantee real time
keyframe_parallax: 10.0 # keyframe selection threshold (pixel)

#imu parameters       The more accurate parameters you provide, the better performance
#for handheld, wheeld
acc_n: 0.021793          # accelerometer measurement noise standard deviation. #0.2
gyr_n: 0.00215568        # gyroscope measurement noise standard deviation.     #0.05
acc_w: 0.00050207        # accelerometer bias random work noise standard deviation.  #0.02
gyr_w: 1.71656e-05      # gyroscope bias random work noise standard deviation.     #4.0e-5

#for tracked applications
#acc_n: 0.5          # accelerometer measurement noise standard deviation. #0.2
#gyr_n: 0.01         # gyroscope measurement noise standard deviation.     #0.05
#acc_w: 0.001         # accelerometer bias random work noise standard deviation.  #0.02
#gyr_w: 2.0e-5       # gyroscope bias random work noise standard deviation.     #4.0e-5


g_norm: 9.805       # gravity magnitude

#loop closure parameters
loop_closure: 1                    # start loop closure
fast_relocalization: 1             # useful in real-time and large project
load_previous_pose_graph: 0        # load and reuse previous pose graph; load from 'pose_graph_save_path'
#pose_graph_save_path: "/home/fb/output/pose_graph/" # save and load path
pose_graph_save_path: "*****"
#unsynchronization parameters
estimate_td: 1                      # online estimate time offset between camera and imu
td: -0.0237                          # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)

#rolling shutter parameters
rolling_shutter: 1                      # 0: global shutter camera, 1: rolling shutter camera
rolling_shutter_tr: 0.033               # unit: s. rolling shutter read out time per frame (from data sheet).

#visualization parameters
save_image: 1                   # save image in pose graph for visualization prupose; you can close this function by setting 0
visualize_imu_forward: 0        # output imu forward propogation to achieve low latency and high frequence results
visualize_camera_size: 0.4      # size of camera marker in RVIZ

参考:

Intel RealSense D435i Calibration_fb_941219的博客-CSDN博客

猜你喜欢

转载自blog.csdn.net/hltt3838/article/details/120738643
今日推荐