Load and Play ROS or ROS 2 Bag File
Load ROS or ROS 2 Bag File
Load the ROS or ROS 2 bag file by opening it from the File tab in ROS Data Analyzer app toolstrip. The toolstrip also contains the list of supported visualizers under the Visualize tab, and allows you to choose the layout between Default and Grid.
You can open multiple instances of the app to play multiple ROS or ROS 2 bag files simultaneously.
View Bag File Details
The details of bag file content are found on the left side under the app toolstrip.
The Topic List shows the available topics in the ROS or ROS 2 bag file.
The Source Details list the Name, Start time, End time, Duration and Message count of the bag file.
Create Visualizers and Play Bag File
Types of Viewer
Viewer | Viewer Icon | Interface | Description |
---|---|---|---|
Image Viewer |
|
| |
Point Cloud Viewer |
|
| |
Laser Scan Viewer |
|
| |
Odometry Viewer |
|
| |
XY Plot Viewer |
|
| |
Time Plot Viewer |
|
| |
Message Viewer |
|
| |
Map Viewer |
|
|
|
Marker Viewer |
|
|
|
The ROS Bag Viewer app enables you to visualize messages in ROS and ROS 2 bag files. You can create multiple viewers within the app and visualize different ROS and ROS 2 messages simultaneously. For each viewer, you can filter the supported messages in the bag file and press the Play button from the Playback panel for visualization.
You can choose to display the Elapsed Time or the Timestamp values associated with the bag file along the slider tick labels. You can visualize the messages by putting a specific numeric value or drag the slider to a particular value of the elapsed time or the time stamp. You can also take a snapshot and export the information for further use.
Note
Upon loading a ROS or ROS 2 bag file, the app toolstrip updates with the added features of adding and managing bookmarks and tags, and exporting data from topics or bookmarks.
Add and Manage Bookmarks
During the bag file playback, you can add bookmarks at desired time points. To add a bookmark, follow these steps:
Click Add in the Bookmark section of the app toolstrip. This opens the Add bookmark details dialog.
Add the duration of the bookmark in seconds and specify a label. You can also tune the start time of the bookmark.
Click OK. The app now adds a bookmark to the bag file starting from the start time for the specified duration.
You can always view all the bookmarks that you have added as a table by clicking Manage in the Bookmark section of the app toolstrip. Alternatively, you can also access the bookmark table by clicking the Bookmarks tab at the top-right edge of the app canvas. From the bookmark table, you can switch between different bookmarks, modify the bookmark parameters by double-clicking the entries, or delete bookmarks.
Add and Manage Tags
You can add tags to bag file that is currently open in the app. Tags serve as identifiers about the overall content in the bag file. Tags can also provide a quick understanding of the use-cases and applications of the bag file. To add a tag, follow these steps:
Click Add Tag in the Tags section of the app toolstrip. This opens the Tags panel.
Add the desired tag and press Enter.
Save and Restore Session
If you close the app with a bag file loaded or load a different bag file, this automatically saves the current session. The app saves these visualization session elements and restores them when you open the same bag file next time:
All visualizers
Visualizer layout
Bookmarks
Tags
Export Data from Topics and Bookmarks
The ROS Data Analyzer app enables you to capture the data of specific instances from a large database of bag files and export the data using topics and bookmarks. You can then save the data to a BAG or MCAP file for further analysis.
Export Data from Topics
To export data from topics, follow these steps:
From the app toolstrip, click
Export
and select Export data from Topics. This opens the export dialog specific to exporting data from topics.Select one or multiple topics from the list under Select Topic.
Use slider to select the timestamp range for which you want to export the data. You can also enter Start time and Duration as alternatives to update the minimum and maximum thumbs of the slider respectively.
Click the drop down to select
.bag
to save the data exported from a ROS bag file. To save the data exported from a ROS 2 bag file, you can choose .bag or.mcap
from the drop down.Click Export to export data based on the chosen parameters.
For example, you can export message types like nav_msgs/Odometry
and gps_common/GPSFix
to a new bag file for path planning. Or,
you can export sensor_msgs/Image
and
sensor_msgs/PointCloud2
message types to a different bag file
for simultaneous localization and mapping (SLAM).
Export Data Using Bookmarks
To export data using bookmarks, follow these steps:
From the app toolstrip, click
Export
and select Export data using Bookmarks. This opens the export dialog specific to exporting data using Bookmarks.Select one or multiple bookmarks from the list under Select Bookmark.
Click the drop down to select
.bag
to save the data exported from a ROS bag file. To save the data exported from a ROS 2 bag file, you can choose .bag or.mcap
from the drop down.Click Export to export data based on the chosen parameters.
For example, you can use this functionality to mark specific sections in deployed algorithms to capture certain instances of segmentation, pose and so on, and save them to a new bag file for further analysis.
Search Bag Files Using Tags, Bookmarks and Visualizers and Export Search Results
The ROS Data Analyzer app allows you to search across all previously opened bag files using filters or the associated metadata such as the tags, bookmarks and visualizers. You can then export the search results of the required metadata to a CSV file and share across a team for further analysis.
To search across previously opened bag files and export the search results, follow these steps:
From the app toolstrip, click Open > Search Bag File. This opens the search dialog.
Under Search Filters panel:
Select the desired tags. You can search manually across all the tags using the search bar.
Select the desired bookmarks. You can search manually across all the bookmarks using the search bar.
Select the desired visualizers. This filter denotes the visualizers that were open during the bag file visualization.
All selected filters will appear in the Active Filters panel.
The Search Results panel shows the list of bag files which satisfy at least one criterion from the Active Filters panel.
You can export the search results to a CSV file by clicking the Export icon on the top right corner just above the Search Results panel.