ORB-SLAM2学习(一、System框架搭建)—RGBD篇

本文介绍了ORB-SLAM2的系统框架,包括跟踪、局部建图和回环检测三个模块。主要关注RGBD场景的应用,通过ros_rgbd.cc主程序解析ORB-SLAM2如何处理Realsense D435I的数据。系统构建中涉及线程管理,如跟踪线程、局部建图线程和回环检测线程。文章还探讨了图像处理、时间同步和主函数中ROS节点的运行方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考链接:https://blog.youkuaiyun.com/qq_30356613/article/details/76409367 注释详细

https://blog.youkuaiyun.com/u010128736/article/details/53169832 思路清晰


  • 整体流程如图所示:     

orb-slam主要有三个线程组成:跟踪、Local Mapping(又称小图)、Loop Closing(又称大图)。

1)跟踪模块:主要是通过提取每一帧的ORB特征,通过恒速模型、关键帧模型、重定位估计相机初始位姿,然后通过共视关系跟踪局部局部地图来优化相机位姿进行优化,最后确定当前帧是否作为关键帧插入地图中。

 2)局部建图:主要是针对跟踪过程中产生的关键帧进行操作,包括把该关键帧插入到地图中,添加新的地图点,剔除冗余的关键帧、地图点,通过Local BA优化相机位姿和地图点。

 3)回环检测:同样针对关键帧进行操作,主要是通过BoW模型判断当前关键帧是否产生回环,如果产生可能的回环则进行回环一致性检测,通过一致性检测之后认为运动已经产生回环,则计算Sim3变换进行回环矫正,并另起线程进行全局优化。

### ORB-SLAM3 RGB-D Configuration and Tutorial ORB-SLAM3 is an advanced Simultaneous Localization and Mapping (SLAM) system that supports monocular, stereo, and RGB-D cameras. For configuring ORB-SLAM3 with an RGB-D camera setup, several key steps need to be followed carefully. #### Preparation of Environment Before starting the configuration process for ORB-SLAM3 using an RGB-D sensor like a ZED Camera or any other compatible device, ensure all dependencies are installed correctly on Ubuntu 20.04 LTS as mentioned in detailed tutorials[^4]. This includes setting up ROS Noetic along with necessary packages such as PCL (Point Cloud Library), OpenCV, etc., which facilitate point cloud processing and visualization tasks essential for working with depth information from RGB-D sensors. #### Installation Steps To install ORB-SLAM3 specifically tailored towards handling data coming from RGB-D sources: 1. Clone repository into `catkin_ws/src` directory. ```bash cd ~/catkin_ws/src/ git clone --recursive https://github.com/UZ-SLAMLab/ORB_SLAM3.git ``` 2. Modify CMakeLists.txt file inside cloned repo according to specific hardware requirements if needed before building it via Catkin tools within workspace environment: ```bash cd ~/catkin_ws && catkin_make clean && catkin_build source devel/setup.bash ``` 3. After successful compilation, proceed by running examples provided under Examples folder present at root level of project structure where one can find scripts dedicated particularly toward testing different types including rgbd_tum dataset among others. #### Configuration File Adjustments For optimal performance when integrating real-world devices rather than pre-recorded datasets, adjustments might have to made within YAML files located typically under Vocabulary path (`Vocabulary/ORBvoc.bin`) alongside main executable binaries generated post-build phase. These configurations involve tweaking parameters related but not limited to image resolution, intrinsic/extrinsic calibration matrices, baseline distance between two eyes in case of binocular setups, etc.[^3]. Additionally, modifying certain parts of codebase may become inevitable depending upon application-specific needs; this could range anywhere from altering loop closing behavior through editing header definitions found in LoopClosing.h file, ensuring compatibility across various versions used during development stages until final deployment onto target platforms. #### Running Tests Once everything has been set up properly, executing sample applications becomes straightforward. Use terminal commands similar to those shown below while replacing placeholders appropriately based on personal preferences regarding input/output paths specified earlier throughout entire installation procedure described above. ```bash rosrun orbslam2 Mono PATH_TO_VOCABULARY FILENAME_OF_SETTINGS_YAML VIDEO_SOURCE_OR_IMAGE_SEQUENCE_PATH ``` Or similarly for stereo mode, ```bash rosrun orbslam2 Stereo PATH_TO_VOCABULARY FILENAME_OF_SETTINGS_YAML LEFT_CAMERA_VIDEO_SOURCE RIGHT_CAMERA_VIDEO_SOURCE ``` And finally for RGB-D operation, ```bash rosrun orbslam2 RGBD PATH_TO_VOCABULARY FILENAME_OF_SETTINGS_YAML DEPTH_MAPS_AND_COLOR_FRAMES_DATASET_PATH ``` These instructions provide guidance on how to configure and utilize ORB-SLAM3 effectively with RGB-D inputs after making appropriate changes wherever required without deviating much away from official documentation guidelines available publicly online.
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值