Analyze bag file: plotjuggler, rqt_bag

Video of this tutorial

Video of this tutorial is here 

Capturing the bag file

We download three repos which enable simulating robot motion with turtlesim, and giving it a sequence of waypoints to follow using scripted_bot_driver. We build the repos, and run the robot in simulation and capture a bagfile, then we view various parameters from the bag file with Plotjuggler and rqt_bag.

Download and build the repos

The following can be done inside a docker container, or in a regular ROS installation


Run the simulation and capture a bag file

Observe console output is diplayed on a per-node basis by swri_console. You can switch between the nodes by clicking their name and view the output of each.

Here is what your terminator window could look like, showing the commands run:

Observe the turtle traversing the waypoints in the turtlesim window, and progress output from the action servers and scripted_mover node is displayed in swri_console. When the turtlebot has stopped moving, stop bag recording with Ctrl-C in the bag recording window.

Here is what the turtlesim track looks like for the waypoints shown

Swri_console output:

View the bag with Plotjuggler and rqt_bag

In the bag record window (in the bag files directory), run plotjuggler and select the bag file you just recorded and choose topics from which to plot variables. See the video for a walk through of how to use plotjuggler

In the bag record window (in the bag files directory), run rqt_bag and select the bag file you just recorded. The main pane shows all the topics in the bagile and which ones have messages at which times. Left click to set the playback head to a point in time you'd like to look at. Zoom in with the mouse wheel. Right-click on a topic name and select view -> raw. Observe a pane added with the contents of the last message on this topic at the time where the playback head is. Try stepping forward and back in messages and see the contents of the message at the play head. Add a second topic and step through its messages. Both message windows update based on the last recorded message at the time the cursor is at. Observe the cursor moves as you step forward and back in messages. See the video for a walk through of how to use rqt_bag