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

Aperta
#578 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@mabelzhang ci sta già lavorando.

Dal 9/3/2021.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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 --.

Lingua principale
Python
Stelle
274
Fork
246
Merge medio
1g 14h
PR unite (30g)
12

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ros2/ros2cli

Tutte le issue di ros2/ros2cli

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.