ROS与VSLAM入门教程-SVO安装
ROS与VSLAM入门教程-SVO安装
说明:
- 介绍如何安装SVO
依赖安装:
- 安装Sophus - Lie groups
cd workspace
git clone https://github.com/strasdat/Sophus.git
cd Sophus
git checkout a621ff
mkdir build
cd build
cmake ..
make
- 安装Fast - Corner Detector
cd workspace
git clone https://github.com/uzh-rpg/fast.git
cd fast
mkdir build
cd build
cmake ..
make
安装g2o
先安装依赖:
apt-get install cmake, libeigen3-dev, libsuitesparse-dev, libqt4-dev, qt4-qmake, libqglviewer-qt4-dev
- 安装g2o:
cd workspace
wget https://github.com/RainerKuemmerle/g2o/archive/20160424_git.tar.gz -O g2o-20160424_git.tar.gz
tar xvzf g2o-20160424_git.tar.gz
cd g2o-20160424_git
mkdir build
cd build
cmake ..
make
sudo make install
- 也可以指定安装目录:
cmake .. -DCMAKE_INSTALL_PREFIX:PATH=$HOME/installdir
- 安装vikit - Some useful tools that we need
cd catkin_ws/src
git clone https://github.com/uzh-rpg/rpg_vikit.git
- 需要cmake-modules
sudo apt-get install ros-hydro-cmake-modules
- 替代hydro为对应的其他版本
安装SVO
- 下载源码
cd catkin_ws/src
git clone https://github.com/uzh-rpg/rpg_svo.git
- 如果有g2o,在svo/CMakeLists.txt设置HAVE_G2O为TRUE
- 如果安装在其他目录如$HOME/installdir,可以设置:
export G2O_ROOT=$HOME/installdir
- 编译:
cd ..
catkin_make
数据集测试:
- 下载数据集:http://rpg.ifi.uzh.ch/datasets/airground_rig_s3_2013-03-18_21-38-48.bag
- 执行命令:
roslaunch svo_ros test_rig3.launch
- 启动rviz:
rosrun rviz rviz -d <PATH TO rpg_svo>/svo_ros/rviz_config.rviz
- 播放rosbag
rosbag play airground_rig_s3_2013-03-18_21-38-48.bag
实时测试:
摄像头校准,参考Camera Calibration
获得新的校准文件svo_ros/params/my_camera.yaml
修改svo_ros/launch/live.launch
启动launch
roslaunch svo_ros live.launch
界面测试:
- 启动界面:
rosrun rqt_svo rqt_svo
- 如果异常,执行:
rm ~/.config/ros.org/rqt_gui.ini
rosrun rqt_svo rqt_svo
参考:
- https://github.com/uzh-rpg/rpg_svo
- http://uzh-rpg.github.io/rpg_svo/doc/
- https://github.com/uzh-rpg/rpg_svo/wiki
- http://blog.csdn.net/wendox/article/details/52512114
- http://blog.sina.com.cn/s/blog_13fe28d370102wz56.html
- https://github.com/uzh-rpg/rpg_svo/wiki/Run-SVO-with-ROS
- http://blog.csdn.net/wendox/article/details/52536706
- http://www.ros.org/news/2014/06/new-package-svo-semi-direct-monocular-visual-odometry.html
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号