VINS-Fusion运行Kaist数据集

2023-11-23 01:50
文章标签 数据 运行 fusion vins kaist

本文主要是介绍VINS-Fusion运行Kaist数据集,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

目录

  • Kaist数据集转rosbag
  • 运行Kaist rosbag数据集

Kaist数据集转rosbag

使用Kaist序列38,转换rosbag参考GithubKaist2bag,这里主要使用IMU,双目相机以及GPS数据。
附:其他的合并rosbag方法数据参考bag_merge。

#!/usr/bin/env pythonimport sys
import argparse
from fnmatch import fnmatchcasefrom rosbag import Bagdef main():parser = argparse.ArgumentParser(description='Merge one or more bag files with the possibilities of filtering topics.')parser.add_argument('outputbag',help='output bag file with topics merged')parser.add_argument('inputbag', nargs='+',help='input bag files')parser.add_argument('-v', '--verbose', action="store_true", default=False,help='verbose output')parser.add_argument('-t', '--topics', default="*",help='string interpreted as a list of topics (wildcards \'*\' and \'?\' allowed) to include in the merged bag file')args = parser.parse_args()topics = args.topics.split(' ')total_included_count = 0total_skipped_count = 0if (args.verbose):print("Writing bag file: " + args.outputbag)print("Matching topics against patters: '%s'" % ' '.join(topics))with Bag(args.outputbag, 'w') as o: for ifile in args.inputbag:matchedtopics = []included_count = 0skipped_count = 0if (args.verbose):print("> Reading bag file: " + ifile)with Bag(ifile, 'r') as ib:for topic, msg, t in ib:if any(fnmatchcase(topic, pattern) for pattern in topics):if not topic in matchedtopics:matchedtopics.append(topic)if (args.verbose):print("Including matched topic '%s'" % topic)o.write(topic, msg, t)included_count += 1else:skipped_count += 1total_included_count += included_counttotal_skipped_count += skipped_countif (args.verbose):print("< Included %d messages and skipped %d" % (included_count, skipped_count))if (args.verbose):print("Total: Included %d messages and skipped %d" % (total_included_count, total_skipped_count))if __name__ == "__main__":main()

运行Kaist rosbag数据集

Kaist相机配置文件:

%YAML:1.0
---
model_type: PINHOLE
camera_name: camera
image_width: 1280
image_height: 560
distortion_parameters:k1: -5.6143027800000002e-02k2: 1.3952563200000001e-01p1: -1.2155906999999999e-03p2: -9.7281389999999998e-04
projection_parameters:fx: 816.90378992770002fy: 811.56803828490001cx: 608.50726281690004cy: 263.47599764440002

总的配置文件:

%YAML:1.0#common parameters
imu: 1
num_of_cam: 1  imu_topic: "/imu0"
image0_topic: "/cam0/image_raw"
image1_topic: "/cam1/image_raw"
output_path: "/home/Workspace/RosWorkspace/catkin_ws_vins_fusion/src/VINS-Fusion/output/"cam0_calib: "kaist_cam.yaml"
cam1_calib: "kaist_cam.yaml"
image_width: 1280
image_height: 560# Extrinsic parameter between IMU and Camera.
estimate_extrinsic: 0   # 0  Have an accurate extrinsic parameters. We will trust the following imu^R_cam, imu^T_cam, don't change it.# 1  Have an initial guess about extrinsic parameters. We will optimize around your initial guess.body_T_cam0: !!opencv-matrixrows: 4cols: 4dt: ddata: [-6.80499000e-03, -1.53215000e-02, 9.99850000e-01, 1.71239,-9.99977000e-01,  3.34627000e-04, -6.80066000e-03, 0.247401,-2.30383000e-04, -9.99883000e-01, -1.53234000e-02, -0.11589,0, 0, 0, 1]body_T_cam1: !!opencv-matrixrows: 4cols: 4dt: ddata: [-6.80499000e-03, -1.53215000e-02, 9.99850000e-01, 1.71239,-9.99977000e-01,  3.34627000e-04, -6.80066000e-03, 0.247401,-2.30383000e-04, -9.99883000e-01, -1.53234000e-02, -0.11589,0, 0, 0, 1]#Multiple thread support
multiple_thread: 1#feature traker paprameters
max_cnt: 200            # max feature number in feature tracking
min_dist: 30            # min distance between two features 
freq: 10                # frequence (Hz) of publish tracking result. At least 10Hz for good estimation. If set 0, the frequence will be same as raw image 
F_threshold: 1.0        # ransac threshold (pixel)
show_track: 1           # publish tracking image as topic
flow_back: 1            # perform forward and backward optical flow to improve feature tracking accuracy#optimization parameters
max_solver_time: 0.08  # max solver itration time (s), to guarantee real time
max_num_iterations: 10   # max solver itrations, to guarantee real time
keyframe_parallax: 15 # keyframe selection threshold (pixel)#imu parameters       The more accurate parameters you provide, the better performance
acc_n: 0.02          # accelerometer measurement noise standard deviation. #0.2   0.04
gyr_n: 0.003         # gyroscope measurement noise standard deviation.     #0.05  0.004
acc_w: 0.005         # accelerometer bias random work noise standard deviation.  #0.02
gyr_w: 3.0e-5       # gyroscope bias random work noise standard deviation.     #4.0e-5
g_norm: 9.81007     # gravity magnitude#unsynchronization parameters
estimate_td: 0                      # online estimate time offset between camera and imu
td: 0.0                             # initial value of time offset. unit: s. readed image clock + td = real image clock (IMU clock)#loop closure parameters
load_previous_pose_graph: 0        # load and reuse previous pose graph; load from 'pose_graph_save_path'
pose_graph_save_path: "/home/Workspace/RosWorkspace/catkin_ws_vins_fusion/src/VINS-Fusion/output/pose_graph/" # save and load path
save_image: 1                   # save image in pose graph for visualization prupose; you can close this function by setting 0

运行指令:

roslaunch vins vins_rviz.launch
rosrun vins vins_node ~/catkin_ws/src/VINS-Fusion/config/kaist/kaist_config.yaml 
rosrun global_fusion global_fusion_node
rosbag play Kaist38_gps.bag

运行结果:
在这里插入图片描述前期由于ENU坐标系与VIO坐标系没有对齐,误差稍大,收敛之后整体效果尚可,但是在个别路段由于GPS的定位偏差较大,优化出的位姿效果没有预期的好。

这篇关于VINS-Fusion运行Kaist数据集的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/414454

相关文章

SQL Server修改数据库名及物理数据文件名操作步骤

《SQLServer修改数据库名及物理数据文件名操作步骤》在SQLServer中重命名数据库是一个常见的操作,但需要确保用户具有足够的权限来执行此操作,:本文主要介绍SQLServer修改数据... 目录一、背景介绍二、操作步骤2.1 设置为单用户模式(断开连接)2.2 修改数据库名称2.3 查找逻辑文件名

canal实现mysql数据同步的详细过程

《canal实现mysql数据同步的详细过程》:本文主要介绍canal实现mysql数据同步的详细过程,本文通过实例图文相结合给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的... 目录1、canal下载2、mysql同步用户创建和授权3、canal admin安装和启动4、canal

使用SpringBoot整合Sharding Sphere实现数据脱敏的示例

《使用SpringBoot整合ShardingSphere实现数据脱敏的示例》ApacheShardingSphere数据脱敏模块,通过SQL拦截与改写实现敏感信息加密存储,解决手动处理繁琐及系统改... 目录痛点一:痛点二:脱敏配置Quick Start——Spring 显示配置:1.引入依赖2.创建脱敏

详解如何使用Python构建从数据到文档的自动化工作流

《详解如何使用Python构建从数据到文档的自动化工作流》这篇文章将通过真实工作场景拆解,为大家展示如何用Python构建自动化工作流,让工具代替人力完成这些数字苦力活,感兴趣的小伙伴可以跟随小编一起... 目录一、Excel处理:从数据搬运工到智能分析师二、PDF处理:文档工厂的智能生产线三、邮件自动化:

Java -jar命令如何运行外部依赖JAR包

《Java-jar命令如何运行外部依赖JAR包》在Java应用部署中,java-jar命令是启动可执行JAR包的标准方式,但当应用需要依赖外部JAR文件时,直接使用java-jar会面临类加载困... 目录引言:外部依赖JAR的必要性一、问题本质:类加载机制的限制1. Java -jar的默认行为2. 类加

Python数据分析与可视化的全面指南(从数据清洗到图表呈现)

《Python数据分析与可视化的全面指南(从数据清洗到图表呈现)》Python是数据分析与可视化领域中最受欢迎的编程语言之一,凭借其丰富的库和工具,Python能够帮助我们快速处理、分析数据并生成高质... 目录一、数据采集与初步探索二、数据清洗的七种武器1. 缺失值处理策略2. 异常值检测与修正3. 数据

pandas实现数据concat拼接的示例代码

《pandas实现数据concat拼接的示例代码》pandas.concat用于合并DataFrame或Series,本文主要介绍了pandas实现数据concat拼接的示例代码,具有一定的参考价值,... 目录语法示例:使用pandas.concat合并数据默认的concat:参数axis=0,join=

java -jar命令运行 jar包时运行外部依赖jar包的场景分析

《java-jar命令运行jar包时运行外部依赖jar包的场景分析》:本文主要介绍java-jar命令运行jar包时运行外部依赖jar包的场景分析,本文给大家介绍的非常详细,对大家的学习或工作... 目录Java -jar命令运行 jar包时如何运行外部依赖jar包场景:解决:方法一、启动参数添加: -Xb

C#代码实现解析WTGPS和BD数据

《C#代码实现解析WTGPS和BD数据》在现代的导航与定位应用中,准确解析GPS和北斗(BD)等卫星定位数据至关重要,本文将使用C#语言实现解析WTGPS和BD数据,需要的可以了解下... 目录一、代码结构概览1. 核心解析方法2. 位置信息解析3. 经纬度转换方法4. 日期和时间戳解析5. 辅助方法二、L

使用Python和Matplotlib实现可视化字体轮廓(从路径数据到矢量图形)

《使用Python和Matplotlib实现可视化字体轮廓(从路径数据到矢量图形)》字体设计和矢量图形处理是编程中一个有趣且实用的领域,通过Python的matplotlib库,我们可以轻松将字体轮廓... 目录背景知识字体轮廓的表示实现步骤1. 安装依赖库2. 准备数据3. 解析路径指令4. 绘制图形关键