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 publishers being created with invalid QoS profile #205

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

achim-k
Copy link
Collaborator

@achim-k achim-k commented Mar 30, 2023

Public-Facing Changes

  • Fix publishers being created with invalid QoS profile

Description

Since #184 we use the QoS profile of an existing publisher when creating a new publisher for a client advertised topic. In case the existing publisher has been destroyed before (but is still registered, see #204), the QoS profile is invalid and creating a publisher fails with the message 'create_publisher() failed setting topic QoS, at ./src/publisher.cpp:226'.

This PR mitigates the issue by taking the QoS profile of an existing publisher from a different node (if there is any). The assumption is, that publishers of other nodes are less likely to be destroyed.

@achim-k achim-k requested a review from jtbandes March 30, 2023 19:04
Copy link
Member

@jtbandes jtbandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok, but would it be better to unregister the publisher? Or is that impossible?

@achim-k
Copy link
Collaborator Author

achim-k commented Mar 31, 2023

Seems ok, but would it be better to unregister the publisher? Or is that impossible?

That would be ideal, but there seems to be a bug which prevents us from doing so. See #204 and the linked rclcpp issue

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

Successfully merging this pull request may close these issues.

None yet

2 participants