-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adapt to '--ros-args ... [--]'-based ROS args extraction #405
Conversation
Signed-off-by: Michel Hidalgo <[email protected]>
So, I'm having second thoughts about 3256ee2 too. I did it for consistency with |
Signed-off-by: Michel Hidalgo <[email protected]>
3256ee2
to
b58798b
Compare
Again, I don't feel strongly about it, I don't mind the feature as long as it's documented and consistent.
I don't really think this is an issue (especially if documented). Personally I think of the arguments to |
Signed-off-by: Michel Hidalgo <[email protected]>
Signed-off-by: Michel Hidalgo <[email protected]>
@@ -146,7 +146,7 @@ def __init__( | |||
self._parameter_overrides = {} | |||
self._descriptors = {} | |||
|
|||
if cli_args is not None: | |||
if cli_args is not None and '--ros-args' not in cli_args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if someone does:
cli_args=['asd', '--ros-args', ...]
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as in rclcpp
, 'asd'
will become an unparsed non-ROS arg.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, but that doesn't match the docstring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, looks like that docstring is outdated though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in the case above, asd
is a non-ROS argument, and in the following:
cli_args=['asd']
It's a ros argument, because --ros-args
is magically prepended.
I prefer a consistent and explicit behavior, i.e.: always add explicitly --ros-args
when needed.
But if I'm the only with this feeling, I don't mind if we left this as-is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same comment applies in rclcpp
:
https://github.com/ros2/rclcpp/blob/69773838e2b229c79676897d080455113f10bc9e/rclcpp/src/rclcpp/node_options.cpp#L107-L109
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We sort of discuss this here: ros2/rclcpp#816 (comment)
I can see the point of both sides. I would be fine requiring the user to explicitly use --ros-args
with the NodeOptions.arguments
if you guys think that would be less surprising. I don't expect it to be used in this way very often, so I think it's fine if it's not quite as convenient as it could be with implicitly added --ros-args
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always adding --ros-args
is the least surprising alternative, but it is somewhat verbose. I don't have a strong opinion as to which we should prioritize.
Precisely what the title says. Connected to ros2/rcl#477.