inconsistent declare/undeclare parameter behaviour
@fujitatomoya đang làm issue này rồi.
Từ ngày 20/2/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 805
- Fork
- 564
- Merge trung bình
- 1 ngày 22 giờ
- Pull request đã merge (30 ngày)
- 21
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ros2/rclcpp
-
good first issue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
Issue tương tự
-
[CI] Nightly Clang build broken: structured binding captured in a lambda in FileDataSource.cpp Đang mởbug build
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
facebookincubator/velox#19194 ·
-
JIT-compiled number -> Decimal conversion silently overflows instead of raising DECIMAL_OVERFLOW Đang mởfuzz
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ClickHouse/ClickHouse#122114 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
module/agent platform/macos type/bug/regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
enhancement PyCDE
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100