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

Negotiation fails with rmw_cyclonedds_cpp #3

Open
nvcyc opened this issue Mar 25, 2024 · 0 comments
Open

Negotiation fails with rmw_cyclonedds_cpp #3

nvcyc opened this issue Mar 25, 2024 · 0 comments

Comments

@nvcyc
Copy link

nvcyc commented Mar 25, 2024

Negotiated publisher holds a callback to trigger additional negotiation when it detects a change in graph in terms of the list of negotiated subscriber connected to the same topic. The list is based on ROS pub/sub internal GIDs.

A GID is recorded here when a negotiated subscriber is connected:

std::copy(
std::begin(msg_info.get_rmw_message_info().publisher_gid.data),
std::end(msg_info.get_rmw_message_info().publisher_gid.data),
std::begin(gid_key));

It gets a GID in a different way to check if a connected negotiated subscriber (more precisely, its negotiation publisher) is already existed here:

if (negotiated_subscription_type_gids_->count(endpoint.endpoint_gid()) > 0) {
std::vector<std::string> old_type =
negotiated_subscription_type_gids_->at(endpoint.endpoint_gid());
new_negotiated_subscription_gids->emplace(endpoint.endpoint_gid(), old_type);
}

In rmw_fastrtps_cpp GIDs obtained from these two methods are identical, but they are different when using rmw_cyclonedds_cpp, which causes the algorithm to think that a negotiated has been removed and hence removing all negotiated results. As a result, negotiation can fail in rmw_cyclonedds_cpp when it should be successful.

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

No branches or pull requests

1 participant