py_trees.demos.ports.remapping module
Explicit 3-step pipeline with remapping and subtree namespaces.
- class py_trees.demos.ports.remapping.AppendSuffix(name: str, suffix: str, **kwargs: Any)
Bases:
BehaviourWithPortsStep 2: read one string, append a suffix, and write the updated string.
- classmethod input_ports() dict
Return the input port declarations.
- classmethod output_ports() dict
Return the output port declarations.
- class py_trees.demos.ports.remapping.GenerateValue(name: str, prefix: str = 'value', **kwargs: Any)
Bases:
BehaviourWithPortsStep 1: generate a random value and write it to an output port.
- classmethod input_ports() dict
Return the input port declarations.
- classmethod output_ports() dict
Return the output port declarations.
- class py_trees.demos.ports.remapping.ReadResult(name: str, **kwargs: Any)
Bases:
BehaviourWithPortsStep 3: read the final pipeline value so it can be inspected.
- classmethod input_ports() dict
Return the input port declarations.
- classmethod output_ports() dict
Return the output port declarations.
- property result: str
Return the value wired to this node’s input port.
- py_trees.demos.ports.remapping.main() None
Run two isolated 3-step pipelines that reuse the same port names (no clash).
- py_trees.demos.ports.remapping.run_pipeline(namespace: str, prefix: str, suffix: str) str
Run one explicit 3-step pipeline in the given namespace.
Step 1: GenerateValue writes to
/step1_value.Step 2: AppendSuffix reads
/step1_value, writes/step2_value, and also writes a local (unremapped)valuestatus output.Step 3: ReadResult reads
/step2_value.