Skip to content

Instantly share code, notes, and snippets.

@cahartsell
cahartsell / rosbag_speed_test.py
Created August 6, 2021 15:33
Simple python script for testing the read speed of ROS bag files using multiple threads/processes.
import glob
import os
import rosbag
import concurrent.futures
import multiprocessing
import time
USE_MULTIPROCESSING = True # Flag to switch between concurrent/multiprocessing libraries
NUM_WORKERS = 8 # Number of worker threads/processes