{"action":"created","issue":{"url":"https://api.github.com/repos/ros2/ros2/issues/489","repository_url":"https://api.github.com/repos/ros2/ros2","labels_url":"https://api.github.com/repos/ros2/ros2/issues/489/labels{/name}","comments_url":"https://api.github.com/repos/ros2/ros2/issues/489/comments","events_url":"https://api.github.com/repos/ros2/ros2/issues/489/events","html_url":"https://github.com/ros2/ros2/issues/489","id":319731671,"node_id":"MDU6SXNzdWUzMTk3MzE2NzE=","number":489,"title":"Update get_node_names to never return empty values","user":{"login":"dhood","id":5618076,"node_id":"MDQ6VXNlcjU2MTgwNzY=","avatar_url":"https://avatars0.githubusercontent.com/u/5618076?v=4","gravatar_id":"","url":"https://api.github.com/users/dhood","html_url":"https://github.com/dhood","followers_url":"https://api.github.com/users/dhood/followers","following_url":"https://api.github.com/users/dhood/following{/other_user}","gists_url":"https://api.github.com/users/dhood/gists{/gist_id}","starred_url":"https://api.github.com/users/dhood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhood/subscriptions","organizations_url":"https://api.github.com/users/dhood/orgs","repos_url":"https://api.github.com/users/dhood/repos","events_url":"https://api.github.com/users/dhood/events{/privacy}","received_events_url":"https://api.github.com/users/dhood/received_events","type":"User","site_admin":false},"labels":[{"id":180553417,"node_id":"MDU6TGFiZWwxODA1NTM0MTc=","url":"https://api.github.com/repos/ros2/ros2/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":854305137,"node_id":"MDU6TGFiZWw4NTQzMDUxMzc=","url":"https://api.github.com/repos/ros2/ros2/labels/good%20first%20issue","name":"good first issue","color":"7057ff","default":true},{"id":180553418,"node_id":"MDU6TGFiZWwxODA1NTM0MTg=","url":"https://api.github.com/repos/ros2/ros2/labels/help%20wanted","name":"help wanted","color":"008672","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-02T22:19:09Z","updated_at":"2018-08-06T16:04:10Z","closed_at":null,"author_association":"MEMBER","body":"Each supported RMW implementation (e.g. `rmw_connext_cpp`, `rmw_fastrtps_cpp`, `rmw_opensplice_cpp`) has its own vendor-specific implementation of `rmw_get_node_names`.\r\n\r\n`rmw_get_node_names` is called from [`rcl_get_node_names`](https://github.com/ros2/rcl/blob/2c390d3a67664e0ba0bec86589f994a10bfee847/rcl/include/rcl/graph.h#L210), which is what all client libraries (c++, python, etc) use.\r\n\r\n\"Pure\" non-ROS DDS participants will be detected by some vendors in `rmw_get_node_names`, and the current approach for implementing `rmw_get_node_names` returns a list that _contains_ these empty names.\r\n\r\nThe objective of this ticket is instead to have `rmw_get_node_names` in the rmw implementations only return names of participants that are non-empty.\r\n\r\nAfter that has happened, we can revert these PRs that work-around the potential for empty names in the list:\r\n- [ ] https://github.com/ros2/rclcpp/pull/435\r\n- [ ] https://github.com/ros2/rclpy/pull/177\r\n- [ ] https://github.com/ros2/rcl/pull/214\r\n- [ ] https://github.com/ros2/ros2cli/pull/76\r\n\r\nThe only behaviour that needs to be changed is:\r\n- [ ] [`rmw_connext_cpp`](https://github.com/ros2/rmw_connext/pull/276/files#diff-bccfea1954134a50cf75b01ae95188e3R96)\r\n\r\n- `rmw_fastrtps_cpp` already [ignores participants without a name](https://github.com/ros2/rmw_fastrtps/pull/182/files#diff-e0ae150821b275cbd461f0895600e01aR71)\r\n- `rmw_opensplice_cpp` already [skips participants without a name in the userdata](https://github.com/ros2/rmw_opensplice/pull/191/files#diff-722d8069c393a517aee8369e15ead3e6R158) (opensplice only supports participants being named via the user data: https://github.com/ros2/ros2/issues/438).\r\n\r\nThe recommendation for implementing the change is to:\r\n1. over-allocate the array for the potential number of names, \r\n1. populate the first elements of the array with valid names encountered,\r\n1. down-size the string array.\r\n\r\n`rmw_opensplice_cpp` currently does step 3 by [coping the data into a smaller-sized array](https://github.com/ros2/rmw_opensplice/pull/191/files#diff-722d8069c393a517aee8369e15ead3e6R184). To avoid this step the recommendation is to add a new function for [string arrays](https://github.com/ros2/rcutils/blob/c72d2cf3da3dd4f2c8286f647c0718898f44fef0/src/string_array.c) that allows the unused portion of the array to be deallocated. More details in [this thread](https://github.com/ros2/rclcpp/pull/435#issuecomment-385060611)."},"comment":{"url":"https://api.github.com/repos/ros2/ros2/issues/comments/410760030","html_url":"https://github.com/ros2/ros2/issues/489#issuecomment-410760030","issue_url":"https://api.github.com/repos/ros2/ros2/issues/489","id":410760030,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDc2MDAzMA==","user":{"login":"dirk-thomas","id":1335366,"node_id":"MDQ6VXNlcjEzMzUzNjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1335366?v=4","gravatar_id":"","url":"https://api.github.com/users/dirk-thomas","html_url":"https://github.com/dirk-thomas","followers_url":"https://api.github.com/users/dirk-thomas/followers","following_url":"https://api.github.com/users/dirk-thomas/following{/other_user}","gists_url":"https://api.github.com/users/dirk-thomas/gists{/gist_id}","starred_url":"https://api.github.com/users/dirk-thomas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirk-thomas/subscriptions","organizations_url":"https://api.github.com/users/dirk-thomas/orgs","repos_url":"https://api.github.com/users/dirk-thomas/repos","events_url":"https://api.github.com/users/dirk-thomas/events{/privacy}","received_events_url":"https://api.github.com/users/dirk-thomas/received_events","type":"User","site_admin":false},"created_at":"2018-08-06T16:04:10Z","updated_at":"2018-08-06T16:04:10Z","author_association":"MEMBER","body":"Even when `rmw_connext_cpp` is updated I wouldn't recommend to revert the PRs that work-around the potential for empty names in the list. There are other RMW implementations out there which might return empty names and there is no harm in keeping the logic to prevent problems if the returned array contains empty entries.\r\n\r\n"}}
{"actor":{"display_login":"dirk-thomas"}}