A way to get the parsed global arguments from within the Node or NodeOptions
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 805
- Forks
- 564
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 27
Description
Hello!
i've a use case where I need to know the parsed global ros args inside the Node, but I see there is no current way as the NodeOptions arguments are empty by default, and unfortunately, I don't have access to the argv within the class to find the global arguments parsed through command line or the launch. Is there a way to access what ros arguments are parsed from within ros2 node? If so, how?
I need this because I have set the use_global_arguments options to false for the other nodes I create inside my process to not affect by global arguments, but however, I would like them to share the arguments of remapping of topics services etc. For this reason, it would be interesting to have access to the argv and argc from within the ROS2 node
Thank you in advance
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Node and NodeOptions entry points, focusing on how argv/argc and use_global_arguments are handled. Define how a node could access parsed global ROS arguments while allowing child nodes to reuse topic and service remappings without inheriting all global arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100