py_trees.meta module
Meta methods to create behaviours without creating behaviours themselves.
- py_trees.meta.create_behaviour_from_function(func: BehaviourUpdateMethod, module: str | None = None) Type[Behaviour]
Create a behaviour from the specified function.
This takes the specified function and drops it in to serve as the the Behaviour
update()
method.The user provided fucntion must include the self argument and return a
Status
value.It also automatically registers a method for the
terminate()
method that clears the feedback message. Other methods are left untouched.- Args:
func: a drop-in for the
update()
method module: suppliment it with a __module__ name if required (otherwise it will default to ‘abc.’)