Array parameters wierdness
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
Research direction
No source files or tests are named. Start by tracing how parameters.yaml types, defaults, and validation rules are parsed, then reproduce the three configurations in the issue. Done means array parameters remain arrays with bounds, with and without a default value, and the reported integer-versus-integer_array error is resolved.
Written by the indexing model from the issue text.
Description
There seem to be some issues with the handling of array parameters. I'm encountering problems with setting parameters and getting my application terminated, because of
Wrong parameter type, parameter {myParam} is of type {integer}, setting it to {integer_array} is not allowed.
Working configuration:
parameters.yaml
myParam: {
type: int_array_fixed_2,
description: "myDescription",
default_value: [ 0, 0],
validation: {
element_bounds<>: [ 0, 10000 ]
}
}
config.yaml
node:
ros__parameters:
myParam: [0, 1]
bounds demoting array to single integer
parameters.yaml
myParam: {
type: int_array_fixed_2,
description: "myDescription",
default_value: [ 0, 0],
validation: {
bounds<>: [ 0, 10000 ]
}
}
Changing out element_bounds to bounds will demote the parameter to a single integer and cause the error at the start. Removing the validation block will fix the problem.
No default_value demotes to single integer
parameters.yaml
myParam: {
type: int_array_fixed_2,
description: "myDescription",
validation: {
element_bounds<>: [ 0, 10000 ]
}
}
Removing the default_value key will also demote the array. Removing the validation block will change nothing.
Something fishy is going on here, could you have a look? Thank you <3
- Dominant language
- Python
- Stars
- 385
- Forks
- 81
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PickNikRobotics/generate_parameter_library
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
PickNikRobotics/generate_parameter_library#392 · 2 comments ·
-
GCC 15 emits -Wfree-nonheap-object for generated string one_of validationPossibly taken @tylerjw claimed this 20 days ago. Open
PickNikRobotics/generate_parameter_library#389 · 1 comment · 1 assignee ·
-
Feature request: math in the yamlPossibly taken @tylerjw claimed this 20 days ago. Open
PickNikRobotics/generate_parameter_library#381 · 2 comments · 1 reaction · 1 assignee ·
-
Validator reference (bounds<>/element_bounds<> etc.) is hard to find inside the READMEMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
PickNikRobotics/generate_parameter_library#377 · 1 comment ·
-
`.inf` not within floating point rangePossibly taken @christianrauch claimed this 70 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 30/100
PickNikRobotics/generate_parameter_library#376 · 3 comments ·
All issues in PickNikRobotics/generate_parameter_library
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
webrecorder/warcio#209 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Jeffy123-zhu/logspecter#20 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day