Skip to main content

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

Project description

DearBagPlayer

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

Quick Start

Install dependencies:

pip install dearpygui numpy
pip install --extra-index-url https://rospypi.github.io/simple/ rosbag

Install DearBagPlayer:

pip install dearbagplayer # from https://pypi.org/

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 - Tested on Python 3.9, should work on other Python 3 versions as well
  • DearPyGui
  • NumPy
  • rosbag

Features

Load data from rosbag files

Load up to 10 bag files each time to load data into the data pool.

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

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

dearbagplayer-0.3.0.tar.gz (18.1 kB view hashes)

Uploaded Source

Built Distribution

DearBagPlayer-0.3.0-py3-none-any.whl (21.4 kB view hashes)

Uploaded Python 3

Supported by

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