Today I installed and tested LSD-SLAM and recorded the problems encountered in the configuration.
LSD-SLAM论文
LSD-SLAM: Large-Scale Direct Monocular SLAM, J. Engel, T. Schöps, D. Cremers, ECCV '14
Semi-Dense Visual Odometry for a Monocular Camera, J. Engel, J. Sturm, D. Cremers, ICCV '13
Configuration Environment
Operating system: ubuntu 14.04 Virtual machine
ROS: ROS Indigo
official code: https://github.com/tum-vision/lsd_slam
code compilation
Refer to the official code to create an environment, install dependencies, download and compile:
# ros环境创建
sudo apt-get install python-rosinstall
mkdir ~/rosbuild_ws
cd ~/rosbuild_ws
rosws init . /opt/ros/indigo
mkdir package_dir
rosws set ~/rosbuild_ws/package_dir -t .
echo "source ~/rosbuild_ws/setup.bash" >> ~/.bashrc
bash
cd package_dir
# 代码下载
sudo apt-get install ros-indigo-libg2o ros-indigo-cv-bridge liblapack-dev libblas-dev freeglut3-dev libqglviewer-dev libsuitesparse-dev libx11-dev
# 编译
rosmake lsd_slam
You will encounter an error when compiling: there is a line of compilation error in log10.
Reason: the quotation mark problem of the python package in ros.
Modify:
lsd_slam/lsd_slam_viewer/cfg/LSDSLAMViewerParams.cfg
on line 20 of the file, remove point's
the single quotation marks '
in and and keyframe's
; similarly, delete the single quotation marks in lines 21 and 30. quotation marks. Modified lsd_slam/lsd_slam_core/cfg/LSDDebugParams.cfg
single quotes in lines 11, 12 and 48.
Solution to the original issue on github: https://github.com/tum-vision/lsd_slam/issues/270#issuecomment-321496655
run
The nodes that need to be run are: SLAM node, visualization node, and data publishing node. Data from the data set or real-time camera data can be used. For example, using the data set's run command:
# 运行数据集节点
rosbag play ~/LSD_room.bag
# 运行SLAM节点
rosrun lsd_slam_core live_slam image:=/image_raw camera_info:=/camera_info
# 运行可视化节点
rosrun lsd_slam_viewer viewer
The window generated by the viewer node during runtime cannot display the point cloud image? Solution: lsd_slam/lsd_slam_core/src/IOWrapper/OpenCV/ImageDisplay_OpenCV.cpp
Modify the relevant content of cv::waitKey.
lsd_slam/lsd_slam_core/src/IOWrapper/OpenCV/ImageDisplay_OpenCV.cpp,lines 119 and 125
I just replaced ‘cv::waitKey(milliseconds)’ with ‘return 1’.
Issue on official github: https://github.com/tum-vision/lsd_slam/issues/64#issuecomment-140161062
summary
The configuration of MonoSLAM and PTAM is much more convenient than before, after all, it is slightly newer.