-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
handle node names which are null #435
Conversation
8dd2fc9
to
1171194
Compare
1171194
to
5561f5a
Compare
5561f5a
to
c7e1961
Compare
Pure DDS participants will show up in this list as null. The current approach returns a list that contains these empty names. At first I didn't see a big issue with this, but reviewing the recently-added tests in ros2/system_tests#260, I was surprised by the behaviour of it outputting blank lines: https://ci.ros2.org/job/ci_linux/4161/testReport/junit/test_rclcpp.build.test_rclcpp/test_node_name__rmw_opensplice_cpp__rmw_connext_cpp_/test_node_name/ From a design perspective, I would think that it is the role of the client library to filter out the implementation detail that rmw implementations may detect these "nameless" participants, since the user is requesting a list of ROS nodes not DDS participants. Otherwise every caller of I understand that the test is behaving as expected with this approach, so it may be that my opinion is off for some reason or another (efficiency is the counterargument I suspect). Could I get confirmation that we see it as the user's responsibility to check for empty node names themselves? |
I describes the current behavior as well as the potential alternatives in this comment: ros2/rmw_connext#276 (comment) |
The comment that you linked to refers to allowing I understand that it would be frustrating to have these comments come up after these PRs have been merged, but tests also double as usage examples, so when you added a test yesterday it prompted me to re-evaluate this approach because of the user experience. I don't think the "big" change of these PRs (storing node name in participant data) is what's under question, it's more if we should spin off a followup enhancement that adds filtering at a lower level, which doesn't have to be done immediately. Could be a "help wanted" ticket, if others agree. |
That is totally fine. I just stated the same kind of question in that ticket and didn't receive any comment. So my perception was nobody cared to do either or and was fine with the status quo. I would be be in favor of implementing option 2 and never return |
I'll wait for other input and create a spinoff otherwise. To clarify, I will re-list the options (quoting from ros2/rmw_connext#276 (comment)): You are in favor of what is labeled as B in this list, correct? |
I am in favor of option C assuming that both options B and C will not return |
I'm summarising the tasks in a spinoff ticket. I think there's another option that doesn't require two-pass and doesn't require changes to the Inspired by |
As far as I understand your proposal that wouldn't work. If you have an array with two entries and you set the first one to The referenced |
The array would be overallocated to start with, then populated such that all used elements appear at the front (as I imagine it was in the proposal involving the edit: linked to string array fini |
Wouldn't you need a function which deallocates the "second unused part" of the array? I don't think that exist atm. |
It doesn't exist as a function, no, The benefit, I see, is that there's no need to change the struct to contain an additional field that only applies to some situations (e.g. for cases where some values in the array are allowed/expected to be null, this additional field isn't useful but still has to be maintained). |
Yes, over-allocating and then calling |
Spinoff ticket in ros2/ros2#489 |
Signed-off-by: Dirk Thomas <dirk-thomas@users.noreply.github.com>
ros2#436) * Revert "Changes the default 3rd party logger from rcl_logging_noop to rcl_logging_log4cxx (ros2#425)" This reverts commit ac8ee90. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Revert "add explicit dependency on rcl_logging_log4cxx (ros2#435)" This reverts commit 816ce67. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org> * Add dependency on rcl_logging_noop. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Necessary since each item can potentially contain a
nullptr
.Connect to ros2/ros2#438.