OpenVINS学习1——数据集配置与运行

前言

OpenVINS是基于MSCKF的开源VIO算法,有非常详细的官网文档可以学习使用,将来一段时间的主要实践工作,就是深度掌握这份开源代码。

https://docs.openvins.com/

一、环境配置与Euroc数据集运行

我的环境是Ubuntu20.04,ROS1,参看https://docs.openvins.com/gs-installing.html进行配置下载就行,Euroc数据集从OpenVINS支持数据集那里能够直接下载。

https://docs.openvins.com/gs-datasets.html#gs-data-euroc

关于Euroc的运行,我下载的最新版本OpenVINS好像没有pgeneva_ros_eth.launch ,网上很多博客可能没办法直接运行。不过参考这个博客就行。

https://blog.csdn.net/PG__13/article/details/123323802

在这里插入图片描述

关于运行配置,主要都在subscribe.launch里面,通过配置不同参数,进行运行选项的选择。

<launch>

    <!-- what config we are going to run (should match folder name) -->
    <arg name="verbosity"   default="INFO" /> <!-- ALL, DEBUG, INFO, WARNING, ERROR, SILENT -->
    <arg name="config"      default="euroc_mav" /> <!-- euroc_mav, tum_vi, rpng_aruco -->
    <arg name="config_path" default="$(find ov_msckf)/../config/$(arg config)/estimator_config.yaml" />

    <!-- mono or stereo and what ros bag to play -->
    <arg name="max_cameras" default="2" />
    <arg name="use_stereo"  default="true" />
    <arg name="bag_start"   default="0" /> <!-- v1-2: 0, mh1: 40, mh2: 35, mh3: 17.5, mh4-5: 15 -->
    <arg name="bag_rate"    default="1" />
    <arg name="dataset"     default="V1_01_easy" /> <!-- V1_01_easy, V1_02_medium, V2_02_medium -->
    <arg name="dobag"       default="false" /> <!-- if we should play back the bag -->
    <arg name="bag"         default="/media/patrick/RPNG\ FLASH\ 3/$(arg config)/$(arg dataset).bag" />
<!--    <arg name="bag"         default="/home/patrick/datasets/$(arg config)/$(arg dataset).bag" />-->
<!--    <arg name="bag"         default="/datasets/$(arg config)/$(arg dataset).bag" />-->

    <!-- saving trajectory path and timing information -->
    <arg name="dosave"      default="false" />
    <arg name="dotime"      default="false" />
    <arg name="path_est"    default="/tmp/traj_estimate.txt" />
    <arg name="path_time"   default="/tmp/traj_timing.txt" />

    <!-- if we should viz the groundtruth -->
    <arg name="dolivetraj"  default="false" />
    <arg name="path_gt"     default="$(find ov_data)/$(arg config)/$(arg dataset).txt" />

    <!-- MASTER NODE! -->
<!--    <node name="ov_msckf" pkg="ov_msckf" type="run_subscribe_msckf" output="screen" clear_params="true" required="true" launch-prefix="gdb -ex run &#45;&#45;args">-->
    <node name="ov_msckf" pkg="ov_msckf" type="run_subscribe_msckf" output="screen" clear_params="true" required="true">

        <!-- master configuration object -->
        <param name="verbosity"              type="string" value="$(arg verbosity)" />
        <param name="config_path"            type="string" value="$(arg config_path)" />

        <!-- world/filter parameters -->
        <param name="use_stereo"             type="bool"   value="$(arg use_stereo)" />
        <param name="max_cameras"            type="int"    value="$(arg max_cameras)" />

        <!-- timing statistics recording -->
        <param name="record_timing_information"   type="bool"   value="$(arg dotime)" />
        <param name="record_timing_filepath"      type="string" value="$(arg path_time)" />

    </node>

    <!-- play the dataset -->
    <group if="$(arg dobag)">
        <node pkg="rosbag" type="play" name="rosbag" args="-d 1 -r $(arg bag_rate) -s $(arg bag_start) $(arg bag)" required="true"/>
    </group>

    <!-- record the trajectory if enabled -->
    <group if="$(arg dosave)">
        <node name="recorder_estimate" pkg="ov_eval" type="pose_to_file" output="screen" required="true">
            <param name="topic"      type="str" value="/ov_msckf/poseimu" />
            <param name="topic_type" type="str" value="PoseWithCovarianceStamped" />
            <param name="output"     type="str" value="$(arg path_est)" />
        </node>
    </group>

    <!-- path viz of aligned gt -->
    <group if="$(arg dolivetraj)">
        <node name="live_align_trajectory" pkg="ov_eval" type="live_align_trajectory" output="log" clear_params="true">
            <param name="alignment_type" type="str" value="posyaw" />
            <param name="path_gt"        type="str" value="$(arg path_gt)" />
        </node>
    </group>


</launch>

二、TUM数据集运行测试

TUM数据集也可以从OpenVINS支持数据集那里下载,运行命令主要也是参照subscribe.launch进行配置,因为OpenVINS原生支持TUM数据集,所以比较容易跑通。运行命令如下:

//开启一个终端
roscore

//开启一个终端
rviz
//打开rviz后,再点击左上角,open config,添加workspace/catkin_ws_ov/src/open_vins/ov_msckf/launch/display.rviz配置文件

//开启一个终端
source devel/setup.bash
roslaunch ov_msckf subscribe.launch config:=tum_vi dataset:=dataset-room1_512_16

//在存放数据bag的文件夹内开启一个终端
rosbag play dataset-room1_512_16.bag

有个真值的问题没解决,运行Euroc的时候就发现了,RVIZ中没有显示真实轨迹,这里以TUM为例演示一下怎么显示真实轨迹,Euroc数据集是同理的。将dolivetraj参数配置为true就行,因为OpenVINS里自带了真实轨迹数据,会自动找到,但是如果使用其他数据集,则还需要改动真值路径等参数。

roslaunch ov_msckf subscribe.launch config:=tum_vi dataset:=dataset-room1_512_16 dolivetraj:=true

在这里插入图片描述
此外,ov_eval中还有很多评估工具,需要单独运行来使用,之后出一期专门学习一下这个。

3、VIRAL数据集配置运行

这是今天的重点部分,原生OpenVINS并不支持VIRAL数据集,但是VIRAL数据集作者曾经就在OpenVINS运行出过一个改动好的代码,但是现在OpenVINS中launch文件经过改动了,因此也需要重新配置一番。

VIRAL支持的OpenVINS:https://github.com/brytsknguyen/open_vins.git

主要需要修改的地方有:配置文件添加,真实轨迹文件添加,数据集添加测试。
直接去VIRAL支持的OpenVINS里把ntuviral.rviz、run_ntuviral.launch粘贴到自己的OpenVINS中的open_vins/ov_msckf/launch文件夹下就行了。VIRAL作者已经将配置参数都写到了run_ntuviral.launch里面。
在这里插入图片描述

运行命令

//打开一个终端
roscore

//打开一个终端
roslaunch ov_msckf run_ntuviral.launch bagfile:=/home/merlincs/workspace/dataset/VIRAL/eee_01
//后面是bag的路径

这一块还是有问题,明天再搞了。。。

相关推荐

  1. 学习记录】CLINS配置运行

    2023-12-09 14:12:05       22 阅读
  2. Webpack配置运行基础教程

    2023-12-09 14:12:05       20 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-09 14:12:05       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-09 14:12:05       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-09 14:12:05       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-09 14:12:05       18 阅读

热门阅读

  1. Pytorch当中nn.Identity()层的作用

    2023-12-09 14:12:05       30 阅读
  2. 2024年生成式人工智能发展预测

    2023-12-09 14:12:05       36 阅读
  3. ubuntu18.04安装pcl1.11.1

    2023-12-09 14:12:05       39 阅读
  4. 【C/PTA】结构体专项练习

    2023-12-09 14:12:05       24 阅读
  5. 解决Base64字符串出现不合法字符的情况

    2023-12-09 14:12:05       41 阅读
  6. SpringBoot集成WebSocket

    2023-12-09 14:12:05       44 阅读
  7. 【深入剖析K8s】第四章 K8S集群搭建与配置

    2023-12-09 14:12:05       40 阅读
  8. ubuntu18.04安装opencv-4.5.5+opencv_contrib-4.5.5

    2023-12-09 14:12:05       41 阅读
  9. Stream 流

    2023-12-09 14:12:05       40 阅读
  10. 系统优化(安全,限流,数据存储)

    2023-12-09 14:12:05       36 阅读