-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add ros_arguments option to Node action #249
Add ros_arguments option to Node action #249
Conversation
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
@@ -180,6 +181,9 @@ def __init__( | |||
wildcard namespace (`/**`) and other specific parameter declarations | |||
may overwrite it. | |||
|
|||
Using `ros_arguments` is equivalent to using `arguments` with a | |||
prepended '--ros-args' item. |
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.
@christophebedard I see the convenience BUT is it necessary? Most ROS arguments can be given in an idiomatic way (e.g. via remappings
) already. If we need --log-level
, I'd argue we should add it. CC @wjwwood @ivanpauno.
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.
I found #60 while answering an answers.ros.org question: https://answers.ros.org/question/380883/specify-log-level-on-ros2-node-in-launch-file/#380965. In this case, it seemed to confuse the person. They weren't sure whether they needed to use --
beause launch_ros
appends --ros-args ...
too (even if in practice rcl
handles it just fine). I think having ros_arguments
would make it much simpler, but yeah it's up to you the maintainers 😝
If we need
--log-level
you mean like a LogLevel
substitution?
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.
I found #60 while answering an answers.ros.org question: https://answers.ros.org/question/380883/specify-log-level-on-ros2-node-in-launch-file/#380965. In this case, it seemed to confuse the person.
I see. I was wondering about the use case. If not having to write out --ros-args
helps people, I'm onboard.
you mean like a LogLevel substitution?
Like a log_level
argument that can be a substitution. But that's a separate PR.
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.
Seems like we can handle things better if the user explicitly tells us when something is a ros argument, so +1 from me.
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.
LGTM
@hidmic I can't merge PRs so I'll leave that to you! |
Going in ! Thanks for the patience @christophebedard. |
Argh, @christophebedard one thing we missed is adding support for this attribute in the |
oh yeah I really didn't think about that! I'll create another PR as a follow-up. |
Closes #60
This adds a
ros_arguments
option to theNode
action. It's simply:ros_arguments == ['--ros-args'] + arguments
.Signed-off-by: Christophe Bedard bedard.christophe@gmail.com