一、所需的环境
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_wssource 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
运行效果