Skip to content

Change ClientInstance Registry insert to insert_or_assign #114

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

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from

Conversation

perry-reframe
Copy link

Allows new RosAction-/RosTopic-/RosServiceClients to assign new ClientInstances into the Registry in the event that the old ClientInstance went out of scope.

For example, if a BehaviorTree with three RosServiceNodes to /foo is created, only one ServiceClient is constructed and is then shared between all clients. However, if that tree goes out of scope and destroys its service client, and a new instance is constructed, all three RosServiceNodes construct their own ServiceClient for a total of three service clients. This is because the insert function does not overwrite the expired weakptrs left in the registry.

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

Successfully merging this pull request may close these issues.

1 participant