graph_diff
Snapshot a ROS 2 graph and compare it with a baseline to see what changed: node, topic, type, QoS, rate and count differences, plus what was added.
Instructions
ROS 2 graph only. Answer "what changed since it last worked": snapshot the graph (or bag_path) and compare it with baseline, as a GraphDiff. changes are node, topic, type, qos, rate and count differences; added = present now, absent from the baseline. not_compared names what a pair cannot support: nodes and counts need live against live, rates bag against bag, writer QoS a DDS backend. /rosout and /parameter_events count noise is only tallied in builtin_changes_count. The first call stores a snapshot and says so in note. Snapshots stay in memory (16, lost on restart). Raises an MCP error for an unknown id, a bad bag path or without a ros2 CLI. Mock mode: the first call reports 3 changes, the next 0. Read-only. Duration: ros2 CLI behind the ROS lock, one call at a time; ends within 45 s; busy error if the lock is held (retry).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bag_path | No | Snapshot this bag instead of the live graph. | |
| baseline | No | `previous` (last snapshot), a `snap-N` id from `snapshot_ids`, or a bag path. | previous |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | One sentence of context, or `None`. | |
| changes | Yes | ||
| current | Yes | ||
| baseline | No | `null` without baseline. | |
| added_count | Yes | ||
| baseline_id | No | `null` without baseline (`note`). | |
| snapshot_id | Yes | Stored snapshot id. | |
| not_compared | Yes | Skipped comparison and why. | |
| snapshot_ids | Yes | Held ids, oldest first. | |
| changed_count | Yes | ||
| removed_count | Yes | ||
| mode_effective | Yes | `live` or `mock` (fixtures). | |
| builtin_changes_count | Yes | Count changes on `/rosout`, `/parameter_events`: not in `changes`. |