下载KITTI数据集的Odometry的00数据集
下载ELAS_ROS代码编译后增加kitti.launch如下:

<launch>
<!-- Launches ELAS node, and rectification nodes for input -->
<!-- Arguments: input stereo namespace and output elas namespace -->
<arg name="stereo" default="narrow_stereo_textured"/>
<arg name="elas_ns" default="elas"/>
<!-- If you already have rectified camera images remove the image_proc nodes -->
<group ns="$(arg stereo)/left">
<node name="left_rect" pkg="image_proc" type="image_proc"/>
</group>
<group ns="$(arg stereo)/right">
<node name="right_rect" pkg="image_proc" type="image_proc"/>
</group>
<!-- This node actually does the stereo reconstruction -->
<node name="$(arg elas_ns)" pkg="elas_ros" type="elas_ros" output="screen">
<remap from="stereo" to="$(arg stereo)"/>
<remap from="image" to="image_rect"/>
<!--<param name="approximate_sync" value="true" />-->
<param name="disp_min" type="int" value="0"/>
<param name="disp_max" type="int" value="255"/>
<param name="support_threshold" type="double" value="0.95"/>
<param name="support_texture" type="int" value="10"/>
<param name="candidate_stepsize" type="int" value="5"/>
<param name="incon_window_size" type="int" value="5"/>
<param name="incon_threshold" type="int" value="5"/>
<param name="incon_min_support" type="int" value="5"/>
<param name="add_corners" type="bool" value="0"/>
<param name="grid_size" type="int" value="20"/>
<param name="beta" type="double" value="0.02"/>
<param name="gamma" type="double" value="3"/>
<param name="sigma" type="double" value="1"/>
<param name="sradius" type="double" value="2"/>
<param name="match_texture" type="int" value="1"/>
<param name="lr_threshold" type="int" value="2"/>
<param name="speckle_sim_threshold" type="double" value="1"/>
<param name="speckle_size" type="int" value="200"/>
<param name="ipol_gap_width" type="int" value="300"/>
<param name="filter_median" type="bool" value="0"/>
<param name="filter_adaptive_mean" type="bool" value="1"/>
<param name="postprocess_only_left" type="bool" value="1"/>
<param name="subsampling" type="bool" value="0"/>
<!-- If your cameras are not synchronised then uncomment the following line -->
<param name="approximate_sync" value="true" type="bool"/>
</node>
</launch>

在ros新建工程xiaoyao后在scripts增加文档doublecam_talk.py如下:

#!/usr/bin/env python
# license removed for brevity
import rospy
from sensor_msgs.msg import Image,CameraInfo
from std_msgs.msg import Header
import cv2
from cv_bridge import CvBridge
import time
import os
w =1241
h =376#xiaoyao
def build_camera_info(sec_test,frame_str):msg_header = Header(stamp=rospy.Time.from_sec(sec_test))#(stamp=rospy.Time.now())#msg_header = Header( stamp=rospy.Time.now() )msg_header.frame_id = 'narrow_stereo_optical_frame'#frame_str#"camera"camera_info = CameraInfo()# store info without headercamera_info.header = msg_headercamera_info.width = wcamera_info.height = hcamera_info.distortion_model = 'plumb_bob'cx = 607.1928cy = 185.2157fx = 718.856fy = 718.856camera_info.K = [fx, 0, cx, 0, fy, cy, 0, 0, 1]camera_info.D = [0, 0, 0, 0, 0]camera_info.R = [1.0, 0, 0, 0, 1.0, 0, 0, 0, 1.0]camera_info.P = [fx, 0, cx, 0, 0, fy, cy, 0, 0, 0, 1.0, 0]camera_info.binning_x =1 camera_info.binning_y =1 #camera_info.roi.do_rectify=Truereturn camera_info def talker():'''/camera/left/image_raw/camera/right/image_raw/camera/left/camera_info/camera/right/camera_info'''pub1 = rospy.Publisher('/narrow_stereo_textured/left/image_raw', Image, queue_size=5)pub2 = rospy.Publisher('/narrow_stereo_textured/right/image_raw', Image, queue_size=5)pubinfo1 = rospy.Publisher('/narrow_stereo_textured/left/camera_info', CameraInfo, queue_size=5)pubinfo2 = rospy.Publisher('/narrow_stereo_textured/right/camera_info', CameraInfo, queue_size=5)rospy.init_node('talker', anonymous=True) rate = rospy.Rate(2)datadir = '/home/cc/orbslam2/data/00/'lpath=datadir+'image_0/'rpath=datadir+'image_1/'i=0f = open(datadir+"times.txt")imglist = os.listdir(lpath)imglist.sort( key=None, reverse=False)#sorted(imglist)#print(imglist)for imgfile in imglist:if rospy.is_shutdown():breakimgname = imgfile#.split('/')[-1]limg = cv2.imread(lpath+imgname)rimg = cv2.imread(rpath+imgname)#print(lpath+imgname,rpath+imgname)lineNum = float( f.readline() )left_camera_info =  build_camera_info(lineNum,'')        right_camera_info = build_camera_info(lineNum,'')left_img_msg   = CvBridge().cv2_to_imgmsg(limg, "bgr8")right_img_msg  = CvBridge().cv2_to_imgmsg(rimg, "bgr8")left_img_msg.header = left_camera_info.headerright_img_msg.header = right_camera_info.headerpubinfo1.publish(left_camera_info) pubinfo2.publish(right_camera_info)pub1.publish(left_img_msg)pub2.publish(right_img_msg)rate.sleep()if __name__ == '__main__':try:talker()except rospy.ROSInterruptException:pass

roscore
roslaunch elas_ros kitti.launch
rosrun xiaoyao doublecam_talk.py

rviz显示
下方Add按钮点击后,
查看Image主题 elas_ros/depth/Image 、elas_ros/image_disparity/Image 、 elas/point_cloud(虚拟机好像显示不了)

之前碰壁:
1.camera_info的格式查看可参考:http://docs.ros.org/en/melodic/api/sensor_msgs/html/msg/CameraInfo.html
rostopic echo /camera/right/camera_info
2.
[image_transport] Topics ‘xxx’ and ‘xxx’ do not appear to be synchronized
图片也有header需要跟camera_info的header同步
3.Rectified topic ‘xxx’ requested but camera publishing ‘xxx’ is uncalibrated
kitti需要内参的书写(在header里的fx)

ELAS_ROS算法 在 KITTI数据集 实践相关推荐

  1. 【MMDetection3D】环境搭建,使用PointPillers训练测试可视化KITTI数据集

    文章目录 前言 3D目标检测概述 KITTI数据集简介 MMDetection3D 环境搭建 数据集准备 训练 测试及可视化 绘制损失函数曲线 参考资料 前言 2D卷不动了,来卷3D,之后更多地工作会 ...

  2. 感知机算法在鸢尾花数据集上的实践

    感知机算法在鸢尾花数据集上的实践 1 问题背景 2 数据集的微处理 3 导数据,并进行简单可视化 4 模型算法的训练部分 1 问题背景 感知机作为一个比较经典的处理线性二分类的算法,今天想着实践一下, ...

  3. KITTI数据集详解和评价标准

    from: https://blog.csdn.net/Solomon1558/article/details/70173223 摘要:本文融合了Are we ready for Autonomous ...

  4. 数据集:KITTI数据集分析

    摘要:本文融合了Are we ready for Autonomous Driving? The KITTI Vision Benchmark Suite和Vision meets Robotics: ...

  5. KITTI 数据集(CVPR 2012) - 点云 3D

    KITTI 数据集(CVPR 2012) - 点云 3D 0. KITTI 数据集 - 点云 3D 简述 0.1 KITTI 数据集采集平台 0.2 KITTI 3D 目标检测 - 数据集解析 0.2 ...

  6. Kitti数据集的使用

    摘要:本文融合了Are we ready for Autonomous Driving? The KITTI Vision Benchmark Suite和Vision meets Robotics: ...

  7. 郑捷《机器学习算法原理与编程实践》学习笔记(第七章 预测技术与哲学)7.1 线性系统的预测...

    7.1.1 回归与现代预测 7.1.2 最小二乘法 7.1.3 代码实现 (1)导入数据 def loadDataSet(self,filename): #加载数据集X = [];Y = []fr = ...

  8. 毕设日志——在faster rcnn pytorch上训练KITTI数据集

    本次目标: 整理运行代码产生的内容 下载KITTI数据集和LSVH数据集 修改数据集样式为VOC2007 在新的数据集上训测 2019.4.13 一.准备工作 备份之前训练生成的文件models,ou ...

  9. kitti数据集简介、百度网盘分享 kitti-object、kitti-tracking 全套数据集 自动驾驶

    0 写在前面 最近在学习MOT相关知识,之前暑期实习是在一家自动驾驶公司,公司资料里已经有了kitti数据集,所以直接用的,并没有去下载.但是最近自己在学校也用到了这个数据集,所以就去官网下载了,结果 ...

  10. 郑捷《机器学习算法原理与编程实践》学习笔记(第四章 推荐系统原理)(三)SVD...

    4.5.1 SVD算法回顾 A = U∑VT 其中:A是N*M的矩阵,U是M*M的方阵(里面向量正交,称为左奇异向量),∑是一个M*N的矩阵,VT是一个N*N的矩阵(里面向量正交,右奇异向量) 那么奇 ...

最新文章

  1. 【pytorch】nn.GRU的使用
  2. [轉]fckeditor添加自定义按钮
  3. 数据库主键设计之思考
  4. 编程之美-电梯调度算法方法整理
  5. 避免css中文字体在浏览器中解析成乱码
  6. javascript 之----eval的用法
  7. Kali linux 渗透测试技术之搭建WordPress Turnkey Linux及检测WordPress 应用程序漏洞
  8. mysql两个数据库表数据同步_php同步mysql两个数据库中表的数据
  9. 正则表达式 详解---2017-04-16
  10. ubuntu终止terminal中下载任务以及继续下载
  11. 洛谷——P2026 求一次函数解析式
  12. (附源码)flutter+React Native+Springboot Api
  13. 使用Notepad2替代系统笔记本
  14. kindle导出电子书pc_在PC版Kindle上阅读Mobi电子书
  15. 影响力最大化 模拟爆发(粗糙笔记)
  16. 外卖霸王餐返利小程序开发制作功能介绍
  17. 47、微信-发起群聊AddGroupChatActivity
  18. QQGame找茬游戏辅助工具
  19. com.android.pngp.tln,杂七杂八的记录
  20. 公文标题排版(样式修改)

热门文章

  1. 监控系统中的几种服务器,监控系统各种服务器
  2. python信噪比signaltonoise, SNR
  3. Multisim14 语言设置
  4. xml:使用xmlspy创建xml文件,且通过xml文件生成对应的dtd文件
  5. 在JMP中拆分数据集有烦恼?这些实用妙招试试看!
  6. 微信公众号推送天气预报Python
  7. postman下载地址
  8. lisp弧度转度分秒_度分秒转弧度)
  9. 华为安装gsm框架_华为Mate20手机怎么下载安装谷歌服务助手,GMS框架安装教程
  10. JAVA——【案例】实现计算机系信息管理系统(教师和学生信息管理)