Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP for behaviour.update #446

Open
ndahn opened this issue May 31, 2024 · 0 comments
Open

LSP for behaviour.update #446

ndahn opened this issue May 31, 2024 · 0 comments

Comments

@ndahn
Copy link

ndahn commented May 31, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant