ros2 / ros2/ros2cli

[ros2run] Argument passing to node executable handles -- inconsistently

Open
#578 0 comments 0 reactions 1 assignee View on GitHub

@mabelzhang is already working on this.

Since Mar 9, 2021.

Dominant language
Python
Stars
262
Forks
228
Avg merge
23h 15m
Merged PRs (30d)
12

Description

Bug report

Required Info:

  • Operating System:
    • Ubuntu 20.04.1 LTS
  • Installation type:
    • binaries
  • Version or commit hash:
    • Version 0.9.7
  • DDS implementation:
    • Fast-RTPS
  • Client library (if applicable):
    • N/A
Steps to reproduce issue

I created a small reproduction repo over at ros2run_arg_test.
It contains one small script which just prints the number of arguments and all arguments it received.
With this:

ros2 run ros2run_arg_test echo_args.sh foo -- bar
ros2 run ros2run_arg_test echo_args.sh -- foo bar
Expected behavior
Number: 3
Arguments: foo -- bar
Number: 3
Arguments: -- foo bar
Actual behavior
  1. correct
Number: 3
Arguments: foo -- bar
  1. Unexpected, the -- gets discarded silently:
Number: 2
Arguments: foo bar
Additional information

I discovered this over at micro_ros_setup.
I am not completely sure if this is a bug, but i couldn't find any mention of this behavior in this design document or anywhere else.
Please let me know if this is expected behavior, in that case this should probably get documented somewhere and i'd have to think of a new syntax.
Related: #61 added the option to pass arguments without leading --.

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.