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

Editing boolean array makes the plugin crash #143

Open
AugusteBourgois opened this issue Mar 15, 2024 · 0 comments
Open

Editing boolean array makes the plugin crash #143

AugusteBourgois opened this issue Mar 15, 2024 · 0 comments

Comments

@AugusteBourgois
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant