Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ros2param] Add verb to describe parameters #362

Closed
jacobperron opened this issue Oct 15, 2019 · 0 comments · Fixed by #367
Closed

[ros2param] Add verb to describe parameters #362

jacobperron opened this issue Oct 15, 2019 · 0 comments · Fixed by #367
Assignees
Labels
enhancement New feature or request in review Waiting for review (Kanban column)

Comments

@jacobperron
Copy link
Member

Feature request

Feature description

Every parameter has a descriptor. It would be nice if the ros2 param CLI tool had a verb for getting the description of a parameter.

The verb could be called describe or info. I think I prefer info since it's shorty and more consistent with our other CLI tools.

For example,

$ ros2 param info foo_node bar_param
Name: bar_param
Description: This is a text description of the parameter
Type: double
Constraints:
    Read only: false
    Min: 0.0
    Max: 1.0
    Step: 0.1
    Additional constraints:  A text description of constraints (if there is one).

There might be some better ideas for formatting, but I think the Min, Max, and Step constraints should only appear if there is a range constraint.
And the Additional constraints should only appear if the string is not empty.

Implementation considerations

Each node provides a service (enabled by default) for requesting one or more parameter descriptors, so the tool can make a single service call when ros2 param info is called.
Considering that the input to the service request is a list of names, it might also make sense to support querying multiple parameters at a time in the CLI tool.

For example,

$ ros2 param info foo_node bar_param baz_param another_param
Name: bar_param
Description: This is a text description of the bar_param parameter
Type: string
Constraints:
    Read only: false
    Additional constraints:  A text description of constraints (if there is one).

Name: baz_param
Description: This is a text description of the baz parameter
Type: double
Constraints:
    Read only: true
    Min: 0.0
    Max: 1.0
    Step: 0.1

Name: another_param
Description: This is a text description of the another_param parameter
Type: integer array
Constraints:
    Read only: false
@jacobperron jacobperron added enhancement New feature or request help wanted Extra attention is needed labels Oct 15, 2019
@dirk-thomas dirk-thomas added in progress Actively being worked on (Kanban column) and removed help wanted Extra attention is needed labels Oct 17, 2019
@dirk-thomas dirk-thomas self-assigned this Oct 17, 2019
@dirk-thomas dirk-thomas added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants