Skip to main content

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 .bag and ROS2 rosbag2 directory support from the same codebase
  • Topic whitelist filtering
  • Absolute ROS-time or relative-time windows
  • Optional PointCloud2 spatial filter with independent x/y/z min/max bounds
  • Background GUI execution with progress logging and cancellation
  • PyPI-ready packaging with rosbag-filter and rosbag-filter-app entry 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:

  1. Create the rosbag-filter project on TestPyPI.
  2. Create the rosbag-filter project on PyPI.
  3. Configure the testpypi and pypi GitHub environments.
  4. Add trusted publishing for this GitHub repository in both indexes.

Suggested release flow:

  1. Run the TestPyPI workflow manually.
  2. Validate installation from TestPyPI in a clean environment.
  3. Push a version tag like v0.2.0 to publish to PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rosbag_filter-0.2.0.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rosbag_filter-0.2.0-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

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

Hashes for rosbag_filter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1a158439897141742a373538875b7fefc30cad9a7651b664298c981b848a3796
MD5 32ee013a926559e6abe868582f3496f2
BLAKE2b-256 b54a095e7d2dd135fd47a195c0e0345cbfc588d5d6f0589114db68e9d7180668

See more details on using hashes here.

Provenance

The following attestation bundles were made for rosbag_filter-0.2.0.tar.gz:

Publisher: release-pypi.yml on RENyunfan/rosbag_filter_app

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for rosbag_filter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a9622bc879ab47368f1fb947b32755392e53a02df96b41fe18376ab0f854428
MD5 b31a62e2de4d51f51b9d5edb32ecff59
BLAKE2b-256 9671f76ee3cf52c6e1d1a289aa327963583068ff069ae7ec09497a282fbc104d

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page