diff --git a/CMakeLists.txt b/CMakeLists.txt index 091f6e6d6b4..1be9d7fce6a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,7 @@ set(VARS_PREFIX "iDynTree") set(${VARS_PREFIX}_MAJOR_VERSION 0) set(${VARS_PREFIX}_MINOR_VERSION 11) -set(${VARS_PREFIX}_PATCH_VERSION 0) +set(${VARS_PREFIX}_PATCH_VERSION 1) set(${VARS_PREFIX}_VERSION ${${VARS_PREFIX}_MAJOR_VERSION}.${${VARS_PREFIX}_MINOR_VERSION}.${${VARS_PREFIX}_PATCH_VERSION}) # Pick up our CMake scripts - they are all in the cmake subdirectory. diff --git a/doc/releases/v0_11_1.md b/doc/releases/v0_11_1.md new file mode 100644 index 00000000000..0b1a94a818d --- /dev/null +++ b/doc/releases/v0_11_1.md @@ -0,0 +1,12 @@ +iDynTree 0.11.1 (UNRELEASED) {#v0_11_1} +======================== + +[TOC] + +iDynTree 0.11.1 Release Notes +========================= + +Bug Fixes +--------- + +* Fixed a locale-dependent floating point parsing in the URDF parser (https://github.com/robotology/idyntree/pull/475). diff --git a/src/model_io/urdf/src/InertialElement.cpp b/src/model_io/urdf/src/InertialElement.cpp index af892d4d8b0..f84b73978ed 100644 --- a/src/model_io/urdf/src/InertialElement.cpp +++ b/src/model_io/urdf/src/InertialElement.cpp @@ -37,13 +37,9 @@ namespace iDynTree { element->setAttributeCallback([this](const std::unordered_map>& attributes) { m_mass = 0; auto mass = attributes.find("value"); - if (mass != attributes.end()) { - try { - m_mass = std::stod(mass->second->value()); - } catch(const std::invalid_argument& ia) { - std::string message = std::string("Failed to obtain floating point representation from ") + ia.what(); - reportWarning("InertialElement", "childElementForName::mass::f_attribute", message.c_str()); - } + if (mass != attributes.end() + && !stringToDoubleWithClassicLocale(mass->second->value(), m_mass)) { + reportWarning("InertiaElement", "childElementForName::mass::f_attribute", "Failed to obtain floating point representation for the mass element."); } return true; });