Skip to content

Negotiation fails with rmw_cyclonedds_cpp #3

Description

@nvcyc

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions