目录
一、安装realsense环境
二、获取realsense D450L相机内参
三、标定雷达和相机
1.下载livox_camera_calib
2.修改配置参数
3.使用fastlio生成点云
4.标定
一、安装realsense环境
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
//更新依赖库
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
//安装所需的依赖
sudo apt-get install libudev-dev pkg-config libgtk-3-dev
sudo apt-get install libusb-1.0-0-dev pkg-config
sudo apt-get install libglfw3-dev
sudo apt-get install libssl-dev
//编译
cd librealsense
mkdir build
cd build
cmake ../ -DBUILD_EXAMPLES=true
make
sudo make install
//测试是否安装成功
realsense-viewer
安装环境过程中如果出现以下报错,采用以下方法。error: ‘LocalParameterization’ is not a member of ‘ceres-CSDN博客
ceres::LocalParameterization *quatParam = new ceres::EigenQuaternionParameterization();
替换为
ceres::Manifold *quatParam = new ceres::EigenQuaternionManifold();
二、获取realsense D450L相机内参
sudo apt install ros-noetic-camera-calibration
roslaunch realsense2_camera rs_camera.launch
内参结果
distortion_model: "plumb_bob" D: [0.0, 0.0, 0.0, 0.0, 0.0] K: [613.80517578125, 0.0, 321.6905212402344, 0.0, 614.0089111328125, 244.05947875976562, 0.0, 0.0, 1.0] R: [1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0] P: [613.80517578125, 0.0, 321.6905212402344, 0.0, 0.0, 614.0089111328125, 244.05947875976562, 0.0, 0.0, 0.0, 1.0, 0.0] binning_x: 0 binning_y: 0 roi: x_offset: 0 y_offset: 0 height: 0 width: 0 do_rectify: False --- header: seq: 597 stamp: secs: 1720576168 nsecs: 845483780 frame_id: "camera_color_optical_frame" height: 480 width: 640 |
三、标定雷达和相机
1.下载livox_camera_calib
cd ~/catkin_ws/src
git clone https://github.com/hku-mars/livox_camera_calib.git
cd ../
catkin_make
source ~/catkin_ws/devel/setup.bash
2.修改配置参数
image_file中存放相机拍摄的图片,pcl_file中存放雷达的点云数据(雷达点云数据采用fastlio算法生成),result_file中存放点云和图片配准的内外参数结果。将上一步生成的相机内参放入camera中。修改calib中的outdoor的yaml文档。
3.使用fastlio生成点云
cd ~/$A_ROS_DIR$/src
git clone https://github.com/hku-mars/FAST_LIO.git
cd FAST_LIO
git submodule update --init
cd ../..
catkin_make
source devel/setup.bash
//建图 For Avia mid360需要修改相关节点
cd ~/$FAST_LIO_ROS_DIR$
source devel/setup.bash
roslaunch fast_lio mapping_avia.launch
roslaunch livox_ros_driver livox_lidar_msg.launch
4.标定
roslaunch livox_camera_calib calib.launch