A way to get the parsed global arguments from within the Node or NodeOptions

Offen
#2,610 5 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Functionhx arbeitet bereits daran.

Seit 12.7.2026.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Muss geklärt werden
Aktivitätsstatus
Ruhig
Tech-Stack
cpp
Bereich
api

Rechercherichtung

Beginnen Sie mit den Node- und NodeOptions-Einstiegspunkten und konzentrieren Sie sich darauf, wie argv/argc und use_global_arguments behandelt werden. Legen Sie fest, wie ein Node auf geparste globale ROS-Argumente zugreifen könnte und gleichzeitig untergeordneten Nodes ermöglichen könnte, Topic- und Service-Remappings wiederzuverwenden, ohne alle globalen Argumente zu übernehmen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

help wanted

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

Vorherrschende Sprache
C++
Sterne
829
Forks
587
Ø Merge
4 T. 6 Std.
Gemergte PRs (30 T.)
30

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus ros2/rclcpp

Alle Issues in ros2/rclcpp

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.