py_trees.demos.ports.nested_subtrees module

Nested subtrees for a robotics pickup mission.

class py_trees.demos.ports.nested_subtrees.AddMissionStep(name: str, **kwargs: Any)

Bases: BehaviourWithPorts

Append one mission step to the report text.

classmethod input_ports() dict

Return the input port declarations.

classmethod output_ports() dict

Return the output port declarations.

update() Status

Append step to report_in and write to report_out.

class py_trees.demos.ports.nested_subtrees.ReadMissionReport(name: str, **kwargs: Any)

Bases: BehaviourWithPorts

Final node that exposes the finished report for printing.

property final_report: str

Return the final report wired to this node’s input port.

classmethod input_ports() dict

Return the input port declarations.

classmethod output_ports() dict

Return the output port declarations.

update() Status

Return SUCCESS; the report is read via final_report.

class py_trees.demos.ports.nested_subtrees.StartMissionReport(name: str, **kwargs: Any)

Bases: BehaviourWithPorts

Create the initial mission report text.

classmethod input_ports() dict

Return the input port declarations.

classmethod output_ports() dict

Return the output port declarations.

update() Status

Combine robot_name and mission_name into the initial report.

py_trees.demos.ports.nested_subtrees.main() None

Parse nested subtrees from XML and execute one mission tick.