First, download Github source
#Prepare Workspace
source /opt/ros/kinetic/setup.bash
mkdir -p rgbdslam_catkin_ws/src
cd rgbdslam_catkin_ws/src
catkin_init_workspace
cd rgbdslam_catkin_ws
catkin_make
source devel/setup.bash
#Get RGBDSLAM
cd /rgbdslam_catkin_ws/src
wget -q http://github.com/felixendres/rgbdslam_v2/archive/kinetic.zip
unzip -q kinetic.zip
cd /rgbdslam_catkin_ws/
#安装依赖
sudo apt-get install libvtk6-dev libdevil-dev
sudo aptitude install libdevil-dev
#Install
rosdep update
rosdep install rgbdslam
catkin_make
The path needs to be added to the workspace .bashrc file:
source devel/setup.bash
source /home/hong/ROS/rgbdslam_catkin_ws/devel/setup.bash
echo "source /home/hong/ROS/rgbdslam_catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
Second, the test data set
1. Download rgbd_dataset_freiburg1_desk.bag, placed under the src
2. to rgbdslam_catkin_ws / src / rgbdslam / rgbdslam.launch modifications:
the rgbdslam.launch in
<param name="config/topic_image_mono" value="/camera/rgb/image_color"/>
<param name="config/topic_image_depth" value="/camera/depth_registered/sw_registered/image_rect_raw"/>
Path data set into
<param name="config/topic_image_mono" value="/camera/rgb/image_color"/>
<param name="config/topic_image_depth" value="/camera/depth/image"/>
3. Open a terminal, run roscore
4 to open the terminal:
source devel/setup.bash
roslaunch rgbdslam rgbdslam.launch
5 to open the terminal, enter the file folder to store the data set, enter the command:
rosbag play rgbd_dataset_freiburg1_desk.bag
Third, the use rviz view dataset
1. Open the terminal and run roscore
2. rosbag info+Tab键
find packet, view the data set information: rosbag info rgbd_dataset_freiburg1_desk.bag
3 to open the terminal: rosbag play rgbd_dataset_freiburg1_desk.bag
4. In the meantime the terminal to open, view published Topic: rostopic list
5. The open rviz, clicking add-> topic, find the topic published, it can dynamically display data stream:rosrun rviz rviz
Fourth, the error handling
process 1: encountered "required process [rgbdslam-2] has died" ... Iinitiating down the problem
was mainly due to rgbdslam dependent libraries g2o and pcl not compatible caused. Solution Source URL: https://hubpages.com/technology/Instructions-for-compiling-rgbdslam-v2-on-a-fresh-Ubuntu-1604-install-ros-kinetic-in-virtualbox
Solution:
1. If you have previously installed the g2o, uninstall, uninstall as follows:
(1) Delete / usr / local / include / g2o , instruction sudo rm -rf /usr/local/include/g2o
;
(2) delete the / usr / local / lib related libg2o _ *. so library files,sudo rm -rf libg2o_*.so
2. Download Eigen3 library to rgbdslam_vs / src directory
cd rgbdslam_catkin_ws/src
wget http://bitbucket.org/eigen/eigen/get/3.2.10.tar.bz2
mkdir eigen
tar -xvjf 3.2.10.tar.bz2 -C eigen --strip-components 1
3. Download rgbdslam author g2o, using the above eigen3.2 configuration g2o download, edit files in g2o cmakelists.txt package, the line 251
SET(G2O_EIGEN3_INCLUDE ${EIGEN3_INCLUDE_DIR} CACHE PATH "Directory of Eigen3")
改成
SET(G2O_EIGEN3_INCLUDE $"Eigen3的绝对路径" CACHE PATH "Directory of Eigen3")
cmake to compile
git clone https://github.com/felixendres/g2o.git
cd g2o
mkdir build
cd build
cmake ..
make
sudo make install
4. Download PCL1.8 and modify its cmakelist.txt
wget https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.0.tar.gz
tar -xvzf pcl-1.8.0.tar.gz
修改cmakelist.txt,在其第146行加入并保存,(right after endif())
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
Compile PCL1.8
cd pcl
mkdir build
cd build
cmake ..
make VERBOSE=1 -j8
sudo make install
5. Modify the rgbdslam_v2 CMakeLists.txt:
将find_package(PCL 1.7 REQUIRED COMPONENTS common io) 改为 find_package(PCL 1.8 REQUIRED COMPONENTS common io)
然后catkin_make
Treatment 2: Remove the pack after a terminal ROS document showed no bash
bash: /home/yaoyao/wsyros/devel/setup.bash: No such file or directory
open terminal gedit ~ / .bashrc enter edit mode, remove the extra setup. bash configuration file is saved.
Fifth, there is a mounting (not tested):
After installing ros, you can directly execute install.sh complete the installation rgbd slam v2. Where to download install.sh, do: bash install.sh
automate the installation process, only the middle one point or enter yes OK.
Reference from:
https://blog.csdn.net/zhuoyueljl/article/details/78536996
https://blog.csdn.net/u011178262/article/details/83046256
https://blog.csdn.net/qq_29828623/article / the Details / 60,765,043
https://www.cnblogs.com/voyagee/p/6898278.html
https://blog.csdn.net/jialing678/article/details/85940462
https://blog.csdn.net/jialing678/ Article This article was / the Details / 85,945,985
http://www.guyuehome.com/860