Skip to content
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

Blank lines / "(no name)" in output of ros2 node list #72

Closed
dhood opened this issue Dec 7, 2017 · 9 comments
Closed

Blank lines / "(no name)" in output of ros2 node list #72

dhood opened this issue Dec 7, 2017 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@dhood
Copy link
Member

dhood commented Dec 7, 2017

Not a major issue but something we should look into eventually:

built from source with fastrtps on linux:

<ros2 run demo_nodes_cpp add_two_ints_server>
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ ros2 node list
add_two_ints_server
<kill server node>
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ ros2 node list




<start it again>
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ ros2 node list




add_two_ints_server
<kill it again>
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ ros2 node list



dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ 

built from source with connext on osx:

$ RMW_IMPLEMENTATION=rmw_connext_cpp ros2 node list
REDAWorker_enterExclusiveArea:worker U00007fff7a779300 deadlock risk: cannot enter 0x7fa690f9c770 of level 40 from level 40
REDACursor_modifyReadWriteArea:!enter worker (U00007fff7a779300)'s exclusive area
PRESPsService_removeRemoteEndpoint:!modify pres psRemoteWriter
REDAWorker_enterExclusiveArea:worker U00007fff7a779300 deadlock risk: cannot enter 0x7fa690f9c770 of level 40 from level 40
REDACursor_modifyReadWriteArea:!enter worker (U00007fff7a779300)'s exclusive area
PRESPsService_removeRemoteEndpoint:!modify pres psRemoteReader
add_two_ints_server
(no name)
(no name)
(no name)
(no name)

the (no name) output comes from this line in rmw_connext_cpp:
https://github.com/ros2/rmw_connext/blob/efaf513a5f9303216670ed76b5060ed5b8f958e5/rmw_connext_shared_cpp/src/node_names.cpp#L76

Perhaps this equivalent in fastrtps can return empty names: https://github.com/ros2/rmw_fastrtps/blob/3e5edb3316e2aee325e9354549e54c999a89bca9/rmw_fastrtps_cpp/src/rmw_node_names.cpp#L56

I haven't seen opensplice output empty lines.

@Karsten1987
Copy link
Contributor

Karsten1987 commented Dec 7, 2017

I have the same output for fastrtps on osx.

Reproducible for me when starting a talker with opensplice, and calling rosnode list on fastrtps

@mikaelarguedas
Copy link
Member

oh weird. Just to confirm: that's something you both see only on MacOS (and not on Linux)?

@dhood
Copy link
Member Author

dhood commented Dec 7, 2017

I edited my first post to clarify the first output is from fastrtps on linux. @tfoote saw it on windows in #69 so this is cross-platform FWICT

@dirk-thomas
Copy link
Member

I ran the same sequence on Linux (build from source) and the node list is always correct for me (no sign of empty lines).

@dirk-thomas dirk-thomas added bug Something isn't working and removed enhancement New feature or request labels Dec 7, 2017
@tfoote
Copy link
Contributor

tfoote commented Dec 7, 2017

I have three ways to reproduce it.

One

  • FastRTPS window: ros2 daemon start
  • OpenSplice window: ros2 node list OK with config file error
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 node list
========================================================================================
Report      : ERROR
Date        : Thu Dec 07 12:23:08 Pacific Standard Time 2017
Description : Failed to open configuration syntax file: C:/dev/opensplice/HDE/x86_64.win64\etc\metaconfig.xml
Node        : DESKTOP-1VF050Q
Process     : python.exe <5716>
Thread      : spliced 5688
Internals   : 6.7.171127OSS/fcc005a2/fcc005a2/configuration validator/cfg_validator.c/825/0/1512678188.615544300/0

C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>
  • FastRTPS window: ros2 node list
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 node list





C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>

two

  • OpenSplice window ros2 daemon start
  • FastRTPS window: ros2 node list
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 node list





C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>

three

  • FastRTPS window: ros2 daemon start
  • OpenSplice window: ros2 run lifecycle lifecycle_listener
  • FastRTPS window: ros2 node list
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 node list
lc_listener





C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>

@dhood
Copy link
Member Author

dhood commented Dec 7, 2017

I think having opensplice nodes running is what causes the extra output.

Having only fastrtps/connext nodes I see expected output from RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 node list (no padding) and RMW_IMPLEMENTATION=rmw_connext_cpp ros2 node list (no "(no name)").

When opensplice nodes are introduced the output happens.

I've noticed that RMW_IMPLEMENTATION=rmw_opensplice_cpp ros2 node list:

  • is able to detect opensplice nodes without error
  • does not report opensplice nodes as having shut down immediately
  • cannot detect connext/fastrtps nodes

I suspect there may be general discovery incompatibility that causes rmw_get_node_names to have errors when fastrtps/connext are requesting status of opensplice participants, and it looks like opensplice can't detect the others either

@dirk-thomas
Copy link
Member

I don't think that this is related to the daemon at all.

You can try the following to reproduce:

  • make sure no other processes are running
  • start any node using OpenSplice (without ros2 run but invoking the executable directly)
  • call ros2 node list using FastRTPS (which will start a daemon using FastRTPS)

which leads to the same result: the node list containing empty lines.

@dirk-thomas
Copy link
Member

The reason for the problem as well as a possible solution to fix this is described in ros2/ros2#438.

@dirk-thomas
Copy link
Member

Addressed by #76.

esteve pushed a commit to esteve/ros2cli that referenced this issue Dec 16, 2022
esteve pushed a commit to esteve/ros2cli that referenced this issue Dec 16, 2022
* Handle zero-width string parameters.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>

* Restore yaml.safe_load usage.

Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants