“Did the firmware change make the robot better or worse?” is one of the most common questions in robotics — and one of the worst answered, because the before and after runs usually live in different files, recorded at different times, and get eyeballed in different tools. PlotJuggler 4 was built with this comparison in mind: it can load several recordings at once, align their timelines, and overlay their signals, with a per-dataset time offset for each recording. That mechanism — not a new chart type, not an export to a spreadsheet — is what turns run-to-run comparison from an impression into evidence. This guide sets out the workflow.
Why before/after comparisons go wrong
- The runs start at different moments. One log begins at power-on, the other at motion start, so the same event sits at different timestamps and the overlay looks “shifted” even when behaviour is identical.
- The views differ. Different signals, different zoom, different scaling — the comparison quietly becomes a comparison of screenshots.
- Only the interesting run gets examined. The after run is scrutinised; the before run is remembered. Memory is not a baseline.
Each of these is a workflow problem, and each has a direct fix in the loading and alignment steps below. If you have not yet worked with several recordings in one view, start with the basics in comparing multiple bag files in PlotJuggler, then apply the stricter discipline here.
Step 1: Load both recordings into one session
Load the before and after recordings into the same PlotJuggler session — PlotJuggler 4’s multi-recording support is the core mechanism of this whole method. Use recordings of the same task, driven the same way, wherever you can: a comparison is only as fair as the runs themselves. If the two runs were recorded by different versions of your logging setup, expect topic names or content to differ slightly, and verify that the signals you plan to compare exist, under the same names, in both datasets before drawing any conclusion.
Step 2: Align the timelines with per-dataset offsets
This is the step that decides whether the comparison means anything. PlotJuggler 4 lets you set a time offset per dataset, so you can shift one entire recording until a shared, unmistakable event — motion start, a mode change, a distinctive manoeuvre — lines up in both. Align on an event that the change under test could not itself have moved; aligning on the very behaviour you are testing would erase the difference you are looking for. Once aligned, events that genuinely moved stand out immediately, because everything that should coincide, does. The per-curve version of the same idea is covered in our time offset guide.
Step 3: Compare the same signals, in the same layout
Build one view and use it for both datasets: the same signals, the same arrangements, the same derived series. Where a judgement depends on a quantity neither log records directly — an error, a rate, a settling behaviour — build it once as a Lua or Python custom transform and apply it to both datasets identically. Then read the overlay question by question:
| Question | What to compare | A regression looks like |
|---|---|---|
| Did it reach the same states? | State and mode series overlaid after alignment. | A state missing, late, or reached by a visibly different path. |
| Did it track as well? | Commanded versus actual for both runs, same chart. | The after run’s error band widening where the before run’s did not. |
| Did timing change? | The aligned event times across both datasets. | Steps taking consistently longer, or happening in a different order. |
| Did anything new appear? | A slow scan of the after run in the shared layout. | Spikes, dropouts or oscillations with no counterpart in the before run. |
Step 4: Save the comparison so it can be repeated
Save the finished view as a layout. PlotJuggler 4’s layout format (schema v4) saves the viewport and the per-dataset offsets alongside the plot arrangement, which means next week’s run can be dropped into exactly the comparison you built today — the foundation of a genuine regression habit rather than a one-off investigation. For what changed in the new line overall, see What’s New in PlotJuggler 4; if your team is still on the previous line, the PlotJuggler 3 to 4 migration guide covers moving over, and it is worth doing for this workflow alone: several recordings with per-dataset alignment is a PlotJuggler 4 capability.
The honest limits
Two cautions. First, an overlay shows difference, not cause: a changed run proves the change coincided with different behaviour, and narrowing which input or subsystem explains it is the debugging workflow, not the comparison. Second, two runs are a sample of two. For a change you intend to ship, run the comparison across several before and after recordings of the same task; the per-dataset-offset workflow makes that practical, because each new recording is minutes of alignment rather than a new analysis. Teams that adopt that habit catch regressions while they are still a diff under review — which is the cheapest moment to catch them.
