You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
As far as i know, global arguments are parsed in the initialization of Context (rcl_init), and stored in rcl_context_s below.
and depends on user setting for use_global_arguments, global arguments are applied to nodes and endpoints.
I think we need to have something like Context::get_remap_rules() to return the remap rules from the global arguments parsed in Context.
I am not even sure why rcl_arguments_impl_s is implemented as internal structure... probably concealment for maintenance?...
A method like Context::get_remap_rules() as you proposed will need a new method in the rcl library to add it to context. I'm worried that if this would be open to backportable till Humble
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
The text was updated successfully, but these errors were encountered: