Skip to content

Parsing floats in URDF yields wrong value depending on locale #41

@dbasa

Description

@dbasa

urdfdom_headers uses std::stod to parse floating point values like position (xyz) and rotation (rpy) from URDF files. The result of std::stod is locale dependant. So with e.g. a German locale (de_DE.UTF-8) "1.57079632679" is parsed to 1.
This is the case in urdfdom_headers/urdf_model/include/urdf_model/pose.h Line 70 (not necessarily exclusive)

In my opinion the issue described here can be linked to this error, as can be the issue described here.

This link states that "[...] using a stringstream to convert it worked perfectly fine."

If desired I can fix this issue using stringstream and create a pull request, but I have to admit I have no background knowledge in ros package building and testing procedures.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions