Browse by type
Unified ROS1 and ROS2 bag filtering with one Python package, one CLI, and one Tk GUI.
.bag and ROS2 rosbag2 directory support from the same codebasex/y/z min/max boundsrosbag-filter and rosbag-filter-app entry pointsPython 3.8+ is supported.
pip install "rosbag-filter[gui]"
tkinter is a system dependency on Linux. On Ubuntu:
sudo apt-get install python3-tk
Show help:
rosbag-filter --help
Filter a ROS1 bag:
rosbag-filter \
--input /data/run.bag \
--output /data/run_filtered.bag \
--topics /imu,/tf \
--time-mode relative \
--start 5.0 \
--end 25.0
Filter a ROS2 bag and apply PointCloud2 bounds:
rosbag-filter \
--input /data/run_ros2 \
--output /data/run_ros2_filtered \
--topics /cloud_registered,/tf \
--time-mode ros \
--start 1710000000.0 \
--end 1710000030.0 \
--workers 8 \
--pc2-topic /cloud_registered \
--pc2-x-min -1.0 \
--pc2-x-max 2.0 \
--pc2-z-max 1.5
Launch the GUI:
rosbag-filter-app
The PointCloud2 controls are hidden in the Advanced PointCloud2 Filter panel by default. Expand the panel only when you want to enable spatial filtering and set x/y/z bounds.
rosbag-filter-gui is also installed as a compatibility alias.
For direct source usage, the legacy wrappers still work:
python3 rosbag_filter_app.py
python3 rosbag2_filter_gui.py
Install dev dependencies:
pip install -e ".[dev,gui]"
Run tests:
pytest
Build distributions:
python -m build
python -m twine check dist/*
The repository includes GitHub Actions workflows for CI, TestPyPI, and PyPI trusted publishing.
Before the first release:
rosbag-filter project on TestPyPI.rosbag-filter project on PyPI.testpypi and pypi GitHub environments.Suggested release flow:
v0.2.0 to publish to PyPI.$ claude mcp add rosbag_filter_app \
-- python -m otcore.mcp_server <graph>