C ++ chapter of quantitative transaction -SORT sorting of vector containers (positive order, counter -order)

2023-01-24   ES  

在这里插入图片描述
Create a My_RS_CAMERA. Lunch, put it
arg name=“enable_gyro” default=“true”/
arg name=“enable_accel” default=“true”/
arg name=“unite_imu_method” default=“linear_interpolation”/
and then

roslaunch realsense2_camera my_rs_camera.launch

View the topic to see if there are/carera/imu
and then record the baby package:

rosbag record -o imu_435 /camera/imu

Enter ~/catkin_ws/src/imu_utils/launch directory:
touch my435_imu_calibration.launch
gedit my435_imu_calibration.launch
Write the following:

<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= "my_imu_calibration"/>
        <param name="data_save_path" type="string" value= "$(find imu_utils)/data/"/>
        <param name="max_time_min" type="int" value= "120"/>
        <param name="max_cluster" type="int" value= "400"/>
    </node>
</launch>

roslaunch imu_utils my_d435i_imu_calibration.launch
into the recording BAG path:

The

rosbag play -r 400 imu_435.bag

parameter is generated in the imu_utils/data file.

1. There is a standard paper
2. Configuration file of calibration paper
Create a standard paper configuration file under Kalibr_WorkSpace/SRC/Kalibr file

touch aprilgrid.yaml
gedit aprilgrid.yaml
target_type: 'aprilgrid' #gridtype
tagCols: 6               #number of apriltags
tagRows: 6               #number of apriltags
tagSize: 0.022           #size of apriltag, edge to edge [m]
tagSpacing: 0.3          #ratio of space between tags to tagSize

3. Turn off the structure light

roslaunch realsense2_camera my_rs_camera.launch
rosrun rqt_reconfigure rqt_reconfigure

在这里插入图片描述
View whether there are Camera/COLOR/Image_raw,/Camera/Infra1/Image_rect_raw,/Camera/Infra2/Image_RAW_RAW_RAW
Open RVIZ
View the image of three topics, see which camera is left and right
If so, you can record the BAG packet of three topics:

rosrun topic_tools throttle messages /camera/color/image_raw 4.0 /color
rosrun topic_tools throttle messages /camera/infra1/image_rect_raw 4.0 /infra_left
rosrun topic_tools throttle messages /camera/infra2/image_rect_raw 4.0 /infra_right

Start recording the data packet!

rosbag record -o multicameras_calibration /infra_left /infra_right /color

Use the camera calibration program Kalibr to calibrate:

kalibr_calibrate_cameras --TARGET path/april_6x6_50x50cm_A4.yaml --bag path/multicameras_calibration_2020-10-29-20-19-06.bag --models pinhole-radtan pinhole-radtan pinhole-radtan --topics /infra_left /infra_right /color --bag-from-to 10 100 --show-extraction

and then get the .yaml file of the Camchain in the Kalibr file

1. Record the BAG package:
first align the IMU parameter data and image
Copy the my_RS_CAMERANCH in the RealSense-ROS package, renamed RS_imu_stereo. Lunch, and the content was changed to

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

2. Start Launch file

roslaunch realsense2_camera rs_imu_stereo.launch

3. Turn off the structure light

rosrun rqt_reconfigure rqt_reconfigure

在这里插入图片描述
4. Open RVIZ, ADD Imu Topic and Infra1 Topic, and Infra2 Topic. At the same time, adjust the RealSense position to ensure that the image data of the binocular image has been included in the calibration board.
5. Adjust the release frequency, and name

rosrun topic_tools throttle messages /camera/infra1/image_rect_raw 20.0 /infra_left
rosrun topic_tools throttle messages /camera/infra2/image_rect_raw 20.0 /infra_right
rosrun topic_tools throttle messages /camera/imu 200.0 /imu

6. Record the BAG package

rosbag record -o imu_stereo /infra_left /infra_right /imu

7. Write the camera yaml file according to the file calibration of the camera: Camchain.yaml

cam0:
  camera_model: pinhole
  intrinsics: [461.629, 460.152, 362.680, 246.049]
  distortion_model: radtan
  distortion_coeffs: [-0.27695497, 0.06712482, 0.00087538, 0.00011556]
  T_cam_imu:
  - [0.01779318, 0.99967549,-0.01822936, 0.07008565]
  - [-0.9998017, 0.01795239, 0.00860714,-0.01771023]
  - [0.00893160, 0.01807260, 0.99979678, 0.00399246]
  - [0.0, 0.0, 0.0, 1.0]
  timeshift_cam_imu: -8.121e-05
  rostopic: /cam0/image_raw
  resolution: [752, 480]
cam1:
  camera_model: omni
  intrinsics: [0.80065662, 833.006, 830.345, 373.850, 253.749]
  distortion_model: radtan
  distortion_coeffs: [-0.33518750, 0.13211436, 0.00055967, 0.00057686]
  T_cn_cnm1:
  - [ 0.99998854, 0.00216014, 0.00427195,-0.11003785]
  - [-0.00221074, 0.99992702, 0.01187697, 0.00045792]
  - [-0.00424598,-0.01188627, 0.99992034,-0.00064487]
  - [0.0, 0.0, 0.0, 1.0]
  T_cam_imu:
  - [ 0.01567142, 0.99978002,-0.01393948,-0.03997419]
  - [-0.99966203, 0.01595569, 0.02052137,-0.01735854]
  - [ 0.02073927, 0.01361317, 0.99969223, 0.00326019]
  - [0.0, 0.0, 0.0, 1.0]
  timeshift_cam_imu: -8.681e-05
  rostopic: /cam1/image_raw
  resolution: [752, 480]

No parameter can be deleted

9. Write imu.yaml

#Accelerometers
accelerometer_noise_density: 1.86e-03   #Noise density (continuous-time)
accelerometer_random_walk:   4.33e-04   #Bias random walk

#Gyroscopes
gyroscope_noise_density:     1.87e-04   #Noise density (continuous-time)
gyroscope_random_walk:       2.66e-05   #Bias random walk

rostopic:                    /imu      #the IMU ROS topic
update_rate:                 200.0      #Hz (for discretization of the values above)

10. Start calibration:

kalibr_calibrate_imu_camera --bag ../imu_stereo_2020-10-30-11-24-41.bag --cam ../Aprilgrid/camchain.yaml --imu ../Aprilgrid/imu.yaml --target ../Aprilgrid/april_6x6_50x50cm_A4.yaml --show-extraction

source

Related Posts

[Reading book records] The accumulation of knowledge and persistence;

[Spring source code] Event monitoring mechanism (@EventListener implementation method) The

Struts 1.2.4 Learning experience! (Seven)

It is not allowed, will this game be hot again! Someone re -engraved a version of the feel very positive (with the source code)

C ++ chapter of quantitative transaction -SORT sorting of vector containers (positive order, counter -order)

Random Posts

Based on the Java platform, use Baidu Face recognition API

User Center -Modify User Information Leonjinhai

RESTTEMPlate remotely call, the response header in the response result is Content-Type: Text/Plain; Charset = UTF-8, and the data type conversion fails

Dynamic Web Project’s Struts2 project introduced Spring framework

Made in Mario, Ready ~~ GO! “GitHub Hot Speed V.22.16”