Skip to content

Support topic instances#178

Merged
fujitatomoya merged 6 commits intorollingfrom
feature/keyed-topics-support
Apr 7, 2025
Merged

Support topic instances#178
fujitatomoya merged 6 commits intorollingfrom
feature/keyed-topics-support

Conversation

@fgallegosalido
Copy link
Collaborator

This PR adds the necessary code to support topic instances in rmw_connextdds (not supported in rmw_connextddsmicro).

Copy link
Collaborator

@fercsrti77 fercsrti77 left a comment

Choose a reason for hiding this comment

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

I already reviewed these code changes offline with @fgallegosalido and @lobolanja

@fgallegosalido
Copy link
Collaborator Author

@fujitatomoya the pull request is ready to be reviewed.

@lobolanja lobolanja closed this Mar 31, 2025
@lobolanja lobolanja reopened this Mar 31, 2025
@lobolanja
Copy link
Collaborator

@fgallegosalido we will need to create a repos file to run CI, right?

Copy link
Collaborator

@lobolanja lobolanja left a comment

Choose a reason for hiding this comment

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

@fgallegosalido Can you rebase the required branches from the original task to be able to run the tests and so, if you can't directly rebase those branches create a fork and rebase it in your personal repository, so we are able to run the CI.

@fgallegosalido
Copy link
Collaborator Author

I've opened two prs that let us run the CI with the new tests:

@fgallegosalido
Copy link
Collaborator Author

@MiguelCompany
Copy link
Contributor

CI with this repos file:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@MiguelCompany
Copy link
Contributor

@fgallegosalido This fails to build on windows. Could you take a look?

Signed-off-by: Francisco Gallego Salido <fgallego@rti.com>
@fgallegosalido
Copy link
Collaborator Author

@MiguelCompany solved

@MiguelCompany
Copy link
Contributor

MiguelCompany commented Apr 3, 2025

New CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@fgallegosalido
Copy link
Collaborator Author

@MiguelCompany CI is green. Unless someone else has any objection, this should be ready to be merged. Waiting for @fujitatomoya 's feedback before closing. We should close this one along with ros2/rmw_fastrtps#753, ros2/rcl_interfaces#173 and ros2/system_tests#568

@MiguelCompany
Copy link
Contributor

@fgallegosalido I agree. I guess we will have to wait till the team in America wakes up.

@fujitatomoya
Copy link
Collaborator

@fgallegosalido @MiguelCompany 1st thank you very much for putting this together. i think you guys are waiting for the reviews, i can try weekend for rmws, but cannot promise i can complete.....

CC: @mjcarroll @wjwwood @ahcorde @sloretz @cottsay

@fujitatomoya
Copy link
Collaborator

@fgallegosalido i am not sure how much i can help this, but i will review this 1st thing in the morning tomorrow.

@lobolanja can you approve this?

@MiguelCompany
Copy link
Contributor

New CI with this repos file:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@fgallegosalido
Copy link
Collaborator Author

@fujitatomoya this has been already reviewed internally, but we just wanted someone from outside the company to give their OK

Copy link
Collaborator

@lobolanja lobolanja left a comment

Choose a reason for hiding this comment

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

Everything has been reviewed on RTI’s side, so we’re ready to proceed with the merge.

@fgallegosalido
Copy link
Collaborator Author

@MiguelCompany if everything looks good to you (changes in this repo, but most importantly the testing stuff), approve this pr

Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

There are some missing includes, probably there are more, I don't want to delay this merge of this PR, we can include them in a follow up PR

Signed-off-by: Francisco Gallego Salido <fgallego@rti.com>
@fgallegosalido
Copy link
Collaborator Author

fgallegosalido commented Apr 7, 2025

@ahcorde feedback applied. No functional change has really been added. If there is a need to run again the CI, go ahead, although the schedule is a bit tight to merge today if we need to rerun the CI. @fujitatomoya what do you think?

I can also undo the last commit and cherry-pick it later to avoid running the CI again.

void ** data_buffer = nullptr;

// TODO(fgallegosalido): Use DDS_DataReader_read_or_take_instance_untypedI
// when ROS2 support for instances is added.
Copy link
Collaborator

Choose a reason for hiding this comment

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

precisely ROS2 should be ROS 2, there are other comments already exist with `ROS2, i guess no need to fix 💬

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will address that during the next release cycle


static
void
RMW_Connext_TypePlugin_destroy_key(void ** key, void * user_data)
Copy link
Collaborator

Choose a reason for hiding this comment

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

(not blocking PR, just a suggestion) i would do the following to keep the code cleaner, if that is unused for now.

Suggested change
RMW_Connext_TypePlugin_destroy_key(void ** key, void * user_data)
RMW_Connext_TypePlugin_destroy_key(void ** key, [[maybe_unused]] void * user_data)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's a really nice addition! I'll make sure to slowly clean up the code after this is merged

Comment on lines +196 to +197
// By default, dispose samples do not contain the serialized key, so this should only be a
// problem if the DataWriterQos.protocol.serialize_key_with_dispose is set to true.
Copy link
Collaborator

Choose a reason for hiding this comment

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

what if the user configure DataWriterQos.protocol.serialize_key_with_dispose as DDS, and comes to this situation? there will be errors when receiving dispose samples, correct? as source code, we can see that is the case it does not support yet, but any user notification can be added? or is this really a corner case, that user barely can configure in that way? just curious that user might or might not be affected with this constraint.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think many ROS 2 users will use this or find themselves in this codepath. However, we are planning to polish the Keyed Topics implementation later on to cover all these corner cases

Comment on lines +750 to +754
if (!serialize_key) {
// Not currently supported. As a result, users cannot enable batching by
// setting writer_qos.batch.enabled to TRUE.
return RTI_FALSE;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

user still can configure RTI DDS to enable writer_qos.batch.enabled and ends up having this failure? if this happens, user can know why it is failing with clear error message from RTI connextdds? if not, it would be nice to add the error message that tells user about this limitation explicitly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See my other comment

@fujitatomoya
Copy link
Collaborator

@fgallegosalido i just did the review, minor concerns for user perspective. can you take a look? i am okay to merge this without changes.

@fujitatomoya
Copy link
Collaborator

@fgallegosalido @lobolanja is this good to go?

@lobolanja
Copy link
Collaborator

@fgallegosalido @lobolanja is this good to go?

Yes, good to go! @fujitatomoya

I’ll take note of your questions and recommendations and discuss them with @fgallegosalido. We’ll address them in future PRs if needed. For now, we’re confident that the changes already in place are quite stable.

@fujitatomoya fujitatomoya merged commit 55b2aaa into rolling Apr 7, 2025
1 check passed
@fgallegosalido fgallegosalido deleted the feature/keyed-topics-support branch April 7, 2025 20:10
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

Successfully merging this pull request may close these issues.

6 participants