Skip to main content

DearBagPlayer

DearBagPlayer is a flexible rosbag player based on Dear PyGui in Python.

Quick Start

Install dependencies:

pip install dearpygui numpy rosbags

Install DearBagPlayer:

pip install dearbagplayer

Run DearBagPlayer:

dearbagplayer

See features below to take a quick look at the main features.

Example rosbag files can be found in Magic-wei/DearBagPlayerDemoData for people who would like to try DearBagPlayer. See more details about the examples there.

This project is still under developing, see TODO for future work. Currently DearBagPlayer only supports topics that contain data entities with type of int, float, bool and lists or tuples with fixed size.

Dependencies

  • Windows 10 or at least Ubuntu 20.04 LTS
  • Python >= 3.10 - Tested on Python 3.12
  • DearPyGui
  • NumPy
  • rosbags

Features

Load data from rosbag files

Load up to 10 bag files each time to load data into the data pool. Both ROS1 (.bag files) and ROS2 (rosbag2 directories containing metadata.yaml) bags are supported. ROS1 bags are imported via Files -> Import ROS1 Bag(s), ROS2 bags via Files -> Import ROS2 Bag Folder.

Before a bag is parsed, a topic selection window shows all topics with message count, estimated data size and entities per message. Topics that are too large are deselected by default with a warning, since importing them significantly increases import time and pollutes the topic list.

If a ROS2 bag does not embed message definitions, a popup will offer to import the corresponding .msg files via Files -> Import Message Definitions Folder; after loading the definitions the bag import is retried automatically. Every .msg file must be located in a <package>/msg directory.

Drag to plot

Select entities first and drag them to the plot area, drop to plot. Three types of plot enabled:

  • Time series plot (drag and drop directly)
  • XY plot (with ctrl key)
  • Data vs. travel distance plot (with shift key)

Flexible timeline modification

  • Play forward/backward
  • Modify play speed
  • Sync timestamp by drag timeline
  • Play in loop

Zoom in/out at runtime, create new plot tab, delete and clear plots

  • Zoom in/out at runtime
  • Create new plot tab
  • Delete single plot by right-click button of the legend
  • Clear all plots in the activated plot tab with one click

TODO

  • DearBagPlayer
    • Data pool:
      • Get message struct from rosbag
      • Get information of all the topics in a rosbag file
      • Load and maintain a data dict for each topic (especially with different timestamps)
      • Create selectable items for each message entity that has the type of int, float or bool
      • Select bag files (up to 10 each time) to load data into the data pool
      • Select dragged topic when it is not yet selected
      • Add widgets to specify topics to read from bag files (currently it has the feature of specifying topics in code)
      • Create custom series from selected topics
    • Drag and drop callbacks to plot:
      • Drag time series to plot
      • Drag XY plot (drop with ctrl key)
      • Drag data vs. travel distance plot (drop with shift key)
      • Create error popup if XY plot or data vs travel distance series come from different rosbag files
    • Timeline management:
      • Play forward/backward
      • Modify play speed (-5 to 5)
      • Sync timestamp by drag timeline
      • Add button to enable/disable playing in loop
      • Add hotkeys to play/pause/stop
    • Plots:
      • Create new plot tab with 2x2 subplots
      • Enable drop callbacks (single time series)
      • Enable drop callbacks (XY plot)
      • Enable drop callbacks (Data vs. travel distance)
      • Clear all plots in the activated plot tab with one click
      • Create new plot tab with one click
      • Enable closing plot tab
      • Enable closing all series in a plot tab
      • Enable renaming plot tab
      • Resize at runtime
      • Split plots vertically or horizontally at runtime
      • Copy plots or save to files
    • Enable live streaming
    • Enable publishing
    • Save and load config files
    • Packaging
      • Convert DearBagPlayer to a Python package
      • Add entry point for CLI usage
      • Configure setup
      • Release to PyPI

License

MIT License

Metadata

Release files for DearBagPlayer 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for DearBagPlayer 0.3.1
File Size Uploaded
dearbagplayer-0.3.1.tar.gz 29.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for DearBagPlayer 0.3.1
File Interpreter ABI Platform
dearbagplayer-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 59.5 kB

Release files / dearbagplayer-0.3.1.tar.gz

Download URL dearbagplayer-0.3.1.tar.gz
Size 29.7 kB
Tags Source
SHA-256 checksum
How to use checksums
334fa4f2eca885a6edd7497e3f4a86ab761da8fba0c84c9c2a20967e2da178f7
BLAKE2b-256 checksum
How to use checksums
b553a406b5186fb603dd9e45d40c800d23813b94ff8d1477ba826ca0c75124bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release files / dearbagplayer-0.3.1-py3-none-any.whl

Download URL dearbagplayer-0.3.1-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a336df51baea1e792f4013b1ef87ab96c985b3d22d70775e7537aea718b477f8
BLAKE2b-256 checksum
How to use checksums
df08d3650b2724deb0ab249167ee74153ef09a967f0031deecf2a9439899049f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page