Skip to content

zzwu29/bag_scripts

Repository files navigation

bag_scripts

Efficient rosbag scripts for multi-topics (Camera, IMU, GNSS, UWB and groundtruth) in Python.

And for lidar file, please refer to this repositorty.

Getting Started

git clone https://github.com/zzwu29/bag_scripts.git

Usage

Extract bag

extract raw data

python bag_extractor.py --bag * --image_topics * --imu_topics * --gnss_topics * --uwb_topics * --gt_topics * --output_folder ?(default: ~/Desktop/)

extract timestamp from raw data file name

python extract_timestamp.py

convert IMU unix timestamp to gps time, interpolate IMU raw data, and convert IMU measurement units

python conv_imu_timestamp.py

Create bag

convert IMU from gps timestamp to unix timestamp for kalibr_bagcreater.py to pack

python imu_to_unix_csv.py

copy and rename images from gps timestamp to unix timestamp for kalibr_bagcreater.py to pack

python img_unix_copy.py

create rosbag from imu and image topics, refer here for the format requirements(support rgb images and greyscale images)

 python kalibr_bagcreater.py --folder YOUR_FOLDER --output-bag YOUR_BAG.bag [--color]

merge multiple rosbags

python bagmerge.py -o YOUR_OUTPUT_BAG.bag -t TOPIC_BE_MERGED_TO_MAIN_BAG YOUR_MAIN_BAG.bag YOUR_AUXILIARY_BAG.bag

Acknowledgement

About

Efficient rosbag scripts in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages