xiaoqiang tutorial (18) 3D modeling using DSO_SLAM
weijiz 最后由 weijiz 编辑
3D modeling using DSO_SLAM
Direct Sparse Odometry (DSO) was developed by Jakob Engel with better measured performance and accuracy than lsd_slam. DSO was open sourced to github by the author. At the same time, the author has also open sourced the usage code dso_ros of DSO in the ros system. This tutorial will demonstrate how to install DSO and dso_ros on the Xiaoqiang development platform, use the camera on Xiaoqiang platform to run DSO in real time to perform 3D modeling, Click to view the video.
Note: Since the Xiaoqiang development platform has already installed a lot of DSO-needed dependencies in advance, the following will skip the installation of these packages. Readers of other development platforms should refer to the complete installation tutorial on github for installation.
1.a Installation Dependency Package
sudo apt-get install libsuitesparse-dev libeigen3-dev libboost-dev sudo apt-get install libopencv-dev
1.b download source code
cd ~/Documents/ git clone https://github.com/JakobEngel/dso.git
1.c continue to configure dependencies
sudo apt-get install zlib1g-dev cd ~/Documents/dso/thirdparty tar -zxvf libzip-1.1.1.tar.gz cd libzip-1.1.1/ ./configure make sudo make install sudo cp lib/zipconf.h /usr/local/include/zipconf.h
1.d compile and install
cd ~/Documents/dso/ mkdir build cd build cmake .. make -j
2. Installation of dso_ros
Note: The source code provided by the original author has two branches. The master branch corresponds to the rosbuild version, and the catkin branch corresponds to the catkin version. For modern ROS versions, the catkin version is recommended for easier installation and use. However, the author's catkin branch has a code defect and cannot be installed and used. Therefore, the following will install the dso_ros version of our Bwbot modification.
cd ~/Documents/ros/src git clone https://github.com/BlueWhaleRobot/dso_ros.git cd .. export DSO_PATH=/home/xiaoqiang/Documents/dso catkin_make
Note: The camera calibration files of the Xiaoqiang development platform are the same, so you can directly run the following commands. Readers of other development platforms should modify the contents of the camera.txt file (note that there should be no spaces at the end of each line) and Image topic name in commands.
rosrun dso_ros dso_live image:=/camera_node/image_raw calib=/home/xiaoqiang/Documents/ros/src/dso_ros/camera.txt mode=1
Now move the camera and start modeling the surroundings in 3D, avoiding sharp turns and strenuous movements. For Xiaoqiang users, first control the Xiaoqiang movement and use the rosbag to record the
image/camera_node/image_rawimage topic data, and then replay. This can achieve a wide range of modeling. Before the rosbag is replayed, it is necessary to stop the camera node.
sudo service startup stop, otherwise there will be image publishing conflicts.