diff --git a/include/sdf/Param.hh b/include/sdf/Param.hh index 35bc51349..fcb78c1b0 100644 --- a/include/sdf/Param.hh +++ b/include/sdf/Param.hh @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -77,8 +78,22 @@ namespace sdf { os << s.val; return os; + } + + template<> + inline std::ostream& operator<<(std::ostream &os, ParamStreamer s) + { + os << std::setprecision(std::numeric_limits::max_digits10) << s.val; + return os; } + template<> + inline std::ostream& operator<<(std::ostream &os, ParamStreamer s) + { + os << std::setprecision(std::numeric_limits::max_digits10) << s.val; + return os; + } + template std::ostream& operator<<(std::ostream& os, ParamStreamer> sv) diff --git a/test/integration/model/test_model_with_frames/model.sdf b/test/integration/model/test_model_with_frames/model.sdf index f085ec4b8..430070b08 100644 --- a/test/integration/model/test_model_with_frames/model.sdf +++ b/test/integration/model/test_model_with_frames/model.sdf @@ -13,7 +13,7 @@ - 1 + 1.5707963267948966 @@ -21,7 +21,7 @@ - 1 + 0.78539816339744828 diff --git a/test/integration/nested_model_with_frames_expected.sdf b/test/integration/nested_model_with_frames_expected.sdf index 6e3f1dcbe..1f5b66d23 100644 --- a/test/integration/nested_model_with_frames_expected.sdf +++ b/test/integration/nested_model_with_frames_expected.sdf @@ -17,7 +17,7 @@ 0 0 0 0 -0 0 - 1 + 1.5707963267948966 @@ -25,7 +25,7 @@ 0 0 0 0 -0 0 - 1 + 0.78539816339744828 diff --git a/test/integration/two_level_nested_model_with_frames_expected.sdf b/test/integration/two_level_nested_model_with_frames_expected.sdf index f96fae7ba..c31494f5f 100644 --- a/test/integration/two_level_nested_model_with_frames_expected.sdf +++ b/test/integration/two_level_nested_model_with_frames_expected.sdf @@ -20,7 +20,7 @@ 0 0 0 0 -0 0 - 1 + 1.5707963267948966 @@ -28,7 +28,7 @@ 0 0 0 0 -0 0 - 1 + 0.78539816339744828