Walks an MTC Task and saves all introspection data (stage tree, statistics, every solution and failure, interface states, per-stage failure explanations) to a JSON file on disk.
More...
Walks an MTC Task and saves all introspection data (stage tree, statistics, every solution and failure, interface states, per-stage failure explanations) to a JSON file on disk.
Intended for offline triage of MTC planning failures, so the customer can ship a single file back to support instead of needing live RViz access at the moment of failure. Plug it in either as a fallback below PlanMTCTask (to capture only failures) or between Plan and Execute (to capture every plan).
The destination directory accepts:
- An absolute path (e.g.
/var/log/mtc_inspection).
- A path relative to the first configured objectives library directory (e.g.
mtc_dumps/eternal_tool_change).
- A path beginning with
~ or $HOME, expanded against the current user's home directory.
The file name is always generated as <task_id>_<YYYYMMDDHHMMSSmmm>.json from the task's internal id. The trailing 3 digits are milliseconds-within-second so that rapid back-to-back invocations (e.g. retries inside a Fallback) do not overwrite each other. The absolute path of the written file is exposed on the generated_file output port.
If the Task was created with introspection disabled (enable_introspection set to false on InitializeMTCTask), there is no inspection data to save: this Behavior logs a warning, clears the generated_file output port, and succeeds without writing a file.
| Data Port Name | Port Type | Object Type |
| task | input | std::shared_ptr<moveit_pro::task_constructor::Task> |
| output_directory | input | std::string |
| include_trajectories | input | bool |
| include_scenes | input | bool |
| generated_file | output | std::string |
- Warning
- Inherits from AsyncBehaviorBase because, with
include_scenes=true and a non-trivial planning scene, JSON serialization + disk write can run for hundreds of milliseconds. A synchronous tick would block the BT executor for the duration.