D455 camera calibration binocular + imu (1)

1. IMU calibration

1.1 Download code_utils, imu_utils

//安装依赖
sudo apt-get install libdw-dev

//安装code_utils
mkdir -p imu_ws/src
cd ~/imu_ws/src
git clone [email protected]:gaowenliang/code_utils.git
cd ..
catkin_make

If the error backward.hpp is not found, change #include "backward.hpp" in sumpixel_test.cpp to: #include "code_utils/backward.hpp"

1.2 After the code_utils is compiled, download and install imu_utils

cd ~/imu_ws/src/
git clone [email protected]:gaowenliang/imu_utils.git
cd ..
catkin_make

Add a D455_imuCali.launch under the /imu_utils/launch/ folder, the content is as follows: 

<launch>
    <node pkg="imu_utils" type="imu_an" name="imu_an" output="screen">
        <param name="imu_topic" type="string" value= "/camera/imu"/>
        <param name="imu_name" type="string" value= "Realsense"/>
        <param name="data_save_path" type="string" value= "$(find imu_utils)/data/"/>
        <param name="max_time_min" type="int" value= "100"/>
        <param name="max_cluster" type="int" value= "100"/>
    </node>
</launch>

max_time_min: The minimum time for calibration, which can be changed by yourself, is shorter than the actual recording (recommended recording is 120 minutes).
data_save_path: the address to save the file

 1.3 Recording topics

First configure the D455 startup file, change the rs_camera.launch to the following content, and merge the accel and gyro data to get the imu topic

  <arg name="unite_imu_method" default="linear_interpolation"/>

  <arg name="gyro_fps"            default="200"/>
  <arg name="accel_fps"           default="100"/>
  <arg name="enable_gyro"         default="true"/>
  <arg name="enable_accel"        default="true"/>

  <arg name="enable_sync"               default="true"/>

Turn on the camera  

roslaunch realsense2_camera rs_camera.launch

To record the topic, hold the device still and record rosbag for two hours.

rosbag record -O D455_imu /camera/imu

1.5 Calibration

Play back the rosbag at 400x speed, and run the launch file for calibration

roslaunch imu_utils D455_imuCali.launch
rosbag play -r 400 D455_imu.bag

My camera calibration results are as follows:

%YAML:1.0
---
type: IMU
name: Realsense
Gyr:
   unit: " rad/s"
   avg-axis:
      gyr_n: 2.8260834273707305e-03
      gyr_w: 1.0524392205451450e-04
   x-axis:
      gyr_n: 4.1612806190283900e-03
      gyr_w: 2.6277878907964784e-04
   y-axis:
      gyr_n: 3.0326785705306705e-03
      gyr_w: 4.4536289529683372e-05
   z-axis:
      gyr_n: 1.2842910925531309e-03
      gyr_w: 8.4166875542122832e-06
Acc:
   unit: " m/s^2"
   avg-axis:
      acc_n: 1.2291998294860730e-02
      acc_w: 2.9433108833622326e-04
   x-axis:
      acc_n: 1.2614106414887328e-02
      acc_w: 3.3853613052628435e-04
   y-axis:
      acc_n: 1.1447152083785998e-02
      acc_w: 2.8786444017704188e-04
   z-axis:
      acc_n: 1.2814736385908862e-02
      acc_w: 2.5659269430534356e-04

Guess you like

Origin blog.csdn.net/weixin_62952541/article/details/131648118