Skip to content

Conversation

ivanpauno
Copy link
Member

@ivanpauno ivanpauno commented Oct 10, 2019

Adds:

  • Generation of common messages.
    • A package called rmw_dds_common_generators. It basically depends on rosidl_generator_c, rosidl_generator_cpp, rosidl_typesupport_introspection_c, rosidl_typesupport_introspection_cpp, and a group depend in rosidl_typesupport_cpp_packages.
      This is used to avoid depending in the default generators, which also depend in rmw_typesupport_c/cpp creating a circular dependency.
      This metapackage is needed, as there is no build_tool_group_depend equivalent.
    • rmw_dds_common generates three messages Gid.idl, NodeCustomInfo.idl, ParticipantCustomInfo.idl.
    • Each dds implementation will generate a *__type_support.cpp for the messages manually (example here).
  • GraphCache class, that could be used in all the vendors.
  • A common Context class, that will be an implementation detail in all the rmw_context_t of rmw implementations based on DDS, that uses one Participant per Context.

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
* Add gid_utils

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

* Add NodeCache class

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>

Add testing of TopicCache class

Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
* Please linter.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

First pass! Man this one's big.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
…ntation

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
…icipant

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Member Author

@wjwwood I realized recently that I'm not triggering the graph guard condition in many cases I should.
That isn't causing failures, just because lack of tests.
I will pass a rmw_guard_condition_t * to GraphCache, and trigger it in all the setters.

@wjwwood
Copy link
Member

wjwwood commented Feb 10, 2020

Ok, yeah we do need to be triggering the node guard condition anytime the graph changes. That should have been the case before.

It would be nice to have new tests in rcl or something to ensure that this is happening. Unfortunately these tests are notoriously complicated, due to their nature of being asynchronous.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Member Author

Ok, yeah we do need to be triggering the node guard condition anytime the graph changes. That should have been the case before.

Done in
ros2/rmw_fastrtps@bffc25c and 8d6e757.

It would be nice to have new tests in rcl or something to ensure that this is happening. Unfortunately these tests are notoriously complicated, due to their nature of being asynchronous.

Opened issue.

@wjwwood
Copy link
Member

wjwwood commented Feb 13, 2020

@ivanpauno can you update the original description before you merge this? It looks out of date, and it's most likely what someone will look at when coming back to this in the future.

Also, please go ahead and move this to the ROS 2 organization.

break;
case EndpointCreator::BARE_DDS_PARTICIPANT:
node_name = "_CREATED_BY_BARE_DDS_APP_";
node_namespace = "_CREATED_BY_BARE_DDS_APP_";
Copy link
Contributor

Choose a reason for hiding this comment

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

@ivanpauno why not using these string literals when first constructing the tuple? Then you can optimize this switch away.

Copy link
Member Author

Choose a reason for hiding this comment

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

I could optimize EndpointCreator::BARE_DDS_PARTICIPANT case, but not also EndpointCreator::UNDISCOVERED_ROS_NODE. I find clearer if all the cases are together.

using DemangleFunctionT = GraphCache::DemangleFunctionT;

void
check_results(
Copy link
Contributor

Choose a reason for hiding this comment

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

@ivanpauno nit: for all check_* functions, consider not using default parameters for empty sets or zero counts and provide them explicitly instead. IMO it'll make the tests much easier to read.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd also be a bit more verbose on the naming e.g. check_results -> check_graph_cache_state. Same for the rest.

Copy link
Contributor

Choose a reason for hiding this comment

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

Still applies, but won't block on it.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
ivanpauno and others added 3 commits March 20, 2020 16:03
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan S Paunovic <ivanpauno@gmail.com>
Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM but for a few minor comments here and there.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno requested a review from hidmic March 26, 2020 16:07
Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno requested a review from hidmic March 27, 2020 19:09
Copy link
Contributor

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno merged commit dc92e86 into master Apr 2, 2020
@delete-merged-branch delete-merged-branch bot deleted the ivanpauno/first-implementation branch April 2, 2020 17:25
@ivanpauno ivanpauno restored the ivanpauno/first-implementation branch April 2, 2020 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review The pull request is waiting to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants