rmw_connextdds icon indicating copy to clipboard operation
rmw_connextdds copied to clipboard

Add support for listener callbacks

Open asorbini opened this issue 2 years ago • 8 comments

This PR implements the new listener-related functions that were introduced by #44.

Signed-off-by: Andrea Sorbini [email protected]

asorbini avatar Mar 16 '22 23:03 asorbini

Linux CI with only Connext enabled for initial validation: Build Status

asorbini avatar Mar 17 '22 01:03 asorbini

Linux CI with only Connext enabled for initial validation: Build Status

I investigated the failures, I believe the issues lie either in some test problem or they are unrelated to this PR (and they manifested because I ran CI with just this RMW enabled, which usually doesn't happen).

asorbini avatar Mar 17 '22 23:03 asorbini

rclcpp.TestSubscription.on_new_message_callback: in the last case, the test only waits while c3 == 0 while instead the loop should continue for as long as c3 < 3.

Could we fix that test? It's directly related to the listener callbacks API, so it would be good to get it fixed to make sure that's the only issue.

ivanpauno avatar Mar 18 '22 20:03 ivanpauno

Could we fix that test? It's directly related to the listener callbacks API, so it would be good to get it fixed to make sure that's the only issue.

I opened ros2/rclcpp#1900 to fix the unit tests.

asorbini avatar Mar 19 '22 01:03 asorbini

Could we fix that test? It's directly related to the listener callbacks API, so it would be good to get it fixed to make sure that's the only issue.

I opened ros2/rclcpp#1900 to fix the unit tests.

Also opened ros2/rclcpp#1901 to fix the issue with the wait_for_acknowledgments() test.

asorbini avatar Mar 19 '22 01:03 asorbini

Looks good to me, I just want to confirm how the notify_new_data function works exactly.

alsora avatar Mar 22 '22 09:03 alsora

@clalancette @ivanpauno can this PR be merged now even with the freeze? It doesn't change API/ABI.

asorbini avatar Mar 23 '22 16:03 asorbini

@clalancette @ivanpauno can this PR be merged now even with the freeze? It doesn't change API/ABI.

Hi @asorbini, I don't think we should merge this because it is a feature addition and the freeze is in place. If it doesn't break API/ABI, it should be able to be added in a patch release.

audrow avatar Mar 23 '22 19:03 audrow

Did anyone ever test this PR with irobot's events executors? https://github.com/irobot-ros/events-executor If I run their tests with rmw_connextdds enabled and these changes here applied to the rmw_connextdds humble branch, I get these kinds of errors/warnings:

grafik

This PR is needed though, if one is trying to use events executors with connextdds. It would be nice if someone could have a look at this issue.

cwecht avatar Mar 14 '23 16:03 cwecht

#109 fixes the issue with the events executors.

cwecht avatar Mar 16 '23 12:03 cwecht

@asorbini FYI we recently opened the PR for the events-executor in rclcpp and we currently have disabled it from running with connext. To test this PR you can easily remove the "if connext -> skip" parts of the tests https://github.com/ros2/rclcpp/pull/2140

for example here (and in every test in this file https://github.com/ros2/rclcpp/pull/2140/files#diff-e1ac0eadd712d463d84ffc15b59e669fbf53f75c6f81e4c06f03f4d9c91b0ceaR47)

alsora avatar Mar 30 '23 06:03 alsora

@alsora thank you for the heads up, that's very useful to validate these changes.

Do you have a .repos file that I can use to test that PR or is it just those rclcpp changes + current rollng?

asorbini avatar Mar 30 '23 06:03 asorbini

rolling + that PR is sufficient to test, no other changes to other repos are needed. In the last CI run, all the unit-tests passed https://github.com/ros2/rclcpp/pull/2140#issuecomment-1486605066. Note that there is 1 flaky test that we are currently investigating (TEST_F(TestEventsExecutor, destroy_entities)).

Feel free to share the results if you need help debugging failures.

alsora avatar Mar 30 '23 08:03 alsora

What's the status of this PR? Given that https://github.com/ros2/rclcpp/pull/2155 is merged now, it would be really greate to have this PR "officially" approved and merged in order to use rclcpp with ConnextDDS to it's full potential out of the box.

cwecht avatar May 02 '23 06:05 cwecht

What's the status of this PR? Given that ros2/rclcpp#2155 is merged now, it would be really greate to have this PR "officially" approved and merged in order to use rclcpp with ConnextDDS to it's full potential out of the box.

At this point, it needs another approval (there have been changes since the previous ones), and CI run on it. I can do the latter, but I'd prefer @asorbini or @alsora did another review/approval first.

clalancette avatar May 02 '23 12:05 clalancette

I'm not really familiar with connext, but overall the PR looks sane.

From my perspective I would suggest to create a rclcpp branch where the checks that disable events-executor with connext are removed, and then, if it passes all unit-tests, it should be good to go.

alsora avatar May 02 '23 12:05 alsora

@alsora here is the PR to enable the callback groupd tests in rclcpp again: https://github.com/ros2/rclcpp/pull/2182

cwecht avatar May 02 '23 15:05 cwecht

The tests reenabled in https://github.com/ros2/rclcpp/pull/2182 are now succeeding. Although they seem to be somewhat flakly, I'd suppose, that this PR should be mergable now?

cwecht avatar May 16 '23 09:05 cwecht

Although they seem to be somewhat flakly, I'd suppose, that this PR should be mergable now?

We'd really prefer to not merge in "somewhat flaky" tests. We are just down to handful of those now, and I'd like not to increase that number.

clalancette avatar May 16 '23 12:05 clalancette