Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

GUID fix for node graph implementation #255

Merged
merged 5 commits into from
Jan 25, 2019
Merged

GUID fix for node graph implementation #255

merged 5 commits into from
Jan 25, 2019

Conversation

mm318
Copy link
Member

@mm318 mm318 commented Dec 22, 2018

There were some hacks left in the ros2/rcl unit test (specifically in test_graph.cpp), because the unique identifier for participants and topics used in rmw_opensplice didn't seem to be correct. This pull request fixes that issue, and the hacks in the unit tests can now be removed.

@tfoote tfoote added the in review Waiting for review (Kanban column) label Dec 22, 2018
@mm318
Copy link
Member Author

mm318 commented Dec 22, 2018

Justification of this change:

The InstanceHandle_t type does uniquely identify entities, such as DomainParticipants, Subscribers, Publishers, and Topics: https://github.com/ADLINK-IST/opensplice/blob/master/src/api/dcps/isocpp2/include/dds/core/TEntity.hpp#L203

So we intend to use InstanceHandle_t as the unique identifier of participants and topics.

Then one question is how to translate from BuiltinTopicKey_t to InstanceHandle_t.

We can first see that BuiltinTopicKey/BuiltinTopicKey_t can be translated to v_builtinTopicKey/v_gid: https://github.com/ADLINK-IST/opensplice/blob/master/src/api/dcps/isocpp2/code/org/opensplice/topic/BuiltinTopicCopy.cpp#L89

Then v_builtinTopicKey/v_gid can be translated to an InstanceHandle_t as done here: https://github.com/ADLINK-IST/opensplice/blob/master/src/api/dcps/c%2B%2B/common/code/DataReader.cpp#L1384 and here: https://github.com/ADLINK-IST/opensplice/blob/master/src/api/dcps/c%2B%2B/common/code/DataWriter.cpp#L552

This is the approach taken by the implementation of DDS_BuiltinTopicKey_to_InstanceHandle() in this pull request.

@mm318
Copy link
Member Author

mm318 commented Dec 22, 2018

The hacks in the ros2/rcl unit test is being removed with ros2/rcl#368.

@clalancette clalancette self-requested a review January 3, 2019 20:13
Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

This looks generally fine to me; I've got a few comments for improvement, but it is nothing major. I'm going to run CI on the whole thing right now. Once the comments are fixed and CI is green, I'm happy to approve.

rmw_opensplice_cpp/src/guid.hpp Outdated Show resolved Hide resolved
rmw_opensplice_cpp/src/guid.hpp Outdated Show resolved Hide resolved
rmw_opensplice_cpp/src/types.cpp Outdated Show resolved Hide resolved
@clalancette
Copy link
Contributor

clalancette commented Jan 24, 2019

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@clalancette
Copy link
Contributor

The one test failure on aarch64 is a known flakey test: ros2/build_farmer#133 . Thus, I'll approve and merge this. Thank you!

@clalancette clalancette merged commit 25287a6 into ros2:master Jan 25, 2019
@clalancette clalancette removed the in review Waiting for review (Kanban column) label Jan 25, 2019
@chapulina
Copy link

@mm318, this and ros2/rcl#368 will need to be backported to the crystal branches in order to get into patch release 2. Would you or someone else from your team be willing to open a PR with the backport? We can take care of running CI. cc @ross-desmond

@mm318
Copy link
Member Author

mm318 commented Feb 6, 2019

I will be travelling. @ross-desmond, can you do the backport, please? Thanks!

@nuclearsandwich
Copy link
Member

Would you or someone else from your team be willing to open a PR with the backport?

I can take care of opening the backport PR itself as long as someone from the team is able to field feedback if CI comes back with issues.

@ross-desmond
Copy link
Contributor

ross-desmond commented Feb 6, 2019 via email

@ross-desmond
Copy link
Contributor

"Prior to this fix in rmw-opensplice, a node was unable to lookup it's own topics and services discovered through the Simple Discovery Protocol. This enables rmw-opensplice to behave the way rmw-connext and rmw-fastrtps in regards to the node graph API."
Description from ros2/ros2#647 discussion

nuclearsandwich pushed a commit that referenced this pull request Feb 7, 2019
* fix node graph unit tests

* cleanup header #includes

* addressing comments in code review

* fix formatting issue caught by linter

* address comments from OSRF
nuclearsandwich added a commit that referenced this pull request Feb 8, 2019
* fix node graph unit tests

* cleanup header #includes

* addressing comments in code review

* fix formatting issue caught by linter

* address comments from OSRF
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants