ros2 / ros2/launch

Passing a string to ExecuteProcess arguments behaves unintuitively

Open
#394 4 comments 0 reactions 1 assignee View on GitHub

@sloretz is already working on this.

Since Apr 2, 2020.

enhancement
Dominant language
Python
Stars
155
Forks
182
Avg merge
2d 14h
Merged PRs (30d)
6

Description

In Node constructor, arguments takes an arguments of list of strings. Passing a string to arguments typechecks but provides unexpected results, treating the string as a sequence of single-character arguments.

e.g the following code:

    driver_node = LifecycleNode(package='ros2_ouster',
                                node_executable='ouster_driver',
                                node_name=node_name,
                                output='screen',
                                emulate_tty=True,
                                parameters=[parameter_file],
                                node_namespace='/',
                                arguments='__log_level:=debug'
                                )

This displays no error message but the mistake is visible when the process dies.

[ERROR] [ouster_driver-1]: process has died [pid 309341, exit code -15, cmd '/opt/ros/master/install/lib/ros2_ouster/ouster_driver _ _ l o g _ l e v e l : = d e b u g --ros-args -r __node:=ouster_driver --params-file /opt/ros/master/install/share/ros2_ouster/params/os1.yaml -r __ns:=/'].

Passing a string to arguments (or similar places) should either:

  1. Split the string on spaces
  2. Alert the user (ArgumentError seems apt)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.