GithubHelp home page GithubHelp logo

magic-wei / dearbagplayer Goto Github PK

View Code? Open in Web Editor NEW
53.0 3.0 8.0 2.77 MB

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

License: MIT License

Python 100.00%
rosbag python dearpygui visualization visualization-tools timeseries plotting

dearbagplayer's Introduction

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

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

dearbagplayer's People

Contributors

magic-wei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

dearbagplayer's Issues

rosbag2 support

The last ros version noetic will reach EOL at May, 2025, and ros2 will be widely used.

Viewport/PrimaryWindow resize handler Issue

Currently, DearPyGui (DPG) itself has an viewport (or primary window) resize handler issue (see DPG Issue 1896), that is, the resize handler only works when increasing the size of viewport or primary window and doesn't work when decreasing the size. This will dramatically worsen the user experience of DearBagPlayer when resizing the window. Still looking for an alternative way to implement the viewport resize handler properly.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.