Our dataset is captured in rosbag and raw formats. For the convenience of usage, we have provided a toolbox to convert between different structures.
cd /{YOUR_PATH}/rosbag_tools
catkin_make
source /devel/setup.bash
Append your images into a bag file:
You can use this tool to add images to an existing bag file using the following command:
rosrun bag_creator bag_append_node config_file_path
The yaml file format and interpretation is as follows:
image_folder_path
:the path of images that needs to be added to the bag For example, in the sequence 1005_01, there are two grayscale cameras and two RGB cameras. Two grayscale cameras are named c4a3a4 and c4a3a8, and two color cameras are named c54d7a and c54d79. The folder structure should be /{YOUR_PATH}/1005_01/c4a3a4/{c4a3a4 images}, /{YOUR_PATH}/1005_01/c4a3a8/{c4a3a8 images} and so on, Only enter /{YOUR_PATH}/1005_01/ here.timestamp_file_path
:the path of timestamp filebag_names
:the original bag to be addeddown_sample_ratio
: image downsampling frequency. For example, if the original picture is collected at 40Hz, and the corresponding timestamp file records 40Hz information, when down_sample_ratio is set to 4, the picture will be added to the bag at a frequency of 10Hzleft_cam_topic
:topic of left gray cameraright_cam_topic
:topic of right gray cameraleft_cam_topic_rgb
:topic of left rgb cameraright_cam_topic_rgb
:topic of right rgb camera
see the yaml sample file settings_for_append.yaml
Create a new bag with your images:
You can create a new bag file from an existing image file using the following command:
rosrun bag_creator bag_creator_node config_file_path
The yaml file meaning of this tool is exactly the same as the append tool, please see the append section.
see the yaml sample file settings_for_creator.yaml
Extract images from existing bag file:
You can extract topic-specific images from the bag using the following command:
rosrun bag_creator bag_extractor_node config_file_path
The yaml file format and interpretation is as follows:
down_sample_ratio
:how many frames to output a picture everyinput_bag_path
:the path of input bagbag_name
:bag nameoutput_folder_path
:the path of images outputoutput_image_prefix
:the prefix of the image outputoutput_image_format
:the format of the image outputcam_topic
:the image topic to output
see the yaml sample file settings_for_extractor.yaml