rosbag-compare
Compare the topic content between rosbags
Say you have a bunch of rosbags inside a folder and you don't know whether or not all those rosbags have the same topics. rosbag-compare will :
- retrieve the topics contained in each rosbag
- export a summary of the ros topics in a JSON file
- plot the topics that are missing for each rosbag :
Installation
rosbag-compare can be installed from PyPi :
$ pip install rosbag-compare
Usage
rosbag-compare can be used both as a command line application and in Python code.
Command line
A basic use of rosbag-compare is to simply call it with the path of the folder that contains rosbags. This will simply generate a JSON file with a summary of the comparison in topics_<name-of-bagfolder>.json.
$ rosbag-compare -b /path/to/folder/with/rosbags
You can also generate a figure that will show what topics are missing in each rosbag with the --plot/-p flag. This figure helps when you want to find out if all rosbags of your experiment contains the topics that are of your interest.
$ rosbag-compare -b /path/to/folder/with/rosbags -p
In Python
You can also call rosbag-compare directly into your Python code :
from rosbag_compare import RosbagComparator
data_path = "/path/to/folder/with/rosbags"
rbag_comp = RosbagComparator(data_path)
# This step may take time as it open each rosbag separately
# Will show a progress bar
rbag_comp.extract_data()
# Export summary to a JSON file
rbag_comp.to_json() # Defaults to topics_<foldername>.json
rbag_comp.to_json("exported_summary.json")
# Generate a figure with the name of the
# missing topics for each rosbag
rbag_comp.plot() # Show figure
rbag_comp.plot(save_fig=True) # Save figure (defaults to missing_topics.png)
rbag_comp.plot(save_fig=True, img_path="topics_summary.jpg") # Save figure to path
Contributing
Pull requests are welcome and don't hesitate to open issues
Development requirements can be installed using pip :
$ python -m venv venv
$ source venv/bin/activate
$ pip install -r requirements/requirements-dev.txt
License
This project is licensed under a MIT license
Metadata
Release files for rosbag-compare 0.1.1
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-compare-0.1.1.tar.gz | 58.7 kB | Without provenance | Details for rosbag-compare-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rosbag_compare-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for rosbag_compare-0.1.1-py3-none-any.whl |
Total release size: 65.5 kB
Release files / rosbag-compare-0.1.1.tar.gz
| Download URL | rosbag-compare-0.1.1.tar.gz |
|---|---|
| Size | 58.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41f0a74bd422ba70751452a1fa18bcd4a225f0eeee4b8f090399080b6e624120
|
|
BLAKE2b-256 checksum How to use checksums |
39943b5d95c4edebcfccf58234e600018a40fa648335de827207ccaa49808e1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / rosbag_compare-0.1.1-py3-none-any.whl
| Download URL | rosbag_compare-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3078e0e00979ea2aed6dd216bc9c6af3478e448cb1b05a2d356cc5f98f207816
|
|
BLAKE2b-256 checksum How to use checksums |
3f0d03f0144141e04842bae5e37ca45e15a20c20d1ebc85c0c7285f09f21d063
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Security for rosbag-compare 0.1.1
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.