ros2cli
ros2cli copied to clipboard
[ros2run] Argument passing to node executable handles -- inconsistently
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
- correct
Number: 3
Arguments: foo -- bar
- 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 --
.