These are some scripts to extract data from rosbag conventiently. Any contribution is welcome.
sudo apt install python3-rosbag
sudo apt-get install ros-noetic-ros-numpy
pip3 install tqdm opencv-python argparse cv-bridge
This script is used to extract image data from rosbag. It supports sensor_msgs/Image
and sensor_msgs/CompressedImage
. Please modify script file before run it. You should specify your bag file path, output directory, topic name ,sensor_msgs type,and whether save with timestamp.
./scripts/get_image.sh
This is used to extract depth image data.
This is used to extract LiDAR data as .pcd files with pcl_ros.
Extract LiDAR data and save in kitti format. (000000.bin). Tests on Ouster LiDAR.
You can extract other kinds of data by editing Template.py
bag_preprocess.py is used to get photos and lidar data from rosbag