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
License
MIT License
评论