-
Notifications
You must be signed in to change notification settings - Fork 171
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
ros2 param set string type "Off" #677
Comments
Thanks for the report. This is basically unintentional behavior (and hence a bug). What's happening here is that we are using YAML parsing to parse the value, and it is automatically interpreting certain values (on, off, true, false, etc) as booleans, and then trying to send that to the node. In Foxy, parameter types are flexible, so it automatically changes the type. In Rolling, for instance, the One workaround for all platforms is to do the following:
Which will make the parameter literally |
Thanks for the fix! much appreciated. |
You are welcome, happy to help. |
Bug report
Required Info:
Steps to reproduce issue
Declare string parameter from within cpp code.
Attempt to set the parameter from the CLI to the string "Off"
Expected behavior
Paremeter is set to the string "Off"
Actual behavior
Parameter is changed to boolean type and set to False.
Additional information
I tried all the following, none of them allow me to set a string value:
Is there any way to enforce the type when parsing the passed-in CLI value? or at the very least assume the passed-in value is the same type as the existing parameter type?
Maybe a new
-f
/--force-type
flag for "force" type?The text was updated successfully, but these errors were encountered: