Display Rosbags

There are numerous open-source tools available for managing ROS bags.
Among those, I decided to explore the use of Bag Database for my needs

Bag Database

Only supports Ros1 files

Step 1: Install Docker Desktop on Windows

Link:
https://docs.docker.com/desktop/install/windows-install/
Rosbag_Visualize1
(1)Download Docker Desktop for Windows:
Click on Docker Desktop for Windows
(2)Install Docker Desktop:
Rosbag_Visualize2
Double click and run the Docker Desktop Installer.exe
Rosbag_Visualize3
Installed
(3) Start Docker Desktop
Rosbag_Visualize4
검색 > Type in Docker Desktop > Click Accept on Docker Subscription Service Agreement > Sign up > Proceed survey

Step 2: Configure Docker Desktop for File Sharing

To use Docker volumes with local directories, you need to ensure Docker Desktop has access to your drives
Rosbag_Visualize5
Settings > Resources > Click on browse to browse Disk Image
Share Drive:
Rosbag_Visualize6
Ensure the drive where your ROS bag files are stored (D:) is checked to allow Docker containers to access it
Click on Apply & restart

Step 3: Prepare Required Directories

Ensuring your specified path (D:\MobilityServiceLab\rosbag\bags) exists and contains your ROS bag files
Rosbag_Visualize7

Step 4: Create Docker file

(1)Create a New Text Document for Docker Compose:
-Navigate to the directory where you want to create the Docker Compose file
-Right-click in the folder, select ‘New’ > ‘Text Document’, and name the file docker-compose.yml
(2)Open the Docker Compose File in a Code Editor:
-Launch the code editor you prefer to use. (Example: Visual Studio Code)
-Open the newly created docker-compose.yml file in Visual Studio Code
(3)Prepare the Docker Compose Content: Copy the Docker Compose content from the source
Reference: https://towardsdatascience.com/bag-file-management-using-bag-database-44d774d54df3
(4) Copy and Paste the Content > Save the Docker Compose File

Step 5: Adjust the Docker Compose File for Windows

The Docker Compose file you provided should work as-is, provided Docker Desktop is correctly configured to access your drive
Make sure the path to your bags is correctly specified in the volumes section.

volumes:
    bags:
        driver: local
        driver_opts:
            type: 'none'
            o: 'bind'
            device: 'D:\MobilityServiceLab\rosbag\bags'  # Replace this with the path to your bags
    docker_cache:
    postgres:
    ldap:
    slapd:
    indexes:
    scripts:
        driver_opts:
            type: 'tmpfs'
            device: 'tmpfs'

Step 6: Adjust the Docker Compose File for Windows

Open Command Prompt and Navigate to the folder where your Docker Compose file is saved

D:
cd <Folder Location> 

Search > cmd > Navigate to the location of the folder
Run Docker Compose:
Execute the following command to start up your services defined in the Docker Compose file

docker-compose up -d

Rosbag_Visualize8
Rosbag_Visualize9

Step 6: Verify the Setup

Check that your services are running correctly

docker ps

Rosbag_Visualize10
List running containers

Step 7: Accessing Your Services

Bag Database Web Interface:
Accessible at http://localhost:8080
Open this address in a web browser to interact with the bag database UI
Postgres Database:
Accessible on port 5432
(Do not directly need to access this unless performing specific database operations)

Step 8: Test Rosbag Data

Rosbag_Visualize11

Step 8: Upload rosbag data

Rosbag_Visualize12
Browse > Click Upload All
Rosbag_Visualize13
bag file can be identified on the List View

Step 9: View Bag information

Rosbag_Visualize14
Right click > View Bag information
Properties
List of information about a bag file
Most of these fields were statically determined by when reading the modified and cannot be modified, but Bold fields are used to store dynamically determined information and can be modified
Message Types
All of the types of messages that were read from a bag file
Displays the MD5 Sum of each message type, since messages with the same name could have different types if the message definition changed
Topics
All of the topics in the bag file
In addition to displaying a list of topics, the action icons in the right can be used to view images and videos from topics that have a sensor_msgs/Image or sensor_msgs/CompressedImage type
Tags
If a bag has had tags set on it, they will all be displayed here. This panel can also be used to add or remove tags

The Bag Database will do its best to use OpenCV to convert images into a format that can be rendered into a bag file, but OpenCV may not be able to parse some image formats. Consult the server log if images do not render as expected.

Reference: https://towardsdatascience.com/bag-file-management-using-bag-database-44d774d54df3

Step 10: View Bag information

docker-compose stop

Rosbag_Visualize15
=> Can be restarted with docker-compose start

PlotJuggler

Many of these tools lack support for ROS 2. Given that my ROS 2 bag data is in the .db3 format, I encountered limitations with these other tools so I tried the PlotJuggler

Step1: Access PlotJuggler Website & Github

Link:
https://github.com/facontidavide/PlotJuggler?tab=readme-ov-file

Step2: Install Plot Juggler Package

Development Environment:
Set up on Ubuntu 22.03 OS, running in a virtual machine via VirtualBox
Integration is achieved using the ROS 2 Humble bridge

sudo apt install ros-humble-plotjuggler-ros

Rosbag_Visualize19

Step3: Run Plot Juggler Package

ros2 run plotjuggler plotjuggler

Rosbag_Visualize18

Step4: Plot Juggler Executed

Rosbag_Visualize20