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

Error output from subset_of #129

Open
christophfroehlich opened this issue Jul 14, 2023 · 4 comments
Open

Error output from subset_of #129

christophfroehlich opened this issue Jul 14, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@christophfroehlich
Copy link
Collaborator

While playing around with the validators for ros-controls/ros2_controllers#703, I found out that the error message of subset_of is not really helpful. Launching the JTC from demo 1 with

    command_interfaces:
      - test

gives

Exception thrown during init stage with message: argument not found

If I delete this section, I get a useful error from not_empty:

Exception thrown during init stage with message: Invalid value set during initialization for parameter 'command_interfaces': Parameter 'command_interfaces' cannot be empty

@tylerjw Is there something wrong with the validator configuration or is this an issue with this library?

@tylerjw
Copy link
Contributor

tylerjw commented Jul 17, 2023

Here is the code for subset_of: https://github.com/PickNikRobotics/RSL/blob/91c445b283c5c74a23be0a62f8e6ca07f1fb1e5a/include/rsl/parameter_validators.hpp#L75

You can see the error it should produce. That error seems like you are hitting something else. Can you run that in gdb and get a backtrace to see what is throwing that exception?

@christophfroehlich
Copy link
Collaborator Author

christophfroehlich commented Jul 17, 2023

First time for me to run gdb on that stuff. It seems that subset_of<> is returning the correct string and added to the const string, which is then passed to fmt::format

0x7fffc0119570 "Invalid value set during initialization for parameter 'command_interfaces': Entry 'test' in parameter 'command_interfaces' is not in the set {position, velocity, acceleration, effort}"

image

@christophfroehlich
Copy link
Collaborator Author

I tried it with ros2_controllers (rolling and humble) installed from source, I have no binary installation at hand.

@tylerjw
Copy link
Contributor

tylerjw commented Jul 19, 2023

I'll need to re-create this locally to determine why our validation error message isn't getting out. I don't understand where Exception thrown during init stage with message: argument not found comes from.

@tylerjw tylerjw added the bug Something isn't working label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants