-
Notifications
You must be signed in to change notification settings - Fork 167
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 load' fails when double parameter in parameter file is in scientific notation #834
Comments
… scientific notation ros2/ros2cli#834 Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
I believe that root cause is python fixed with yaml/pyyaml#173 |
@fujitatomoya I don't believe this to be the issue. I have tried 5.0e-06 and get the same error message. |
what do you mean? i think this is because of yaml/pyyaml#173, and could be addressed by https://github.com/yaml/pyyaml/pull/174/files. |
Maybe I'm missing something. My understanding was that pyyaml#174 fixes the issue where scientific notation without a dot in the mantissa is not resolved as a float but as a string. What I am saying is that in my repro steps above, I changed the parameter to have a dot in the mantissa and it still resolves it as a string. I'm not sure where the issue is, with respect to #834, but it exists regardless of whether there is a dot or not in the mantissa. |
@bijoua29 thanks for the explanation. |
I'm also not able to reproduce this with standard ROS 2 tooling. That is to say, I took your code and removed the references to With that setup, your tests above work just fine for me, in Rolling, Iron, and Humble. Can you check to confirm that the same thing works for you? |
@clalancette I ran your modified package with standard ROS 2 tooling i.e. without generate_parameter_library, and it still fails for me on the latest Rolling. That is, the following works fine:
but the following fails after the node is launched:
with the error:
Interestingly, if I have 0.00006 (no scientific notation) in the parameter file, it succeeds when launching but still fails on the subsequent param load. I am now curious what is different about your setup from mine. |
You are correct, that is failing. Thanks for pointing it out. That said, this does look to be a consequence of yaml/pyyaml#174 not being in yet. I locally modified my PyYAML sources to have that PR in place, and with that there, the |
@clalancette Thanks for confirming my findings. I am not hopeful that yaml/pyyaml#174 is going to be merged anytime soon since it has been open for 5 years. So, did you install pyyaml locally using 'setup.py install'? Not sure how I could automate that since I am running in a docker container. |
No, I edited the system version of |
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
Parameters are loaded properly in step 1
Parameters are loaded properly in step 2
Actual behavior
Parameters are loaded properly in step 1
However, in step 2, it results in following error:
Additional information
Attached is package that was used for test
parameter_test.zip
The text was updated successfully, but these errors were encountered: