rosbag_slam_lint
Lint rosbag2 metadata.yaml for LiDAR/IMU SLAM recording quality. (No ROS runtime required.)
rosbag2 の metadata.yaml を対象に、LiDAR/IMU SLAM向けの録画品質をチェックするCLIです。(ROS実行環境なしで動きます)
Install
PyPI:
python3 -m pip install -U rosbag-slam-lint
CLIだけ欲しい場合(隔離環境):
pipx install rosbag-slam-lint
開発用(editable install, このmonorepoから):
python3 -m pip install -e ./oss/rosbag_slam_lint
Quickstart
rosbag-slam-lint /path/to/bag_dir
rosbag-slam-lint /path/to/metadata.yaml
rosbag-slam-lint /path/to/bag_dir --fail-on warn
目的
録画後に以下を即判定します。
- 必須トピックがあるか
- 平均Hzが最低ラインを満たすか
- 録画時間・総メッセージ数が極端に不足していないか
使い方
rosbag-slam-lint /path/to/bag_dir
metadata.yaml を直接渡すこともできます。
rosbag-slam-lint /path/to/metadata.yaml
JSON出力:
rosbag-slam-lint /path/to/bag_dir --json
WarningでもCIを落とす:
rosbag-slam-lint /path/to/bag_dir --fail-on warn
設定ファイルで閾値を上書き:
rosbag-slam-lint /path/to/bag_dir --profile lio --config examples/config.sample.yaml
デモ(サンプル)
サンプル入力:
examples/metadata.sample.yaml
rosbag-slam-lint examples/metadata.sample.yaml
出力例:
== rosbag_slam_lint ==
source: examples/metadata.sample.yaml
duration_s: 100.000
message_count: 5200
topic_count: 3
topics:
- /imu/data (sensor_msgs/msg/Imu): 4200 msgs, 42.000 Hz
- /velodyne_points (sensor_msgs/msg/PointCloud2): 900 msgs, 9.000 Hz
- /odom (nav_msgs/msg/Odometry): 100 msgs, 1.000 Hz
diagnostics:
[WARN] LOW_TOPIC_RATE: imu average rate is 42.00Hz; recommended >= 50.0Hz. IMU topic average rate looks low (< 50Hz).
suggestion: Check sensor frame rate, network bandwidth, and QoS reliability.
[INFO] MISSING_RECOMMENDED_TOPICS: Recommended topic group 'tf' not found (patterns=['/tf']).
suggestion: This is optional, but useful for downstream debug/visualization.
[INFO] MISSING_RECOMMENDED_TOPICS: Recommended topic group 'tf_static' not found (patterns=['/tf_static']).
suggestion: This is optional, but useful for downstream debug/visualization.
閾値調整(実bagを使う)
複数の metadata.yaml から、プロファイルに必要なトピック群の実測Hz分布を集計できます。
rosbag-slam-profile-stats /data/bags --json
/data/bags は再帰探索され、metadata.yaml が自動収集されます。
出力の required_groups[].suggested_min_hz は、既定で p10 * 0.8 で計算されます。
設定ファイル(--config)
サンプル: examples/config.sample.yaml
checks:
short_recording_s: 120
low_message_count: 5000
profiles:
lio:
required_groups:
lidar_points:
min_hz: 8.0
imu:
min_hz: 80.0
サポート項目:
checks.short_recording_schecks.low_message_countprofiles.<profile>.required_groups.<group>.min_hz
プロファイル
lio(現在実装済み)- 必須: LiDAR群, IMU群
- 推奨:
/tf,/tf_static,/odom
lio_glim(厳しめ設定)- 必須: LiDAR群 (>= 8Hz), IMU群 (>= 88Hz)
- 推奨:
/tf,/tf_static,/odom
ekf- 必須: IMU群 (>= 50Hz), Wheel/Odometry群 (>= 10Hz)
- 推奨:
/tf,/tf_static
vio- 必須: IMU群 (>= 100Hz), Camera image群 (>= 10Hz)
- 推奨:
/tf,/tf_static
wheel_lio- 必須: LiDAR群 (>= 5Hz), IMU群 (>= 50Hz), Wheel/Odometry群 (>= 10Hz)
- 推奨:
/tf,/tf_static
終了コード
0: 失敗条件に達する問題なし1:--fail-onで指定した閾値以上の問題あり2: 入力不正や読み込み失敗
今後の予定
/tfチェーン整合チェック- GitHub Actions向けサンプル
- プロファイル自動推定(トピック構成ベース)
リリースノート
CHANGELOG.mdを参照RELEASE_NOTES_v0.3.2.mdを参照RELEASE_NOTES_v0.3.1.mdを参照RELEASE_NOTES_v0.3.0.mdを参照RELEASE_NOTES_v0.2.0.mdを参照RELEASE_NOTES_v0.2.1.mdを参照ANNOUNCE_v0.3.2.mdに告知テンプレを用意ANNOUNCE_v0.3.1.mdに告知テンプレを用意ANNOUNCE_v0.3.0.mdに告知テンプレを用意ANNOUNCE_v0.2.1.mdに告知テンプレを用意
テスト
cd oss/rosbag_slam_lint
pytest -q
PyPI公開(メンテナ向け)
ローカルビルド検証:
cd oss/rosbag_slam_lint
python3 -m pip install build twine
python3 -m build
python3 -m twine check dist/*
GitHub Actionsでの公開:
- リポジトリシークレット
PYPI_API_TOKENを設定 - バージョンを更新してタグ/リリースを作成
Publish rosbag_slam_lintworkflow が release event で実行される
Secret設定を補助するスクリプト:
cd oss/rosbag_slam_lint
./scripts/setup_pypi_secret.sh --set
設定確認だけする場合:
cd oss/rosbag_slam_lint
./scripts/setup_pypi_secret.sh --check
CIで失敗させる最小例
name: bag-quality-check
on: [push, pull_request]
jobs:
lint-bag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install -e ./oss/rosbag_slam_lint
- run: |
rosbag-slam-lint path/to/metadata.yaml \
--profile lio \
--config oss/rosbag_slam_lint/examples/config.sample.yaml \
--fail-on warn
リリース手順(v0.1.0ベース)
pyproject.tomlのversionを更新CHANGELOG.mdに変更内容を追記- ローカル確認
python3 -m py_compile rosbag_slam_lint.pyrosbag-slam-lint examples/metadata.sample.yamlrosbag-slam-lint examples/metadata.sample.yaml --json
- コミットとタグ作成
git add oss/rosbag_slam_lintgit commit -m "Release rosbag_slam_lint vX.Y.Z"git tag vX.Y.Z
- push
git pushgit push --tags
Metadata
Release files for rosbag-slam-lint 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rosbag_slam_lint-0.3.2.tar.gz | 12.4 kB | Without provenance | Details for rosbag_slam_lint-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rosbag_slam_lint-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for rosbag_slam_lint-0.3.2-py3-none-any.whl |
Total release size: 25.6 kB
Release files / rosbag_slam_lint-0.3.2.tar.gz
| Download URL | rosbag_slam_lint-0.3.2.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fe4ccbae0d2664b0fc30a94a63e28cdb5a27a46ad8b00ac7ffbf59d8dce061c
|
|
BLAKE2b-256 checksum How to use checksums |
503e1a265452c7d377ae17a4e3e94b9ae2b410cad50a2a504f5dd572b726bab8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / rosbag_slam_lint-0.3.2-py3-none-any.whl
| Download URL | rosbag_slam_lint-0.3.2-py3-none-any.whl |
|---|---|
| Size | 13.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11f0d4fc0390ebe7df55e29001184f1ae32b4d8ea333ed49731d186d1acd4642
|
|
BLAKE2b-256 checksum How to use checksums |
e153167f4bc6332912cf1e5bcb2053c21d820ccb18e26317020151ab8312b0c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for rosbag-slam-lint 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.