ORB-SLAM3 RGBD摄像头

一、所需的环境
 

 python2.7、Opencv3.2、Pangolin0.5、eigen3.3.1

Ubuntu18.04、ros版本:melodic

二、安装astro pro plus驱动

1、安装环境所需要依赖

sudo apt-get install ros-melodic-serial ros-melodic-bfl ros-melodic-mbf-msgs ros melodic-pointcloud-to-laserscan ros-melodic-rgbd-launch ros-melodic-libuvc-* ros melodic-uvc-camera ros-melodic-usb-cam ros-melodic-ar-track-alvar ros-melodic camera-calibration build-essential freeglut3 freeglut3-dev libsfml-dev

2、编译驱动源码

mkdir -p astra_ws/src
cd astra_ws/src
catkin_init_workspace
git clone https://github.com/orbbec/ros_astra_camera
cd ..
catkin_make --pkg astra_camera

三、修改ros_rgbd.cc

修改/home/wheeltec-client/workspace/src/ORB_SLAM3/Examples/ROS/ORB_SLAM3/src/ros_rgbd.cc,

把rgb_topic和depth_topic订阅话题修改为:

四、重新编译OBR-SLAM3

chmod +x build.sh
chmod +x build_ros.sh
./build.sh
./build_ros.sh

  添加环境变量

gedit ~/.bashrc

在最后添加:

export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM3/Examples/ROS

(注:PATH这里填上你ORB_SLAM3的具体路径)

五、运行ORB-SLAM3

   1.启动ROS

roscore

    2.启动相机

  cd astra_ws
  source devel/setup.bash 
  roslaunch astra_camera astra_pro_plus.launch    

    3.启动ORB_SLAM3

cd /home/wheeltec-client/workspace/src/ORB_SLAM3
rosrun ORB_SLAM3 RGBD ./Vocabulary/ORBvoc.txt ./Examples/RGB-D/TUM1.yaml

运行效果

### 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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值