VIO ๋ชจ๋์์ VINS-FUSION์ ์คํํ ์ ์์๋ ๋ช ์ ๋๋ ์ฌ๋ ์ค ํ ๋ช ์ด๋ฏ๋ก ๋ช ๊ฐ์ง ์์ ์ ๋ช ํํ ํ๊ณ ํผ๋๋ฐฑ์ ์์ฒญํ๊ธฐ ์ํด ๋ค์ ๋ฐฉ๋ฌธํฉ๋๋ค.
D435i๋ก VINS FUSION์ ์คํํ๋ ค๊ณ ํฉ๋๋ค(๋ง์ ์ฌ๋๋ค์ด ์๊ฐํ๋ ๊ฒ์ฒ๋ผ). ์ฌ์ฉ ๊ฐ๋ฅํ ์ถ์ realsense_stereo_imu_config.yaml์ ์ฌ์ฉํ์ฌ ์ฌ๋๋ค์ด ๋ณด๊ณ ํ ๊ฒ์ ๊ฒฝํํ์ต๋๋ค. ์นด๋ฉ๋ผ๋ฅผ ๋ง์ง์ ๋ง์ ๊ณ์ฐ๋ ํฌ์ฆ๊ฐ ๋ฏธ์ณค์ต๋๋ค.
๊ทธ๋์ ๋๋ Kalibr๋ฅผ ์ฌ์ฉํ์ต๋๋ค.
cam0:
cam_overlaps: [1]
camera_model: pinhole
distortion_coeffs: [0.3775752250096366, -0.08329757139021714, 0.6504570262599587, -0.4530039925701512]
distortion_model: equidistant
intrinsics: [395.5922288679944, 395.5957501002353, 319.88738279106286, 239.07386401539998]
resolution: [640, 480]
rostopic: /camera/infra1/image_rect_raw
cam1:
T_cn_cnm1:
- [0.9999953397168069, 9.448668958037214e-05, 0.0030514942108417595, -0.04984248508758902]
- [-9.749429725933605e-05, 0.9999995096576434, 0.0009854843073503579, 6.189814698173665e-05]
- [-0.0030513995994150846, -0.0009857772179980872, 0.9999948585886561, 0.00015202509092000083]
- [0.0, 0.0, 0.0, 1.0]
cam_overlaps: [0]
camera_model: pinhole
distortion_coeffs: [0.31220975539351176, 0.48299676137352554, -1.4010717249687126, 2.191483852686]
distortion_model: equidistant
intrinsics: [396.5827833428163, 396.75838144377565, 319.1950768721882, 238.53973946284336]
resolution: [640, 480]
rostopic: /camera/infra2/image_rect_raw
์ด ๋งค๊ฐ๋ณ์(imu = 0)๋ก VINS_FUSION์ ์คํํ ๋ ์ ์ ํ ๋์์ ์ป์๊ธฐ ๋๋ฌธ์ ๋ณด์ ์ด ๊ด์ฐฎ๋ค๊ณ ์๊ฐํฉ๋๋ค. ๋๋ ๊ทธ ๋ถ์ผ์ ์ ๋ฌธ๊ฐ๊ฐ ์๋๊ธฐ ๋๋ฌธ์ ํ์ํ ๊ฒฝ์ฐ PDF ๋ณด๊ณ ์๋ฅผ ๊ณต์ ํ๊ฒ ๋์ด ๊ธฐ์ฉ๋๋ค.
accelerometer_noise_density: 0.0011060 #Noise density (continuous-time)
accelerometer_random_walk: 8.6056e-05 #Bias random walk
๊ทธ๋ฌ๋ ์์ด๋ก์ ๊ฒฝ์ฐ ๋๋ ๋ถ๋ช
ํ ํ์์ ์
๋๋ค.
๊ฐ์ ๋ค์๊ณผ ๊ฐ๊ธฐ ๋๋ฌธ์ ๋๋ค.
gyroscope_noise_density: 50.427 #Noise density (continuous-time)
gyroscope_random_walk: 0.3480 #Bias random walk
์ฌ๊ธฐ์์ ์ด๋ฌํ ๊ฐ์น์ ๋ํ ๊ทํ์ ์๊ฒฌ์ ๋ฃ๊ณ ์ถ์ต๋๋ค.
๊ทธ๋ฌ๋ imu-camera ๋ณด์ ์ ์ํํ ์ ์์์ต๋๋ค.
cam0:
T_cam_imu:
- [0.999848715163262, 0.0018345448477758066, 0.017296856118190283, -0.009035083963879727]
- [-0.001867318311452875, 0.999996491602708, 0.0018788040335944412, 0.002129300542443833]
- [-0.01729334868368733, -0.0019108185351930207, 0.9998486329759259, -0.005593943362795322]
- [0.0, 0.0, 0.0, 1.0]
cam_overlaps: [1]
camera_model: pinhole
distortion_coeffs: [0.3775752250096366, -0.08329757139021714, 0.6504570262599587,
-0.4530039925701512]
distortion_model: equidistant
intrinsics: [395.5922288679944, 395.5957501002353, 319.88738279106286, 239.07386401539998]
resolution: [640, 480]
rostopic: /camera/infra1/image_rect_raw
timeshift_cam_imu: -0.028184396371617668
cam1:
T_cam_imu:
- [0.9997911085949877, 0.0019231918046627172, 0.020347985347160178, -0.058894395640646836]
- [-0.0019818392674274344, 0.999993939322739, 0.0028624519050287085, 0.0021865657711008357]
- [-0.02034235698054308, -0.002902180399802527, 0.9997888606407872, -0.005416418875488448]
- [0.0, 0.0, 0.0, 1.0]
T_cn_cnm1:
- [0.9999953397168102, 9.448668958037212e-05, 0.003051494210841759, -0.04984248508758902]
- [-9.749429725933604e-05, 0.9999995096576467, 0.0009854843073503574, 6.189814698173665e-05]
- [-0.003051399599415084, -0.0009857772179980868, 0.9999948585886594, 0.00015202509092000083]
- [0.0, 0.0, 0.0, 1.0]
cam_overlaps: [0]
camera_model: pinhole
distortion_coeffs: [0.31220975539351176, 0.48299676137352554, -1.4010717249687126,
2.191483852686]
distortion_model: equidistant
intrinsics: [396.5827833428163, 396.75838144377565, 319.1950768721882, 238.53973946284336]
resolution: [640, 480]
rostopic: /camera/infra2/image_rect_raw
timeshift_cam_imu: -0.028184788415138273
ํ์ ์ํํธ๊ฐ ์์์ด๊ธฐ ๋๋ฌธ์ ์ฌ๊ธฐ์์๋ ๋๋์ต๋๋ค! ๊ฐ๋ฅํฉ๋๊น?
์นด๋ฉ๋ผ ๋ณํ๊ณผ ๊ด๋ จํ์ฌ VINS_FUSION ๊ด๋ จ ์ค๋ ๋์์ body_T_cam0/1์ด ์นด๋ฉ๋ผ ํ๋ ์์์ IMU ํ๋ ์์ผ๋ก์ ๋ณํ์์ ์ดํดํ์ต๋๋ค.
p = body_T_cam0 * q
p: point in IMU coordinates
q: point in camera coordinates
๊ทธ๋ฆฌ๊ณ Kalibr์ T_cam_imu๋ IMU ์ธ๋ถ ๊ธฐ๋ฅ์ ๋๋ค. IMU์์ ์นด๋ฉ๋ผ ์ขํ(T_c_i)๋ก ๋ณํํ์ง๋ง VINS_FUSION์์ ์ฌ์ฉํ๋ ์ฌ๋ฐ๋ฅธ ํ์์ ์ป๋ ๋ฐ ์ง๊ธ๊น์ง ์์ํดํ์ต๋๋ค.
๊ทธ๋ฌ๋ ์ด ๋ชจ๋ ์์ ์๋ ๋ถ๊ตฌํ๊ณ ์ฌ์ ํ IMU๋ก VINS๋ฅผ ์คํํ ์ ์์ต๋๋ค. ๋๋ฌด ๊ธธ์ด์ ์ฃ์กํ์ง๋ง ์๋ํ์ง ์๋ ์ด์ ๋ฅผ ์ค๋ช ํ ์ ์๋ ์๋ชป๋ ๋ถ๋ถ์ด ์์ต๋๊น?
์ ๋ง ๊ฐ์ฌํฉ๋๋ค
@FaboNo ์๋ ๊ตฌ์ฑ์ผ๋ก ์๋ํ๋๋ก ๊ด๋ฆฌํ์ผ๋ฉฐ ์์ฒด ๋ณด์ ์ ์คํํ ํ์๊ฐ ์์์ผ๋ฉฐ ์ ์ ํ ๋ณด์ ์ผ๋ก ๋ ์ ์๋ํ ์ ์๋ค๊ณ ํ์ ํ์ง๋ง ์ ์๋ํ๊ณ ๋ฐ์ฐํ์ง ์์ต๋๋ค.
์ด ๋ ํฌ์์ ์ ๊ณต๋๋ left.yaml ๋ฐ right.yaml์ ์ฌ์ฉํ์ต๋๋ค.
realsense ์ต์ ์์ ์๋ ๋ ธ์ถ์ ๋๊ณ IR ์ด๋ฏธ ํฐ๋ฅผ ๋๊ณ ์๋์ง ํ์ธํ์ญ์์ค.
%YAML:1.0
#common parameters
#support: 1 imu 1 cam; 1 imu 2 cam: 2 cam;
imu: 1
num_of_cam: 2
imu_topic: "/camera/imu"
image0_topic: "/camera/infra1/image_rect_raw"
image1_topic: "/camera/infra2/image_rect_raw"
output_path: "/home/dji/output/"
cam0_calib: "left.yaml"
cam1_calib: "right.yaml"
image_width: 640
image_height: 480
# Extrinsic parameter between IMU and Camera.
estimate_extrinsic: 1 # 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.
body_T_cam0: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 1,0,0,0.00552,
0,1,0,-0.0051,
0,0,1,-0.01174,
0., 0., 0., 1. ]
body_T_cam1: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 1,0,0,-0.04464144,
0,1,0,-0.0051,
0,0,1,-0.01174,
0., 0., 0., 1. ]
#Multiple thread support
multiple_thread: 1
#feature traker paprameters
max_cnt: 150 # max feature number in feature tracking
min_dist: 30 # 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
flow_back: 1 # perform forward and backward optical flow to improve feature tracking accuracy
#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
acc_n: 0.1 # accelerometer measurement noise standard deviation. #0.2 0.04
gyr_n: 0.01 # gyroscope measurement noise standard deviation. #0.05 0.004
acc_w: 0.001 # accelerometer bias random work noise standard deviation. #0.002
gyr_w: 0.0001 # gyroscope bias random work noise standard deviation. #4.0e-5
g_norm: 9.805 # gravity magnitude
#unsynchronization parameters
estimate_td: 1 # online estimate time offset between camera and imu
td: -0.072 # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)
#loop closure parameters
load_previous_pose_graph: 0 # load and reuse previous pose graph; load from 'pose_graph_save_path'
pose_graph_save_path: "/home/dji/output/pose_graph/" # save and load path
save_image: 0 # save image in pose graph for visualization prupose; you can close this function by setting 0
@FaboNo ์๋ ํ์ธ์ FaboNo. ๋ต๋ณ์ด ๋ฆ์ด์ ์ ๋ง ์ฃ์กํฉ๋๋ค. ์๋ก์ด ๋ฌธ์ ๊ฐ ์๋ค๋ ๊ฒ์ ์ธ์ํ์ง ๋ชปํ์ต๋๋ค.
์ฐ์ , ๋๋ ๋น์ ์ ์นด๋ฉ๋ผ ๋ชจ๋ธ์ ๊ต์ ํ ๊ฒ์ ๊ถ์ฅ pinhold-radtan
๋ณด๋ค๋ equidistant
์ฌ์ฉํ.
์ฌ๋ฐ๋ฅธ ์นด๋ฉ๋ผ ๋ณด์ ํ 2๊ฐ์ ์นด๋ฉ๋ผ์ 0๊ฐ์ imu ๋ชจ๋๋ก VINS-Fusion์ ์คํํด ๋ณด์ญ์์ค.
๋จผ์ ์ ์๋ํด์ผ ํฉ๋๋ค(๋น ๋ฅธ ๋์์ด๋ ์์ํ ํ์ ์์ด ์ฌ์ด ๋์์์)
body_T_cam
์ด Kalibr ๊ฒฐ๊ณผ์์ T_cam_imu
์ ์ญํ๋ ฌ ์ธ์ง ํ์ธํ์ญ์์ค.
๋ํ 2๊ฐ์ ์นด๋ฉ๋ผ ๋ชจ๋(์)๋ง ์คํํ๊ธฐ ์ ์ body_T_cam0 ๋ฐ 1์ ํ์ธํ์ญ์์ค.
์์ timeshift_cam_imu
๋ d435i์ ์ ์ ๊ฐ์ผ๋ก, ์นด๋ฉ๋ผ๊ฐ IMU๋ณด๋ค ์ต์ ๋ฒ์ ์์ ์๋ฏธํฉ๋๋ค.
๋ด ๊ฒฝํ์ d435i์ ์ ํฉํ์ง ์์ IMU ์บ๋ฆฌ๋ธ๋ ์ด์
์ ์ํด Kalibr Allan ์ ์คํํ ํ์๊ฐ ์์ต๋๋ค.
์คํ๋ ค d435i์ IMU ๋ชจ๋ธ์ ์ฐพ์ ๋ค์ ์ฌ๊ธฐ์ ํน์ ๋ชจ๋ธ์ ๋งค๊ฐ๋ณ์๋ฅผ ์ฌ์ฉํ์ต๋๋ค
๊ทธ๋ฌ๋ ์ฌ๊ธฐ์์ ์ ๊ฐ์ด ๊ธฐ๋ณธ imu parameters
๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
๊ทธ๋ค์ ์ถฉ๋ถํด์ผํฉ๋๋ค. (๋๋ ๊ธฐ๋ณธ๊ฐ์ 3๋ฐฐ์ ๊ฐ์ด ์ฝ๊ฐ ์ฆ๊ฐ)
์ฌ๊ธฐ์ ์ค๋ช
๋ ๋๋ก D435i SDK ์์ IMU calibration
๋ฅผ ์คํํ๋ ๊ฒ์ด ์ข์ต๋๋ค.
@FaboNo
๊ทธ๊ฑด ๊ทธ๋ ๊ณ , ๋๋ D435i์ ๋ํ ์๋ ์์ฑ์์ ๊ธฐ๋ณธ ๋งค๊ฐ ๋ณ์/yaml ํ์ผ์ด ์ด์ ์ ๊ฝค ์ ์๋ํ๋์ง ํ์ธํ์ต๋๋ค.
๋ชจ๋ ์๊ณก ๊ฐ์ด 0์ด๊ณ ์ด์ ๊ฑฐ๋ฆฌ/์ฃผ์ ๊ฐ ๋ฐ ๊ณต์นญ body_T_cam
๊ฐ๋ง ํฌํจ๋ ๊ฒฝ์ฐ์๋ ๋ง์ฐฌ๊ฐ์ง์
๋๋ค.
์๊ณก ๊ฐ์ด ํฐ equidistant
์นด๋ฉ๋ผ ๊ณ ์ ๋ณด์ ๊ฒฐ๊ณผ๊ฐ ์ฃผ์ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค.
@engcang ๋ฉ์์ง ์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค. ์ค์ ๋ก ์ด๋ฏธ์ง๋ ์ด๋ฏธ ์์ ๋์์ผ๋ฏ๋ก Kalibr์ ์คํํ๋ฉด ๊ฑฐ์ ์ธ๋ชจ๊ฐ ์์ต๋๊น?
์์ ๋ ๋ ์๊ณก๋ 0๊ณผ ๊ฐ์์ผ ํฉ๋๋ค.
@marufino ๋ฉ์์ง ์ ๋ง ๊ฐ์ฌํฉ๋๋ค ๋ด์ผ ํด๋ณด๊ณ ์๋ ค๋๋ฆฌ๊ฒ ์ต๋๋ค
@FaboNo
์ด ๋ฌธ์ ์ ๋ํ ์์์ด ์์ต๋๊น? ์๋์ํค์
จ๋์?
์ต๊ทผ์ Intel D435i๋ก VINS-Fusion(์คํ
๋ ์ค)์ ํ
์คํธํ ๊ธฐํ๊ฐ ์์๊ณ ์์ง ๊ด์ฌ์ด ์๋ค๋ฉด ์ฌ๊ธฐ ๊ฒฐ๊ณผ ํด๋ฆฝ ์ด ์์ต๋๋ค.
@engcang ๋ต๋ณ์ด ๋๋ฌด ๋ฆ์ด์ ์ฃ์กํฉ๋๋ค. ์์์ ๋ดค๋๋ฐ ์ธ์์ ์ด๋ค์. ์ฃผ๋ก PixHawk4๋ฅผ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ๋ช ๊ฐ์ง ์ง๋ฌธ์ด ์์ต๋๋ค.
@FaboNo ์๋ ํ์ธ์.
@engcang ๋ต๋ณ ๊ฐ์ฌํฉ๋๋ค. realsense_stereo_imu_config.yaml์์ imu ๋งค๊ฐ๋ณ์ ๊ฐ์ ๋ณ๊ฒฝํ๊ฑฐ๋ ๋ณ๊ฒฝํ์ง ์์ ์ํ๋ก ์ ์งํ๋์ง ๊ถ๊ธํฉ๋๋ค.
๋๋ ์ด์จ๋ ๋น์ ์ ์ค์ ์ ์๋ํฉ๋๋ค
@FaboNo
์๋
ํ์ธ์. ์ผ๋ฐ์ ์ผ๋ก yaml ํ์ผ์์ IMU ๋งค๊ฐ๋ณ์๋ฅผ ๋ณ๊ฒฝํ์ง ์์ต๋๋ค. ๋๋ ๋ํ Kalibr_allan ์์ ์ป์ ๋๋ก IMU ๋งค๊ฐ๋ณ์๋ฅผ ์ค์ ํ๋ ค๊ณ ํ์ต๋๋ค.
๊ทธ๋ฌ๋ ๋๋ ๊ทธ๊ฒ๋ค์ ์ฌ์ฉํ์ฌ ๋ ๋์ ์ฑ๋ฅ์ ์ป์ ์ ์์์ต๋๋ค.
4์กฑ ๋ณดํ ๋ก๋ด์ด ์ง๋ฉด์ ์ธ๊ฒ ๋ฟ๋ ๊ฒ๊ณผ ๊ฐ์ ๋ฏธ์น ๊ฒฝ์ฐ์๋ง ๋งค๊ฐ๋ณ์๋ฅผ 10๋ฐฐ ์ด์์ผ๋ก ์ค์ ํ๋ ค๊ณ ํ๋ฉด ์๋ํฉ๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
@FaboNo ์๋ ํ์ธ์.