Unified ROS1 and ROS2 bag filtering with CLI and Tk GUI.
Project description
ROS Bag Filter
Unified ROS1 and ROS2 bag filtering with one Python package, one CLI, and one Tk GUI.
Features
- ROS1
.bagand ROS2rosbag2directory support from the same codebase - Topic whitelist filtering
- Absolute ROS-time or relative-time windows
- Optional PointCloud2 spatial filter with independent
x/y/zmin/max bounds - Background GUI execution with progress logging and cancellation
- PyPI-ready packaging with
rosbag-filterandrosbag-filter-appentry points
Install
Python 3.8+ is supported.
pip install "rosbag-filter[gui]"
tkinter is a system dependency on Linux. On Ubuntu:
sudo apt-get install python3-tk
CLI
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
GUI
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
Development
Install dev dependencies:
pip install -e ".[dev,gui]"
Run tests:
pytest
Build distributions:
python -m build
python -m twine check dist/*
Release
The repository includes GitHub Actions workflows for CI, TestPyPI, and PyPI trusted publishing.
Before the first release:
- Create the
rosbag-filterproject on TestPyPI. - Create the
rosbag-filterproject on PyPI. - Configure the
testpypiandpypiGitHub environments. - Add trusted publishing for this GitHub repository in both indexes.
Suggested release flow:
- Run the TestPyPI workflow manually.
- Validate installation from TestPyPI in a clean environment.
- Push a version tag like
v0.2.0to publish to PyPI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rosbag_filter-0.2.0.tar.gz.
File metadata
- Download URL: rosbag_filter-0.2.0.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a158439897141742a373538875b7fefc30cad9a7651b664298c981b848a3796
|
|
| MD5 |
32ee013a926559e6abe868582f3496f2
|
|
| BLAKE2b-256 |
b54a095e7d2dd135fd47a195c0e0345cbfc588d5d6f0589114db68e9d7180668
|
Provenance
The following attestation bundles were made for rosbag_filter-0.2.0.tar.gz:
Publisher:
release-pypi.yml on RENyunfan/rosbag_filter_app
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rosbag_filter-0.2.0.tar.gz -
Subject digest:
1a158439897141742a373538875b7fefc30cad9a7651b664298c981b848a3796 - Sigstore transparency entry: 1361789298
- Sigstore integration time:
-
Permalink:
RENyunfan/rosbag_filter_app@d4ff8ca603aae322a7694129592af808064ed8e2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/RENyunfan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@d4ff8ca603aae322a7694129592af808064ed8e2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rosbag_filter-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rosbag_filter-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a9622bc879ab47368f1fb947b32755392e53a02df96b41fe18376ab0f854428
|
|
| MD5 |
b31a62e2de4d51f51b9d5edb32ecff59
|
|
| BLAKE2b-256 |
9671f76ee3cf52c6e1d1a289aa327963583068ff069ae7ec09497a282fbc104d
|
Provenance
The following attestation bundles were made for rosbag_filter-0.2.0-py3-none-any.whl:
Publisher:
release-pypi.yml on RENyunfan/rosbag_filter_app
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rosbag_filter-0.2.0-py3-none-any.whl -
Subject digest:
7a9622bc879ab47368f1fb947b32755392e53a02df96b41fe18376ab0f854428 - Sigstore transparency entry: 1361789304
- Sigstore integration time:
-
Permalink:
RENyunfan/rosbag_filter_app@d4ff8ca603aae322a7694129592af808064ed8e2 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/RENyunfan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@d4ff8ca603aae322a7694129592af808064ed8e2 -
Trigger Event:
push
-
Statement type: