ubuntu 18.04 + SVO2.0

今年7.15日苏黎世大学SVO2.0开源,第一时间下载运行调试一下~
仓库地址:https://github.com/uzh-rpg/rpg_svo_pro_open
一、安装
作者提供了完整的安装步骤 个人运行环境ubuntu18.04 + ros meldic。安装时给终端挂了梯子
sudo apt-get install python-catkin-tools python-vcstool
sudo apt-get install libglew-dev libopencv-dev libyaml-cpp-dev
sudo apt-get install libblas-dev liblapack-dev libsuitesparse-dev

mkdir svo_ws && cd svo_ws
catkin config --init --mkdirs --extend /opt/ros/ --cmake-args -DCMAKE_BUILD_TYPE=Release -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
cd src
git clone [email protected]:uzh-rpg/rpg_svo_pro_open.git
vcs-import < ./rpg_svo_pro_open/dependencies.yaml
这两步出错,是由于ssh下载方式需要私钥,我配置过但是没成功。。
打开/rpg_svo_pro_open/dependencies.yaml文件,对内容进行替换,将git@替换为http:// com:替换为com/
重新执行命令
touch minkindr/minkindr_python/CATKIN_IGNORE
cd rpg_svo_pro_open/svo_online_loopclosing/vocabularies && ./download_voc.sh
cd …/…/…
安装全部功能:
rm rpg_svo_pro_open/svo_global_map/CATKIN_IGNORE
gedit rpg_svo_pro_open/svo_cmake/cmake/Modules/SvoSetup.cmake 修改 SET(USE_GLOBAL_MAP TRUE)
git clone --branch 4.0.3 http://github.com/borglab/gtsam.git
gedit gtsam/CMakelists.txt 修改278行 option(GTSAM_USE_SYSTEM_EIGEN “Find and use system-installed Eigen. If ‘off’, use the one bundled with GTSAM” ON)
gedit gtsam/CMakelists.txt 在第174行添加 list_append_cache(GTSAM_COMPILE_OPTIONS_PUBLIC “-mno-avx”)
catkin build // 如果cpu核占满可能卡,可以留一个核不编译 cpu核占满必然卡,建议catkin build -j6
安装报错:
1、Dbow2报错,在CMakelists.txt 将ssh下载 改为http下载
2、 /home/smz/slam_demo/svo_ws/src/rpg_svo_pro_open/svo_common/include/svo/common/point.h:97:15: error: ‘atomic_uint64_t’ in namespace ‘std’ does not name a type
static std::atomic_uint64_t global_map_value_version_;
将atomic_uint64_t 改为 std::atomic
(ref:https://stackoverflow.com/questions/41541283/atomic-uint32-t-in-namespace-std-does-not-name-a-type-error)
多执行两遍确保:[build] Summary: All 37 packages succeeded!
*====================================================================================*
程序运行:
前端:
ref:https://github.com/uzh-rpg/rpg_svo_pro_open/blob/master/doc/frontend/visual_frontend.md
source ~/svo_ws/devel/setup.bash
如果缺少这个文件,关了终端,再打开一个重新catkin build 会生成链接文件
从http://rpg.ifi.uzh.ch/datasets/airground_rig_s3_2013-03-18_21-38-48.bag下载数据集
按照教程随便跑跑
视觉惯性里程计:
随便跑跑
全局地图:
用单目+imu数据集随便跑

realsense 435i + SVO2.0
用的color+imu。首先用kalibr获得两个校准文件 cam 和 imu
cd ~/svo_ws/src/rpg_svo_pro_open/svo_ros/scripts
打开imu文件,将imu0:删掉;
打开kalibr_to_svo.py 文件,将最后的输出output_file = 'svo_'改掉,把后面的+删掉(主要是执行的参数里面带/,生成文件名会出问题)
python kalibr_to_svo.py --kalibr “camchain.yaml” --imu “imu.yaml”
获得一个文件:
根据euroc参考文件改一改,可得

label: "realsense"
cameras:
- camera:
    label: /camera/color/
    line-delay-nanoseconds: 0
    image_height: 480
    image_width: 640
    type: pinhole
    intrinsics:
      cols: 1
      rows: 4
      data: [604.8615687027687, 603.6238362922599, 324.4511694447079, 238.11709530521293]
    distortion:
      type: radial-tangential  
      parameters:
        cols: 1
        rows: 4
        data: [0.18151223015071874, -0.36591781744370794, -0.001109317609389558, -0.0030726958273606434]
  T_B_C:
    cols: 4
    rows: 4
    data: [0.9999613729136541, 0.005864363071957247, -0.006546902045967294, -0.014446365294359765,
      -0.005980363762296013, 0.9998229383347701, -0.017841727183672357, 0.011788540848228552,
      0.006441112474553076, 0.01788019086548688, 0.9998193891122052, 0.043261915837175355,
      0.0, 0.0, 0.0, 1.0]
  serial_no: 0
  calib_date: 0
  description: /camera/color/image_raw


imu_params:
  delay_imu_cam: 0.0
  max_imu_delta_t: 0.01
  acc_max: 176.0
  omega_max: 7.8
  sigma_omega_c: 0.0027631264999965644
  sigma_acc_c: 0.01845961950034697
  sigma_omega_bias_c: 4.574658363625803e-05
  sigma_acc_bias_c: 0.00048822850739876976
  sigma_integration: 0.0
  g: 9.8082
  imu_rate: 200.0

imu_initialization:
  velocity: [0.0, 0.0, 0.0]
  omega_bias: [0.0, 0.0, 0.0]
  acc_bias: [0.0, 0.0, 0.0]
  velocity_sigma: 1.0
  omega_bias_sigma: 0.0027631264999965644
  acc_bias_sigma: 0.01845961950034697

emmm 初始化过程中飘的妈都不认识了。。 应该是相机的问题。。ubuntu18.04 对realsense系列的时间戳有问题。
不过程序能跑,可以用ubuntu16.04再试试

你可能感兴趣的:(slam)