-
Notifications
You must be signed in to change notification settings - Fork 418
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
Do argument parsing outside of node constructor #492
Labels
Comments
This was referenced Jan 29, 2019
mjcarroll
added
in review
Waiting for review (Kanban column)
and removed
in progress
Actively being worked on (Kanban column)
labels
Feb 5, 2019
@mjcarroll is this actually done? |
Ah, sorry. With a quick glance I thought this was covered with |
4 tasks
nnmm
pushed a commit
to ApexAI/rclcpp
that referenced
this issue
Jul 9, 2022
Signed-off-by: ivanpauno <ivanpauno@ekumenlabs.com>
DensoADAS
pushed a commit
to DensoADAS/rclcpp
that referenced
this issue
Aug 5, 2022
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Feature request
Things that come from command line arguments should be separately passed into the node's constructor rather than passing in arguments and asking the node to do the parsing.
Feature description
Currently command line arguments may be passed to a node via an argument to the node's constructor. This separates the responsibility of parsing arguments from actually using them. An entity like ros2 launch launch composable nodes would invoke parsing of any command line arguments, and then pass the results into the node.
Implementation considerations
The current arguments passed to the node are
rclcpp/rclcpp/include/rclcpp/node.hpp
Lines 94 to 101 in 8f793fd
The information that should be passed in if not through the arguments is:
__ns:=...
,__node:=...
__params:=...
Since new features may be added as command line arguments it may be an advantage to pass
rclcpp::NodeArguments()
so future features don't have to change all the places where arguments are passed to a node's constructorrequires ros2/rcl#254
The text was updated successfully, but these errors were encountered: