inconsistent declare/undeclare parameter behaviour
@fujitatomoya がすでに取り組んでいます。
2025年2月20日 から。
評価
この issue はまだ評価されていません。
説明
current behaviour
A ROS node can:
- explicitly declare a parameter via
declare_parameterand explicitly undeclare it viaundeclare_parameter - implicitly declare a parameter by setting the option
allow_undeclared_parameters(true)and then just setting the parameter viaset_parameterand implicitly undeclare a dynamic parameter by changing its type toPARAMETER_NOT_SET
It is also possible to mix these modes and implicitly undeclare an explicitly declared parameter by not allowing undeclared parameters, using dynamic parameter types and then setting its type to PARAMETER_NOT_SET. In such a situation, it will not be possible to "reactivate" the parameter again, without the node explicitly declaring the parameter again.
This mix of explicit creating and implicit deletion of parameters is inconsistent.
expected behaviour
If an explicitly declared dynamic parameters type is changed to PARAMETER_NOT_SET, it should result into the same behaviour as declaring the parameter with PARAMETER_NOT_SET in the first place. That means, after changing the type to PARAMETER_NOT_SET, has_parameter must return true and ros2 param get should return Parameter not set. and ros2 param dump should show the value as null.
Additionally, it would be useful if this would still work with static types, such that a parameter has a static type and its value is either be set or unset (null), comparable to a NULL pointer in C.
The current implicitly undeclare behaviour should only apply when allow_undeclared_parameters is true and parameters are declared implicitly via set_parameter.
- 主要言語
- C++
- スター
- 805
- フォーク
- 564
- 平均マージ
- 1日 22時間
- マージ済み PR(30日)
- 21
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ros2/rclcpp のほかの issue
-
good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ros2/message_filters#338 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
subsurface/subsurface#4984 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·