How to modify rosbag?如何修改rosbag?
Ubuntu16.04,kinetic
本文示例修改使用rosbag中的frame id
在http://wiki.ros.org/bag_tools中,能找到
change_camera_info.py
usage: change_frame_id.py [-h] -o OUTPUT_BAGFILE -i INPUT_BAGFILE -f FRAME_ID
-t TOPIC [TOPIC ...] reate a new bagfile from an existing one replacing the frame id of requested
topics. optional arguments:
-h, --help show this help message and exit
-o OUTPUT_BAGFILE output bagfile
-i INPUT_BAGFILE input bagfile
-f FRAME_ID desired frame_id name in the topics
-t TOPIC [TOPIC ...] topic(s) to change
准备修改包的frame id,问题是,发现完整版的ros似乎没有安装bag_tools?什么回事呢?
看了F&A后,发现是一个老生常谈的问题How to use bag_tools? bag_tools因为缺失需要c++编译的executable,这个包已经损坏了,并且只能从源码source安装,使用git clone或者直接下载整个.zip文件后,解压,将bag_tools复制到catkin_ws中,进行catkin_make,出现另外一个问题(我觉得有可能是opencv版本兼容问题,也有可能不是):
00:04:39.904 In file included from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core.hpp:59:0,
00:04:39.904 from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core/core.hpp:48,
00:04:39.904 from /opt/ros/kinetic/include/image_proc/processor.h:37,
00:04:39.904 from /opt/ros/kinetic/include/stereo_image_proc/processor.h:37,
00:04:39.904 from /tmp/binarydeb/ros-kinetic-bag-tools-0.0.3/src/process_stereo.cpp:34:
00:04:39.904 /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core/mat.hpp: In instantiation of ‘class cv::Mat_<unsigned int>’:
00:04:39.904 /opt/ros/kinetic/include/stereo_image_proc/processor.h:180:30: required from here
00:04:39.904 /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core/mat.hpp:2150:50: error: no type named ‘channel_type’ in ‘class cv::DataType<unsigned int>’
00:04:39.904 typedef typename DataType<_Tp>::channel_type channel_type;
00:04:39.904
解决方法为https://github.com/srv/srv_tools/issues/17中提到的
在bag_tools/src下的三个文件extract_images.cpp, extract_stereo_images.cpp 和 process_stereo.cpp前面加上
#define OPENCV_TRAITS_ENABLE_DEPRECATED
编译通过,perfect!
接下来修改frame id,将你所要的修改frame id的rosbag文件copy到bag_tools/dataset中,
执行
./scripts/change_frame_id.py -o ./dataset/subsetcopy01.bag -i ./dataset/subset01.bag -f /openni_rgb_optical_frame -t /camera/color/image_raw
/camera/aligned_depth_to_color/image_raw
使用ls命令时,发现没有修改过的rosbag显示为绿色,修改后的则为白色。
好像ls后显示的颜色并不影响,直接忽略。
How to modify rosbag?如何修改rosbag?的更多相关文章
- ABAP modify screen:修改屏幕,实现隐藏、禁止输入字段
Loop at screen会loop处理屏幕上的每一个组件,并对其做相应的处理. SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME.PARAMETERS ...
- 3D Slicer Modify Mouse Event 修改3D Slicer中的鼠标响应事件
在3D Slicer中,我们如果想在自己写的插件中来修改默认的鼠标响应事件的话,就需要先将原有的响应事件链接删除,然后建立自定义的响应事件链接,然后将自己要实现的功能写在响应事件函数中. 比如Slic ...
- cartographer 3D运行录制rosbag包
目录: 1.运行多线激光雷达: 2.运行IMU: 3.录制rosbag包: 4.配置cartographer: 5.查看地图: 1.运行多线激光雷达: 主要是测试雷达是否正在运行,确认雷达点云topi ...
- mvc jquery 修改 viewbag
[HttpGet] public ActionResult Modify(int id) { Books mod=db.Books.Where(b = ...
- mvc 修改 删除 linq
Models文件夹里面可以Linq,Entity两种映射框架,也允许有ADO的操作,甚至可以ADO代码和映射代码一起操作 控制器当中允许有相同的方法名,类似在做修改时有两个Modify方法,但是MVC ...
- 10月16日下午MySQL数据库CRUD操作(增加、删除、修改、查询)
1.MySQL注释语法--,# 2.2.后缀是.sql的文件是数据库查询文件. 3.保存查询. 关闭查询时会弹出提示是否保存,保存的是这段文字,不是表格(只要是执行成功了表格已经建立了).保存以后下次 ...
- eclipse中tomcat 中server location灰色,如何修改?
Eclipse中tomcat service设置选择window ----show view---services可以看到服务的面板双击tomcat进入配置界面Service Locations(Sp ...
- [转帖]创建文件或修改文件时间 touch
Linux命令(五)创建文件或修改文件时间 touch https://www.cnblogs.com/ay-a/p/7900274.html touch -t .x86_64.rpm 记得 wind ...
- Linux命令(五)创建文件或修改文件时间 touch
Linux中 touch 命令可以改变文档或目录时间, 包括存取时间或更改时间, 也可以用于创建新文件. 命令格式: touch [选项] [参数] 选项: -a 只更改文件的读取时间. -m ...
随机推荐
- POJ 1639 Picnic Planning:最小度限制生成树
题目链接:http://poj.org/problem?id=1639 题意: 给你一个无向图,n个节点,m条边,每条边有边权. 让你求一棵最小生成树,同时保证1号节点的度数<=k. 题解: 最 ...
- Git_错误_01_failed to push some refs to 'git@github.com
在使用git 对源代码进行push到gitHub时可能会出错,信息如下 此时很多人会尝试下面的命令把当前分支代码上传到master分支上. $ git push -u origin master 但依 ...
- L105
A pill could soon radio signals from inside your gut to help doctors diagnose diseases from ulcers t ...
- L101
It isn't where you came from. It's where you're going that counts.起点并不重要,重要的是,你要去往何方.Nothing is impo ...
- (转)#ifndef的用法
原文链接:http://wenku.baidu.com/link?url=c4doqVo3U429RkwTN5eaJIfD2rEu-1bLKKQXuqO8drmL359PhUjVmzC7P94wBY9 ...
- Oracle12c多租户如何启动关闭CDB或PDB (PDB自动启动)
Oracle 数据库 12 c 中介绍了多租户选项允许单个容器数据库 (CDB) 来承载多个单独的可插拔数据库 (PDB).下面我们一起来启动和关闭容器数据库 (CDB) 和可插拔数据库 (PDB). ...
- 不同类型input尺寸设置区别
最近发现为不用类型的input设置相同的尺寸,却得到了不一样的尺寸结果.发现不同类型的input的height和width竟然含义不同.在此小整理一下. (1)button类型 规律 button类型 ...
- poj 2000 Gold Coins(水题)
一.Description The king pays his loyal knight in gold coins. On the first day of his service, the kni ...
- Python脚本开头两行:#!/usr/bin/python和# -*- coding: utf-8 -*-的作用
转于:https://www.crifan.com/python_head_meaning_for_usr_bin_python_coding_utf-8/ 出处:在路上 一.基本功能 1)#!/us ...
- Python:正则表达式(二)
则表达式是一个特殊的字符序列,它能帮助你方便的检查一个字符串是否与某种模式匹配. Python 自1.5版本起增加了re 模块,它提供 Perl 风格的正则表达式模式. re 模块使 Python 语 ...