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 when starting gazebo if LC_NUMERIC in not set to C. #60

Closed
osrf-migration opened this issue May 5, 2014 · 9 comments
Closed

Error when starting gazebo if LC_NUMERIC in not set to C. #60

osrf-migration opened this issue May 5, 2014 · 9 comments
Labels
bug Something isn't working major

Comments

@osrf-migration
Copy link

Original report (archived issue) by Andrei Haidu (Bitbucket: ahaidu).


Following error appears when starting gazebo 3.0 (present in earlier versions as well)

#!

Error [Param.cc:181] Unable to set value [1,0471975511965976] for key[horizontal_fov] Error [Param.cc:181] Unable to set value [0,100000001] for key[near]

More info in the question

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


  • set assignee_account_id to "557058:155a32e2-420c-4d50-98e0-0e722f63f906"
  • set assignee to "jrivero (Bitbucket: jrivero, GitHub: j-rivero)"

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


I was able to reproduce the bug (or seems pretty similar):

   jrivero@nium build $ make test
    Running tests...
    ... [snip]
    55% tests passed, 9 tests failed out of 20
     
    The following tests FAILED:
              1 - INTEGRATION_audio (Failed)
              3 - INTEGRATION_cfm_damping_implicit_spring_damper (Failed)
              5 - INTEGRATION_fixed_joint_reduction (Failed)
              7 - INTEGRATION_joint_axis_frame (Failed)
              9 - INTEGRATION_provide_feedback (Failed)
             11 - PERFORMANCE_parser_urdf (Failed)
             13 - UNIT_SDF_TEST (Failed)
             15 - UNIT_Console_TEST (Failed)
             19 - UNIT_parser_urdf_TEST (Failed)
    Errors while running CTest
    make: *** [test] Error 8
     
    jrivero@nium build $ locale
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_ALL to default locale: No such file or directory
    LANG=
    LANGUAGE=
    LC_CTYPE="en_US.utf8"
    LC_NUMERIC="en_US.utf8"
    LC_TIME="en_US.utf8"
    LC_COLLATE="en_US.utf8"
    LC_MONETARY="en_US.utf8"
    LC_MESSAGES="en_US.utf8"
    LC_PAPER="en_US.utf8"
    LC_NAME="en_US.utf8"
    LC_ADDRESS="en_US.utf8"
    LC_TELEPHONE="en_US.utf8"
    LC_MEASUREMENT="en_US.utf8"
    LC_IDENTIFICATION="en_US.utf8"
    LC_ALL=en_US.utf8
     
    jrivero@nium build $ locale -a
    locale: Cannot set LC_CTYPE to default locale: No such file or directory
    locale: Cannot set LC_MESSAGES to default locale: No such file or directory
    locale: Cannot set LC_COLLATE to default locale: No such file or directory
    C
    C.UTF-8
    POSIX
     
    jrivero@nium build $ export LC_ALL=
    jrivero@nium build $ locale
    LANG=
    LANGUAGE=
    LC_CTYPE="POSIX"
    LC_NUMERIC="POSIX"
    LC_TIME="POSIX"
    LC_COLLATE="POSIX"
    LC_MONETARY="POSIX"
    LC_MESSAGES="POSIX"
    LC_PAPER="POSIX"
    LC_NAME="POSIX"
    LC_ADDRESS="POSIX"
    LC_TELEPHONE="POSIX"
    LC_MEASUREMENT="POSIX"
    LC_IDENTIFICATION="POSIX"
    LC_ALL=
     
    jrivero@nium build $ make test
    Running tests...
    Test project /home/jrivero/code/sdformat/build
    [snip]
     
    100% tests passed, 0 tests failed out of 20

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


I still not able to know why the test case is not failing ...
https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/commits/50eba16e85c318cb9e87825cd45df9dc42c5e16d (3b81f5f)

@osrf-migration
Copy link
Author

Original comment by Steve Peters (Bitbucket: Steven Peters, GitHub: scpeters).


See also gazebo issue 1397. @chapulina

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


The test case mentioned by @j-rivero also doesn't fail for me. I think it passes because the issue is not that all inputs containing decimals will fail for some locales. If that were the case, I wouldn't have been able to insert models or do almost anything with Gazebo, but in fact, I've been living with LC_NUMERIC=pt_BR.UTF-8 until now just fine. Each time I opened gazebo I'd get only the same 2 errors described above:

Error [Param.cc:181] Unable to set value [1,0471975511965976] for key[horizontal_fov]
Error [Param.cc:181] Unable to set value [0,100000001] for key[near]

That didn't bother me and I was using Gazebo normally. It wasn't until recently that I started getting more errors like this (gazebo issue 1397). Now if I open Gazebo while LC_NUMERIC=pt_BR.UTF-8:

Error [Param.cc:181] Unable to set value [1,0471975511965976] for key[horizontal_fov]
Error [Param.cc:181] Unable to set value [0,100000001] for key[near]
Error [Param.cc:181] Unable to set value [0,899999976] for key[constant]
Error [Param.cc:181] Unable to set value [0,00999999978] for key[linear]
Error [Param.cc:181] Unable to set value [0,00100000005] for key[quadratic]

And if I insert a sphere from the GUI toolbar, for example:

Error [Param.cc:181] Unable to set value [0,5] for key[radius]
Error [Param.cc:181] Unable to set value [0,5] for key[radius]

So I think that rather than a general problem with decimals on SDF, this is a matter of Gazebo generating bad input at very specific places. In fact, changing this line from

this->sdf->GetElement("horizontal_fov")->Set(_angle.Radian());

to

this->sdf->GetElement("horizontal_fov")->Set(_angle);

eliminates the error related to horizontal_fov. Not sure what's going on...

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


In pull request #147

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


  • changed state from "new" to "resolved"

Fixed. Expected to appear in the next major version of sdformat although a backport to the sdf 2.3 branch is easy.

@osrf-migration
Copy link
Author

Original comment by Hugo Costelha (Bitbucket: hcostelha).


Is it possible to port it to the 2.3 branch? This way the typical ros/gazebo ubuntu 14.04 installation would not suffer from this problem.

@osrf-migration
Copy link
Author

Original comment by Jose Luis Rivero (Bitbucket: Jose Luis Rivero, GitHub: j-rivero).


I just released 2.3.2 sdformat package which should include this fix.

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

1 participant