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

Precision error when getting double value from sdf element #103

Closed
osrf-migration opened this issue Jul 31, 2015 · 2 comments
Closed

Precision error when getting double value from sdf element #103

osrf-migration opened this issue Jul 31, 2015 · 2 comments
Labels
bug Something isn't working major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


Values are stored as strings in sdf elements which probably resulted in the cropping of decimals during the double to string cast operation.

Added test in double_precision (3cb3038)
branch

The test shows that decimals get cropped and the double comparison fails

@osrf-migration osrf-migration added major bug Something isn't working labels Apr 11, 2020
scpeters pushed a commit that referenced this issue Sep 13, 2022
@scpeters
Copy link
Member

this should be fixed by #1137

iche033 added a commit that referenced this issue Sep 16, 2022
scpeters added a commit that referenced this issue Sep 28, 2022
* Add test showing truncation by Param::Set
* Param: use ParamStreamer to preserve digits in
  Set and GetDefault
* World_TEST: increase expected precision
* add precision test for #103

Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Co-authored-by: Ian Chen <[email protected]>
@scpeters
Copy link
Member

fixed by #1137

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working major
Projects
None yet
Development

No branches or pull requests

2 participants