Skip to content

Feature Request: Support Drop-down List for Integer Parameters with Additional Constraints #150

@himaj47

Description

@himaj47

Description:
We would like to request a new feature in rqt_reconfigure to support integer parameters that have additional constraints defined in their parameter descriptor. Specifically, we propose adding support for defining constraints as a CSV-formatted string containing key-value pairs, where:

  • Values (strings) are user-friendly labels displayed in the drop-down list.
  • Keys (integers) are the actual values passed in parameter update calls.

Proposed Format in Parameter Descriptor:

The additional constraints can be provided as a CSV-formatted string:

0,value0
1,value1
2,value2

For example, a parameter could have constraints like:

"additional_constraints": "\n0,Low\n1,Medium\n2,High"

Expected Behavior in rqt_reconfigure:

  1. When an integer parameter has an additional_constraints field formatted as a CSV string, rqt_reconfigure should render it as a drop-down list instead of a numeric input field.
  2. The drop-down list should display the Values (e.g., "Low", "Medium", "High").
  3. When the user selects an option, rqt_reconfigure should send the corresponding integer value (e.g., 1, 2, or 3) in the parameter update request.

Use Case:

This feature would be particularly useful for defining categorical integer parameters, making them more user-friendly in rqt_reconfigure. Currently, users need to manually enter integer values without seeing their corresponding labels.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions