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

LifeCycle pattern dosn't work (for me at least) #2057

Open
DrShIkIgAmy opened this issue Dec 6, 2022 · 4 comments
Open

LifeCycle pattern dosn't work (for me at least) #2057

DrShIkIgAmy opened this issue Dec 6, 2022 · 4 comments
Labels
more-information-needed Further information is required

Comments

@DrShIkIgAmy
Copy link

Here's the problem:
I have LifeCycleNode implemented as component. The node has to received some data from a service to pass Configuration state. I bet you've already got the point. The configuration func is deadlocked. Because I can't return control to a component_container, cause configuration is not finished. I can't finish configuration, cause I've not received the data from the service (stiil awaiting). To receive response some of spins has to be called, but I can't do this, because my node will be double-registrated in that case. I cannot create another node (for client purpose) and destroy it after response is received, because any new node inside component derive name from parent. I cannot create sub-node, cause my node is derived from LifeCycleNode.
May be messed up a little bit, but it seems to me, that is is a bug.

@fujitatomoya
Copy link
Collaborator

@DrShIkIgAmy thanks for creating issue, but i am not really sure about the case that you described. could you provide self-contained reproducible sample to this problem you have?

@fujitatomoya fujitatomoya added the more-information-needed Further information is required label Dec 6, 2022
@tgroechel
Copy link

If I'm parsing this correctly @DrShIkIgAmy , are you referring to the deadlock issue of calling a service within a running callback? I.e., #773

Issue is:

  • on_change_state calls a user callback (e.g., on_configure)
  • within on_configure you call an external service
  • the lc executor is stuck servicing this on_configure and can therefor not process any response (i.e., deadlocked)

This is likely addressed by #2213

@fujitatomoya
Copy link
Collaborator

@tgroechel thanks for the info, #773 (comment) could be something we can do right now in the application.

@ros-discourse
Copy link

This issue has been mentioned on ROS Discourse. There might be relevant details there:

https://discourse.ros.org/t/deferrable-canceleable-lifecycle-transitions/32318/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-information-needed Further information is required
Projects
None yet
Development

No branches or pull requests

4 participants