Skip to content

Editing boolean array makes the plugin crash #143

@AugusteBourgois

Description

@AugusteBourgois

Hi there,

I am extensively using the array edition from rqt_reconfigure, and I have noticed that editing an array of booleans makes the plugin crash. This is due to the json parser, which expects booleans to be written as true and false (i.e. lower case), while the bool arrays are by default written as True and False (i.e. the python way).

Adding the following lines in the edit_finished() method in the param_editors.py file solves the problem:

if Parameter.Type.from_parameter_value(self.parameter.value) == Parameter.Type.BOOL_ARRAY:
  params_list = json.loads(params_string.lower())
else:
  params_list = json.loads(params_string)

System: Ubuntu 22.04
Ros2 humble
Local build of rqt_reconfigure on the rolling branch, no modifications.

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