# bag-parser **Repository Path**: nextvpu/bag-parser ## Basic Information - **Project Name**: bag-parser - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-09-27 - **Last Updated**: 2024-09-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #### Usage ##### 编译 - linux 1. 下载代码 > git clone https://gitee.com/nextvpu/bag-parser.git 2. 配置环境 > pip install -r requirements.txt 3. 运行 > python main.py -f xxx.bag ##### 运行可执行文件 运行平台:Windows x64 将 BagParser.zip 解压,解压后,在命令行中调用 main.exe ```bash main.exe -f xxx.bag ``` xxx.bag 为待解析的 bag 文件,填写绝对路径 运行后,工具会解析 bag 文件中所有 Image 类型的 topic,并保存他们的所有消息。生成的目录规则为: ``` [Bag文件名对应的路径]/[Topic名称路径]/图像文件名 例如: ninebot_2024-06-03-16-32-36/_feynman_camera_N09ASH24DH0051_leftir_image_rect_color/3231_1717403556.737316000.png ``` 1. `ninebot_2024-06-03-16-32-36` 对应于原 bag 文件`ninebot_2024-06-03-16-32-36.bag` 2. `_feynman_camera_N09ASH24DH0051_leftir_image_rect_color` 对应的是原 bag 中的 topic 名称,但将原 topic 中的"/"等字符替换为"\_" 3. `3231_1717403556.737316000.png` 从消息数据中保存的图像文件,文件名格式为:`[seq]_[ts.sec]_[ts.nsec].[ext]` - 后续我们的 ros 中会将 seq 保存为 group id 运行后,工具会生成解析 bag 文件对应的 log 文件,名称格式为`parse_of_[bag_name].log`, 如:`parse_of_ninebot_2024-06-03-16-32-36.bag.log`, 如果解析出现错误,需分析该 log 其他选项: 1. -v 输出版本信息 2. -h 输出帮助信息