《基于RGBD相机的Active SLAM的研究》-Active-ORB-SLAM2源码安装

  • Post author:
  • Post category:其他


github地址:


https://github.com/XinkeAE/Active-ORB-SLAM2


安装步骤

Clone the repository:

git clone https://github.com/XinkeAE/Actuve-ORB-SLAM2.git

cd Active-ORB-SLAM2
chmod +x build.sh
./build.sh

This will create libORB_SLAM2.so at lib folder and the executables mono_tum, mono_kitti, rgbd_tum, stereo_kitti, mono_euroc and stereo_euroc in Examples folder.

#3. Building ROS

chmod +x build_ros.sh
./build_ros.sh

#4. Specify the goal pose in planning.cc and system.cc changing line 265 - 268 in system.cc

#5. Run ros driver by running the script

./kinect.sh


bug集合


我使用的系统是Ubuntu16.04+ros kinetic

1,octomap头文件丢失Ubuntu自带了octomap,但是版本是1.8.1。我们需要先卸载掉自带的octomap,换成1.72版本的

2,OMPL安装

有一部分需要链接外网,解决办法参考


https://blog.csdn.net/chengchang1234/article/details/111483944?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.control&dist_request_id=1328593.11301.16147559145220387&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.control

3,build.sh报错

原来的cmakelist文件有缺失,改成

find_package(Eigen3 3.1.0 REQUIRED)
find_package(Pangolin REQUIRED)
find_package(OMPL REQUIRED)
find_package(Boost REQUIRED)
find_package( octomap REQUIRED )


include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/include
${EIGEN3_INCLUDE_DIR}
${Pangolin_INCLUDE_DIRS}
${Boost_INCLLUDE_DIR}
${OCTOMAP_INCLUDE_DIRS}
/usr/local/include/ompl-1.5/ompl
/usr/local/include/ompl-1.5
)

4,build_ros.sh报错

/home/jianzhuozhu/catkin_ws/src/Active-ORB-SLAM2-master/Examples/ROS/ORB_SLAM2文件加下面的cmakelist文件有缺失,改成

find_package(Eigen3 3.1.0 REQUIRED)
find_package(Pangolin REQUIRED)
find_package(OMPL REQUIRED)
find_package(Boost REQUIRED)
find_package( octomap REQUIRED )


include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/../../../
${PROJECT_SOURCE_DIR}/../../../include
${Pangolin_INCLUDE_DIRS}
${OCTOMAP_INCLUDE_DIRS}
/usr/local/include/ompl-1.5/ompl
/usr/local/include/ompl-1.5
)

出现报错

ros_rgbd.cc.o: undefined reference to symbol '_ZN5boost6system15system_categoryEv' /usr/lib/x

将代码改为

set(LIBS 
${OpenCV_LIBS} 
${EIGEN3_LIBS}
${Pangolin_LIBRARIES}
${PROJECT_SOURCE_DIR}/../../../Thirdparty/DBoW2/lib/libDBoW2.so
${PROJECT_SOURCE_DIR}/../../../Thirdparty/g2o/lib/libg2o.so
${PROJECT_SOURCE_DIR}/../../../lib/libORB_SLAM2.so
${OCTOMAP_LIBRARIES}
-lboost_system
)

不再报错

参考以下代码修改内参

      parameters.fx = camera_info->K[0];
      parameters.fy = camera_info->K[4];
      parameters.cx = camera_info->K[2];
      parameters.cy = camera_info->K[5];

      parameters.baseline = camera_info->P[3];

      parameters.k1 = camera_info->D[0];
      parameters.k2 = camera_info->D[1];
      parameters.p1 = camera_info->D[2];
      parameters.p2 = camera_info->D[3];
      parameters.k3 = camera_info->D[4];

需要修改的参数表为Examples/RGB-D/kinect.yaml,具体的相机数据订阅

rostopic echo /camera/rgb/camera_iofo

运行以下代码

roslaunch astra_launch astra.launch
./kinect.sh

在这里插入图片描述



版权声明:本文为jianzhuozhu原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。