Skip to content

LSP for behaviour.update #446

@ndahn

Description

@ndahn

py_trees uses a blackboard as a centralized way for behaviors to interact with each other and retrieve global state information. While the approach and implementation are nice, assuming a blackboard as the only way to pass variables imposes a lot of restrictions.

For example, since you can't have multiple trees with individual blackboards, and if you want to pass something to your behaviors you can never just pass them to the function call. This adds a lot of complexity which I think is not necessary, and for many smaller projects undesirable.

Would it be possible to change the signature of Behaviour.update() to accept *args and **kwargs? This simple change would provide a lot of (optional!) flexibility based on the Liskov substitution principle (LSP), without causing any incompatibilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions