环境参考:Nvidia Jetson AGX Orin Developer Kit 32GB、Ubuntu20.04、Jetpack5.1.1、Intel Realsense D435i深度相机、ROS-noetic、Vins-Fusion-gpu
Jetson AGX Orin+Vins+ros+d435i配置运行详情请见:
Jetson AGX ORIN配置运行vins-fusion-gpu(Zed/D435)_dueen1123的博客-CSDN博客
Octomap安装
1.编译安装 OctomapServer 建图包
cd ~/catkin_ws/src
git clone https://github.com/OctoMap/octomap_mapping.git
返回主目录,安装依赖,编译
cd ~/catkin_ws
rosdep install octomap_mapping
sudo apt-get install ros-noetic-pcl-ros
sudo apt-get install ros-noetic-octomap-ros
catkin_make
此处若未安装rosdep则执行:
sudo apt update
sudo apt install python3-rosdep
sudo rosdep init
rosdep update
再重新执行上一步。
2.安装 Rviz 可视化 Octomap 的插件:
sudo apt-get install ros-noetic-octomap-rviz-plugins
参数配置
1.修改外参
修改 ~/catkin_ws_src/VINS-Fusion-gpu/config/realsense_d435i下的realsense_stereo_imu_config.yaml文件,最好对相机进行标定
可参考:https://blog.csdn.net/qq_35616298/article/details/116171823
示例:
%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/master/output/"
cam0_calib: "left.yaml"
cam1_calib: "right.yaml"
image_width: 640
image_height: 480
# IMU和Camera之间的外部参数。
estimate_extrinsic : 1 # 0 有一个准确的外在参数。我们将信任以下 imu^R_cam,imu^T_cam,不要更改它。
# 1 初步猜测外在参数。我们将围绕您最初的猜测进行优化。
body_T_cam0: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 0.9998528554981037, -0.000802125407182569, 0.00536519139410059, -0.0117530714817712,
0.000756690239208138, 0.999963883387885, 0.00846518397330719, 0.000876053017376294,
-0.00537178776070555, -0.00846099962481987, 0.999949776429598, 0.0330899634954485,
0, 0, 0, 1 ]
body_T_cam1: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 0.9999273228661367, -0.000653939965772498, 0.0037560266870867, 0.0361739507304974,
0.000620172019278801, 0.999959446460512, 0.00898447667104663, 0.000362155753378663,
-0.00376174967527688, -0.00898208199179027, 0.999952584597127, 0.0331025774267971,
0, 0, 0, 1 ]
#多线程支持
multiple_thread: 1
#特征跟踪器参数
max_cnt : 150 #特征跟踪中的最大特征数
min_dist : 30