Skip to content

tools using daemon crash if default rmw implementation is not installed #120

@mikaelarguedas

Description

@mikaelarguedas

Working from binaries, if the default rmw_implementation is removed and the ros2 tools invoked without specifying the RMW_IMPLEMENTATION the tools crash with a Traceback without useful error message.

Details
root@10328256cca9:~# ros2 topic list 
Traceback (most recent call last):
  File "/opt/ros/bouncy/bin/ros2", line 11, in <module>
    load_entry_point('ros2cli==0.5.2', 'console_scripts', 'ros2')()
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/cli.py", line 69, in main
    rc = extension.main(parser=parser, args=args)
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2topic/command/topic.py", line 43, in main
    return extension.main(args=args)
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2topic/verb/list.py", line 34, in main
    with NodeStrategy(args) as node:
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/node/strategy.py", line 29, in __init__
    spawn_daemon(args)
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/node/daemon.py", line 72, in spawn_daemon
    stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, **kwargs)
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1275, in _execute_child
    restore_signals, start_new_session, preexec_fn)
TypeError: expected str, bytes or os.PathLike object, not NoneType
root@10328256cca9:~# ros2 node list  
Traceback (most recent call last):
  File "/opt/ros/bouncy/bin/ros2", line 11, in <module>
    load_entry_point('ros2cli==0.5.2', 'console_scripts', 'ros2')()
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/cli.py", line 69, in main
    rc = extension.main(parser=parser, args=args)
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2node/command/node.py", line 39, in main
    return extension.main(args=args)
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2node/verb/list.py", line 34, in main
    with NodeStrategy(args) as node:
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/node/strategy.py", line 29, in __init__
    spawn_daemon(args)
  File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/node/daemon.py", line 72, in spawn_daemon
    stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, **kwargs)
  File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1275, in _execute_child
    restore_signals, start_new_session, preexec_fn)
TypeError: expected str, bytes or os.PathLike object, not NoneType

How to reproduce:

$ docker run -it --rm osrf/ros2:bouncy-basic
# apt update && apt install -y ros-bouncy-rmw-opensplice-cpp
# apt remove ros-bouncy-rmw-fastrtps-cpp -y && apt autoremove -y
# source /opt/ros/bouncy/setup.bash
# ros2 node list

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions