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

Issue with nested behaviors in concurrency containers #22

Open
dcconner opened this issue Jun 22, 2024 · 2 comments
Open

Issue with nested behaviors in concurrency containers #22

dcconner opened this issue Jun 22, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@dcconner
Copy link
Member

@pschillinger - Expanding on discussion started by flexbe_webui#5

@RPRKLR discovered an issue with the handling of sub-behaviors within a concurrency container.

I found the root cause of that issue, and during testing, I uncovered another issue with the way that transition commands were being processed by nested behaviors. This would cause an issue if a nested transition was blocked due to autonomy level and effectively lock the behavior.

Additional testing and clean up of these issues should be finished later today and posted by 23-June-24 in the ros2-devel branch.

In developing these changes, I see another potential issue.

The current approach to transition command uses the state name as the target. This has the potential to cause issues if a concurrent state has nested behaviors with two sub-states with the same name. My proposed fix to this will be to specify the full state path as the target. This will require changes to flexbe_behavior_engine, flexbe_app, and flexbe_webui for consistency.

As this is a less likely issue, my plan is to do more internal testing with basic fix mentioned above, then incorporate that fix into the humble, iron, jazzy, and rolling branches.

At that point, pending discussion here on using full path to state as the transition command target, I will make a change to the three together. For this change, I propose to NOT port to humble, and focus this change going forward in rolling and jazzy. I am undecided about Iron. Given that there will be a change in messaging, and might impact someone's logs or testing, I'm leaning toward not incorporating that fix into Iron.

@dcconner dcconner self-assigned this Jun 22, 2024
@dcconner dcconner added the bug Something isn't working label Jun 22, 2024
@dcconner
Copy link
Member Author

Another option would be to use the new state_id code as the target. This is less data to transmit than longer string path, and a clear comparison. The downside is that the numeric ID is less useful for monitoring and logging as it is more opaque to human observers. Adding another field to Transition command message could be an option, and use both path and state id, but that is a bigger API change. I'm inclined to just stick with the longer path string under assumption that data constraints are not the dominate issue.

@dcconner
Copy link
Member Author

dcconner commented Aug 27, 2024

After review and testing, I decided to take the plunge and switch messages to use the state id instead of the longer full path. The latest ros2-devel is now version 4.0.0 that makes this change to internal messaging between onboard and OCS. Unless you are logging sync or lock messages you should not notice a difference, but it improves overall sync with nested containers. It also handles preempting states within containers and calling on_exit. Please give it a try.

This breaks compatability with the older flexbe_app, use the flexbe_webui (main branch) instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant