主动SLAM开源工作较少,ExplORB-SLAM是"ExplORB-SLAM: Active Visual SLAM Exploiting the Pose-graph Topology"论文中使用的代码,但是该程序环境配置较为混乱,在此记录一些配置过程中遇到的问题。
基本环境
ExplORB-SLAM中已经提供了一些依赖需求,请保证已经安装这些环境
OpenCV
Python3
- Numpy
- Sklearn
- Numba
- OpenCV
Gazebo
ROS Noetic
-rviz
-turtlebot3_teleop
-gazebo_ros
-octomap_ros
-octomap_rviz_plugins
-move_base
# 部分基本环境安装
sudo apt-get install ros-noetic-turtlebot3 ros-noetic-turtlebot3-description ros-noetic-turtlebot3-gazebo ros-noetic-turtlebot3-msgs ros-noetic-turtlebot3-slam ros-noetic-turtlebot3-teleop
sudo apt-get install ros-noetic-octomap-ros ros-noetic-octomap-msgs ros-noetic-octomap-server ros-noetic-octomap-rviz-plugins
其他依赖环境安装
可直接安装的组件
# kobuki
sudo apt install ros-noetic-kobuki-msgs ros-noetic-kobuki-driver
# 局部规划算法
sudo apt install ros-noetic-teb-local-planner
# pyhon依赖
pip install nptyping
SophusPy
# Sophuspy依赖pybind11
# https://github.com/pybind/pybind11下载最新release
mkdir build
cd build
cmake ..
make
sudo make install
# 安装sophuspy
pip install sophuspy
除了sophuspy库还有pysophus库提供了sophus库的python接口,有兴趣可以尝试。
安装ExplORB-SLAM
git clone https://github.com/JulioPlaced/ExplORB-SLAM.git
cd ExplORBSLAM/
catkin b
运行结果
问题
AttributeError: type object ‘scipy.spatial.transform._rotation.Rotation’ has no attribute ‘from_dcm’
源代码scipy版本较低,可以考虑回退scipy版本,或者将from_dcm改为from_matrix, as_dcm改为as_matrix