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

未关闭
#2,610 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@Functionhx 已经在做这个了。

开始于 2026年7月12日。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
冷清
技术栈
cpp
领域
api

调研方向

从 Node 和 NodeOptions 入口点开始,重点关注 argv/argc 和 use_global_arguments 的处理方式。定义 node 如何能够访问已解析的全局 ROS 参数,同时允许子 node 重用 topic 和 service remapping,而无需继承所有全局参数。

由索引模型根据 Issue 内容生成。

描述

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

主要语言
C++
星标
829
派生
587
平均合并
4 天 6 小时
30 天内合并 PR
30

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ros2/rclcpp 的其他 Issue

查看 ros2/rclcpp 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。