|
MoveIt Pro API
Core Behaviors for MoveIt Pro
|
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...
#include <save_mtc_task_inspection.hpp>


Public Member Functions | |
| SaveMTCTaskInspection (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
Public Member Functions inherited from moveit_pro::behaviors::AsyncBehaviorBase | |
| AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
| ~AsyncBehaviorBase () override=default | |
| BT::NodeStatus | onStart () override |
| Required implementation of BT::StatefulActionNode::onStart(). | |
| BT::NodeStatus | onRunning () override |
| Required implementation of BT::StatefulActionNode::onRunning(). | |
| void | onHalted () override |
| Required implementation of BT::StatefulActionNode::onHalted(). | |
| void | resetStatus () |
| Resets the internal status of this node. | |
Public Member Functions inherited from moveit_pro::behaviors::SharedResourcesNode< BT::StatefulActionNode > | |
| SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
| Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node. | |
Static Public Member Functions | |
| static BT::PortsList | providedPorts () |
| static BT::KeyValueVector | metadata () |
Additional Inherited Members | |
Protected Member Functions inherited from moveit_pro::behaviors::AsyncBehaviorBase | |
| virtual tl::expected< void, std::string > | doHalt () |
| Optionally implement additional work needed to cleanly interrupt the async process. | |
| void | notifyCanHalt () |
| Called when runAsync() finishes to notify onHalted() that the async process has finished. | |
Protected Attributes inherited from moveit_pro::behaviors::SharedResourcesNode< BT::StatefulActionNode > | |
| std::shared_ptr< BehaviorContext > | shared_resources_ |
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:
/var/log/mtc_inspection).mtc_dumps/eternal_tool_change).~ 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.
| 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 |
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. | moveit_pro::behaviors::SaveMTCTaskInspection::SaveMTCTaskInspection | ( | const std::string & | name, |
| const BT::NodeConfiguration & | config, | ||
| const std::shared_ptr< BehaviorContext > & | shared_resources | ||
| ) |
|
static |
|
static |