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

Fix detachment #40

Merged
merged 6 commits into from
Dec 6, 2024
Merged

Fix detachment #40

merged 6 commits into from
Dec 6, 2024

Conversation

mxgrey
Copy link
Contributor

@mxgrey mxgrey commented Dec 6, 2024

While reviewing open-rmf/rmf_site#238 there was a bug was discovered for the .detach feature. The detach operation would remove the UnusedTarget component from a target, but it would not put in any InputStorage, so give_input would error out when trying to give an input to the detached node. This PR updates give_input to account for Detached correctly. It also adds a regression test, test_detach, which would fail without the changes in this PR.

In the process of fixing the above issue, I took the opportunity to add and refine a few other tests which were helpful in narrowing in on this issue. I've also introduced InputTypeIndicator which keeps track of the expected input type for any operation. This allows us to do some runtime introspection and generate more helpful error messages if input/output types ever clash.

@mxgrey mxgrey merged commit 3d5425d into main Dec 6, 2024
6 checks passed
@mxgrey mxgrey deleted the debug_missing_input_storage branch December 6, 2024 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants