Tricks-Realsense-d435i配置

安装

安装时,应特别注意
./scripts/setup_udev_rules.sh
./scripts/patch-realsense-ubuntu-lts.sh

cd librealsense_install/librealsense-mastar
mkdir build 
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=true
sudo make uninstall 
make clean && make -j8 
sudo make install

虚拟机ubuntu16.04中遇到的问题
问题1:
没有IMU话题

 24/11 03:06:42,805 WARNING [140333593020160] (ds5-timestamp.cpp:73) UVC metadata payloads not available. Please refer to the installation chapter for details.
[ WARN] [1606216002.806794542]: Frame metadata isn't available! (frame_timestamp_domain = RS2_TIMESTAMP_DOMAIN_SYSTEM_TIME)
 24/11 03:06:43,129 WARNING [140333602031360] (ds5-timestamp.cpp:73) UVC metadata payloads not available. Please refer to the installation chapter for details.
/camera/color/camera_info
/camera/color/image_raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressed/parameter_descriptions
/camera/color/image_raw/compressed/parameter_updates
/camera/color/image_raw/compressedDepth
/camera/color/image_raw/compressedDepth/parameter_descriptions
/camera/color/image_raw/compressedDepth/parameter_updates
/camera/color/image_raw/theora
/camera/color/image_raw/theora/parameter_descriptions
/camera/color/image_raw/theora/parameter_updates
/camera/depth/camera_info
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressed/parameter_descriptions
/camera/depth/image_rect_raw/compressed/parameter_updates
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth/image_rect_raw/compressedDepth/parameter_updates
/camera/depth/image_rect_raw/theora
/camera/depth/image_rect_raw/theora/parameter_descriptions
/camera/depth/image_rect_raw/theora/parameter_updates
/camera/extrinsics/depth_to_color
/camera/motion_module/parameter_descriptions
/camera/motion_module/parameter_updates
/camera/realsense2_camera_manager/bond
/camera/rgb_camera/auto_exposure_roi/parameter_descriptions
/camera/rgb_camera/auto_exposure_roi/parameter_updates
/camera/rgb_camera/parameter_descriptions
/camera/rgb_camera/parameter_updates
/camera/stereo_module/auto_exposure_roi/parameter_descriptions
/camera/stereo_module/auto_exposure_roi/parameter_updates
/camera/stereo_module/parameter_descriptions
/camera/stereo_module/parameter_updates
/diagnostics
/rosout
/rosout_agg
/tf
/tf_static

解决 1:

enable_accel:=true enable_gyro:=true

realsenseD435i imu+双目标定
RS2_OPTION_FRAMES_QUEUE_SIZE
Number of frames the user is allowed to keep per stream. Trying to hold-on to more frames will cause frame-drops
程序配置

运行Vins-Mono

视觉SLAM | 使用RealsenseD435i运行VINS-Fusion

imu_utils标定IMU

rosbag play -r 200 imu_calibration.bag
cd ~/work/tools/catkin_imu/
source devel/setup.bash
roslaunch imu_utils d435iOK1_imu_calibration.launch

Kalibr联合标定IMU和双目

启动相机

roslaunch realsense2_camera rs_camera.launch

关闭结构光发射器,防止图像光斑有影响
rosrun rqt_reconfigure rqt_reconfigure
在这里插入图片描述
取消对emitter_enabled的勾选

双目标定+IMU和双目的标定(IMU已标定)

1.改变双目话题发布频率

rosrun topic_tools throttle messages /camera/infra1/image_rect_raw 4.0 /left
rosrun topic_tools throttle messages /camera/infra2/image_rect_raw 4.0 /right

2.录制双目数据

rosbag record -O stereo_calibra_d435i.bag /left /right

录制好后,对bag包的数据进行双目标定

rosrun kalibr kalibr_calibrate_cameras --bag /home/tarmy/work/tools/catkin_kalibr/papera/stereo_calibra_d435i.bag --topics /left /right --models pinhole-radtan pinhole-radtan --target /home/tarmy/work/tools/april_6x6_50x50cm.yaml

双目和IMU外参标定

rosrun topic_tools throttle messages /camera/infra1/image_rect_raw 4.0 /left
rosrun topic_tools throttle messages /camera/infra2/image_rect_raw 4.0 /right
rosrun topic_tools throttle messages /camera/imu 200.0 /imu

录制话题包

rosbag record -O imu_stereo_d435i_4_200hz_tricks.bag  /left /right /imu 

使用 kalibr_calibrate_imu_camera校准IMU和相机的外参

 kalibr_calibrate_imu_camera --target /home/tarmy/work/tools/april_6x6_50x50cm.yaml --cam /home/tarmy/work/tools/catkin_kalibr/camchain-hometarmyworktoolscatkin_kalibrpaperastereo_calibra_d435i.yaml --imu /home/tarmy/work/tools/catkin_kalibr/imu_d435i.yaml --bag /home/tarmy/work/tools/catkin_kalibr/papera/imu_stereo_d435i_4_200hz_tricks.bag

录制时间不能长,否则

 timestamp = acv.Time( data.header.stamp.secs, data.header.stamp.nsecs ) OverflowError: bad numeric 

标定结果

camchain-imucam-hometarmyworktoolscatkin_kalibrpaperaimu_stereo_d435i_4_200hz_tricks.yaml

cam0:
  T_cam_imu:
  - [0.9999028098867836, -0.013078507996931393, -0.004829431549281497, 0.023131154795583586]
  - [0.013017494349084722, 0.9998376818824223, -0.012456112108352662, 0.0680383961563386]
  - [0.004991555006863211, 0.01239203439950455, 0.9999107569488664, -0.08882095938747082]
  - [0.0, 0.0, 0.0, 1.0]
  cam_overlaps: [1]
  camera_model: pinhole
  distortion_coeffs: [0.010752610739467837, -0.003116665747637063, -0.0002567485446071126,
    -0.0010694871436459745]
  distortion_model: radtan
  intrinsics: [383.05963993854607, 385.05326770005917, 314.91684617363353, 238.39452595395264]
  resolution: [640, 480]
  rostopic: /left
  timeshift_cam_imu: -0.04680223746711912
cam1:
  T_cam_imu:
  - [0.9999133507005844, -0.012981068982214372, -0.002186993097636263, -0.07718168714570517]
  - [0.012952996607897177, 0.99983927567057, -0.012395269477737322, 0.06800747586061606]
  - [0.0023475454427808224, 0.012365867322145833, 0.9999207840402985, -0.0879497361137917]
  - [0.0, 0.0, 0.0, 1.0]
  T_cn_cnm1:
  - [0.9999965039567782, 6.464590399054658e-05, 0.002643462715049505, -0.10008236458294173]
  - [-6.480615233565015e-05, 0.9999999960678365, 6.0535007087941015e-05, -2.4044209637057163e-05]
  - [-0.0026434587913147243, -6.070610810234499e-05, 0.999996504214082, 0.000936189375350014]
  - [0.0, 0.0, 0.0, 1.0]
  cam_overlaps: [0]
  camera_model: pinhole
  distortion_coeffs: [0.008132629254947288, 0.0006248681786484926, -3.3905015321507675e-05,
    -0.0009870579573504747]
  distortion_model: radtan
  intrinsics: [383.130360328568, 385.2556845780806, 314.08760061257743, 238.29074050583466]
  resolution: [640, 480]
  rostopic: /right
  timeshift_cam_imu: -0.04664317928566175
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值