### This pkg is now part of [rosbag_toolkit](https://github.com/neufieldrobotics/rosbag_toolkit) and is moved to rosbag_toolkit/bag2mat, Checkout new version at https://github.com/neufieldrobotics/rosbag_toolkit/tree/master/bag2mat
# bag2mat
* Takes a rosbag file and converts it to a matlab mat file based on settings specified in a Dictionary and a yaml config file.
- Dictonary: The dicionary file specified which variables from each message type should be moved to the matlab array.
eg `sensor_msgs/NavSatFix: t.to_sec(), m.latitude, m.longitude, m.altitude`
See config/bag2mat_dic.yaml for full example.
- Configuration: This file specified which topic names should be transferred to matlab and under which variable name.
A list of `-[topic name, message type, name for variable in matfile]`
See config/bag2mat_config.yaml for full example.
* Currently needs the following packages:
- rosbag
- roslib
- scipy
* Put this repo in the src folder of ros workspace and run
```
catkin_make
source devel/setup.bash
usage: bag2matpy [-h] [-c CONFIG_FILE] [-d DICTIONARY] [-i input_bagfile]
```
```
Complete List of Arguments:
-h, --help show this help message and exit
-i INPUT_BAGFILE, --input_bagfile INPUT_BAGFILE
Input rosbag file to input
-o OUTPUT_DIR, --output_dir OUTPUT_DIR
Output dir for matfile
-c CONFIG_FILE, --config_file CONFIG_FILE
Yaml file which specifies topic names to convert
-d DICTIONARY, --dictionary DICTIONARY
Dictionary file which specifies how to read the topic
-s, --subtract_start_time
Boolean flag to specify whether to include offset_time obtained by subtracting bag start_time from all timestamps
```
没有合适的资源?快使用搜索试试~ 我知道了~
把ros下的bag转换成.mat数据
共16个文件
yaml:8个
mat:1个
license:1个
需积分: 18 6 下载量 177 浏览量
2022-04-28
15:41:53
上传
评论
收藏 13.58MB ZIP 举报
温馨提示
ts
资源详情
资源评论
资源推荐
收起资源包目录
防重bag2mat-bag2matpy.zip (16个子文件)
bag2mat-bag2matpy
config
bag2mat_dict.yaml 5KB
bag2matpy_seabed_config.yaml 2KB
bag2matpy_simplenav_uas.yaml 936B
bag2matpy_config(复件).yaml 351B
2022-04-28-09-37-11.mat 5.01MB
bag2matpy_vio.yaml 145B
bag2matpy_google_tango_online_data.yaml 162B
bag2matpy_config.yaml 217B
2022-04-28-09-37-11.bag 71.17MB
bag2matpy_xsens_online_data.yaml 165B
ReadMe.md 2KB
LICENSE 1KB
.gitignore 7B
CMakeLists.txt 2KB
scripts
bag2matpy 5KB
package.xml 605B
共 16 条
- 1
羊狗狗一只2022年
- 粉丝: 38
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0