# tools **Repository Path**: myboyhood/tools ## Basic Information - **Project Name**: tools - **Description**: general tools 1. convert rosbag image topic to imwrite to local disk, for Yolo label. - **Primary Language**: Python - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-11-10 - **Last Updated**: 2024-12-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # CIUS-rosbag-Tools This program can convert rosbag (including: img_raw, compressed, depth image) to `.jpg` format - run example ```bash $ python rosbag2image_single.py -i /home/zph/hard_disk/rosbag/kalibr_bag/usb-ir-color/usb-ir-color-paper-print-5x6-grid_2023-01-12-16-28-57.bag -o /home/zph/hard_disk/rosbag/kalibr_bag/usb-ir-color/checkboard-5x6-grid -t1_name /ir_image_topic -t1_type jpg -prefix kun0 -step 10 -t_start 1673512138 -t_end 1673512174 ``` - `- i` : input rosbag file path - `- o` : output image folder path - `- t1_name` : topic name - `- t1_type` : image type - `- prefix` : image name prefix - `- step` : image save step - `- t_start` : start time - `- t_end` : end time ```bash python rosbag2image_single_with_poses.py -i /home/zph/hard_disk/rosbag/two_uavs_fly_outdoor/paris_env-20240528/v5-best-outdoor-z-line-kun01-camera-front-side-imu-uwb_2024-05-28-17-14-xx.bag -o /home/zph/hard_disk/rosbag/two_uavs_fly_outdoor/paris_env-20240528/v5-best-paris-env-z-line/images -t1_name /kun1/D455/camera/color/image_raw/compressed -t1_type png -step 1 -t_start 1716887740.000 -t_end 1716887750.0 ``` - `- i` : input rosbag file path - `- o` : output image folder path - `- t1_name` : topic name - `- t1_type` : image type - `- prefix` : image name prefix - `- step` : image save step - `- t_start` : start time - `- t_end` : end time - 如果转换深度图 目前,我电脑的python的cv_bridge有问题,不支持转换深度图,所以要改`depth_img_save.cpp`来转换深度图