[sdformat] 02/07: Imported Upstream version 3.0.0~pre3.0.6-1

Jose Luis Rivero jrivero-guest at moszumanska.debian.org
Thu Jul 16 01:46:16 UTC 2015


This is an automated email from the git hooks/post-receive script.

jrivero-guest pushed a commit to branch master
in repository sdformat.

commit ac8e4e26072841f2e3a7f6829d2f1ba5a1fa61bd
Author: Jose Luis Rivero <jrivero at osrfoundation.org>
Date:   Wed Jul 15 04:01:54 2015 +0200

    Imported Upstream version 3.0.0~pre3.0.6-1
---
 .hg_archival.txt                                   |   6 +-
 .hgtags                                            |   9 +
 CMakeLists.txt                                     | 142 ++--
 INSTALL_WIN32.md                                   |   4 +-
 cmake/DefaultCFlags.cmake                          |  71 ++
 cmake/FindSSE.cmake                                | 113 +++
 cmake/HostCFlags.cmake                             |  27 +
 cmake/SDFUtils.cmake                               |  22 +-
 cmake/SearchForStuff.cmake                         |  27 +-
 cmake/TargetArch.cmake                             | 158 ++++
 cmake/sdf_config.cmake.in                          |  27 +-
 cmake/sdformat_pc.in                               |   6 +-
 configure.bat                                      |  10 +-
 doc/sdf_logo.png                                   | Bin 3478 -> 3127 bytes
 doc/sdf_logo.svg                                   |  55 +-
 include/sdf/CMakeLists.txt                         |   1 +
 include/sdf/Console.hh                             |  71 +-
 include/sdf/{SDFImpl.hh => Element.hh}             | 222 +++--
 include/sdf/Exception.hh                           |  22 +-
 include/sdf/ExceptionPrivate.hh                    |  41 +
 include/sdf/Param.hh                               | 311 ++++---
 include/sdf/SDFExtension.hh                        |  96 +++
 include/sdf/SDFImpl.hh                             | 334 +-------
 include/sdf/Types.hh                               |  30 +-
 include/sdf/parser_urdf.hh                         | 156 +---
 sdf/1.2/geometry.sdf                               |   2 +-
 sdf/1.3/geometry.sdf                               |   2 +-
 sdf/1.4/heightmap_shape.sdf                        |   2 +-
 sdf/1.4/surface.sdf                                |   5 +
 sdf/1.5/CMakeLists.txt                             |   3 +-
 sdf/1.5/altimeter.sdf                              |  18 +
 sdf/1.5/gui.sdf                                    |   4 +
 sdf/1.5/heightmap_shape.sdf                        |   2 +-
 sdf/1.5/joint.sdf                                  |  13 +-
 sdf/1.5/link.sdf                                   |   2 +-
 sdf/1.5/magnetometer.sdf                           |  19 +-
 sdf/1.5/model.sdf                                  |   4 +
 sdf/1.5/physics.sdf                                |   8 +
 sdf/1.5/scene.sdf                                  |   4 +
 sdf/1.5/sensor.sdf                                 |   2 +
 sdf/1.5/state.sdf                                  |   4 +
 sdf/1.5/surface.sdf                                |   5 +
 sdf/1.5/visual.sdf                                 |   8 +
 src/CMakeLists.txt                                 |   8 +-
 src/Console.cc                                     |  59 +-
 src/Converter_TEST.cc                              |  36 +-
 src/Element.cc                                     | 823 ++++++++++++++++++
 src/Exception.cc                                   |  29 +-
 src/Exception_TEST.cc                              |  35 +
 src/Param.cc                                       | 419 ++++++++--
 src/Param_TEST.cc                                  | 168 +++-
 src/SDF.cc                                         | 925 ++-------------------
 src/SDFExtension.cc                                | 117 +++
 src/SDF_TEST.cc                                    | 281 +++++--
 src/Types.cc                                       |  47 ++
 src/parser.cc                                      | 175 ++--
 src/parser_urdf.cc                                 | 210 ++---
 src/parser_urdf_TEST.cc                            |  30 +-
 src/urdf/urdf_model/color.h                        |   4 +-
 src/urdf/urdf_model/pose.h                         |  29 +-
 src/urdf/urdf_parser/joint.cpp                     |  50 +-
 src/urdf/urdf_parser/link.cpp                      |  58 +-
 src/urdf/urdf_parser/model.cpp                     |  32 +-
 src/urdf/urdf_parser/pose.cpp                      |  14 +-
 src/urdf/urdf_parser/twist.cpp                     |  14 +-
 src/urdf/urdf_parser/urdf_model_state.cpp          |  18 +-
 src/urdf/urdf_parser/urdf_parser.h                 |   3 +-
 src/urdf/urdf_parser/urdf_sensor.cpp               |  75 +-
 src/win/tinyxml/tinyxml.cpp                        |   4 +
 src/win/tinyxml/tinyxmlparser.cpp                  |   4 +
 test/CMakeLists.txt                                |   2 +
 test/gtest/include/gtest/gtest-printers.h          |   2 +
 test/gtest/include/gtest/gtest-typed-test.h        |   3 +
 test/gtest/include/gtest/internal/gtest-port.h     |   2 +
 test/gtest/src/gtest.cc                            |   3 +
 test/integration/CMakeLists.txt                    |  17 +-
 .../cfm_damping_implicit_spring_damper.cc          |   4 +-
 test/integration/disable_fixed_joint_reduction.cc  |   2 +-
 test/integration/fixed_joint_reduction.cc          | 117 +--
 test/integration/force_torque_sensor.cc            |   2 +-
 test/integration/joint_axis_frame.cc               |   9 +-
 test/integration/locale_fix.cc                     |  85 ++
 test/integration/numeric.sdf                       |  28 +
 .../{plugin_bool.cc => parser_error_detection.cc}  |  46 +-
 test/integration/plugin_attribute.cc               |   5 +-
 test/integration/plugin_bool.cc                    |   5 +-
 test/integration/provide_feedback.cc               |   2 +-
 test/integration/urdf_joint_parameters.cc          |   2 +-
 tools/code_check.sh                                |   3 +
 89 files changed, 3755 insertions(+), 2319 deletions(-)

diff --git a/.hg_archival.txt b/.hg_archival.txt
index db71f85..3a01b48 100644
--- a/.hg_archival.txt
+++ b/.hg_archival.txt
@@ -1,5 +1,5 @@
 repo: 17049bd77df5bd6cd56a76edba4a54afb5647740
-node: 517c99d40b47d9ae8fabbe1307133e4087d513bc
+node: 1c186b0edcf8e733f25ee8d149559640f3627148
 branch: default
-latesttag: sdformat2_2.2.1
-latesttagdistance: 6
+latesttag: sdformat3-prerelease_3.0.5
+latesttagdistance: 21
diff --git a/.hgtags b/.hgtags
index 4e17121..d77d47f 100644
--- a/.hgtags
+++ b/.hgtags
@@ -82,3 +82,12 @@ d79259b26096295719cd65acc9ac07d68870fd47 sdformat2_2.0.1
 e1bb1bc7035660de317cf17da176e007f99c42c0 sdformat2_2.1.0
 95b7b298de85c4bb7ee9e5e5a8e26a2efe5e42b5 sdformat2_2.2.0
 fcfb17aa1b0e38fa960983c9a84b6ac67cbab3e5 sdformat2_2.2.1
+517c99d40b47d9ae8fabbe1307133e4087d513bc sdformat2_2.3.0
+878cbad7ec45305e6a2278bf31b5da324dfe22e6 sdformat2_2.3.1
+b50c8f8857f36ae0a8cdbe4ad5f66d36b96d58dc sdformat2_2.3.2
+cf0fe95cddc8ee47258007047468c4c8d5c602c1 sdformat3-prerelease_3.0.0
+07c0dbc03d3a678d35f6f35de2eb789517ed21c2 sdformat3-prerelease_3.0.1
+a86c5d1fd79620b9e5c6558cec394d656c361e48 sdformat3-prerelease_3.0.2
+70c3a26491e3b76e7090c2c140b8ebe08953190c sdformat3-prerelease_3.0.3
+77671675d30bc9e8e0caa1944ad0f56e876e351c sdformat3-prerelease_3.0.4
+53a99cd74784e59e1c52955199a4f431204cba22 sdformat3-prerelease_3.0.5
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 21b72ff..c2cbef3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,13 +27,16 @@ string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
 # It represents the current version of sdformat implement by the software
 set (SDF_PROTOCOL_VERSION 1.5)
 
-set (SDF_MAJOR_VERSION 2)
-set (SDF_MINOR_VERSION 3)
-set (SDF_PATCH_VERSION 0)
+set (SDF_MAJOR_VERSION 3)
+set (SDF_MINOR_VERSION 0)
+set (SDF_PATCH_VERSION 6)
 
 set (SDF_VERSION ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION})
 set (SDF_VERSION_FULL ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}.${SDF_PATCH_VERSION})
 
+set (project_cmake_dir ${PROJECT_SOURCE_DIR}/cmake
+  CACHE PATH "Location of CMake scripts")
+
 message (STATUS "${PROJECT_NAME} version ${SDF_VERSION_FULL}")
 set (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
 
@@ -105,93 +108,79 @@ include (${sdf_cmake_dir}/SearchForStuff.cmake)
 message (STATUS "----------------------------------------\n")
 
 #####################################
-# Check if warning options are avaliable for the compiler and return WARNING_CXX_FLAGS variable
-# MSVC generates tons of warnings on gtest code. 
-# Recommended to use /W4 instead of /Wall
-if (MSVC)
-  set(WARN_LEVEL "/W4")
-else()
-  set(WARN_LEVEL "-Wall")
-endif()
-
-if (WIN32)
-    # Need for M_PI constant
-    add_definitions(-D_USE_MATH_DEFINES) 
-    # Use dynamic linking for boost
-    add_definitions(-DBOOST_ALL_DYN_LINK)
-    # And force linking to MSVC dynamic runtime
-    set(CMAKE_C_FLAGS_DEBUG "/MDd ${CMAKE_C_FLAGS_DEBUG}")
-    set(CMAKE_C_FLAGS_RELEASE "/MD ${CMAKE_C_FLAGS_RELEASE}")
-    if (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
-      # Not need if proper cmake gnerator (-G "...Win64") is passed to cmake
-      # Enable as a second measeure to workaround over bug
-      # http://www.cmake.org/Bug/print_bug_page.php?bug_id=11240 
-      set(CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
-    endif()
-ENDIF(WIN32)
+# Set the default build type
+if (NOT CMAKE_BUILD_TYPE)
+  set (CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING 
+    "Choose the type of build, options are: Debug Release RelWithDebInfo Profile Check" FORCE)
+endif (NOT CMAKE_BUILD_TYPE)
+string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UPPERCASE)
 
-filter_valid_compiler_warnings(${WARN_LEVEL} -Wextra -Wno-long-long
-  -Wno-unused-value -Wno-unused-value -Wno-unused-value -Wno-unused-value
-  -Wfloat-equal -Wshadow -Winit-self -Wswitch-default
-  -Wmissing-include-dirs -pedantic)
-set (CMAKE_C_FLAGS_ALL "${WARNING_CXX_FLAGS}")
+set (BUILD_TYPE_PROFILE FALSE)
+set (BUILD_TYPE_RELEASE FALSE)
+set (BUILD_TYPE_RELWITHDEBINFO FALSE)
+set (BUILD_TYPE_DEBUG FALSE)
 
-# Check and add visibility hidden by default
-if (UNIX)
-  check_gcc_visibility()
-  if (GCC_SUPPORTS_VISIBILITY)
-      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
-  endif()
+if ("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "PROFILE")
+  set (BUILD_TYPE_PROFILE TRUE)
+elseif ("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "RELEASE")
+  set (BUILD_TYPE_RELEASE TRUE)
+elseif ("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "RELWITHDEBINFO")
+  set (BUILD_TYPE_RELWITHDEBINFO TRUE)
+elseif ("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "DEBUG")
+  set (BUILD_TYPE_DEBUG TRUE)
+elseif ("${CMAKE_BUILD_TYPE_UPPERCASE}" STREQUAL "COVERAGE")
+  include (${project_cmake_dir}/CodeCoverage.cmake)
+  set (BUILD_TYPE_DEBUG TRUE)
+  SETUP_TARGET_FOR_COVERAGE(coverage ctest coverage)
+else()
+  build_error("CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} unknown. Valid options are: Debug Release RelWithDebInfo Profile Check")
 endif()
 
 #####################################
-# Build type link flags
+# Handle CFlags
+unset (CMAKE_C_FLAGS_ALL CACHE)
+unset (CMAKE_CXX_FLAGS CACHE)
+
+# USE_HOST_CFLAGS (default TRUE)
+# Will check building host machine for proper cflags
+if(NOT DEFINED USE_HOST_CFLAGS OR USE_HOST_CFLAGS)
+  message(STATUS "Enable host CFlags")
+  include (${project_cmake_dir}/HostCFlags.cmake)
+endif()
 
 # USE_UPSTREAM_CFLAGS (default TRUE)
-# Use our own defined flags for building types
+# Will use predefined ignition developers cflags
 if(NOT DEFINED USE_UPSTREAM_CFLAGS OR USE_UPSTREAM_CFLAGS)
-  message(STATUS "Using upstream CFlags")
-  if (NOT APPLE AND NOT MSVC)
-    # -s doesn't work with default osx compiler clang, alternative:
-    # http://stackoverflow.com/questions/6085491/gcc-vs-clang-symbol-strippingu
-    set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s ")
-  endif()
-  set (CMAKE_C_FLAGS_RELEASE " ${CMAKE_C_FLAGS_RELEASE} -O2 -DNDEBUG"
-    CACHE INTERNAL "C Flags for release" FORCE)
-  set (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
-  
-  if (NOT MSVC)
-    set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3"
-      CACHE INTERNAL "C Flags for debug" FORCE)
-    set (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
-  endif()
+  message(STATUS "Enable upstream CFlags")
+  include(${project_cmake_dir}/DefaultCFlags.cmake)
 endif()
 
-#####################################
-# Set the default build type
-if (NOT CMAKE_BUILD_TYPE)
-  set (CMAKE_BUILD_TYPE "RELEASE" CACHE STRING 
-    "Choose the type of build, options are: debug release profile check" FORCE)
-endif (NOT CMAKE_BUILD_TYPE)
-string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
-
-#####################################
-# Set all the global build flags
-set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}} ${CMAKE_C_FLAGS_ALL}")
-set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS_ALL}")
-
-if ("${CMAKE_BUILD_TYPE}" STREQUAL "RELEASE")
-  set (BUILD_TYPE_RELEASE TRUE)
-else()
-  set (BUILD_TYPE_RELEASE FALSE)
-endif()
+# Check if warning options are avaliable for the compiler and return WARNING_CXX_FLAGS variable
+if (MSVC)
+  set(WARN_LEVEL "/W4")
 
-if ( "${CMAKE_BUILD_TYPE}" STREQUAL "DEBUG")
-  set (BUILD_TYPE_DEBUG TRUE)
+  # Unable to be filtered flags (failing due to limitations in filter_valid_compiler_warnings)
+  # Handling exceptions rightly
+  set(UNFILTERED_FLAGS "/EHsc")
 else()
-  set (BUILD_TYPE_DEBUG FALSE)
+  # Equivalent to Wall (according to man gcc) but removed the unknown pragams since we use
+  # MSVC only pragmas all over the code
+  list(APPEND WARN_LEVEL -Waddress -Warray-bounds -Wcomment -Wformat -Wnonnull)
+  list(APPEND WARN_LEVEL -Wparentheses -Wreorder -Wreturn-type)
+  list(APPEND WARN_LEVEL -Wsequence-point -Wsign-compare -Wstrict-aliasing)
+  list(APPEND WARN_LEVEL -Wstrict-overflow=1 -Wswitch -Wtrigraphs -Wuninitialized)
+  list(APPEND WARN_LEVEL -Wunused-function -Wunused-label -Wunused-value)
+  list(APPEND WARN_LEVEL -Wunused-variable -Wvolatile-register-var)
+
+  # Unable to be filtered flags (failing due to limitations in filter_valid_compiler_warnings)
+  set(UNFILTERED_FLAGS "-Wc++11-compat")
 endif()
 
+filter_valid_compiler_warnings(${WARN_LEVEL} -Wextra -Wno-long-long
+  -Wno-unused-value -Wno-unused-value -Wno-unused-value -Wno-unused-value
+  -Wfloat-equal -Wshadow -Winit-self -Wswitch-default
+  -Wmissing-include-dirs -pedantic -Wno-pragmas)
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}${WARNING_CXX_FLAGS} ${UNFILTERED_FLAGS}")
 
 #################################################
 # OS Specific initialization
@@ -267,7 +256,6 @@ else (buid_errors)
   # Make the cmake config files
   set(PKG_NAME ${PROJECT_NAME})
   set(PKG_LIBRARIES sdformat)
-  set(PKG_DEPENDS Boost)
   set(cmake_conf_file "cmake/sdf_config.cmake")
   set(cmake_conf_version_file "cmake/SDFormatConfigVersion.cmake")
   configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${cmake_conf_file}.in" "${CMAKE_CURRENT_BINARY_DIR}/SDFormatConfig.cmake" @ONLY)
diff --git a/INSTALL_WIN32.md b/INSTALL_WIN32.md
index e15d980..c114218 100644
--- a/INSTALL_WIN32.md
+++ b/INSTALL_WIN32.md
@@ -4,7 +4,7 @@ This documentation describes how to set up a workspace for trying to compile sdf
 
 ## Supported compilers
 
-At this moment, compilation has been tested on Windows 7 and is supported 
+At this moment, compilation has been tested on Windows 7 and 8.1 and is supported 
 when using Visual Studio 2013. Patches for other versions are welcome.
 
 ## Installation
@@ -43,4 +43,4 @@ Windows `cmd` for configuring and building.
 
     You should now have an installation of sdformat in sdformat-ws/sdformat/build/install/Release.
 
-    Once this all works (which it currently does not, by a long shot): you should now have an installation of sdformat in sdformat-ws/sdformat/build/install/Release.
+    Once this all works (which it does with tender love and care): you should now have an installation of sdformat in sdformat-ws/sdformat/build/install/Release.
diff --git a/cmake/DefaultCFlags.cmake b/cmake/DefaultCFlags.cmake
new file mode 100644
index 0000000..0903872
--- /dev/null
+++ b/cmake/DefaultCFlags.cmake
@@ -0,0 +1,71 @@
+# Build type link flags
+set (CMAKE_LINK_FLAGS_RELEASE " " CACHE INTERNAL "Link flags for release" FORCE)
+set (CMAKE_LINK_FLAGS_RELWITHDEBINFO " " CACHE INTERNAL "Link flags for release with debug support" FORCE)
+set (CMAKE_LINK_FLAGS_DEBUG " " CACHE INTERNAL "Link flags for debug" FORCE)
+set (CMAKE_LINK_FLAGS_PROFILE " -pg" CACHE INTERNAL "Link flags for profile" FORCE)
+set (CMAKE_LINK_FLAGS_COVERAGE " --coverage" CACHE INTERNAL "Link flags for static code checking" FORCE)
+
+set (CMAKE_C_FLAGS_RELEASE "")
+if (NOT APPLE)
+  # -s doesn't work with default osx compiler clang, alternative:
+  # http://stackoverflow.com/questions/6085491/gcc-vs-clang-symbol-strippingu
+  set (CMAKE_C_FLAGS_RELEASE "-s")
+endif()
+
+if (NOT MSVC)
+    set (CMAKE_C_FLAGS_RELEASE " ${CMAKE_C_FLAGS_RELEASE} -O3 -DNDEBUG ${CMAKE_C_FLAGS_ALL}" CACHE INTERNAL "C Flags for release" FORCE)
+    set (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_C_FLAGS_RELEASE})
+
+    set (CMAKE_C_FLAGS_RELWITHDEBINFO " -g -O2 ${CMAKE_C_FLAGS_ALL}" CACHE INTERNAL "C Flags for release with debug support" FORCE)
+    set (CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_C_FLAGS_RELWITHDEBINFO})
+
+    set (CMAKE_C_FLAGS_DEBUG " -ggdb3 ${CMAKE_C_FLAGS_ALL}" CACHE INTERNAL "C Flags for debug" FORCE)
+    set (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_C_FLAGS_DEBUG})
+
+    set (CMAKE_C_FLAGS_PROFILE " -fno-omit-frame-pointer -g -pg ${CMAKE_C_FLAGS_ALL}" CACHE INTERNAL "C Flags for profile" FORCE)
+    set (CMAKE_CXX_FLAGS_PROFILE ${CMAKE_C_FLAGS_PROFILE})
+
+    set (CMAKE_C_FLAGS_COVERAGE " -g -O0 -Wformat=2 --coverage -fno-inline ${CMAKE_C_FLAGS_ALL}" CACHE INTERNAL "C Flags for static code checking" FORCE)
+    set (CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_C_FLAGS_COVERAGE} -fno-elide-constructors -fno-default-inline -fno-implicit-inline-templates")
+endif()
+
+#####################################
+# Set all the global build flags
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+
+# Visual Studio enables c++11 support by default
+if (NOT MSVC)
+  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}} -std=c++11")
+endif()
+
+if (UNIX)
+    set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+    set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+    set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+    set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_LINK_FLAGS_${CMAKE_BUILD_TYPE_UPPERCASE}}")
+    # Add visibility in UNIX
+    check_gcc_visibility()
+    if (GCC_SUPPORTS_VISIBILITY)
+      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+    endif()
+endif()
+
+# Compiler-specific C++11 activation.
+if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+    execute_process(
+        COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
+    if (NOT (GCC_VERSION VERSION_GREATER 4.7))
+        message(FATAL_ERROR "${PROJECT_NAME} requires g++ 4.8 or greater.")
+    endif ()
+elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
+elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
+    if (NOT MSVC12)
+        message(FATAL_ERROR "${PROJECT_NAME} requires VS 2013 os greater.")
+    endif()
+else ()
+    message(FATAL_ERROR "Your C++ compiler does not support C++11.")
+endif ()
diff --git a/cmake/FindSSE.cmake b/cmake/FindSSE.cmake
new file mode 100644
index 0000000..96622f5
--- /dev/null
+++ b/cmake/FindSSE.cmake
@@ -0,0 +1,113 @@
+# Check if SSE instructions are available on the machine where 
+# the project is compiled.
+
+IF (ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
+  IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+     EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO)
+
+     STRING(REGEX REPLACE "^.*(sse2).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE)
+     IF (SSE2_TRUE)
+        set(SSE2_FOUND true CACHE BOOL "SSE2 available on host")
+     ELSE (SSE2_TRUE)
+        set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
+     ENDIF (SSE2_TRUE)
+
+     # /proc/cpuinfo apparently omits sse3 :(
+     STRING(REGEX REPLACE "^.*[^s](sse3).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "sse3" "${SSE_THERE}" SSE3_TRUE)
+     IF (NOT SSE3_TRUE)
+        STRING(REGEX REPLACE "^.*(T2300).*$" "\\1" SSE_THERE ${CPUINFO})
+        STRING(COMPARE EQUAL "T2300" "${SSE_THERE}" SSE3_TRUE)
+     ENDIF (NOT SSE3_TRUE)
+
+     STRING(REGEX REPLACE "^.*(ssse3).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "ssse3" "${SSE_THERE}" SSSE3_TRUE)
+     IF (SSE3_TRUE OR SSSE3_TRUE)
+        set(SSE3_FOUND true CACHE BOOL "SSE3 available on host")
+     ELSE (SSE3_TRUE OR SSSE3_TRUE)
+        set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
+     ENDIF (SSE3_TRUE OR SSSE3_TRUE)
+     IF (SSSE3_TRUE)
+        set(SSSE3_FOUND true CACHE BOOL "SSSE3 available on host")
+     ELSE (SSSE3_TRUE)
+        set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
+     ENDIF (SSSE3_TRUE)
+
+     STRING(REGEX REPLACE "^.*(sse4_1).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "sse4_1" "${SSE_THERE}" SSE41_TRUE)
+     IF (SSE41_TRUE)
+        set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host")
+     ELSE (SSE41_TRUE)
+        set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
+     ENDIF (SSE41_TRUE)
+
+     STRING(REGEX REPLACE "^.*(sse4_2).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "sse4_2" "${SSE_THERE}" SSE42_TRUE)
+     IF (SSE42_TRUE)
+        set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available on host")
+     ELSE (SSE42_TRUE)
+        set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host")
+     ENDIF (SSE42_TRUE)
+
+  ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Darwin")
+     EXEC_PROGRAM("/usr/sbin/sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
+        CPUINFO)
+
+     STRING(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE)
+     IF (SSE2_TRUE)
+        set(SSE2_FOUND true CACHE BOOL "SSE2 available on host")
+     ELSE (SSE2_TRUE)
+        set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
+     ENDIF (SSE2_TRUE)
+
+     STRING(REGEX REPLACE "^.*[^S](SSE3).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "SSE3" "${SSE_THERE}" SSE3_TRUE)
+     IF (SSE3_TRUE)
+        set(SSE3_FOUND true CACHE BOOL "SSE3 available on host")
+     ELSE (SSE3_TRUE)
+        set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
+     ENDIF (SSE3_TRUE)
+
+     STRING(REGEX REPLACE "^.*(SSSE3).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "SSSE3" "${SSE_THERE}" SSSE3_TRUE)
+     IF (SSSE3_TRUE)
+        set(SSSE3_FOUND true CACHE BOOL "SSSE3 available on host")
+     ELSE (SSSE3_TRUE)
+        set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
+     ENDIF (SSSE3_TRUE)
+
+     STRING(REGEX REPLACE "^.*(SSE4.1).*$" "\\1" SSE_THERE ${CPUINFO})
+     STRING(COMPARE EQUAL "SSE4.1" "${SSE_THERE}" SSE41_TRUE)
+     IF (SSE41_TRUE)
+        set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host")
+     ELSE (SSE41_TRUE)
+        set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
+     ENDIF (SSE41_TRUE)
+  ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Windows")
+     # TODO
+     set(SSE2_FOUND   true  CACHE BOOL "SSE2 available on host")
+     set(SSE3_FOUND   false CACHE BOOL "SSE3 available on host")
+     set(SSSE3_FOUND  false CACHE BOOL "SSSE3 available on host")
+     set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
+  ELSE(CMAKE_SYSTEM_NAME MATCHES "Linux")
+     set(SSE2_FOUND   true  CACHE BOOL "SSE2 available on host")
+     set(SSE3_FOUND   false CACHE BOOL "SSE3 available on host")
+     set(SSSE3_FOUND  false CACHE BOOL "SSSE3 available on host")
+     set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
+  ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
+ENDIF(ARCH MATCHES "i386" OR ARCH MATCHES "x86_64")
+
+if(NOT SSE2_FOUND)
+      MESSAGE(STATUS "Could not find hardware support for SSE2 on this machine.")
+endif(NOT SSE2_FOUND)
+if(NOT SSE3_FOUND)
+      MESSAGE(STATUS "Could not find hardware support for SSE3 on this machine.")
+endif(NOT SSE3_FOUND)
+if(NOT SSSE3_FOUND)
+      MESSAGE(STATUS "Could not find hardware support for SSSE3 on this machine.")
+endif(NOT SSSE3_FOUND)
+if(NOT SSE4_1_FOUND)
+      MESSAGE(STATUS "Could not find hardware support for SSE4.1 on this machine.")
+endif(NOT SSE4_1_FOUND)
diff --git a/cmake/HostCFlags.cmake b/cmake/HostCFlags.cmake
new file mode 100644
index 0000000..f38d8d7
--- /dev/null
+++ b/cmake/HostCFlags.cmake
@@ -0,0 +1,27 @@
+include (${project_cmake_dir}/FindSSE.cmake)
+
+if (SSE2_FOUND)
+  set (CMAKE_C_FLAGS_ALL "-msse -msse2 ${CMAKE_C_FLAGS_ALL}")
+  if (NOT APPLE)
+    set (CMAKE_C_FLAGS_ALL "-mfpmath=sse ${CMAKE_C_FLAGS_ALL}")
+  endif()
+endif()
+
+if (SSE3_FOUND)
+  set (CMAKE_C_FLAGS_ALL "-msse3 ${CMAKE_C_FLAGS_ALL}")
+endif()
+if (SSSE3_FOUND)
+  set (CMAKE_C_FLAGS_ALL "-mssse3 ${CMAKE_C_FLAGS_ALL}")
+endif()
+
+if (SSE4_1_FOUND OR SSE4_2_FOUND)
+  if (SSE4_1_FOUND)
+    set (CMAKE_C_FLAGS_ALL "-msse4.1 ${CMAKE_C_FLAGS_ALL}")
+  endif()
+  if (SSE4_2_FOUND)
+    set (CMAKE_C_FLAGS_ALL "-msse4.2 ${CMAKE_C_FLAGS_ALL}")
+  endif()
+else()
+  message(STATUS "\nSSE4 disabled.\n")
+endif()
+
diff --git a/cmake/SDFUtils.cmake b/cmake/SDFUtils.cmake
index d576b65..5a83283 100644
--- a/cmake/SDFUtils.cmake
+++ b/cmake/SDFUtils.cmake
@@ -93,6 +93,21 @@ endmacro()
 
 #################################################
 macro (sdf_setup_windows)
+  # Need for M_PI constant
+  add_definitions(-D_USE_MATH_DEFINES -DWINDOWS_LEAN_AND_MEAN) 
+  # Suppress warnings caused by boost
+  add_definitions(/wd4512 /wd4996)
+  # Use dynamic linking for boost
+  add_definitions(-DBOOST_ALL_DYN_LINK)
+  # And force linking to MSVC dynamic runtime
+  set(CMAKE_C_FLAGS_DEBUG "/MDd ${CMAKE_C_FLAGS_DEBUG}")
+  set(CMAKE_C_FLAGS_RELEASE "/MD ${CMAKE_C_FLAGS_RELEASE}")
+  if (MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+    # Not need if proper cmake gnerator (-G "...Win64") is passed to cmake
+    # Enable as a second measeure to workaround over bug
+    # http://www.cmake.org/Bug/print_bug_page.php?bug_id=11240 
+    set(CMAKE_SHARED_LINKER_FLAGS "/machine:x64")
+  endif()
 endmacro()
 
 #################################################
@@ -124,9 +139,10 @@ macro (sdf_build_tests)
 
     add_dependencies(${BINARY_NAME}
       gtest gtest_main sdformat
-      ${tinyxml_LIBRARIES}
       )
      
+    link_directories(${IGNITION-MATH_LIBRARY_DIRS})
+
     if (UNIX)
       target_link_libraries(${BINARY_NAME}
         libgtest.a
@@ -134,12 +150,14 @@ macro (sdf_build_tests)
         sdformat
         pthread
         ${tinyxml_LIBRARIES}
+        ${IGNITION-MATH_LIBRARIES}
       )
     elseif(WIN32)
       target_link_libraries(${BINARY_NAME}
         gtest.lib
         gtest_main.lib
         sdformat.dll
+        ${IGNITION-MATH_LIBRARIES}
       )
     endif()
  
@@ -150,7 +168,7 @@ macro (sdf_build_tests)
   
     # Check that the test produced a result and create a failure if it didn't.
     # Guards against crashed and timed out tests.
-    add_test(check_${BINARY_NAME} ${PROJECT_SOURCE_DIR}/tools/check_test_ran.py
+    add_test(check_${BINARY_NAME} python ${PROJECT_SOURCE_DIR}/tools/check_test_ran.py
              ${CMAKE_BINARY_DIR}/test_results/${BINARY_NAME}.xml)
   endforeach()
 endmacro()
diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake
index 47f6795..73942a9 100644
--- a/cmake/SearchForStuff.cmake
+++ b/cmake/SearchForStuff.cmake
@@ -1,6 +1,11 @@
 include (${sdf_cmake_dir}/FindOS.cmake)
 include (FindPkgConfig)
 
+# Detect the architecture
+include (${project_cmake_dir}/TargetArch.cmake)
+target_architecture(ARCH)
+message(STATUS "Building for arch: ${ARCH}")
+
 ########################################
 # Find Boost, if not specified manually
 if (WIN32)
@@ -17,7 +22,7 @@ if (NOT Boost_FOUND)
   BUILD_ERROR ("Boost not found. Please install thread signals system filesystem program_options regex boost version ${MIN_BOOST_VERSION} or higher.")
 endif() 
 
-if (USE_EXTERNAL_TINXYML)
+if (USE_EXTERNAL_TINYXML)
   #################################################
   # Find tinyxml. Only debian distributions package tinyxml with a pkg-config
   # Use pkg_check_modules and fallback to manual detection (needed, at least, for MacOS)
@@ -86,12 +91,11 @@ endif()
 
 ################################################
 # Find ruby executable to produce xml schemas
-# Use quiet to avoid complains from ruby headers or libs not installed
-find_package(Ruby 1.9.1 QUIET)
-if (NOT RUBY_EXECUTABLE)
+find_program(RUBY ruby)
+if (NOT RUBY)
     BUILD_ERROR ("Ruby version 1.9 is needed to build xml schemas")
 else()
-    message(STATUS "Found ruby executable: ${RUBY_EXECUTABLE}")
+    message(STATUS "Found ruby executable: ${RUBY}")
 endif()
 
 #################################################
@@ -101,3 +105,16 @@ macro (check_gcc_visibility)
   include (CheckCXXCompilerFlag)
   check_cxx_compiler_flag(-fvisibility=hidden GCC_SUPPORTS_VISIBILITY)
 endmacro()
+
+########################################
+# Find ignition math
+if (NOT DEFINED IGNITION-MATH_LIBRARY_DIRS AND NOT DEFINED IGNITION-MATH_INCLUDE_DIRS AND NOT DEFINED IGNITION-MATH_LIBRARIES)
+  set(IGNITION-MATH_REQUIRED_MAJOR_VERSION 2)
+  find_package(ignition-math${IGNITION-MATH_REQUIRED_MAJOR_VERSION} QUIET)
+  if (NOT ignition-math${IGNITION-MATH_REQUIRED_MAJOR_VERSION}_FOUND)
+    message(STATUS "Looking for ignition-math${IGNITION-MATH_REQUIRED_MAJOR_VERSION}-config.cmake - not found")
+    BUILD_ERROR ("Missing: Ignition math${IGNITION-MATH_REQUIRED_MAJOR_VERSION} library.")
+  else()
+    message(STATUS "Looking for ignition-math${IGNITION-MATH_REQUIRED_MAJOR_VERSION}-config.cmake - found")
+  endif()
+endif()
diff --git a/cmake/TargetArch.cmake b/cmake/TargetArch.cmake
new file mode 100644
index 0000000..323824b
--- /dev/null
+++ b/cmake/TargetArch.cmake
@@ -0,0 +1,158 @@
+# Copyright (c) 2012 Petroules Corporation. All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+# 
+#     Redistributions of source code must retain the above copyright notice, this
+#     list of conditions and the following disclaimer.  Redistributions in binary
+#     form must reproduce the above copyright notice, this list of conditions and
+#     the following disclaimer in the documentation and/or other materials
+#     provided with the distribution.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+# ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Based on the Qt 5 processor detection code, so should be very accurate
+# https://qt.gitorious.org/qt/qtbase/blobs/master/src/corelib/global/qprocessordetection.h
+# Currently handles arm (v5, v6, v7), x86 (32/64), ia64, and ppc (32/64)
+
+# Regarding POWER/PowerPC, just as is noted in the Qt source,
+# "There are many more known variants/revisions that we do not handle/detect."
+
+
+
+set(archdetect_c_code "
+#if defined(__arm__) || defined(__TARGET_ARCH_ARM)
+    #if defined(__ARM_ARCH_7__) \\
+        || defined(__ARM_ARCH_7A__) \\
+        || defined(__ARM_ARCH_7R__) \\
+        || defined(__ARM_ARCH_7M__) \\
+        || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 7)
+        #error cmake_ARCH armv7
+    #elif defined(__ARM_ARCH_6__) \\
+        || defined(__ARM_ARCH_6J__) \\
+        || defined(__ARM_ARCH_6T2__) \\
+        || defined(__ARM_ARCH_6Z__) \\
+        || defined(__ARM_ARCH_6K__) \\
+        || defined(__ARM_ARCH_6ZK__) \\
+        || defined(__ARM_ARCH_6M__) \\
+        || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 6)
+        #error cmake_ARCH armv6
+    #elif defined(__ARM_ARCH_5TEJ__) \\
+        || (defined(__TARGET_ARCH_ARM) && __TARGET_ARCH_ARM-0 >= 5)
+        #error cmake_ARCH armv5
+    #else
+        #error cmake_ARCH arm
+    #endif
+#elif defined(__i386) || defined(__i386__) || defined(_M_IX86)
+    #error cmake_ARCH i386
+#elif defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64)
+    #error cmake_ARCH x86_64
+#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
+    #error cmake_ARCH ia64
+#elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) \\
+      || defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC)  \\
+      || defined(_M_MPPC) || defined(_M_PPC)
+    #if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__)
+        #error cmake_ARCH ppc64
+    #else
+        #error cmake_ARCH ppc
+    #endif
+#endif
+
+#error cmake_ARCH unknown
+")
+
+# Set ppc_support to TRUE before including this file or ppc and ppc64
+# will be treated as invalid architectures since they are no longer supported by Apple
+
+function(target_architecture output_var)
+    if(APPLE AND CMAKE_OSX_ARCHITECTURES)
+        # On OS X we use CMAKE_OSX_ARCHITECTURES *if* it was set
+        # First let's normalize the order of the values
+
+        # Note that it's not possible to compile PowerPC applications if you are using
+        # the OS X SDK version 10.6 or later - you'll need 10.4/10.5 for that, so we
+        # disable it by default
+        # See this page for more information:
+        # http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4
+
+        # Architecture defaults to i386 or ppc on OS X 10.5 and earlier, depending on the CPU type detected at runtime.
+        # On OS X 10.6+ the default is x86_64 if the CPU supports it, i386 otherwise.
+
+        foreach(osx_arch ${CMAKE_OSX_ARCHITECTURES})
+            if("${osx_arch}" STREQUAL "ppc" AND ppc_support)
+                set(osx_arch_ppc TRUE)
+            elseif("${osx_arch}" STREQUAL "i386")
+                set(osx_arch_i386 TRUE)
+            elseif("${osx_arch}" STREQUAL "x86_64")
+                set(osx_arch_x86_64 TRUE)
+            elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support)
+                set(osx_arch_ppc64 TRUE)
+            else()
+                message(FATAL_ERROR "Invalid OS X arch name: ${osx_arch}")
+            endif()
+        endforeach()
+
+        # Now add all the architectures in our normalized order
+        if(osx_arch_ppc)
+            list(APPEND ARCH ppc)
+        endif()
+
+        if(osx_arch_i386)
+            list(APPEND ARCH i386)
+        endif()
+
+        if(osx_arch_x86_64)
+            list(APPEND ARCH x86_64)
+        endif()
+
+        if(osx_arch_ppc64)
+            list(APPEND ARCH ppc64)
+        endif()
+    else()
+        file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")
+
+        enable_language(C)
+
+        # Detect the architecture in a rather creative way...
+        # This compiles a small C program which is a series of ifdefs that selects a
+        # particular #error preprocessor directive whose message string contains the
+        # target architecture. The program will always fail to compile (both because
+        # file is not a valid C program, and obviously because of the presence of the
+        # #error preprocessor directives... but by exploiting the preprocessor in this
+        # way, we can detect the correct target architecture even when cross-compiling,
+        # since the program itself never needs to be run (only the compiler/preprocessor)
+        try_run(
+            run_result_unused
+            compile_result_unused
+            "${CMAKE_BINARY_DIR}"
+            "${CMAKE_BINARY_DIR}/arch.c"
+            COMPILE_OUTPUT_VARIABLE ARCH
+            CMAKE_FLAGS CMAKE_OSX_ARCHITECTURES=${CMAKE_OSX_ARCHITECTURES}
+        )
+
+        # Parse the architecture name from the compiler output
+        string(REGEX MATCH "cmake_ARCH ([a-zA-Z0-9_]+)" ARCH "${ARCH}")
+
+        # Get rid of the value marker leaving just the architecture name
+        string(REPLACE "cmake_ARCH " "" ARCH "${ARCH}")
+
+        # If we are compiling with an unknown architecture this variable should
+        # already be set to "unknown" but in the case that it's empty (i.e. due
+        # to a typo in the code), then set it to unknown
+        if (NOT ARCH)
+            set(ARCH unknown)
+        endif()
+    endif()
+
+    set(${output_var} "${ARCH}" PARENT_SCOPE)
+endfunction()
diff --git a/cmake/sdf_config.cmake.in b/cmake/sdf_config.cmake.in
index b3655a8..bd9c8d5 100644
--- a/cmake/sdf_config.cmake.in
+++ b/cmake/sdf_config.cmake.in
@@ -3,28 +3,31 @@ if (@PKG_NAME at _CONFIG_INCLUDED)
 endif()
 set(@PKG_NAME at _CONFIG_INCLUDED TRUE)
 
-list(APPEND @PKG_NAME at _INCLUDE_DIRS @CMAKE_INSTALL_PREFIX@/include/sdformat- at SDF_VERSION@)
+list(APPEND @PKG_NAME at _INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include/sdformat- at SDF_VERSION@")
 
-list(APPEND @PKG_NAME at _CFLAGS -I at CMAKE_INSTALL_PREFIX@/include/sdformat- at SDF_VERSION@)
+list(APPEND @PKG_NAME at _CFLAGS "-I at CMAKE_INSTALL_PREFIX@/include/sdformat- at SDF_VERSION@")
+if (NOT WIN32)
+  list(APPEND @PKG_NAME at _CXX_FLAGS "${@PKG_NAME at _CFLAGS} -std=c++11")
+endif()
 
 foreach(lib @PKG_LIBRARIES@)
   set(onelib "${lib}-NOTFOUND")
   find_library(onelib ${lib}
-    PATHS @CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@
+    PATHS "@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@"
     NO_DEFAULT_PATH
     )
   if(NOT onelib)
     message(FATAL_ERROR "Library '${lib}' in package @PKG_NAME@ is not installed properly")
   endif()
-  list(APPEND @PKG_NAME at _LIBRARIES ${onelib})
+  list(APPEND @PKG_NAME at _LIBRARIES "${onelib}")
 endforeach()
 
-foreach(dep @PKG_DEPENDS@)
-  if(NOT ${dep}_FOUND)
-    find_package(${dep})
-  endif()
-  list(APPEND @PKG_NAME at _INCLUDE_DIRS ${${dep}_INCLUDE_DIRS})
-  list(APPEND @PKG_NAME at _LIBRARIES ${${dep}_LIBRARIES})
-endforeach()
+find_package(ignition-math at IGNITION-MATH_REQUIRED_MAJOR_VERSION@)
+list(APPEND @PKG_NAME at _INCLUDE_DIRS ${IGNITION-MATH_INCLUDE_DIRS})
+list(APPEND @PKG_NAME at _LIBRARIES ${IGNITION-MATH_LIBRARIES})
+
+find_package(Boost)
+list(APPEND @PKG_NAME at _INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
+list(APPEND @PKG_NAME at _LIBRARIES ${Boost_LIBRARIES})
 
-list(APPEND @PKG_NAME at _LDFLAGS -L at CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@)
+list(APPEND @PKG_NAME at _LDFLAGS "-L at CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@")
diff --git a/cmake/sdformat_pc.in b/cmake/sdformat_pc.in
index 5190440..54e9627 100644
--- a/cmake/sdformat_pc.in
+++ b/cmake/sdformat_pc.in
@@ -1,10 +1,10 @@
-prefix=@CMAKE_INSTALL_PREFIX@
+prefix="@CMAKE_INSTALL_PREFIX@"
 libdir=${prefix}/@LIB_INSTALL_DIR@
 includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@
 
 Name: SDF
 Description: Robot Modeling Language (SDF)
 Version: @SDF_VERSION_FULL@
-Requires:
+Requires: ignition-math at IGNITION-MATH_REQUIRED_MAJOR_VERSION@
 Libs: -L${libdir} -lsdformat
-CFlags: -I${includedir}/sdformat- at SDF_VERSION@
+CFlags: -I${includedir}/sdformat- at SDF_VERSION@ -std=c++11
diff --git a/configure.bat b/configure.bat
index 7c248b7..677344e 100644
--- a/configure.bat
+++ b/configure.bat
@@ -1,4 +1,12 @@
 @set build_type=Release
 @if not "%1"=="" set build_type=%1
 @echo Configuring for build type %build_type%
-cmake -G "NMake Makefiles" -DBOOST_ROOT:STRING="..\boost_1_56_0" -DBOOST_LIBRARYDIR:STRING="..\boost_1_56_0\lib64-msvc-12.0" -DCMAKE_INSTALL_PREFIX="install/%build_type%" -DCMAKE_BUILD_TYPE="%build_type%" ..
+
+cmake -G "NMake Makefiles"^
+  -DBOOST_ROOT:STRING="..\boost_1_56_0"^
+  -DBOOST_LIBRARYDIR:STRING="..\boost_1_56_0\lib64-msvc-12.0"^
+  -DCMAKE_INSTALL_PREFIX="install/%build_type%"^
+  -DIGNITION-MATH_INCLUDE_DIRS:STRING="..\..\ign-math\build\install\%build_type%\include\ignition\math2"^
+  -DIGNITION-MATH_LIBRARY_DIRS:STRING="..\..\ign-math\build\install\%build_type%\lib"^
+  -DIGNITION-MATH_LIBRARIES="ignition-math2"^
+  -DCMAKE_BUILD_TYPE="%build_type%" ..
diff --git a/doc/sdf_logo.png b/doc/sdf_logo.png
index 3218631..09d36a2 100644
Binary files a/doc/sdf_logo.png and b/doc/sdf_logo.png differ
diff --git a/doc/sdf_logo.svg b/doc/sdf_logo.svg
index d6cd824..613ee18 100644
--- a/doc/sdf_logo.svg
+++ b/doc/sdf_logo.svg
@@ -9,14 +9,14 @@
    xmlns="http://www.w3.org/2000/svg"
    xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
    xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   width="178.6875"
-   height="155.46875"
-   id="svg2"
+   width="100"
+   height="100"
+   id="svg4263"
    version="1.1"
-   inkscape:version="0.48.3.1 r9886"
-   sodipodi:docname="sdf_logo.svg">
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="sdf_icon_inverted.svg">
   <defs
-     id="defs4" />
+     id="defs4265" />
   <sodipodi:namedview
      id="base"
      pagecolor="#ffffff"
@@ -24,30 +24,26 @@
      borderopacity="1.0"
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
-     inkscape:zoom="2"
-     inkscape:cx="257.26383"
-     inkscape:cy="-47.849535"
+     inkscape:zoom="2.8"
+     inkscape:cx="47.175197"
+     inkscape:cy="62.743618"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      showgrid="false"
-     showguides="true"
-     inkscape:guide-bbox="true"
-     inkscape:window-width="2560"
-     inkscape:window-height="1524"
-     inkscape:window-x="2560"
-     inkscape:window-y="24"
-     inkscape:window-maximized="1"
      fit-margin-top="0"
      fit-margin-left="0"
      fit-margin-right="0"
-     fit-margin-bottom="0">
-    <sodipodi:guide
-       orientation="0,1"
-       position="331.27232,-248.78629"
-       id="guide2997" />
-  </sodipodi:namedview>
+     fit-margin-bottom="0"
+     inkscape:window-width="536"
+     inkscape:window-height="575"
+     inkscape:window-x="1574"
+     inkscape:window-y="660"
+     inkscape:window-maximized="0"
+     showguides="true"
+     inkscape:guide-bbox="true"
+     inkscape:snap-bbox="true" />
   <metadata
-     id="metadata7">
+     id="metadata4268">
     <rdf:RDF>
       <cc:Work
          rdf:about="">
@@ -62,14 +58,11 @@
      inkscape:label="Layer 1"
      inkscape:groupmode="layer"
      id="layer1"
-     transform="translate(-8.9062509,-5.8750009)">
+     transform="translate(-240.04023,-318.89557)">
     <path
-       style="font-size:144px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#620018;fill-opacity:1;stroke:none;font-family:Sans"
-       d="m 127.28125,5.8750009 0,63.2812501 c -0.0222,-0.0197 -0.0403,-0.0428 -0.0625,-0.0625 -9.5157,-8.48427 -24.43757,-12.74989 -44.781249,-12.75 l -27.9375,0 c -12.73335,-8.91535 -30.34375,-11.55466 -30.34375,-23.875 0,-10.51199 9.4985,-13.40625 17.5625,-13.40625 7.48799,0 11.531,1.30751 18.875,4.1875 l 2,-13.25 c -6.912,-2.4479901 -14.81351,-3.5937501 -21.4375,-3.5937501 -0.567,0 -1.12868,-0.0185 -1.6875,0 -17.32333,0.57435 -30.5625001,10.0457701 -30.5625001,27.3437501 0,31.24797 4 [...]
-       id="path3036"
-       inkscape:connector-curvature="0"
-       inkscape:export-filename="/home/nkoenig/work/sdf/doc/sdf_logo.png"
-       inkscape:export-xdpi="90"
-       inkscape:export-ydpi="90" />
+       style="color:#000000;fill:#297d0d;fill-opacity:1;stroke:none;stroke-width:1px;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+       d="m 290.04023,318.89557 c -27.61418,0 -50,22.39119 -50,50.01197 0,27.44488 22.10199,49.70532 49.47343,49.98803 0.0282,-2.99127 -2.73355,-17.16035 -2.75251,-25.83193 -0.01,-4.37926 4.2938,-20.11503 1.86692,-27.05292 -23.38638,-13.46997 -14.18196,-24.15492 -30.30158,-28.56116 16.82978,0.23212 15.50922,-3.54115 28.62614,7.46948 4.55933,4.09843 4.33928,9.2997 4.21254,17.88365 -0.11042,7.47939 0.69674,7.79948 0.93346,13.43068 2.12912,-0.92082 7.28788,-2.61118 10.6989,-5.55422 5.19706, [...]
+       id="path4464"
+       inkscape:connector-curvature="0" />
   </g>
 </svg>
diff --git a/include/sdf/CMakeLists.txt b/include/sdf/CMakeLists.txt
index 2caae58..7e32833 100644
--- a/include/sdf/CMakeLists.txt
+++ b/include/sdf/CMakeLists.txt
@@ -4,6 +4,7 @@ set (headers
   Assert.hh
   Console.hh
   Converter.hh
+  Element.hh
   Exception.hh
   Param.hh
   parser.hh
diff --git a/include/sdf/Console.hh b/include/sdf/Console.hh
index e781779..cbc85a5 100644
--- a/include/sdf/Console.hh
+++ b/include/sdf/Console.hh
@@ -47,6 +47,8 @@ namespace sdf
   #define sdferr (sdf::Console::Instance()->ColorMsg("Error", \
         __FILE__, __LINE__, 31))
 
+  class ConsolePrivate;
+
   /// \brief Message, error, warning, and logging functionality
   class SDFORMAT_VISIBLE Console
   {
@@ -64,19 +66,7 @@ namespace sdf
       /// \param[in] _rhs Content to be logged.
       /// \return Reference to myself.
       public: template <class T>
-        ConsoleStream &operator<<(const T &_rhs)
-        {
-          if (this->stream)
-            *this->stream << _rhs;
-
-          if (Console::Instance()->logFileStream.is_open())
-          {
-            Console::Instance()->logFileStream << _rhs;
-            Console::Instance()->logFileStream.flush();
-          }
-
-          return *this;
-        }
+        ConsoleStream &operator<<(const T &_rhs);
 
       /// \brief Print a prefix to both terminal and log file.
       /// \param[in] _lbl Text label
@@ -85,23 +75,7 @@ namespace sdf
       /// \param[in] _color Color to make the label.  Used only on terminal.
       public: void Prefix(const std::string &_lbl,
                           const std::string &_file,
-                          unsigned int _line, int _color)
-        {
-          int index = _file.find_last_of("/") + 1;
-
-          if (this->stream)
-          {
-            *this->stream << "\033[1;" << _color << "m" << _lbl << " [" <<
-              _file.substr(index , _file.size() - index)<< ":" << _line <<
-              "]\033[0m ";
-          }
-
-          if (Console::Instance()->logFileStream.is_open())
-          {
-            Console::Instance()->logFileStream << _lbl << " [" <<
-              _file.substr(index , _file.size() - index)<< ":" << _line << "] ";
-          }
-        }
+                          unsigned int _line, int _color);
 
       /// \brief The ostream to log to; can be NULL.
       private: std::ostream *stream;
@@ -136,18 +110,43 @@ namespace sdf
                                const std::string &file,
                                unsigned int line);
 
+    private: ConsolePrivate *dataPtr;
+  };
+
+  /// \internal
+  /// \brief Private data for Console
+  class ConsolePrivate
+  {
+    /// \brief Constructor
+    public: ConsolePrivate() : msgStream(&std::cerr), logStream(NULL) {}
+
     /// \brief message stream
-    private: ConsoleStream msgStream;
+    public: Console::ConsoleStream msgStream;
 
     /// \brief log stream
-    private: ConsoleStream logStream;
+    public: Console::ConsoleStream logStream;
 
     /// \brief logfile stream
-    private: std::ofstream logFileStream;
-
-    /// \brief Pointer to myself
-    private: static boost::shared_ptr<Console> myself;
+    public: std::ofstream logFileStream;
   };
+
+  ///////////////////////////////////////////////
+  template <class T>
+  Console::ConsoleStream &Console::ConsoleStream::operator<<(const T &_rhs)
+  {
+    if (this->stream)
+      *this->stream << _rhs;
+
+    if (Console::Instance()->dataPtr->logFileStream.is_open())
+    {
+      Console::Instance()->dataPtr->logFileStream << _rhs;
+      Console::Instance()->dataPtr->logFileStream.flush();
+    }
+
+    return *this;
+  }
+
+
   /// \}
 }
 #endif
diff --git a/include/sdf/SDFImpl.hh b/include/sdf/Element.hh
similarity index 64%
copy from include/sdf/SDFImpl.hh
copy to include/sdf/Element.hh
index 457aa57..51cc52e 100644
--- a/include/sdf/SDFImpl.hh
+++ b/include/sdf/Element.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright 2012 Open Source Robotics Foundation
+ * Copyright 2015 Open Source Robotics Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,31 +14,43 @@
  * limitations under the License.
  *
 */
-#ifndef _SDFIMPL_HH_
-#define _SDFIMPL_HH_
+#ifndef _SDF_ELEMENT_HH_
+#define _SDF_ELEMENT_HH_
 
-#include <vector>
 #include <string>
+#include <vector>
 #include <boost/shared_ptr.hpp>
 #include <boost/enable_shared_from_this.hpp>
 
-#include "sdf/Types.hh"
 #include "sdf/Param.hh"
 #include "sdf/system_util.hh"
 
+/// \todo Remove this diagnositic push/pop in version 5
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#include "sdf/Types.hh"
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
+
+#ifdef _WIN32
+// Disable warning C4251 which is triggered by
+// boost::enable_shared_from_this
+#pragma warning(push)
+#pragma warning(disable: 4251)
+#endif
+
 /// \ingroup sdf_parser
 /// \brief namespace for Simulation Description Format parser
 namespace sdf
 {
-  class SDFORMAT_VISIBLE SDF;
+  class ElementPrivate;
   class SDFORMAT_VISIBLE Element;
 
-  /// \def SDFPtr
-  /// \bried boost shared pointer to SDF
-  typedef boost::shared_ptr<SDF> SDFPtr;
-
   /// \def ElementPtr
-  /// \bried boost shared pointer to an SDF Element
+  /// \brief boost shared pointer to an SDF Element
   typedef boost::shared_ptr<Element> ElementPtr;
 
   /// \def ElementPtr_V
@@ -48,31 +60,6 @@ namespace sdf
   /// \addtogroup sdf
   /// \{
 
-  /// \brief Find the absolute path of a file.
-  /// \param[in] _filename Name of the file to find.
-  /// \param[in] _searchLocalPath True to search for the file in the current
-  /// working directory.
-  /// \param[in] _useCallback True to find a file based on a registered
-  /// callback if the file is not found via the normal mechanism.
-  SDFORMAT_VISIBLE
-  std::string findFile(const std::string &_filename,
-                       bool _searchLocalPath = true,
-                       bool _useCallback = false);
-
-  /// \brief Associate paths to a URI.
-  /// Example paramters: "model://", "/usr/share/models:~/.gazebo/models"
-  /// \param[in] _uri URI that will be mapped to _path
-  /// \param[in] _path Colon separated set of paths.
-  SDFORMAT_VISIBLE
-  void addURIPath(const std::string &_uri, const std::string &_path);
-
-  /// \brief Set the callback to use when SDF can't find a file.
-  /// The callback should return a complete path to the requested file, or
-  /// and empty string if the file was not found in the callback.
-  /// \param[in] _cb The callback function.
-  SDFORMAT_VISIBLE
-  void setFindCallback(boost::function<std::string (const std::string &)> _cb);
-
   /// \class Element Element.hh sdf/sdf.hh
   /// \brief SDF Element class
   class SDFORMAT_VISIBLE Element :
@@ -191,13 +178,13 @@ namespace sdf
     public: ParamPtr GetAttribute(const std::string &_key);
 
     /// \brief Get the number of attributes
-    public: unsigned int GetAttributeCount() const;
+    public: size_t GetAttributeCount() const;
 
     /// \brief Get an attribute using an index
     public: ParamPtr GetAttribute(unsigned int _index) const;
 
     /// \brief Get the number of element descriptions
-    public: unsigned int GetElementDescriptionCount() const;
+    public: size_t GetElementDescriptionCount() const;
 
     /// \brief Get an element description using an index
     public: ElementPtr GetElementDescription(unsigned int _index) const;
@@ -216,65 +203,17 @@ namespace sdf
     /// \brief Get the param of the elements value
     public: ParamPtr GetValue();
 
-    public: bool GetValueBool(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: int GetValueInt(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: float GetValueFloat(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: double GetValueDouble(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: unsigned int GetValueUInt(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: char GetValueChar(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: std::string GetValueString(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Vector3 GetValueVector3(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Vector2d GetValueVector2d(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Quaternion GetValueQuaternion(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Pose GetValuePose(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Color GetValueColor(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Time GetValueTime(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
+    /// \brief Get the element value/attribute as a boost::any.
+    /// \param[in] _key The key of the attribute. If empty, get the value of
+    /// the element. Defaults to empty.
+    /// \return The element as a boost::any.
+    public: boost::any GetAny(const std::string &_key = "");
 
     public: template<typename T>
-            T Get(const std::string &_key = "")
-            {
-              T result = T();
-
-              if (_key.empty() && this->value)
-                this->value->Get<T>(result);
-              else if (!_key.empty())
-              {
-                ParamPtr param = this->GetAttribute(_key);
-                if (param)
-                  param->Get(result);
-                else if (this->HasElement(_key))
-                  result = this->GetElementImpl(_key)->Get<T>();
-                else if (this->HasElementDescription(_key))
-                  result = this->GetElementDescription(_key)->Get<T>();
-                else
-                  sdferr << "Unable to find value for key[" << _key << "]\n";
-              }
-              return result;
-            }
+            T Get(const std::string &_key = "");
 
     public: template<typename T>
-            bool Set(const T &_value)
-            {
-              if (this->value)
-              {
-                this->value->Set(_value);
-                return true;
-              }
-              return false;
-            }
+            bool Set(const T &_value);
 
     public: bool HasElement(const std::string &_name) const;
 
@@ -312,6 +251,8 @@ namespace sdf
     /// \brief Add a new element description
     public: void AddElementDescription(ElementPtr _elem);
 
+    public: ElementPtr GetElementImpl(const std::string &_name) const;
+
     private: void ToString(const std::string &_prefix,
                            std::ostringstream &_out) const;
 
@@ -320,52 +261,85 @@ namespace sdf
                  const std::string &_type, const std::string &_defaultValue,
                  bool _required, const std::string &_description="");
 
-    public: ElementPtr GetElementImpl(const std::string &_name) const;
 
-    private: std::string name;
-    private: std::string required;
-    private: std::string description;
-    private: bool copyChildren;
+    /// \brief Private data pointer
+    private: ElementPrivate *dataPtr;
+  };
+
+  /// \internal
+  /// \brief Private data for Element
+  class ElementPrivate
+  {
+    /// \brief Element name
+    public: std::string name;
+
+    /// \brief True if element is required
+    public: std::string required;
+
+    /// \brief Element description
+    public: std::string description;
+
+    /// \brief True if element's children should be copied.
+    public: bool copyChildren;
 
-    private: ElementPtr parent;
+    /// \brief Element's parent
+    public: ElementPtr parent;
 
     // Attributes of this element
-    private: Param_V attributes;
+    public: Param_V attributes;
 
     // Value of this element
-    private: ParamPtr value;
+    public: ParamPtr value;
 
     // The existing child elements
-    private: ElementPtr_V elements;
+    public: ElementPtr_V elements;
 
     // The possible child elements
-    private: ElementPtr_V elementDescriptions;
+    public: ElementPtr_V elementDescriptions;
 
     /// name of the include file that was used to create this element
-    private: std::string includeFilename;
+    public: std::string includeFilename;
   };
 
-
-  /// \brief Base SDF class
-  class SDFORMAT_VISIBLE SDF
+  ///////////////////////////////////////////////
+  template<typename T>
+  T Element::Get(const std::string &_key)
   {
-    public: SDF();
-    /// \brief Destructor
-    public: ~SDF();
-    public: void PrintDescription();
-    public: void PrintValues();
-    public: void PrintWiki();
-    public: void PrintDoc();
-    public: void Write(const std::string &_filename);
-    public: std::string ToString() const;
-
-    /// \brief Set SDF values from a string
-    public: void SetFromString(const std::string &_sdfData);
-
-    public: ElementPtr root;
-
-    public: static std::string version;
-  };
+    T result = T();
+
+    if (_key.empty() && this->dataPtr->value)
+      this->dataPtr->value->Get<T>(result);
+    else if (!_key.empty())
+    {
+      ParamPtr param = this->GetAttribute(_key);
+      if (param)
+        param->Get(result);
+      else if (this->HasElement(_key))
+        result = this->GetElementImpl(_key)->Get<T>();
+      else if (this->HasElementDescription(_key))
+        result = this->GetElementDescription(_key)->Get<T>();
+      else
+        sdferr << "Unable to find value for key[" << _key << "]\n";
+    }
+    return result;
+  }
+
+  ///////////////////////////////////////////////
+  template<typename T>
+  bool Element::Set(const T &_value)
+  {
+    if (this->dataPtr->value)
+    {
+      this->dataPtr->value->Set(_value);
+      return true;
+    }
+    return false;
+  }
   /// \}
 }
+
+#ifdef _WIN32
+#pragma warning(pop)
+#endif
+
 #endif
diff --git a/include/sdf/Exception.hh b/include/sdf/Exception.hh
index c6b191a..a2cb55e 100644
--- a/include/sdf/Exception.hh
+++ b/include/sdf/Exception.hh
@@ -20,6 +20,7 @@
 
 #include <iostream>
 #include <sstream>
+#include <stdint.h>
 #include <string>
 
 #include "sdf/system_util.hh"
@@ -35,6 +36,8 @@ namespace sdf
     throwStream << msg << std::endl << std::flush;\
     throw sdf::Exception(__FILE__, __LINE__, throwStream.str()); }
 
+  class ExceptionPrivate;
+
   /// \class Exception Exception.hh common/common.hh
   /// \brief Class for generating exceptions
   class SDFORMAT_VISIBLE Exception
@@ -47,8 +50,8 @@ namespace sdf
     /// \param[in] _line Line number where the error occurred
     /// \param[in] _msg Error message
     public: Exception(const char *_file,
-                        int _line,
-                        std::string _msg);
+                      int64_t _line,
+                      std::string _msg);
 
     /// \brief Destructor
     public: virtual ~Exception();
@@ -64,14 +67,6 @@ namespace sdf
     /// \brief Print the exception to std out.
     public: void Print() const;
 
-    /// \brief The error function
-    private: std::string file;
-
-    /// \brief Line the error occured on
-    private: int line;
-
-    /// \brief The error string
-    private: std::string str;
 
     /// \brief stream insertion operator for Gazebo Error
     /// \param[in] _out the output stream
@@ -81,6 +76,9 @@ namespace sdf
             {
               return _out << _err.GetErrorStr();
             }
+
+    /// \brief Private data pointer.
+    private: ExceptionPrivate *dataPtr;
   };
 
   /// \class InternalError Exception.hh common/common.hh
@@ -96,7 +94,7 @@ namespace sdf
     /// \param[in] _file File name
     /// \param[in] _line Line number where the error occurred
     /// \param[in] _msg Error message
-    public: InternalError(const char *_file, int _line,
+    public: InternalError(const char *_file, int64_t _line,
                           const std::string _msg);
 
     /// \brief Destructor
@@ -118,7 +116,7 @@ namespace sdf
     /// \param[in] _function Function where assertion failed
     /// \param[in] _msg Function where assertion failed
     public: AssertionInternalError(const char *_file,
-                                   int _line,
+                                   int64_t _line,
                                    const std::string _expr,
                                    const std::string _function,
                                    const std::string _msg = "");
diff --git a/include/sdf/ExceptionPrivate.hh b/include/sdf/ExceptionPrivate.hh
new file mode 100644
index 0000000..99981e2
--- /dev/null
+++ b/include/sdf/ExceptionPrivate.hh
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2015 Open Source Robotics Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifndef _SDF_EXCEPTION_PRIVATE_HH_
+#define _SDF_EXCEPTION_PRIVATE_HH_
+
+#include <string>
+#include <stdint.h>
+
+namespace sdf
+{
+  /// \internal
+  /// \brief Private data for Exception
+  class ExceptionPrivate
+  {
+    /// \brief The error function
+    public: std::string file;
+
+    /// \brief Line the error occured on
+    public: int64_t line;
+
+    /// \brief The error string
+    public: std::string str;
+  };
+}
+#endif
+
diff --git a/include/sdf/Param.hh b/include/sdf/Param.hh
index 598ed2a..e8ae059 100644
--- a/include/sdf/Param.hh
+++ b/include/sdf/Param.hh
@@ -18,24 +18,35 @@
 #ifndef _SDF_PARAM_HH_
 #define _SDF_PARAM_HH_
 
-#ifndef Q_MOC_RUN  // See: https://bugreports.qt-project.org/browse/QTBUG-22829
-# include <boost/lexical_cast.hpp>
-# include <boost/bind.hpp>
-# include <boost/algorithm/string.hpp>
-# include <boost/variant.hpp>
-# include <boost/any.hpp>
-# include <boost/function.hpp>
-# include <boost/shared_ptr.hpp>
+// See: https://bugreports.qt-project.org/browse/QTBUG-22829
+#ifndef Q_MOC_RUN
+  #include <boost/lexical_cast.hpp>
+  #include <boost/bind.hpp>
+  #include <boost/algorithm/string.hpp>
+  #include <boost/any.hpp>
+  #include <boost/shared_ptr.hpp>
+  #include <boost/variant.hpp>
+  #include <boost/function.hpp>
 #endif
 
 #include <typeinfo>
 #include <string>
 #include <vector>
+#include <ignition/math.hh>
 
 #include "sdf/Console.hh"
-#include "sdf/Types.hh"
 #include "sdf/system_util.hh"
 
+/// \todo Remove this diagnositic push/pop in version 5
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#include "sdf/Types.hh"
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
+
 namespace sdf
 {
   class SDFORMAT_VISIBLE Param;
@@ -48,6 +59,9 @@ namespace sdf
   /// \brief vector or boost shared_ptrs to a Param
   typedef std::vector<ParamPtr> Param_V;
 
+  /// \internal
+  class ParamPrivate;
+
   /// \class Param Param.hh sdf/sdf.hh
   /// \brief A parameter class
   class SDFORMAT_VISIBLE Param
@@ -83,11 +97,19 @@ namespace sdf
 
     /// \brief Get the key value.
     /// \return The key.
-    public: const std::string &GetKey() const {return this->key;}
+    public: const std::string &GetKey() const;
 
     /// \brief Get the type of the value stored.
     /// \return The std::type_info.
-    public: const std::type_info &GetType() const;
+    /// \deprecated GetType is unstable. Use IsType().
+    /// \sa IsType
+    public: const std::type_info &GetType() const SDF_DEPRECATED(4.0);
+
+    /// \brief Return true if the param is a particular type
+    /// \return True if the type held by this Param matches the Type
+    /// template parameter.
+    public: template<typename Type>
+            bool IsType() const;
 
     /// \brief Get the type name value.
     /// \return The type name.
@@ -95,11 +117,11 @@ namespace sdf
 
     /// \brief Return whether the parameter is required.
     /// \return True if the parameter is required.
-    public: bool GetRequired() const {return this->required;}
+    public: bool GetRequired() const;
 
     /// \brief Return true if the parameter has been set.
     /// \return True if the parameter has been set.
-    public: bool GetSet() const {return this->set;}
+    public: bool GetSet() const;
 
     /// \brief Clone the parameter.
     /// \return A new parameter that is the clone of this.
@@ -108,8 +130,8 @@ namespace sdf
     /// \brief Set the update function. The updateFunc will be used to
     /// set the parameter's value when Param::Update is called.
     /// \param[in] _updateFunc Function pointer to an update function.
-    public: template<typename T> void SetUpdateFunc(T _updateFunc)
-            {this->updateFunc = _updateFunc;}
+    public: template<typename T>
+            void SetUpdateFunc(T _updateFunc);
 
     /// \brief Set the parameter's value using the updateFunc.
     /// \sa Param::SetUpdateFunc
@@ -122,87 +144,32 @@ namespace sdf
     /// \param[in] _value The value to set the parameter to.
     /// \return True if the value was successfully set.
     public: template<typename T>
-            bool Set(const T &_value)
-            {
-              try
-              {
-                this->SetFromString(boost::lexical_cast<std::string>(_value));
-              }
-              catch(...)
-              {
-                sdferr << "Unable to set parameter[" << this->key << "]."
-                       << "Type type used must have a stream input and output"
-                       << "operator, which allow boost::lexical_cast to"
-                       << "function properly.\n";
-                return false;
-              }
-              return true;
-            }
+            bool Set(const T &_value);
+
+    /// \brief Get the value of the parameter as a boost::any.
+    /// \param[out] _anyVal The boost::any object to set.
+    /// \return True if successfully set _anyVal, false otherwise.
+    public: bool GetAny(boost::any &_anyVal) const;
 
     /// \brief Get the value of the parameter.
     /// \param[out] _value The value of the parameter.
     /// \return True if parameter was successfully cast to the value type
     /// passed in.
     public: template<typename T>
-            bool Get(T &_value)
-            {
-              try
-              {
-                if (typeid(T) == typeid(bool) && this->typeName == "string")
-                {
-                  std::string strValue =
-                    boost::lexical_cast<std::string>(this->value);
-                  if (strValue == "true" || strValue  == "1")
-                    _value = boost::lexical_cast<T>("1");
-                  else
-                    _value = boost::lexical_cast<T>("0");
-                }
-                else
-                {
-                  _value = boost::lexical_cast<T>(this->value);
-                }
-              }
-              catch(...)
-              {
-                sdferr << "Unable to convert parameter[" << this->key << "] "
-                       << "whose type is[" << this->typeName << "], to "
-                       << "type[" << typeid(T).name() << "]\n";
-                return false;
-              }
-              return true;
-            }
+            bool Get(T &_value) const;
 
     /// \brief Get the default value of the parameter.
     /// \param[out] _value The default value of the parameter.
     /// \return True if parameter was successfully cast to the value type
     /// passed in.
     public: template<typename T>
-            bool GetDefault(T &_value)
-            {
-              try
-              {
-                _value = boost::lexical_cast<T>(this->defaultValue);
-              }
-              catch(...)
-              {
-                sdferr << "Unable to convert parameter[" << this->key << "] "
-                       << "whose type is[" << this->typeName << "], to "
-                       << "type[" << typeid(T).name() << "]\n";
-                return false;
-              }
-              return true;
-            }
+            bool GetDefault(T &_value) const;
 
     /// \brief Equal operator. Set's the value and default value from the
     /// provided Param.
     /// \param[in] _param The parameter to set values from.
     /// \return *This
-    public: Param &operator =(const Param &_param)
-            {
-              this->value = _param.value;
-              this->defaultValue  = _param.defaultValue;
-              return *this;
-            }
+    public: Param &operator=(const Param &_param);
 
     /// \brief Set the description of the parameter.
     /// \param[in] _desc New description for the parameter.
@@ -226,62 +193,174 @@ namespace sdf
     /// \brief Initialize the value. This is called from the constructor.
     /// \param[in] _value Value to set the parameter to.
     private: template<typename T>
-            void Init(const std::string &_value)
-            {
-              try
-              {
-                this->value = boost::lexical_cast<T>(_value);
-              }
-              catch(...)
-              {
-                if (this->typeName == "bool")
-                {
-                  std::string strValue = _value;
-                  boost::algorithm::to_lower(strValue);
-                  if (strValue == "true" || strValue == "1")
-                    this->value = true;
-                  else
-                    this->value = false;
-                }
-                else
-                  sdferr << "Unable to init parameter value from string["
-                    << _value << "]\n";
-              }
-
-              this->defaultValue = this->value;
-              this->set = false;
-            }
+             void Init(const std::string &_value);
+
+    /// \brief Private data
+    private: ParamPrivate *dataPtr;
+  };
 
+  /// \internal
+  /// \brief Private data for the param class
+  class ParamPrivate
+  {
     /// \brief Key value
-    private: std::string key;
+    public: std::string key;
 
     /// \brief True if the parameter is required.
-    private: bool required;
+    public: bool required;
 
     /// \brief True if the parameter is set.
-    private: bool set;
+    public: bool set;
 
     //// \brief Name of the type.
-    private: std::string typeName;
+    public: std::string typeName;
 
     /// \brief Description of the parameter.
-    private: std::string description;
+    public: std::string description;
 
     /// \brief Update function pointer.
-    private: boost::function<boost::any ()> updateFunc;
+    public: boost::function<boost::any ()> updateFunc;
 
+/// \todo Remove this diagnositic push/pop in version 5
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
     /// \def ParamVariant
     /// \briead Variant type def.
-    private: typedef boost::variant<bool, char, std::string, int,
-               unsigned int, double, float, sdf::Vector3, sdf::Vector2i,
-               sdf::Vector2d, sdf::Quaternion, sdf::Pose, sdf::Color,
-               sdf::Time> ParamVariant;
+    public: typedef boost::variant<bool, char, std::string, int, uint64_t,
+               unsigned int, double, float, sdf::Time, sdf::Color,
+               sdf::Vector3, sdf::Vector2i, sdf::Vector2d,
+               sdf::Quaternion, sdf::Pose,
+               ignition::math::Vector3d, ignition::math::Vector2i,
+               ignition::math::Vector2d, ignition::math::Quaterniond,
+               ignition::math::Pose3d> ParamVariant;
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
 
     /// \brief This parameter's value
-    protected: ParamVariant value;
+    public: ParamVariant value;
 
     /// \brief This parameter's default value
-    protected: ParamVariant defaultValue;
+    public: ParamVariant defaultValue;
   };
+
+  ///////////////////////////////////////////////
+  template<typename T>
+  void Param::SetUpdateFunc(T _updateFunc)
+  {
+    this->dataPtr->updateFunc = _updateFunc;
+  }
+
+  ///////////////////////////////////////////////
+  template<typename T>
+  bool Param::Set(const T &_value)
+  {
+    try
+    {
+      this->SetFromString(boost::lexical_cast<std::string>(_value));
+    }
+    catch(...)
+    {
+      sdferr << "Unable to set parameter["
+             << this->dataPtr->key << "]."
+             << "Type type used must have a stream input and output"
+             << "operator, which allow boost::lexical_cast to"
+             << "function properly.\n";
+      return false;
+    }
+    return true;
+  }
+
+  ///////////////////////////////////////////////
+  template<typename T>
+  bool Param::Get(T &_value) const
+  {
+    try
+    {
+      if (typeid(T) == typeid(bool) &&
+          this->dataPtr->typeName == "string")
+      {
+        std::string strValue =
+          boost::lexical_cast<std::string>(this->dataPtr->value);
+        if (strValue == "true" || strValue  == "1")
+          _value = boost::lexical_cast<T>("1");
+        else
+          _value = boost::lexical_cast<T>("0");
+      }
+      else
+      {
+        _value = boost::lexical_cast<T>(this->dataPtr->value);
+      }
+    }
+    catch(...)
+    {
+      sdferr << "Unable to convert parameter["
+             << this->dataPtr->key << "] "
+             << "whose type is["
+             << this->dataPtr->typeName << "], to "
+             << "type[" << typeid(T).name() << "]\n";
+      return false;
+    }
+    return true;
+  }
+
+  ///////////////////////////////////////////////
+  template<typename T>
+  bool Param::GetDefault(T &_value) const
+  {
+    try
+    {
+      _value = boost::lexical_cast<T>(this->dataPtr->defaultValue);
+    }
+    catch(...)
+    {
+      sdferr << "Unable to convert parameter["
+             << this->dataPtr->key << "] "
+             << "whose type is["
+             << this->dataPtr->typeName << "], to "
+             << "type[" << typeid(T).name() << "]\n";
+      return false;
+    }
+    return true;
+  }
+
+  ///////////////////////////////////////////////
+  template<typename T>
+  void Param::Init(const std::string &_value)
+  {
+    try
+    {
+      this->dataPtr->value = boost::lexical_cast<T>(_value);
+    }
+    catch(...)
+    {
+      if (this->dataPtr->typeName == "bool")
+      {
+        std::string strValue = _value;
+        boost::algorithm::to_lower(strValue);
+        if (strValue == "true" || strValue == "1")
+          this->dataPtr->value = true;
+        else
+          this->dataPtr->value = false;
+      }
+      else
+      {
+        sdferr << "Unable to init parameter value from string["
+               << _value << "]\n";
+      }
+    }
+
+    this->dataPtr->defaultValue = this->dataPtr->value;
+    this->dataPtr->set = false;
+  }
+
+  ///////////////////////////////////////////////
+  template<typename Type>
+  bool Param::IsType() const
+  {
+    return this->dataPtr->value.type() == typeid(Type);
+  }
 }
 #endif
diff --git a/include/sdf/SDFExtension.hh b/include/sdf/SDFExtension.hh
new file mode 100644
index 0000000..c076aeb
--- /dev/null
+++ b/include/sdf/SDFExtension.hh
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2015 Open Source Robotics Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+*/
+
+#ifndef _SDFORMAT_SDFEXTENSION_HH_
+#define _SDFORMAT_SDFEXTENSION_HH_
+
+#include <tinyxml.h>
+#include <string>
+#include <vector>
+#include <ignition/math/Pose3.hh>
+
+/// \todo Remove this diagnositic push/pop in version 5
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#include "sdf/Types.hh"
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
+
+namespace sdf
+{
+  /// \internal
+  /// \brief A class for holding sdf extension elements in urdf
+  class SDFExtension
+  {
+    /// \brief Constructor
+    public: SDFExtension();
+
+    /// \brief Copy constructor
+    /// \param[in] _ge SDFExtension to copy.
+    public: SDFExtension(const SDFExtension &_ge);
+
+    /// \brief Destructor
+    public: virtual ~SDFExtension() = default;
+
+    // for reducing fixed joints and removing links
+    public: std::string oldLinkName;
+    public: ignition::math::Pose3d reductionTransform;
+
+    // visual
+    public: std::string material;
+    public: std::vector<boost::shared_ptr<TiXmlElement> > visual_blobs;
+
+    // body, default off
+    public: bool setStaticFlag;
+    public: bool gravity;
+    public: bool isDampingFactor;
+    public: double dampingFactor;
+    public: bool isMaxContacts;
+    public: int maxContacts;
+    public: bool isMaxVel;
+    public: double maxVel;
+    public: bool isMinDepth;
+    public: double minDepth;
+    public: bool selfCollide;
+
+    // geom, contact dynamics
+    public: bool isMu1, isMu2, isKp, isKd;
+    public: double mu1, mu2, kp, kd;
+    public: std::string fdir1;
+    public: bool isLaserRetro;
+    public: double laserRetro;
+
+    // joint, joint limit dynamics
+    public: bool isStopCfm, isStopErp, isInitialJointPosition, isFudgeFactor;
+    public: double stopCfm, stopErp, initialJointPosition, fudgeFactor;
+    public: bool isProvideFeedback;
+    public: bool provideFeedback;
+    public: bool isImplicitSpringDamper;
+    public: bool implicitSpringDamper;
+    public: bool isStopKp, isStopKd;
+    public: double stopKp, stopKd;
+
+    // blobs into body or robot
+    public: std::vector<boost::shared_ptr<TiXmlElement> > blobs;
+
+    friend class SDFORMAT_VISIBLE URDF2SDF;
+  };
+}
+#endif
diff --git a/include/sdf/SDFImpl.hh b/include/sdf/SDFImpl.hh
index 457aa57..2db9918 100644
--- a/include/sdf/SDFImpl.hh
+++ b/include/sdf/SDFImpl.hh
@@ -17,34 +17,33 @@
 #ifndef _SDFIMPL_HH_
 #define _SDFIMPL_HH_
 
-#include <vector>
 #include <string>
 #include <boost/shared_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
 
-#include "sdf/Types.hh"
 #include "sdf/Param.hh"
+#include "sdf/Element.hh"
 #include "sdf/system_util.hh"
 
+/// \todo Remove this diagnositic push/pop in version 5
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#include "sdf/Types.hh"
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
+
 /// \ingroup sdf_parser
 /// \brief namespace for Simulation Description Format parser
 namespace sdf
 {
   class SDFORMAT_VISIBLE SDF;
-  class SDFORMAT_VISIBLE Element;
 
   /// \def SDFPtr
-  /// \bried boost shared pointer to SDF
+  /// \brief boost shared pointer to SDF
   typedef boost::shared_ptr<SDF> SDFPtr;
 
-  /// \def ElementPtr
-  /// \bried boost shared pointer to an SDF Element
-  typedef boost::shared_ptr<Element> ElementPtr;
-
-  /// \def ElementPtr_V
-  /// \brief Vector of ElementPtr
-  typedef std::vector< ElementPtr > ElementPtr_V;
-
   /// \addtogroup sdf
   /// \{
 
@@ -73,279 +72,6 @@ namespace sdf
   SDFORMAT_VISIBLE
   void setFindCallback(boost::function<std::string (const std::string &)> _cb);
 
-  /// \class Element Element.hh sdf/sdf.hh
-  /// \brief SDF Element class
-  class SDFORMAT_VISIBLE Element :
-    public boost::enable_shared_from_this<Element>
-  {
-    /// \brief Constructor.
-    public: Element();
-
-    /// \brief Destructor.
-    public: virtual ~Element();
-
-    /// \brief Create a copy of this Element.
-    /// \return A copy of this Element.
-    public: boost::shared_ptr<Element> Clone() const;
-
-    /// \brief Copy values from an Element.
-    /// \param[in] _elem Element to copy value from.
-    public: void Copy(const ElementPtr _elem);
-
-    /// \brief Get a pointer to this Element's parent.
-    /// \return Pointer to this Element's parent, NULL if there is no
-    /// parent.
-    public: ElementPtr GetParent() const;
-
-    /// \brief Set the parent of this Element.
-    /// \param[in] _parent Paren for this element.
-    public: void SetParent(const ElementPtr _parent);
-
-    /// \brief Set the name of the Element.
-    /// \param[in] _name The new name for this Element.
-    public: void SetName(const std::string &_name);
-
-    /// \brief Get the Element's name.
-    /// \return The name of this Element.
-    public: const std::string &GetName() const;
-
-    /// \brief Set the requirement type.
-    /// \param[in] _req Requirement type for this element:
-    /// 0: Not required
-    /// 1: Exactly one element is required
-    /// +: One or more elements are required
-    /// *: Zero or more elements are required.
-    public: void SetRequired(const std::string &_req);
-
-    /// \brief Get the requirement string.
-    /// \return The requirement string.
-    /// \sa Element::SetRequired
-    public: const std::string &GetRequired() const;
-
-    /// \brief Set whether this element should copy its child elements
-    /// during parsing.
-    /// \param[in] _value True to copy Element's children.
-    public: void SetCopyChildren(bool _value);
-
-    /// \brief Return true if this Element's child elements should be copied
-    /// during parsing.
-    /// \return True to copy child elements during parsing.
-    public: bool GetCopyChildren() const;
-
-    /// \brief Output Element's description to stdout.
-    /// \param[in] _prefix String value to prefix to the output.
-    public: void PrintDescription(const std::string &_prefix);
-
-    /// \brief Output Element's values to stdout.
-    /// \param[in] _prefix String value to prefix to the output.
-    public: void PrintValues(std::string _prefix);
-
-    public: void PrintWiki(std::string _prefix);
-
-    /// \brief Helper function for SDF::PrintDoc
-    ///
-    /// This generates the SDF html documentation.
-    /// \param[out] _html Accumulated HTML for output.
-    /// \param[in] _spacing Amount of spacing for this element.
-    /// \param[in] _index Unique index for this element.
-    public: void PrintDocLeftPane(std::string &_html,
-                                  int _spacing, int &_index);
-
-    /// \brief Helper function for SDF::PrintDoc
-    ///
-    /// This generates the SDF html documentation.
-    /// \param[out] _html Accumulated HTML for output
-    /// \param[in] _spacing Amount of spacing for this element.
-    public: void PrintDocRightPane(std::string &_html,
-                                  int _spacing, int &_index);
-
-    /// \brief Convert the element values to a string representation.
-    /// \param[in] _prefix String value to prefix to the output.
-    /// \return The string representation.
-    public: std::string ToString(const std::string &_prefix) const;
-
-    /// \brief Add an attribute value.
-    /// \param[in] _key Key value.
-    /// \param[in] _type Type of data the attribute will hold.
-    /// \param[in] _defaultValue Default value for the attribute.
-    /// \param[in] _required Requirement string. \as Element::SetRequired.
-    /// \param[in] _description A text description of the attribute.
-    public: void AddAttribute(const std::string &_key,
-                              const std::string &_type,
-                              const std::string &_defaultvalue,
-                              bool _required,
-                              const std::string &_description="");
-
-    /// \brief Add a value to this Element.
-    /// \param[in] _type Type of data the attribute will hold.
-    /// \param[in] _defaultValue Default value for the attribute.
-    /// \param[in] _required Requirement string. \as Element::SetRequired.
-    /// \param[in] _description A text description of the attribute.
-    public: void AddValue(const std::string &_type,
-                          const std::string &_defaultValue, bool _required,
-                          const std::string &_description="");
-
-    /// \brief Get the param of an attribute.
-    /// \param[in] _key the name of the attribute
-    /// \return The parameter attribute value. NULL if the key is invalid.
-    public: ParamPtr GetAttribute(const std::string &_key);
-
-    /// \brief Get the number of attributes
-    public: unsigned int GetAttributeCount() const;
-
-    /// \brief Get an attribute using an index
-    public: ParamPtr GetAttribute(unsigned int _index) const;
-
-    /// \brief Get the number of element descriptions
-    public: unsigned int GetElementDescriptionCount() const;
-
-    /// \brief Get an element description using an index
-    public: ElementPtr GetElementDescription(unsigned int _index) const;
-
-    /// \brief Get an element descriptio using a key
-    public: ElementPtr GetElementDescription(const std::string &_key) const;
-
-    /// \brief Return true if an element description exists
-    public: bool HasElementDescription(const std::string &_name);
-
-    public: bool HasAttribute(const std::string &_key);
-
-    /// \brief Return true if the attribute was set (i.e. not default value)
-    public: bool GetAttributeSet(const std::string &_key);
-
-    /// \brief Get the param of the elements value
-    public: ParamPtr GetValue();
-
-    public: bool GetValueBool(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: int GetValueInt(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: float GetValueFloat(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: double GetValueDouble(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: unsigned int GetValueUInt(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: char GetValueChar(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: std::string GetValueString(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Vector3 GetValueVector3(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Vector2d GetValueVector2d(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Quaternion GetValueQuaternion(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Pose GetValuePose(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Color GetValueColor(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-    public: sdf::Time GetValueTime(
-                const std::string &_key = "") SDF_DEPRECATED(1.4);
-
-    public: template<typename T>
-            T Get(const std::string &_key = "")
-            {
-              T result = T();
-
-              if (_key.empty() && this->value)
-                this->value->Get<T>(result);
-              else if (!_key.empty())
-              {
-                ParamPtr param = this->GetAttribute(_key);
-                if (param)
-                  param->Get(result);
-                else if (this->HasElement(_key))
-                  result = this->GetElementImpl(_key)->Get<T>();
-                else if (this->HasElementDescription(_key))
-                  result = this->GetElementDescription(_key)->Get<T>();
-                else
-                  sdferr << "Unable to find value for key[" << _key << "]\n";
-              }
-              return result;
-            }
-
-    public: template<typename T>
-            bool Set(const T &_value)
-            {
-              if (this->value)
-              {
-                this->value->Set(_value);
-                return true;
-              }
-              return false;
-            }
-
-    public: bool HasElement(const std::string &_name) const;
-
-    public: ElementPtr GetElement(const std::string &_name) const;
-    public: ElementPtr GetFirstElement() const;
-
-    public: ElementPtr GetNextElement(const std::string &_name = "") const;
-
-    public: ElementPtr GetElement(const std::string &_name);
-    public: ElementPtr AddElement(const std::string &_name);
-    public: void InsertElement(ElementPtr _elem);
-
-    /// \brief Remove this element from its parent.
-    public: void RemoveFromParent();
-
-    /// \brief Remove a child element.
-    /// \param[in] _child Pointer to the child to remove.
-    public: void RemoveChild(ElementPtr _child);
-
-    /// \brief Remove all child elements.
-    public: void ClearElements();
-
-    public: void Update();
-    public: void Reset();
-
-    public: void SetInclude(const std::string &_filename);
-    public: std::string GetInclude() const;
-
-    /// \brief Get a text description of the element
-    public: std::string GetDescription() const;
-
-    /// \brief Set a text description for the element
-    public: void SetDescription(const std::string &_desc);
-
-    /// \brief Add a new element description
-    public: void AddElementDescription(ElementPtr _elem);
-
-    private: void ToString(const std::string &_prefix,
-                           std::ostringstream &_out) const;
-
-
-    private: boost::shared_ptr<Param> CreateParam(const std::string &_key,
-                 const std::string &_type, const std::string &_defaultValue,
-                 bool _required, const std::string &_description="");
-
-    public: ElementPtr GetElementImpl(const std::string &_name) const;
-
-    private: std::string name;
-    private: std::string required;
-    private: std::string description;
-    private: bool copyChildren;
-
-    private: ElementPtr parent;
-
-    // Attributes of this element
-    private: Param_V attributes;
-
-    // Value of this element
-    private: ParamPtr value;
-
-    // The existing child elements
-    private: ElementPtr_V elements;
-
-    // The possible child elements
-    private: ElementPtr_V elementDescriptions;
-
-    /// name of the include file that was used to create this element
-    private: std::string includeFilename;
-  };
-
-
   /// \brief Base SDF class
   class SDFORMAT_VISIBLE SDF
   {
@@ -362,9 +88,41 @@ namespace sdf
     /// \brief Set SDF values from a string
     public: void SetFromString(const std::string &_sdfData);
 
-    public: ElementPtr root;
+    /// \brief Get a pointer to the root element
+    /// \return Pointer to the root element
+    public: ElementPtr Root() const;
+
+    /// \brief Set the root pointer
+    /// \param[in] _root Root element
+    public: void Root(const ElementPtr _root);
+
+    /// \brief Get the version
+    /// \return The version as a string
+    public: static std::string Version();
 
-    public: static std::string version;
+    /// \brief Set the version string
+    /// \param[in] _version SDF version string.
+    public: static void Version(const std::string &_version);
+
+// \todo Remove this warning push/pop after sdformat 4.0
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4251)
+#endif
+
+    /// \brief Deprecated.
+    /// \sa ElementPtr Root()
+    /// \sa void Root(const ElementPtr _root)
+    public: ElementPtr root SDF_DEPRECATED(4.0);
+
+    /// \brief Deprecated.
+    /// \sa std::string Version()
+    /// \sa Version(const std::string &_version)
+    public: static std::string version SDF_DEPRECATED(4.0);
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
   };
   /// \}
 }
diff --git a/include/sdf/Types.hh b/include/sdf/Types.hh
index 6d3b404..c51fae9 100644
--- a/include/sdf/Types.hh
+++ b/include/sdf/Types.hh
@@ -20,6 +20,10 @@
 
 #include <algorithm>
 #include <cmath>
+#include <cstdint>
+#include <sstream>
+#include <vector>
+#include <boost/shared_ptr.hpp>
 
 #include "sdf/system_util.hh"
 
@@ -36,6 +40,13 @@
 
 namespace sdf
 {
+  /// \brief Windows equivalent of getEnv.
+  /// Should only be called when using windows.
+  /// \param[in] _name Name of the environment variable to get.
+  /// \return Environment variable contents, or NULL on error.
+  SDFORMAT_VISIBLE
+  const char *winGetEnv(const char *_name);
+
   /// \brief check if two values are equal, within a tolerance
   /// \param[in] _a the first value
   /// \param[in] _b the second value
@@ -55,8 +66,8 @@ namespace sdf
     /// \param[in] _g Green value (range 0 to 1
     /// \param[in] _b Blue value (range 0 to 1
     /// \param[in] _a Alpha value (0=transparent, 1=opaque)
-    public: Color(double _r = 0.0, double _g = 0.0,
-                double _b = 0.0, double _a = 1.0)
+    public: Color(float _r = 0.0f, float _g = 0.0f,
+                  float _b = 0.0f, float _a = 1.0f)
             : r(_r), g(_g), b(_b), a(_a) {}
 
     /// \brief Stream insertion operator
@@ -105,6 +116,7 @@ namespace sdf
     public: float a;
   };
 
+  /// \deprecated Use ignition::math::Vector2i
   /// \brief Generic integer x, y vector
   class SDFORMAT_VISIBLE Vector2i
   {
@@ -151,8 +163,9 @@ namespace sdf
 
     /// \brief y data
     public: int y;
-  };
+  } SDF_DEPRECATED(4.0);
 
+  /// \deprecated Use ignition::math::Vector2d
   /// \brief Generic double x, y vector
   class SDFORMAT_VISIBLE Vector2d
   {
@@ -201,8 +214,9 @@ namespace sdf
 
     /// \brief y data
     public: double y;
-  };
+  } SDF_DEPRECATED(4.0);
 
+  /// \deprecated Use ignition::math::Vector3d
   /// \brief The Vector3 class represents the generic vector containing 3
   ///        elements.  Since it's commonly used to keep coordinate system
   ///        related information, its elements are labeled by x, y, z.
@@ -304,8 +318,9 @@ namespace sdf
 
     /// \brief z Data
     public: double z;
-  };
+  } SDF_DEPRECATED(4.0);
 
+  /// \deprecated Use ignition::math::Quaterniond
   /// \brief A quaternion class
   class SDFORMAT_VISIBLE Quaternion
   {
@@ -576,8 +591,9 @@ namespace sdf
 
     /// \brief w data
     public: double w;
-  };
+  } SDF_DEPRECATED(4.0);
 
+  /// \deprecated Use ignition::math::Pose3d
   /// \brief Encapsulates a position and rotation in three space
   class SDFORMAT_VISIBLE Pose
   {
@@ -674,7 +690,7 @@ namespace sdf
 
     /// \brief Orientation data
     public: Quaternion rot;
-  };
+  } SDF_DEPRECATED(4.0);
 
   /// \brief A Time class, can be used to hold wall- or sim-time.
   /// stored as sec and nano-sec.
diff --git a/include/sdf/parser_urdf.hh b/include/sdf/parser_urdf.hh
index 3ee86f8..f92111b 100644
--- a/include/sdf/parser_urdf.hh
+++ b/include/sdf/parser_urdf.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright 2012 Open Source Robotics Foundation
+ * Copyright 2012-2015 Open Source Robotics Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -14,165 +14,17 @@
  * limitations under the License.
  *
 */
-#ifndef URDF2SDF_HH
-#define URDF2SDF_HH
+#ifndef _SDFORMAT_URDF2SDF_HH_
+#define _SDFORMAT_URDF2SDF_HH_
 
 #include <tinyxml.h>
-#include <vector>
 #include <string>
-#include <map>
 
-#include "sdf/Types.hh"
 #include "sdf/Console.hh"
 #include "sdf/system_util.hh"
 
 namespace sdf
 {
-  /// \addtogroup sdf
-  /// \{
-
-  /// \brief A class for holding sdf extension elements in urdf
-  class SDFORMAT_VISIBLE SDFExtension
-  {
-    private: SDFExtension()
-    {
-      material.clear();
-      visual_blobs.clear();
-      setStaticFlag = false;
-      gravity = true;
-      isDampingFactor = false;
-      isMaxContacts = false;
-      isMaxVel = false;
-      isMinDepth = false;
-      fdir1.clear();
-      isMu1 = false;
-      isMu2 = false;
-      isKp = false;
-      isKd = false;
-      selfCollide = false;
-      isLaserRetro = false;
-      isStopCfm = false;
-      isStopErp = false;
-      isStopKp = false;
-      isStopKd = false;
-      isInitialJointPosition = false;
-      isFudgeFactor = false;
-      isProvideFeedback = false;
-      isImplicitSpringDamper = false;
-      blobs.clear();
-
-      dampingFactor = 0;
-      maxContacts = 0;
-      maxVel = 0;
-      minDepth = 0;
-      mu1 = 0;
-      mu2 = 0;
-      kp = 100000000;
-      kd = 1;
-      laserRetro = 101;
-      stopCfm = 0;
-      stopErp = 0.1;
-      stopKp = 100000000;
-      stopKd = 1;
-      initialJointPosition = 0;
-      fudgeFactor = 1;
-
-      provideFeedback = false;
-      implicitSpringDamper = false;
-    };
-
-    private: SDFExtension(const SDFExtension &ge)
-    {
-      material = ge.material;
-      visual_blobs = ge.visual_blobs;
-      setStaticFlag = ge.setStaticFlag;
-      gravity = ge.gravity;
-      isDampingFactor = ge.isDampingFactor;
-      isMaxContacts = ge.isMaxContacts;
-      isMaxVel = ge.isMaxVel;
-      isMinDepth = ge.isMinDepth;
-      fdir1 = ge.fdir1;
-      isMu1 = ge.isMu1;
-      isMu2 = ge.isMu2;
-      isKp = ge.isKp;
-      isKd = ge.isKd;
-      selfCollide = ge.selfCollide;
-      isLaserRetro = ge.isLaserRetro;
-      isStopKp = ge.isStopKp;
-      isStopKd = ge.isStopKd;
-      isStopCfm = ge.isStopCfm;
-      isStopErp = ge.isStopErp;
-      isInitialJointPosition = ge.isInitialJointPosition;
-      isFudgeFactor = ge.isFudgeFactor;
-      isProvideFeedback = ge.isProvideFeedback;
-      isImplicitSpringDamper = ge.isImplicitSpringDamper;
-      provideFeedback = ge.provideFeedback;
-      implicitSpringDamper = ge.implicitSpringDamper;
-      oldLinkName = ge.oldLinkName;
-      reductionTransform = ge.reductionTransform;
-      blobs = ge.blobs;
-
-      dampingFactor = ge.dampingFactor;
-      maxContacts = ge.maxContacts;
-      maxVel = ge.maxVel;
-      minDepth = ge.minDepth;
-      mu1 = ge.mu1;
-      mu2 = ge.mu2;
-      kp = ge.kp;
-      kd = ge.kd;
-      laserRetro = ge.laserRetro;
-      stopKp = ge.stopKp;
-      stopKd = ge.stopKd;
-      stopCfm = ge.stopCfm;
-      stopErp = ge.stopErp;
-      initialJointPosition = ge.initialJointPosition;
-      fudgeFactor = ge.fudgeFactor;
-    };
-
-    // for reducing fixed joints and removing links
-    public: std::string oldLinkName;
-    public: sdf::Pose reductionTransform;
-
-    // visual
-    public: std::string material;
-    public: std::vector<boost::shared_ptr<TiXmlElement> > visual_blobs;
-
-    // body, default off
-    public: bool setStaticFlag;
-    public: bool gravity;
-    public: bool isDampingFactor;
-    public: double dampingFactor;
-    public: bool isMaxContacts;
-    public: int maxContacts;
-    public: bool isMaxVel;
-    public: double maxVel;
-    public: bool isMinDepth;
-    public: double minDepth;
-    public: bool selfCollide;
-
-    // geom, contact dynamics
-    public: bool isMu1, isMu2, isKp, isKd;
-    public: double mu1, mu2, kp, kd;
-    public: std::string fdir1;
-    public: bool isLaserRetro;
-    public: double laserRetro;
-
-    // joint, joint limit dynamics
-    public: bool isStopCfm, isStopErp, isInitialJointPosition, isFudgeFactor;
-    public: double stopCfm, stopErp, initialJointPosition, fudgeFactor;
-    public: bool isProvideFeedback;
-    public: bool provideFeedback;
-    public: bool isImplicitSpringDamper;
-    public: bool implicitSpringDamper;
-    private: bool isStopKp, isStopKd;
-    private: double stopKp, stopKd;
-
-    // blobs into body or robot
-    public: std::vector<boost::shared_ptr<TiXmlElement> > blobs;
-
-    friend class SDFORMAT_VISIBLE URDF2SDF;
-  };
-
   /// \brief URDF to SDF converter
   class SDFORMAT_VISIBLE URDF2SDF
   {
@@ -210,7 +62,5 @@ namespace sdf
     /// list extensions for debugging
     private: void ListSDFExtensions(const std::string &_reference);
   };
-  /// \}
 }
-
 #endif
diff --git a/sdf/1.2/geometry.sdf b/sdf/1.2/geometry.sdf
index f6941f8..e47b142 100644
--- a/sdf/1.2/geometry.sdf
+++ b/sdf/1.2/geometry.sdf
@@ -81,7 +81,7 @@
     </element>
 
     <element name="texture" required="*">
-      <description>The heightmap can contain multiple textures. The order of the texture matters. The first texture will appear at the lowest height, and the last texture at the highest hieght. Use blend to control the hieight thresholds and fade between textures.</description>
+      <description>The heightmap can contain multiple textures. The order of the texture matters. The first texture will appear at the lowest height, and the last texture at the highest height. Use blend to control the height thresholds and fade between textures.</description>
       <element name="size" type="double" default="10" required="1">
         <description>Size of the applied texture in meters.</description>
       </element>
diff --git a/sdf/1.3/geometry.sdf b/sdf/1.3/geometry.sdf
index 2e74e19..1d510cc 100644
--- a/sdf/1.3/geometry.sdf
+++ b/sdf/1.3/geometry.sdf
@@ -89,7 +89,7 @@
     </element>
 
     <element name="texture" required="*">
-      <description>The heightmap can contain multiple textures. The order of the texture matters. The first texture will appear at the lowest height, and the last texture at the highest hieght. Use blend to control the hieight thresholds and fade between textures.</description>
+      <description>The heightmap can contain multiple textures. The order of the texture matters. The first texture will appear at the lowest height, and the last texture at the highest height. Use blend to control the height thresholds and fade between textures.</description>
       <element name="size" type="double" default="10" required="1">
         <description>Size of the applied texture in meters.</description>
       </element>
diff --git a/sdf/1.4/heightmap_shape.sdf b/sdf/1.4/heightmap_shape.sdf
index 7973b73..087f4ca 100644
--- a/sdf/1.4/heightmap_shape.sdf
+++ b/sdf/1.4/heightmap_shape.sdf
@@ -14,7 +14,7 @@
   </element>
 
   <element name="texture" required="*">
-    <description>The heightmap can contain multiple textures. The order of the texture matters. The first texture will appear at the lowest height, and the last texture at the highest hieght. Use blend to control the hieight thresholds and fade between textures.</description>
+    <description>The heightmap can contain multiple textures. The order of the texture matters. The first texture will appear at the lowest height, and the last texture at the highest height. Use blend to control the height thresholds and fade between textures.</description>
     <element name="size" type="double" default="10" required="1">
       <description>Size of the applied texture in meters.</description>
     </element>
diff --git a/sdf/1.4/surface.sdf b/sdf/1.4/surface.sdf
index b31d73f..5e9519f 100644
--- a/sdf/1.4/surface.sdf
+++ b/sdf/1.4/surface.sdf
@@ -54,6 +54,11 @@
     <element name="collide_without_contact_bitmask" type="unsigned int" default="1" required="0">
       <description>Bitmask for collision filtering when collide_without_contact is on </description>
     </element>    
+
+    <element name="collide_bitmask" type="unsigned int" default="1" required="0">
+      <description>Bitmask for collision filtering. This will override collide_without_contact</description>
+    </element>
+
     <element name="ode" required="0">
       <description>ODE contact parameters</description>
       <element name="soft_cfm" type="double" default="0" required="0">
diff --git a/sdf/1.5/CMakeLists.txt b/sdf/1.5/CMakeLists.txt
index 12ffd8f..1a85835 100644
--- a/sdf/1.5/CMakeLists.txt
+++ b/sdf/1.5/CMakeLists.txt
@@ -1,5 +1,6 @@
 set (sdfs
   actor.sdf
+  altimeter.sdf
   audio_source.sdf
   audio_sink.sdf
   box_shape.sdf
@@ -57,7 +58,7 @@ foreach(FIL ${sdfs})
 
   add_custom_command(
     OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${FIL_WE}.xsd"
-    COMMAND ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
+    COMMAND ${RUBY} ${CMAKE_SOURCE_DIR}/tools/xmlschema.rb
     ARGS -s ${CMAKE_CURRENT_SOURCE_DIR} -i ${ABS_FIL} -o ${CMAKE_CURRENT_BINARY_DIR}
     DEPENDS ${ABS_FIL}
     COMMENT "Running xml schema compiler on ${FIL}"
diff --git a/sdf/1.5/altimeter.sdf b/sdf/1.5/altimeter.sdf
new file mode 100644
index 0000000..66ddee5
--- /dev/null
+++ b/sdf/1.5/altimeter.sdf
@@ -0,0 +1,18 @@
+<element name="altimeter" required="0">
+  <description>These elements are specific to an altimeter sensor.</description>
+
+  <element name="vertical_position" required="0">
+    <description>
+      Noise parameters for vertical position
+    </description>
+    <include filename="noise.sdf" required="0"/>
+  </element>
+
+  <element name="vertical_velocity" required="0">
+    <description>
+      Noise parameters for vertical velocity
+    </description>
+    <include filename="noise.sdf" required="0"/>
+  </element>
+
+</element>
diff --git a/sdf/1.5/gui.sdf b/sdf/1.5/gui.sdf
index 6bfc5a9..cfe6389 100644
--- a/sdf/1.5/gui.sdf
+++ b/sdf/1.5/gui.sdf
@@ -17,6 +17,10 @@
       <description></description>
     </element>
 
+    <element name="projection_type" type="string" default="perspective" required="0">
+      <description>Set the type of projection for the camera. Valid values are "perspective" and "orthographic".</description>
+    </element>
+
     <element name="pose" type="pose" default="0 0 0 0 0 0" required="0">
       <description></description>
     </element>
diff --git a/sdf/1.5/heightmap_shape.sdf b/sdf/1.5/heightmap_shape.sdf
index 7973b73..087f4ca 100644
--- a/sdf/1.5/heightmap_shape.sdf
+++ b/sdf/1.5/heightmap_shape.sdf
@@ -14,7 +14,7 @@
   </element>
 
   <element name="texture" required="*">
-    <description>The heightmap can contain multiple textures. The order of the texture matters. The first texture will appear at the lowest height, and the last texture at the highest hieght. Use blend to control the hieight thresholds and fade between textures.</description>
+    <description>The heightmap can contain multiple textures. The order of the texture matters. The first texture will appear at the lowest height, and the last texture at the highest height. Use blend to control the height thresholds and fade between textures.</description>
     <element name="size" type="double" default="10" required="1">
       <description>Size of the applied texture in meters.</description>
     </element>
diff --git a/sdf/1.5/joint.sdf b/sdf/1.5/joint.sdf
index 7ad35aa..978e2c7 100644
--- a/sdf/1.5/joint.sdf
+++ b/sdf/1.5/joint.sdf
@@ -7,7 +7,16 @@
   </attribute>
 
   <attribute name="type" type="string" default="__default__" required="1">
-    <description>The type of joint, which must be one of the following: (revolute) a hinge joint that rotates on a single axis with either a fixed or continuous range of motion, (gearbox) geared revolute joints, (revolute2) same as two revolute joints connected in series, (prismatic) a sliding joint that slides along an axis with a limited range specified by upper and lower limits, (ball) a ball and socket joint, (universal), like a ball joint, but constrains one degree of freedom, (pist [...]
+    <description>The type of joint, which must be one of the following:
+      (revolute) a hinge joint that rotates on a single axis with either a fixed or continuous range of motion,
+      (gearbox) geared revolute joints,
+      (revolute2) same as two revolute joints connected in series,
+      (prismatic) a sliding joint that slides along an axis with a limited range specified by upper and lower limits,
+      (ball) a ball and socket joint,
+      (screw) a single degree of freedom joint with coupled sliding and rotational motion,
+      (universal) like a ball joint, but constrains one degree of freedom,
+      (fixed) a joint with zero degrees of freedom that rigidly connects two links.
+    </description>
   </attribute>
 
   <element name="parent" type="string" default="__default__" required="1">
@@ -34,7 +43,7 @@
     <description>Parameter for screw joints.</description>
   </element>
 
-  <element name="axis" required="1">
+  <element name="axis" required="0">
     <description>
       Parameters related to the axis of rotation for revolute joints,
       the axis of translation for prismatic joints.
diff --git a/sdf/1.5/link.sdf b/sdf/1.5/link.sdf
index 980b7c1..e00d8ee 100644
--- a/sdf/1.5/link.sdf
+++ b/sdf/1.5/link.sdf
@@ -11,7 +11,7 @@
   </element>
 
   <element name="self_collide" type="bool" default="false" required="0">
-    <description>If true, the link can collide with other links in the model.</description>
+    <description>If true, the link can collide with other links in the model. Two links within a model will collide if link1.self_collide OR link2.self_collide. Links connected by a joint will never collide.</description>
   </element>
 
   <element name="kinematic" type="bool" default="false" required="0">
diff --git a/sdf/1.5/magnetometer.sdf b/sdf/1.5/magnetometer.sdf
index 8cce8d7..2f3bfee 100644
--- a/sdf/1.5/magnetometer.sdf
+++ b/sdf/1.5/magnetometer.sdf
@@ -1,4 +1,21 @@
 <element name="magnetometer" required="0">
   <description>These elements are specific to a Magnetometer sensor.</description>
-  <include filename="noise.sdf" required="0"/>
+  <element name="x" required="0">
+    <description>
+      Parameters related to the body-frame X axis of the magnetometer
+    </description>
+    <include filename="noise.sdf" required="0"/>
+  </element>
+  <element name="y" required="0">
+    <description>
+      Parameters related to the body-frame Y axis of the magnetometer
+    </description>
+    <include filename="noise.sdf" required="0"/>
+  </element>
+  <element name="z" required="0">
+    <description>
+      Parameters related to the body-frame Z axis of the magnetometer
+    </description>
+    <include filename="noise.sdf" required="0"/>
+  </element>
 </element>
\ No newline at end of file
diff --git a/sdf/1.5/model.sdf b/sdf/1.5/model.sdf
index 273dca6..3c07330 100644
--- a/sdf/1.5/model.sdf
+++ b/sdf/1.5/model.sdf
@@ -10,6 +10,10 @@
     <description>If set to true, the model is immovable. Otherwise the model is simulated in the dynamics engine.</description>
   </element>
 
+  <element name="self_collide" type="bool" default="false" required="0">
+    <description>If set to true, all links in the model will collide with each other (except those connected by a joint). Can be overridden by the link or collision element self_collide property. Two links within a model will collide if link1.self_collide OR link2.self_collide. Links connected by a joint will never collide.</description>
+  </element>
+
   <element name="allow_auto_disable" type="bool" default="true" required="0">
     <description>Allows a model to auto-disable, which is means the physics engine can skip updating the model when the model is at rest. This parameter is only used by models with no joints.</description>
   </element>
diff --git a/sdf/1.5/physics.sdf b/sdf/1.5/physics.sdf
index dfde6a5..7814b98 100644
--- a/sdf/1.5/physics.sdf
+++ b/sdf/1.5/physics.sdf
@@ -2,6 +2,14 @@
 <element name="physics" required="1">
   <description>The physics tag specifies the type and properties of the dynamics engine.</description>
 
+  <attribute name="name" type="string" default="default_physics" required="0">
+    <description>The name of this set of physics parameters.</description>
+  </attribute>
+
+  <attribute name="default" type="bool" default="false" required="0">
+    <description>If true, this physics element is set as the default physics profile for the world. If multiple default physics elements exist, the first element marked as default is chosen. If no default physics element exists, the first physics element is chosen.</description>
+  </attribute>
+
   <attribute name="type" type="string" default="ode" required="1">
     <description>The type of the dynamics engine. Current options are ode, bullet, simbody and rtql8.  Defaults to ode if left unspecified.</description>
   </attribute>
diff --git a/sdf/1.5/scene.sdf b/sdf/1.5/scene.sdf
index c4a4e84..0cdb52e 100644
--- a/sdf/1.5/scene.sdf
+++ b/sdf/1.5/scene.sdf
@@ -75,4 +75,8 @@
     <description>Enable/disable the grid</description>
   </element>
 
+  <element name="origin_visual" type="bool" default="true" required="0">
+    <description>Show/hide world origin indicator</description>
+  </element>
+
 </element> <!-- End Scene -->
diff --git a/sdf/1.5/sensor.sdf b/sdf/1.5/sensor.sdf
index 324a04a..ee1ac66 100644
--- a/sdf/1.5/sensor.sdf
+++ b/sdf/1.5/sensor.sdf
@@ -8,6 +8,7 @@
 
   <attribute name="type" type="string" default="__default__" required="1">
     <description>The type name of the sensor. By default, SDF supports types
+                  altimeter,
                   camera,
                   contact,
                   depth,
@@ -46,6 +47,7 @@
   </element>
 
   <include filename="plugin.sdf" required="*"/>
+  <include filename="altimeter.sdf" required="0"/>
   <include filename="camera.sdf" required="0"/>
   <include filename="contact.sdf" required="0"/>
   <include filename="gps.sdf" required="0"/>
diff --git a/sdf/1.5/state.sdf b/sdf/1.5/state.sdf
index 01d3c63..99d2718 100644
--- a/sdf/1.5/state.sdf
+++ b/sdf/1.5/state.sdf
@@ -17,6 +17,10 @@
     <description>Real time stamp of the state [seconds nanoseconds]</description>
   </element>
 
+  <element name="iterations" type="uint64_t" default="0" required="1">
+    <description>Number of simulation iterations.</description>
+  </element>
+
   <element name="insertions" required="0">
     <description>A list of new model names</description>
     <include filename="model.sdf" required="+"/>
diff --git a/sdf/1.5/surface.sdf b/sdf/1.5/surface.sdf
index b31d73f..5d28752 100644
--- a/sdf/1.5/surface.sdf
+++ b/sdf/1.5/surface.sdf
@@ -54,6 +54,11 @@
     <element name="collide_without_contact_bitmask" type="unsigned int" default="1" required="0">
       <description>Bitmask for collision filtering when collide_without_contact is on </description>
     </element>    
+
+    <element name="collide_bitmask" type="unsigned int" default="65535" required="0">
+      <description>Bitmask for collision filtering. This will override collide_without_contact</description>
+    </element>
+
     <element name="ode" required="0">
       <description>ODE contact parameters</description>
       <element name="soft_cfm" type="double" default="0" required="0">
diff --git a/sdf/1.5/visual.sdf b/sdf/1.5/visual.sdf
index ea7d96a..bf807ad 100644
--- a/sdf/1.5/visual.sdf
+++ b/sdf/1.5/visual.sdf
@@ -22,6 +22,14 @@
     <description>The reference frame of the visual element, relative to the reference frame of the link.</description>
   </element>
 
+  <element name="meta" required="0">
+    <description>Optional meta information for the visual. The information contained within this element should be used to provide additional feedback to an end user.</description>
+
+    <element name="layer" type="int" default="0" required="0">
+      <description>The layer in which this visual is displayed. The layer number is useful for programs, such as Gazebo, that put visuals in different layers for enhanced visualization.</description>
+    </element>
+  </element>
+
   <include filename="material.sdf" required="0"/>
   <include filename="geometry.sdf" required="1"/>
   <include filename="plugin.sdf" required="*"/>
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index cdb71d9..0659265 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -2,11 +2,13 @@ include (${sdf_cmake_dir}/SDFUtils.cmake)
 
 include_directories(
   ${Boost_INCLUDE_DIR}
+  ${IGNITION-MATH_INCLUDE_DIRS}
 )
 
 link_directories(
   ${PROJECT_BINARY_DIR}/test
   ${Boost_LIBRARY_DIR}
+  ${IGNITION-MATH_LIBRARY_DIRS}
 )
 
 if (USE_EXTERNAL_URDF)
@@ -17,11 +19,14 @@ set (sources
   Assert.cc
   Console.cc
   Converter.cc
+  Element.cc
   Exception.cc
   parser.cc
   parser_urdf.cc
   Param.cc
   SDF.cc
+  SDFExtension.cc
+  Types.cc
 )
 
 include_directories(${Boost_INCLUDE_DIRS})
@@ -59,13 +64,14 @@ set (gtest_sources
   SDF_TEST.cc
   Console_TEST.cc
   Converter_TEST.cc
+  Exception_TEST.cc
   parser_urdf_TEST.cc
   Param_TEST.cc
 )
 sdf_build_tests(${gtest_sources})
 
 sdf_add_library(sdformat ${sources})
-target_link_libraries(sdformat ${Boost_LIBRARIES})
+target_link_libraries(sdformat ${Boost_LIBRARIES} ${IGNITION-MATH_LIBRARIES})
 
 if (USE_EXTERNAL_TINYXML)
   link_directories(${tinyxml_LIBRARY_DIRS})
diff --git a/src/Console.cc b/src/Console.cc
index 8a1f6e6..cf4b14e 100644
--- a/src/Console.cc
+++ b/src/Console.cc
@@ -15,27 +15,42 @@
  *
  */
 
+#include <mutex>
 #include <string.h>
 #include <stdlib.h>
 #include <sstream>
 #include <boost/filesystem.hpp>
-#include <boost/thread/mutex.hpp>
+
+/// \todo Remove this diagnositic push/pop in version 5
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#include "sdf/Types.hh"
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
 
 #include "sdf/Console.hh"
 
 using namespace sdf;
 
-boost::shared_ptr<Console> Console::myself;
-static boost::mutex g_instance_mutex;
+/// Static pointer to the console.
+static boost::shared_ptr<Console> myself;
+static std::mutex g_instance_mutex;
 
 //////////////////////////////////////////////////
 Console::Console()
-  : msgStream(&std::cerr), logStream(NULL)
+  : dataPtr(new ConsolePrivate)
 {
   // Set up the file that we'll log to.
   try
   {
-    char* home = getenv("HOME");
+#ifndef _WIN32
+    char *home = getenv("HOME");
+#else
+    const char *home = sdf::winGetEnv("HOMEPATH");
+#endif
     if (!home)
     {
       sdfwarn << "No HOME defined in the environment. Will not log.";
@@ -54,7 +69,7 @@ Console::Console()
       sdfwarn << logDir << " exists but is not a directory.  Will not log.";
       return;
     }
-    this->logFileStream.open(logFile.string().c_str(), std::ios::out);
+    this->dataPtr->logFileStream.open(logFile.string().c_str(), std::ios::out);
   }
   catch(const boost::filesystem::filesystem_error& e)
   {
@@ -71,7 +86,7 @@ Console::~Console()
 //////////////////////////////////////////////////
 boost::shared_ptr<Console> Console::Instance()
 {
-  boost::mutex::scoped_lock lock(g_instance_mutex);
+  std::lock_guard<std::mutex> lock(g_instance_mutex);
   if (!myself)
     myself.reset(new Console());
 
@@ -88,8 +103,8 @@ Console::ConsoleStream &Console::ColorMsg(const std::string &lbl,
                                           const std::string &file,
                                           unsigned int line, int color)
 {
-  this->msgStream.Prefix(lbl, file, line, color);
-  return this->msgStream;
+  this->dataPtr->msgStream.Prefix(lbl, file, line, color);
+  return this->dataPtr->msgStream;
 }
 
 //////////////////////////////////////////////////
@@ -97,6 +112,28 @@ Console::ConsoleStream &Console::Log(const std::string &lbl,
                                      const std::string &file,
                                      unsigned int line)
 {
-  this->logStream.Prefix(lbl, file, line, 0);
-  return this->logStream;
+  this->dataPtr->logStream.Prefix(lbl, file, line, 0);
+  return this->dataPtr->logStream;
+}
+
+//////////////////////////////////////////////////
+void Console::ConsoleStream::Prefix(const std::string &_lbl,
+                          const std::string &_file,
+                          unsigned int _line, int _color)
+{
+  size_t index = _file.find_last_of("/") + 1;
+
+  if (this->stream)
+  {
+    *this->stream << "\033[1;" << _color << "m" << _lbl << " [" <<
+      _file.substr(index , _file.size() - index)<< ":" << _line <<
+      "]\033[0m ";
+  }
+
+  if (Console::Instance()->dataPtr->logFileStream.is_open())
+  {
+    Console::Instance()->dataPtr->logFileStream << _lbl << " [" <<
+      _file.substr(index , _file.size() - index)<< ":" << _line << "] ";
+  }
 }
+
diff --git a/src/Converter_TEST.cc b/src/Converter_TEST.cc
index 46190b3..7c34c50 100644
--- a/src/Converter_TEST.cc
+++ b/src/Converter_TEST.cc
@@ -45,16 +45,16 @@ TEST(Converter, MoveElemElem)
   TiXmlDocument xmlDoc;
   xmlDoc.Parse(xmlString.c_str());
   TiXmlElement *childElem =  xmlDoc.FirstChildElement();
-  EXPECT_TRUE(childElem);
+  EXPECT_TRUE(childElem != NULL);
   EXPECT_EQ(childElem->ValueStr(), "elemA");
   childElem =  childElem->FirstChildElement();
-  EXPECT_TRUE(childElem);
+  EXPECT_TRUE(childElem != NULL);
   EXPECT_EQ(childElem->ValueStr(), "elemB");
   childElem =  childElem->FirstChildElement();
-  EXPECT_TRUE(childElem);
+  EXPECT_TRUE(childElem != NULL);
   EXPECT_EQ(childElem->ValueStr(), "elemC");
   childElem =  childElem->FirstChildElement();
-  EXPECT_TRUE(childElem);
+  EXPECT_TRUE(childElem != NULL);
   EXPECT_EQ(childElem->ValueStr(), "elemD");
 
   // Test moving from elem to elem
@@ -77,8 +77,8 @@ TEST(Converter, MoveElemElem)
   convertedElem =  convertedElem->FirstChildElement();
   ASSERT_TRUE(convertedElem != NULL);
   EXPECT_EQ(convertedElem->ValueStr(), "elemB");
-  EXPECT_TRUE(convertedElem->FirstChildElement("elemC"));
-  EXPECT_TRUE(convertedElem->FirstChildElement("elemE"));
+  EXPECT_TRUE(convertedElem->FirstChildElement("elemC") != NULL);
+  EXPECT_TRUE(convertedElem->FirstChildElement("elemE") != NULL);
   std::string elemValue = convertedElem->FirstChildElement("elemE")->GetText();
   EXPECT_EQ(elemValue, "D");
   convertedElem =  convertedElem->FirstChildElement("elemC");
@@ -115,7 +115,7 @@ TEST(Converter, MoveElemAttr)
   convertedElem =  convertedElem->FirstChildElement();
   ASSERT_TRUE(convertedElem != NULL);
   EXPECT_EQ(convertedElem->ValueStr(), "elemB");
-  EXPECT_TRUE(convertedElem->Attribute("attrE"));
+  EXPECT_TRUE(convertedElem->Attribute("attrE") != NULL);
   std::string attrValue = convertedElem->Attribute("attrE");
   EXPECT_EQ(attrValue, "D");
   convertedElem =  convertedElem->FirstChildElement();
@@ -153,7 +153,7 @@ TEST(Converter, MoveAttrAttr)
   convertedElem =  convertedElem->FirstChildElement();
   ASSERT_TRUE(convertedElem != NULL);
   EXPECT_EQ(convertedElem->ValueStr(), "elemB");
-  EXPECT_TRUE(convertedElem->Attribute("attrE"));
+  EXPECT_TRUE(convertedElem->Attribute("attrE") != NULL);
   std::string attrValue = convertedElem->Attribute("attrE");
   EXPECT_EQ(attrValue, "C");
   convertedElem =  convertedElem->FirstChildElement();
@@ -194,10 +194,10 @@ TEST(Converter, MoveAttrElem)
   convertedElem =  convertedElem->FirstChildElement();
   ASSERT_TRUE(convertedElem != NULL);
   EXPECT_EQ(convertedElem->ValueStr(), "elemB");
-  EXPECT_TRUE(convertedElem->FirstChildElement("elemE"));
+  EXPECT_TRUE(convertedElem->FirstChildElement("elemE") != NULL);
   std::string elemValue = convertedElem->FirstChildElement("elemE")->GetText();
   EXPECT_EQ(elemValue, "C");
-  EXPECT_TRUE(convertedElem->FirstChildElement("elemC"));
+  EXPECT_TRUE(convertedElem->FirstChildElement("elemC") != NULL);
   convertedElem =  convertedElem->FirstChildElement("elemC");
   ASSERT_TRUE(convertedElem != NULL);
   EXPECT_FALSE(convertedElem->Attribute("attrC"));
@@ -230,7 +230,7 @@ TEST(Converter, MoveElemElemMultipleLevels)
 
   TiXmlElement *convertedElem =  xmlDoc5.FirstChildElement();
   EXPECT_EQ(convertedElem->ValueStr(), "elemA");
-  EXPECT_TRUE(convertedElem->FirstChildElement("elemE"));
+  EXPECT_TRUE(convertedElem->FirstChildElement("elemE") != NULL);
   std::string elemValue = convertedElem->FirstChildElement("elemE")->GetText();
   EXPECT_EQ(elemValue, "D");
   convertedElem =  convertedElem->FirstChildElement("elemB");
@@ -339,7 +339,7 @@ TEST(Converter, MoveAttrElemMultipleLevels)
   TiXmlElement *convertedElem =  xmlDoc8.FirstChildElement();
   ASSERT_TRUE(convertedElem != NULL);
   EXPECT_EQ(convertedElem->ValueStr(), "elemA");
-  EXPECT_TRUE(convertedElem->FirstChildElement("elemE"));
+  EXPECT_TRUE(convertedElem->FirstChildElement("elemE") != NULL);
   std::string elemValue = convertedElem->FirstChildElement("elemE")->GetText();
   EXPECT_EQ(elemValue, "C");
   convertedElem =  convertedElem->FirstChildElement("elemB");
@@ -365,16 +365,16 @@ TEST(Converter, Add)
   TiXmlDocument xmlDoc;
   xmlDoc.Parse(xmlString.c_str());
   TiXmlElement *childElem =  xmlDoc.FirstChildElement();
-  EXPECT_TRUE(childElem);
+  EXPECT_TRUE(childElem != NULL);
   EXPECT_EQ(childElem->ValueStr(), "elemA");
   childElem = childElem->FirstChildElement();
-  EXPECT_TRUE(childElem);
+  EXPECT_TRUE(childElem != NULL);
   EXPECT_EQ(childElem->ValueStr(), "elemB");
   childElem = childElem->FirstChildElement();
-  EXPECT_TRUE(childElem);
+  EXPECT_TRUE(childElem != NULL);
   EXPECT_EQ(childElem->ValueStr(), "elemC");
   childElem = childElem->FirstChildElement();
-  EXPECT_TRUE(childElem);
+  EXPECT_TRUE(childElem != NULL);
   EXPECT_EQ(childElem->ValueStr(), "elemD");
 
   // Test adding element
@@ -399,8 +399,8 @@ TEST(Converter, Add)
   convertedElem = convertedElem->FirstChildElement();
   ASSERT_TRUE(convertedElem != NULL);
   EXPECT_EQ(convertedElem->ValueStr(), "elemB");
-  EXPECT_TRUE(convertedElem->FirstChildElement("elemC"));
-  EXPECT_TRUE(convertedElem->FirstChildElement("elemBB"));
+  EXPECT_TRUE(convertedElem->FirstChildElement("elemC") != NULL);
+  EXPECT_TRUE(convertedElem->FirstChildElement("elemBB") != NULL);
   std::string elemValue = convertedElem->FirstChildElement("elemBB")->GetText();
   EXPECT_EQ(elemValue, "BB");
   convertedElem = convertedElem->FirstChildElement("elemC");
diff --git a/src/Element.cc b/src/Element.cc
new file mode 100644
index 0000000..f6e4e9f
--- /dev/null
+++ b/src/Element.cc
@@ -0,0 +1,823 @@
+/*
+ * Copyright 2015 Open Source Robotics Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "sdf/Assert.hh"
+#include "sdf/Element.hh"
+
+using namespace sdf;
+
+/////////////////////////////////////////////////
+Element::Element()
+  : dataPtr(new ElementPrivate)
+{
+  this->dataPtr->copyChildren = false;
+}
+
+/////////////////////////////////////////////////
+Element::~Element()
+{
+  this->dataPtr->parent.reset();
+  for (Param_V::iterator iter = this->dataPtr->attributes.begin();
+      iter != this->dataPtr->attributes.end(); ++iter)
+  {
+    (*iter).reset();
+  }
+  this->dataPtr->attributes.clear();
+
+  for (ElementPtr_V::iterator iter = this->dataPtr->elements.begin();
+      iter != this->dataPtr->elements.end(); ++iter)
+  {
+    (*iter).reset();
+  }
+
+  for (ElementPtr_V::iterator iter = this->dataPtr->elementDescriptions.begin();
+      iter != this->dataPtr->elementDescriptions.end(); ++iter)
+  {
+    (*iter).reset();
+  }
+  this->dataPtr->elements.clear();
+  this->dataPtr->elementDescriptions.clear();
+
+  this->dataPtr->value.reset();
+
+  delete this->dataPtr;
+  this->dataPtr = NULL;
+
+  // this->Reset();
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::GetParent() const
+{
+  return this->dataPtr->parent;
+}
+
+/////////////////////////////////////////////////
+void Element::SetParent(const ElementPtr _parent)
+{
+  this->dataPtr->parent = _parent;
+}
+
+/////////////////////////////////////////////////
+void Element::SetName(const std::string &_name)
+{
+  this->dataPtr->name = _name;
+}
+
+/////////////////////////////////////////////////
+const std::string &Element::GetName() const
+{
+  return this->dataPtr->name;
+}
+
+/////////////////////////////////////////////////
+void Element::SetRequired(const std::string &_req)
+{
+  this->dataPtr->required = _req;
+}
+
+/////////////////////////////////////////////////
+const std::string &Element::GetRequired() const
+{
+  return this->dataPtr->required;
+}
+
+/////////////////////////////////////////////////
+void Element::SetCopyChildren(bool _value)
+{
+  this->dataPtr->copyChildren = _value;
+}
+
+/////////////////////////////////////////////////
+bool Element::GetCopyChildren() const
+{
+  return this->dataPtr->copyChildren;
+}
+
+/////////////////////////////////////////////////
+void Element::AddValue(const std::string &_type,
+    const std::string &_defaultValue, bool _required,
+    const std::string &_description)
+{
+  this->dataPtr->value = this->CreateParam(this->dataPtr->name,
+      _type, _defaultValue, _required, _description);
+}
+
+/////////////////////////////////////////////////
+boost::shared_ptr<Param> Element::CreateParam(const std::string &_key,
+    const std::string &_type, const std::string &_defaultValue, bool _required,
+    const std::string &_description)
+{
+  return boost::shared_ptr<Param>(
+        new Param(_key, _type, _defaultValue, _required, _description));
+}
+
+/////////////////////////////////////////////////
+void Element::AddAttribute(const std::string &_key, const std::string &_type,
+    const std::string &_defaultValue, bool _required,
+    const std::string &_description)
+{
+  this->dataPtr->attributes.push_back(
+      this->CreateParam(_key, _type, _defaultValue, _required, _description));
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::Clone() const
+{
+  ElementPtr clone(new Element);
+  clone->dataPtr->description = this->dataPtr->description;
+  clone->dataPtr->name = this->dataPtr->name;
+  clone->dataPtr->required = this->dataPtr->required;
+  // clone->parent = this->dataPtr->parent;
+  clone->dataPtr->copyChildren = this->dataPtr->copyChildren;
+  clone->dataPtr->includeFilename = this->dataPtr->includeFilename;
+
+  Param_V::const_iterator aiter;
+  for (aiter = this->dataPtr->attributes.begin();
+       aiter != this->dataPtr->attributes.end(); ++aiter)
+  {
+    clone->dataPtr->attributes.push_back((*aiter)->Clone());
+  }
+
+  ElementPtr_V::const_iterator eiter;
+  for (eiter = this->dataPtr->elementDescriptions.begin();
+      eiter != this->dataPtr->elementDescriptions.end(); ++eiter)
+  {
+    clone->dataPtr->elementDescriptions.push_back((*eiter)->Clone());
+  }
+
+  for (eiter = this->dataPtr->elements.begin();
+       eiter != this->dataPtr->elements.end(); ++eiter)
+  {
+    clone->dataPtr->elements.push_back((*eiter)->Clone());
+    clone->dataPtr->elements.back()->dataPtr->parent = clone;
+  }
+
+  if (this->dataPtr->value)
+    clone->dataPtr->value = this->dataPtr->value->Clone();
+
+  return clone;
+}
+
+/////////////////////////////////////////////////
+void Element::Copy(const ElementPtr _elem)
+{
+  this->dataPtr->name = _elem->GetName();
+  this->dataPtr->description = _elem->GetDescription();
+  this->dataPtr->required = _elem->GetRequired();
+  this->dataPtr->copyChildren = _elem->GetCopyChildren();
+  this->dataPtr->includeFilename = _elem->dataPtr->includeFilename;
+
+  for (Param_V::iterator iter = _elem->dataPtr->attributes.begin();
+       iter != _elem->dataPtr->attributes.end(); ++iter)
+  {
+    if (!this->HasAttribute((*iter)->GetKey()))
+      this->dataPtr->attributes.push_back((*iter)->Clone());
+    ParamPtr param = this->GetAttribute((*iter)->GetKey());
+    (*param) = (**iter);
+  }
+
+  if (_elem->GetValue())
+  {
+    if (!this->dataPtr->value)
+      this->dataPtr->value = _elem->GetValue()->Clone();
+    else
+      *(this->dataPtr->value) = *(_elem->GetValue());
+  }
+
+  this->dataPtr->elementDescriptions.clear();
+  for (ElementPtr_V::const_iterator iter =
+       _elem->dataPtr->elementDescriptions.begin();
+       iter != _elem->dataPtr->elementDescriptions.end(); ++iter)
+  {
+    this->dataPtr->elementDescriptions.push_back((*iter)->Clone());
+  }
+
+  this->dataPtr->elements.clear();
+  for (ElementPtr_V::iterator iter = _elem->dataPtr->elements.begin();
+       iter != _elem->dataPtr->elements.end(); ++iter)
+  {
+    ElementPtr elem = (*iter)->Clone();
+    elem->Copy(*iter);
+    elem->dataPtr->parent = shared_from_this();
+    this->dataPtr->elements.push_back(elem);
+  }
+}
+
+/////////////////////////////////////////////////
+void Element::PrintDescription(const std::string &_prefix)
+{
+  std::cout << _prefix << "<element name ='" << this->dataPtr->name
+            << "' required ='" << this->dataPtr->required << "'>\n";
+
+  std::cout << _prefix << "  <description>" << this->dataPtr->description
+            << "</description>\n";
+
+  Param_V::iterator aiter;
+  for (aiter = this->dataPtr->attributes.begin();
+      aiter != this->dataPtr->attributes.end(); ++aiter)
+  {
+    std::cout << _prefix << "  <attribute name ='"
+              << (*aiter)->GetKey() << "' type ='" << (*aiter)->GetTypeName()
+              << "' default ='" << (*aiter)->GetDefaultAsString()
+              << "' required ='" << (*aiter)->GetRequired() << "'>\n";
+    std::cout << _prefix << "    <description>" << (*aiter)->GetDescription()
+              << "</description>\n";
+    std::cout << _prefix << "  </attribute>\n";
+  }
+
+  if (this->GetCopyChildren())
+    std::cout << _prefix << "  <element copy_data ='true' required ='*'/>\n";
+
+  ElementPtr_V::iterator eiter;
+  for (eiter = this->dataPtr->elementDescriptions.begin();
+      eiter != this->dataPtr->elementDescriptions.end(); ++eiter)
+  {
+    (*eiter)->PrintDescription(_prefix + "  ");
+  }
+
+  std::cout << _prefix << "</element>\n";
+}
+
+/////////////////////////////////////////////////
+void Element::PrintDocRightPane(std::string &_html, int _spacing, int &_index)
+{
+  std::ostringstream stream;
+  ElementPtr_V::iterator eiter;
+
+  int start = _index++;
+
+  std::string childHTML;
+  for (eiter = this->dataPtr->elementDescriptions.begin();
+      eiter != this->dataPtr->elementDescriptions.end(); ++eiter)
+  {
+    (*eiter)->PrintDocRightPane(childHTML, _spacing + 4, _index);
+  }
+
+  stream << "<a name=\"" << this->dataPtr->name << start
+         << "\">&lt" << this->dataPtr->name << "&gt</a>";
+
+  stream << "<div style='padding-left:" << _spacing << "px;'>\n";
+
+  stream << "<div style='background-color: #ffffff'>\n";
+
+  stream << "<font style='font-weight:bold'>Description: </font>";
+  if (!this->dataPtr->description.empty())
+    stream << this->dataPtr->description << "<br>\n";
+  else
+    stream << "none<br>\n";
+
+  stream << "<font style='font-weight:bold'>Required: </font>"
+         << this->dataPtr->required << "   \n";
+
+  stream << "<font style='font-weight:bold'>Type: </font>";
+  if (this->dataPtr->value)
+  {
+    stream << this->dataPtr->value->GetTypeName()
+           << "   \n"
+           << "<font style='font-weight:bold'>Default: </font>"
+           << this->dataPtr->value->GetDefaultAsString() << '\n';
+  }
+  else
+    stream << "n/a\n";
+
+  stream << "</div>";
+
+  if (this->dataPtr->attributes.size() > 0)
+  {
+    stream << "<div style='background-color: #dedede; padding-left:10px; "
+           << "display:inline-block;'>\n";
+    stream << "<font style='font-weight:bold'>Attributes</font><br>";
+
+    Param_V::iterator aiter;
+    for (aiter = this->dataPtr->attributes.begin();
+        aiter != this->dataPtr->attributes.end(); ++aiter)
+    {
+      stream << "<div style='display: inline-block;padding-bottom: 4px;'>\n";
+
+      stream << "<div style='float:left; width: 80px;'>\n";
+      stream << "<font style='font-style: italic;'>" << (*aiter)->GetKey()
+        << "</font>: ";
+      stream << "</div>\n";
+
+      stream << "<div style='float:left; padding-left: 4px; width: 300px;'>\n";
+
+      if (!(*aiter)->GetDescription().empty())
+          stream << (*aiter)->GetDescription() << "<br>\n";
+      else
+          stream << "no description<br>\n";
+
+      stream << "<font style='font-weight:bold'>Type: </font>"
+             << (*aiter)->GetTypeName() << "   "
+        << "<font style='font-weight:bold'>Default: </font>"
+        << (*aiter)->GetDefaultAsString() << "<br>";
+      stream << "</div>\n";
+
+      stream << "</div>\n";
+    }
+    stream << "</div>\n";
+    stream << "<br>\n";
+  }
+
+  _html += stream.str();
+  _html += childHTML;
+  _html += "</div>\n";
+}
+
+/////////////////////////////////////////////////
+void Element::PrintDocLeftPane(std::string &_html, int _spacing, int &_index)
+{
+  std::ostringstream stream;
+  ElementPtr_V::iterator eiter;
+
+  int start = _index++;
+
+  std::string childHTML;
+  for (eiter = this->dataPtr->elementDescriptions.begin();
+      eiter != this->dataPtr->elementDescriptions.end(); ++eiter)
+  {
+    (*eiter)->PrintDocLeftPane(childHTML, _spacing + 4, _index);
+  }
+
+  stream << "<a id='" << start << "' onclick='highlight(" << start
+         << ");' href=\"#" << this->dataPtr->name << start
+         << "\">&lt" << this->dataPtr->name << "&gt</a>";
+
+  stream << "<div style='padding-left:" << _spacing << "px;'>\n";
+
+  _html += stream.str();
+  _html += childHTML;
+  _html += "</div>\n";
+}
+
+/////////////////////////////////////////////////
+void Element::PrintValues(std::string _prefix)
+{
+  std::cout << _prefix << "<" << this->dataPtr->name;
+
+  Param_V::iterator aiter;
+  for (aiter = this->dataPtr->attributes.begin();
+       aiter != this->dataPtr->attributes.end(); ++aiter)
+  {
+    std::cout << " " << (*aiter)->GetKey() << "='"
+      << (*aiter)->GetAsString() << "'";
+  }
+
+  if (this->dataPtr->elements.size() > 0)
+  {
+    std::cout << ">\n";
+    ElementPtr_V::iterator eiter;
+    for (eiter = this->dataPtr->elements.begin();
+        eiter != this->dataPtr->elements.end(); ++eiter)
+    {
+      (*eiter)->PrintValues(_prefix + "  ");
+    }
+    std::cout << _prefix << "</" << this->dataPtr->name << ">\n";
+  }
+  else
+  {
+    if (this->dataPtr->value)
+    {
+      std::cout << ">" << this->dataPtr->value->GetAsString()
+        << "</" << this->dataPtr->name << ">\n";
+    }
+    else
+    {
+      std::cout << "/>\n";
+    }
+  }
+}
+
+/////////////////////////////////////////////////
+std::string Element::ToString(const std::string &_prefix) const
+{
+  std::ostringstream out;
+  this->ToString(_prefix, out);
+  return out.str();
+}
+
+/////////////////////////////////////////////////
+void Element::ToString(const std::string &_prefix,
+                       std::ostringstream &_out) const
+{
+  if (this->dataPtr->includeFilename.empty())
+  {
+    _out << _prefix << "<" << this->dataPtr->name;
+
+    Param_V::const_iterator aiter;
+    for (aiter = this->dataPtr->attributes.begin();
+        aiter != this->dataPtr->attributes.end(); ++aiter)
+    {
+      _out << " " << (*aiter)->GetKey() << "='"
+           << (*aiter)->GetAsString() << "'";
+    }
+
+    if (this->dataPtr->elements.size() > 0)
+    {
+      _out << ">\n";
+      ElementPtr_V::const_iterator eiter;
+      for (eiter = this->dataPtr->elements.begin();
+          eiter != this->dataPtr->elements.end(); ++eiter)
+      {
+        (*eiter)->ToString(_prefix + "  ", _out);
+      }
+      _out << _prefix << "</" << this->dataPtr->name << ">\n";
+    }
+    else
+    {
+      if (this->dataPtr->value)
+      {
+        _out << ">" << this->dataPtr->value->GetAsString()
+             << "</" << this->dataPtr->name << ">\n";
+      }
+      else
+      {
+        _out << "/>\n";
+      }
+    }
+  }
+  else
+  {
+    _out << _prefix << "<include filename='"
+         << this->dataPtr->includeFilename << "'/>\n";
+  }
+}
+
+/////////////////////////////////////////////////
+bool Element::HasAttribute(const std::string &_key)
+{
+  return this->GetAttribute(_key) != NULL;
+}
+
+/////////////////////////////////////////////////
+bool Element::GetAttributeSet(const std::string &_key)
+{
+  bool result = false;
+  ParamPtr p = this->GetAttribute(_key);
+  if (p)
+    result = p->GetSet();
+
+  return result;
+}
+
+/////////////////////////////////////////////////
+ParamPtr Element::GetAttribute(const std::string &_key)
+{
+  Param_V::const_iterator iter;
+  for (iter = this->dataPtr->attributes.begin();
+      iter != this->dataPtr->attributes.end(); ++iter)
+  {
+    if ((*iter)->GetKey() == _key)
+      return (*iter);
+  }
+  return ParamPtr();
+}
+
+/////////////////////////////////////////////////
+size_t Element::GetAttributeCount() const
+{
+  return this->dataPtr->attributes.size();
+}
+
+/////////////////////////////////////////////////
+ParamPtr Element::GetAttribute(unsigned int _index) const
+{
+  ParamPtr result;
+  if (_index < this->dataPtr->attributes.size())
+    result = this->dataPtr->attributes[_index];
+
+  return result;
+}
+
+/////////////////////////////////////////////////
+size_t Element::GetElementDescriptionCount() const
+{
+  return this->dataPtr->elementDescriptions.size();
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::GetElementDescription(unsigned int _index) const
+{
+  ElementPtr result;
+  if (_index < this->dataPtr->elementDescriptions.size())
+    result = this->dataPtr->elementDescriptions[_index];
+  return result;
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::GetElementDescription(const std::string &_key) const
+{
+  ElementPtr_V::const_iterator iter;
+  for (iter = this->dataPtr->elementDescriptions.begin();
+       iter != this->dataPtr->elementDescriptions.end(); ++iter)
+  {
+    if ((*iter)->GetName() == _key)
+      return (*iter);
+  }
+
+  return ElementPtr();
+}
+
+/////////////////////////////////////////////////
+ParamPtr Element::GetValue()
+{
+  return this->dataPtr->value;
+}
+
+/////////////////////////////////////////////////
+bool Element::HasElement(const std::string &_name) const
+{
+  ElementPtr_V::const_iterator iter;
+  for (iter = this->dataPtr->elements.begin();
+       iter != this->dataPtr->elements.end(); ++iter)
+  {
+    if ((*iter)->GetName() == _name)
+      return true;
+  }
+
+  return false;
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::GetElementImpl(const std::string &_name) const
+{
+  ElementPtr_V::const_iterator iter;
+  for (iter = this->dataPtr->elements.begin();
+       iter != this->dataPtr->elements.end(); ++iter)
+  {
+    if ((*iter)->GetName() == _name)
+      return (*iter);
+  }
+
+  // gzdbg << "Unable to find element [" << _name << "] return empty\n";
+  return ElementPtr();
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::GetFirstElement() const
+{
+  if (this->dataPtr->elements.empty())
+    return ElementPtr();
+  else
+    return this->dataPtr->elements.front();
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::GetNextElement(const std::string &_name) const
+{
+  if (this->dataPtr->parent)
+  {
+    ElementPtr_V::const_iterator iter;
+    iter = std::find(this->dataPtr->parent->dataPtr->elements.begin(),
+        this->dataPtr->parent->dataPtr->elements.end(), shared_from_this());
+
+    if (iter == this->dataPtr->parent->dataPtr->elements.end())
+    {
+      return ElementPtr();
+    }
+
+    ++iter;
+    if (iter == this->dataPtr->parent->dataPtr->elements.end())
+      return ElementPtr();
+    else if (_name.empty())
+      return *(iter);
+    else
+    {
+      for (; iter != this->dataPtr->parent->dataPtr->elements.end(); ++iter)
+      {
+        if ((*iter)->GetName() == _name)
+          return (*iter);
+      }
+    }
+  }
+
+  return ElementPtr();
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::GetElement(const std::string &_name)
+{
+  if (this->HasElement(_name))
+    return this->GetElementImpl(_name);
+  else
+    return this->AddElement(_name);
+}
+
+/////////////////////////////////////////////////
+void Element::InsertElement(ElementPtr _elem)
+{
+  this->dataPtr->elements.push_back(_elem);
+}
+
+/////////////////////////////////////////////////
+bool Element::HasElementDescription(const std::string &_name)
+{
+  bool result = false;
+  ElementPtr_V::const_iterator iter;
+  for (iter = this->dataPtr->elementDescriptions.begin();
+       iter != this->dataPtr->elementDescriptions.end(); ++iter)
+  {
+    if ((*iter)->dataPtr->name == _name)
+    {
+      result = true;
+      break;
+    }
+  }
+
+  return result;
+}
+
+/////////////////////////////////////////////////
+ElementPtr Element::AddElement(const std::string &_name)
+{
+  ElementPtr_V::const_iterator iter, iter2;
+  for (iter = this->dataPtr->elementDescriptions.begin();
+      iter != this->dataPtr->elementDescriptions.end(); ++iter)
+  {
+    if ((*iter)->dataPtr->name == _name)
+    {
+      ElementPtr elem = (*iter)->Clone();
+      elem->SetParent(shared_from_this());
+      this->dataPtr->elements.push_back(elem);
+
+      // Add all child elements.
+      for (iter2 = elem->dataPtr->elementDescriptions.begin();
+           iter2 != elem->dataPtr->elementDescriptions.end(); ++iter2)
+      {
+        // Add only required child element
+        if ((*iter2)->GetRequired() == "1")
+        {
+          elem->AddElement((*iter2)->dataPtr->name);
+        }
+      }
+
+      return this->dataPtr->elements.back();
+    }
+  }
+  sdferr << "Missing element description for [" << _name << "]\n";
+  return ElementPtr();
+}
+
+/////////////////////////////////////////////////
+void Element::ClearElements()
+{
+  for (sdf::ElementPtr_V::iterator iter = this->dataPtr->elements.begin();
+      iter != this->dataPtr->elements.end(); ++iter)
+  {
+    (*iter)->ClearElements();
+  }
+
+  this->dataPtr->elements.clear();
+}
+
+/////////////////////////////////////////////////
+void Element::Update()
+{
+  for (sdf::Param_V::iterator iter = this->dataPtr->attributes.begin();
+      iter != this->dataPtr->attributes.end(); ++iter)
+  {
+    (*iter)->Update();
+  }
+
+  for (sdf::ElementPtr_V::iterator iter = this->dataPtr->elements.begin();
+      iter != this->dataPtr->elements.end(); ++iter)
+  {
+    (*iter)->Update();
+  }
+
+  if (this->dataPtr->value)
+    this->dataPtr->value->Update();
+}
+
+/////////////////////////////////////////////////
+void Element::Reset()
+{
+  for (ElementPtr_V::iterator iter = this->dataPtr->elements.begin();
+      iter != this->dataPtr->elements.end(); ++iter)
+  {
+    if (*iter)
+      (*iter)->Reset();
+    (*iter).reset();
+  }
+
+  for (ElementPtr_V::iterator iter = this->dataPtr->elementDescriptions.begin();
+      iter != this->dataPtr->elementDescriptions.end(); ++iter)
+  {
+    if (*iter)
+      (*iter)->Reset();
+    (*iter).reset();
+  }
+  this->dataPtr->elements.clear();
+  this->dataPtr->elementDescriptions.clear();
+
+  this->dataPtr->value.reset();
+
+  this->dataPtr->parent.reset();
+}
+
+/////////////////////////////////////////////////
+void Element::AddElementDescription(ElementPtr _elem)
+{
+  this->dataPtr->elementDescriptions.push_back(_elem);
+}
+
+/////////////////////////////////////////////////
+void Element::SetInclude(const std::string &_filename)
+{
+  this->dataPtr->includeFilename = _filename;
+}
+
+/////////////////////////////////////////////////
+std::string Element::GetInclude() const
+{
+  return this->dataPtr->includeFilename;
+}
+
+/////////////////////////////////////////////////
+std::string Element::GetDescription() const
+{
+  return this->dataPtr->description;
+}
+
+/////////////////////////////////////////////////
+void Element::SetDescription(const std::string &_desc)
+{
+  this->dataPtr->description = _desc;
+}
+
+/////////////////////////////////////////////////
+void Element::RemoveFromParent()
+{
+  if (this->dataPtr->parent)
+  {
+    ElementPtr_V::iterator iter;
+    iter = std::find(this->dataPtr->parent->dataPtr->elements.begin(),
+        this->dataPtr->parent->dataPtr->elements.end(), shared_from_this());
+
+    if (iter != this->dataPtr->parent->dataPtr->elements.end())
+    {
+      this->dataPtr->parent->dataPtr->elements.erase(iter);
+      this->dataPtr->parent.reset();
+    }
+  }
+}
+
+/////////////////////////////////////////////////
+void Element::RemoveChild(ElementPtr _child)
+{
+  SDF_ASSERT(_child, "Cannot remove a NULL child pointer");
+
+  ElementPtr_V::iterator iter;
+  iter = std::find(this->dataPtr->elements.begin(),
+                   this->dataPtr->elements.end(), _child);
+
+  if (iter != this->dataPtr->elements.end())
+  {
+    _child->SetParent(ElementPtr());
+    this->dataPtr->elements.erase(iter);
+  }
+}
+
+/////////////////////////////////////////////////
+boost::any Element::GetAny(const std::string &_key)
+{
+  boost::any result;
+  if (_key.empty() && this->dataPtr->value)
+  {
+    if (!this->dataPtr->value->GetAny(result))
+    {
+      sdferr << "Couldn't get element [" << this->GetName()
+             << "] as boost::any\n";
+    }
+  }
+  else if (!_key.empty())
+  {
+    ParamPtr param = this->GetAttribute(_key);
+    if (param)
+    {
+      if (!this->GetAttribute(_key)->GetAny(result))
+        sdferr << "Couldn't get attribute [" << _key << "] as boost::any\n";
+    }
+    else if (this->HasElement(_key))
+      result = this->GetElementImpl(_key)->GetAny();
+    else if (this->HasElementDescription(_key))
+      result = this->GetElementDescription(_key)->GetAny();
+    else
+      sdferr << "Unable to find value for key [" << _key << "]\n";
+  }
+  return result;
+}
diff --git a/src/Exception.cc b/src/Exception.cc
index 342abf8..ce78fdf 100644
--- a/src/Exception.cc
+++ b/src/Exception.cc
@@ -14,12 +14,8 @@
  * limitations under the License.
  *
  */
-/*
- * Desc: Gazebo Error
- * Author: Nathan Koenig
- * Date: 07 May 2007
- */
 
+#include "sdf/ExceptionPrivate.hh"
 #include "sdf/Console.hh"
 #include "sdf/Exception.hh"
 
@@ -27,40 +23,45 @@ using namespace sdf;
 
 //////////////////////////////////////////////////
 Exception::Exception()
+  : dataPtr(new ExceptionPrivate)
 {
 }
 
 //////////////////////////////////////////////////
-Exception::Exception(const char *_file, int _line, std::string _msg)
+Exception::Exception(const char *_file, int64_t _line, std::string _msg)
+  : dataPtr(new ExceptionPrivate)
 {
-  this->file = _file;
-  this->line = _line;
-  this->str = _msg;
+  this->dataPtr->file = _file;
+  this->dataPtr->line = _line;
+  this->dataPtr->str = _msg;
   this->Print();
 }
 
 //////////////////////////////////////////////////
 Exception::~Exception()
 {
+  delete this->dataPtr;
+  this->dataPtr = NULL;
 }
 
 //////////////////////////////////////////////////
 void Exception::Print() const
 {
   sdf::Console::Instance()->ColorMsg("Exception",
-      this->file, this->line, 31) << *this << "\n";
+      this->dataPtr->file,
+      static_cast<unsigned int>(this->dataPtr->line), 31) << *this;
 }
 
 //////////////////////////////////////////////////
 std::string Exception::GetErrorFile() const
 {
-  return this->file;
+  return this->dataPtr->file;
 }
 
 //////////////////////////////////////////////////
 std::string Exception::GetErrorStr() const
 {
-  return this->str;
+  return this->dataPtr->str;
 }
 
 //////////////////////////////////////////////////
@@ -69,7 +70,7 @@ InternalError::InternalError()
 }
 
 //////////////////////////////////////////////////
-InternalError::InternalError(const char *_file, int _line,
+InternalError::InternalError(const char *_file, int64_t _line,
                              const std::string _msg) :
   Exception(_file, _line, _msg)
 {
@@ -82,7 +83,7 @@ InternalError::~InternalError()
 
 //////////////////////////////////////////////////
 AssertionInternalError::AssertionInternalError(
-    const char * _file, int _line,
+    const char * _file, int64_t _line,
     const std::string _expr,
     const std::string _function,
     const std::string _msg) :
diff --git a/src/Exception_TEST.cc b/src/Exception_TEST.cc
new file mode 100644
index 0000000..bf13d17
--- /dev/null
+++ b/src/Exception_TEST.cc
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2015 Open Source Robotics Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+*/
+
+#include <gtest/gtest.h>
+#include "sdf/Exception.hh"
+
+////////////////////////////////////////////////////
+/// Test exception throwing
+TEST(Exception, Throwing)
+{
+  EXPECT_ANY_THROW(sdfthrow("throw message"));
+  EXPECT_THROW(sdfthrow("throw message"), sdf::Exception);
+}
+
+/////////////////////////////////////////////////
+/// Main
+int main(int argc, char **argv)
+{
+  ::testing::InitGoogleTest(&argc, argv);
+  return RUN_ALL_TESTS();
+}
diff --git a/src/Param.cc b/src/Param.cc
index bc20a17..3ced5eb 100644
--- a/src/Param.cc
+++ b/src/Param.cc
@@ -14,12 +14,9 @@
  * limitations under the License.
  *
 */
-/* Desc: Parameter class
- * Author: Nate Koenig
- * Date: 14 Aug 2008
- */
 
 #include <math.h>
+#include <locale.h>
 #include "sdf/Param.hh"
 
 using namespace sdf;
@@ -54,71 +51,299 @@ class any_set : public boost::static_visitor<>
 Param::Param(const std::string &_key, const std::string &_typeName,
              const std::string &_default, bool _required,
              const std::string &_description)
+  : dataPtr(new ParamPrivate)
 {
-  this->key = _key;
-  this->required = _required;
-  this->typeName = _typeName;
-  this->description = _description;
-  this->set = false;
+  this->dataPtr->key = _key;
+  this->dataPtr->required = _required;
+  this->dataPtr->typeName = _typeName;
+  this->dataPtr->description = _description;
+  this->dataPtr->set = false;
 
-  if (this->typeName == "bool")
+  if (this->dataPtr->typeName == "bool")
     this->Init<bool>(_default);
-  else if (this->typeName == "int")
+  else if (this->dataPtr->typeName == "int")
     this->Init<int>(_default);
-  else if (this->typeName == "unsigned int")
+  else if (this->dataPtr->typeName == "unsigned int")
     this->Init<unsigned int>(_default);
-  else if (this->typeName == "double")
+  else if (this->dataPtr->typeName == "uint64_t")
+    this->Init<uint64_t>(_default);
+  else if (this->dataPtr->typeName == "double")
     this->Init<double>(_default);
-  else if (this->typeName == "float")
+  else if (this->dataPtr->typeName == "float")
     this->Init<float>(_default);
-  else if (this->typeName == "char")
+  else if (this->dataPtr->typeName == "char")
     this->Init<char>(_default);
-  else if (this->typeName == "std::string" ||
-      this->typeName == "string")
+  else if (this->dataPtr->typeName == "std::string" ||
+           this->dataPtr->typeName == "string")
+  {
     this->Init<std::string>(_default);
-  else if (this->typeName == "sdf::Vector2i" ||
-      this->typeName == "vector2i")
+  }
+  else if (this->dataPtr->typeName == "sdf::Time" ||
+           this->dataPtr->typeName == "time")
+  {
+    this->Init<sdf::Time>(_default);
+  }
+  else if (this->dataPtr->typeName == "sdf::Color" ||
+           this->dataPtr->typeName == "color")
+  {
+    this->Init<sdf::Color>(_default);
+  }
+  else if (this->dataPtr->typeName == "ignition::math::Vector2i" ||
+           this->dataPtr->typeName == "vector2i")
+  {
+    this->Init<ignition::math::Vector2i>(_default);
+  }
+  else if (this->dataPtr->typeName == "ignition::math::Vector2d" ||
+           this->dataPtr->typeName == "vector2d")
+  {
+    this->Init<ignition::math::Vector2d>(_default);
+  }
+  else if (this->dataPtr->typeName == "ignition::math::Vector3d" ||
+           this->dataPtr->typeName == "vector3")
+  {
+    this->Init<ignition::math::Vector3d>(_default);
+  }
+  else if (this->dataPtr->typeName == "ignition::math::Pose3d" ||
+           this->dataPtr->typeName == "pose" ||
+           this->dataPtr->typeName == "Pose")
+  {
+    this->Init<ignition::math::Pose3d>(_default);
+  }
+  else if (this->dataPtr->typeName == "ignition::math::Quaterniond" ||
+           this->dataPtr->typeName == "quaternion")
+  {
+    this->Init<ignition::math::Quaterniond>(_default);
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+  }
+  /// \deprecated The following sdf::<types> are deprecated
+  else if (this->dataPtr->typeName == "sdf::Vector2i" ||
+           this->dataPtr->typeName == "vector2i")
+  {
+    sdferr << "sdf::Vector2i is deprecated. Use ignition::math::Vector2i\n";
     this->Init<sdf::Vector2i>(_default);
-  else if (this->typeName == "sdf::Vector2d" ||
-      this->typeName == "vector2d")
+  }
+  else if (this->dataPtr->typeName == "sdf::Vector2d" ||
+           this->dataPtr->typeName == "vector2d")
+  {
+    sdferr << "sdf::Vector2d is deprecated. Use ignition::math::Vector2d\n";
     this->Init<sdf::Vector2d>(_default);
-  else if (this->typeName == "sdf::Vector3" ||
-       this->typeName == "vector3")
+  }
+  else if (this->dataPtr->typeName == "sdf::Vector3" ||
+           this->dataPtr->typeName == "vector3")
+  {
+    sdferr << "sdf::Vector3 is deprecated. Use ignition::math::Vector3d\n";
     this->Init<sdf::Vector3>(_default);
-  else if (this->typeName == "sdf::Pose" ||
-      this->typeName == "pose" || this->typeName == "Pose")
+  }
+  else if (this->dataPtr->typeName == "sdf::Pose" ||
+           this->dataPtr->typeName == "pose" ||
+           this->dataPtr->typeName == "Pose")
+  {
+    sdferr << "sdf::Pose is deprecated. Use ignition::math::Pose3d\n";
     this->Init<sdf::Pose>(_default);
-  else if (this->typeName == "sdf::Quaternion" ||
-      this->typeName == "quaternion")
+  }
+  else if (this->dataPtr->typeName == "sdf::Quaternion" ||
+           this->dataPtr->typeName == "quaternion")
+  {
+    sdferr << "sdf::Quaternion is deprecated. "
+           << "Use ignition::math::Quaterniond\n";
     this->Init<sdf::Quaternion>(_default);
-  else if (this->typeName == "sdf::Time" ||
-      this->typeName == "time")
-    this->Init<sdf::Time>(_default);
-  else if (this->typeName == "sdf::Color" ||
-      this->typeName == "color")
-    this->Init<sdf::Color>(_default);
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
+  }
   else
-    sdferr << "Unknown parameter type[" << this->typeName << "]\n";
+    sdferr << "Unknown parameter type[" << this->dataPtr->typeName << "]\n";
 }
 
 //////////////////////////////////////////////////
 Param::~Param()
 {
+  delete this->dataPtr;
+  this->dataPtr = NULL;
+}
+
+//////////////////////////////////////////////////
+bool Param::GetAny(boost::any &_anyVal) const
+{
+  if (this->IsType<int>())
+  {
+    int ret = 0;
+    if (!this->Get<int>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<uint64_t>())
+  {
+    uint64_t ret = 0;
+    if (!this->Get<uint64_t>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<double>())
+  {
+    double ret = 0;
+    if (!this->Get<double>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<float>())
+  {
+    float ret = 0;
+    if (!this->Get<float>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<bool>())
+  {
+    bool ret = false;
+    if (!this->Get<bool>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<std::string>())
+  {
+    std::string ret;
+    if (!this->Get<std::string>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<unsigned int>())
+  {
+    unsigned int ret = 0;
+    if (!this->Get<unsigned int>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<char>())
+  {
+    char ret = 0;
+    if (!this->Get<char>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<sdf::Time>())
+  {
+    sdf::Time ret;
+    if (!this->Get<sdf::Time>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<sdf::Color>())
+  {
+    sdf::Color ret;
+    if (!this->Get<sdf::Color>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<ignition::math::Vector3d>())
+  {
+    ignition::math::Vector3d ret;
+    if (!this->Get<ignition::math::Vector3d>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<ignition::math::Vector2i>())
+  {
+    ignition::math::Vector2i ret;
+    if (!this->Get<ignition::math::Vector2i>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<ignition::math::Vector2d>())
+  {
+    ignition::math::Vector2d ret;
+    if (!this->Get<ignition::math::Vector2d>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<ignition::math::Pose3d>())
+  {
+    ignition::math::Pose3d ret;
+    if (!this->Get<ignition::math::Pose3d>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<ignition::math::Quaterniond>())
+  {
+    ignition::math::Quaterniond ret;
+    if (!this->Get<ignition::math::Quaterniond>(ret))
+      return false;
+    _anyVal = ret;
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+  }
+  /// \deprecated The follow sdf Types are deprecated
+  else if (this->IsType<sdf::Vector3>())
+  {
+    sdferr << "sdf::Vector3 is deprecated. Use ignition::math::Vector3d\n";
+    sdf::Vector3 ret;
+    if (!this->Get<sdf::Vector3>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<sdf::Vector2i>())
+  {
+    sdferr << "sdf::Vector2i is deprecated. Use ignition::math::Vector2i\n";
+    sdf::Vector2i ret;
+    if (!this->Get<sdf::Vector2i>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<sdf::Vector2d>())
+  {
+    sdferr << "sdf::Vector2d is deprecated. Use ignition::math::Vector2d\n";
+    sdf::Vector2d ret;
+    if (!this->Get<sdf::Vector2d>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<sdf::Pose>())
+  {
+    sdferr << "sdf::Pose is deprecated. Use ignition::math::Pose3d\n";
+    sdf::Pose ret;
+    if (!this->Get<sdf::Pose>(ret))
+      return false;
+    _anyVal = ret;
+  }
+  else if (this->IsType<sdf::Quaternion>())
+  {
+    sdferr << "sdf::Quaternion is deprecated. "
+           << "Use ignition::math::Quaterniond\n";
+    sdf::Quaternion ret;
+    if (!this->Get<sdf::Quaternion>(ret))
+      return false;
+    _anyVal = ret;
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
+  }
+  else
+  {
+    sdferr << "Type of parameter not known: [" << this->GetTypeName() << "]\n";
+    return false;
+  }
+  return true;
 }
 
 //////////////////////////////////////////////////
 void Param::Update()
 {
-  if (this->updateFunc)
+  if (this->dataPtr->updateFunc)
   {
     try
     {
-      boost::apply_visitor(any_set(this->updateFunc()), this->value);
+      boost::apply_visitor(any_set(this->dataPtr->updateFunc()),
+      this->dataPtr->value);
     }
-    catch(boost::bad_lexical_cast &e)
+    catch(boost::bad_lexical_cast &/*e*/)
     {
       sdferr << "Unable to set value using Update for key["
-        << this->key << "]\n";
+        << this->dataPtr->key << "]\n";
     }
   }
 }
@@ -126,22 +351,27 @@ void Param::Update()
 //////////////////////////////////////////////////
 std::string Param::GetAsString() const
 {
-  return boost::lexical_cast<std::string>(this->value);
+  return boost::lexical_cast<std::string>(this->dataPtr->value);
 }
 
 //////////////////////////////////////////////////
 std::string Param::GetDefaultAsString() const
 {
-  return boost::lexical_cast<std::string>(this->defaultValue);
+  return boost::lexical_cast<std::string>(this->dataPtr->defaultValue);
 }
 
 //////////////////////////////////////////////////
 bool Param::SetFromString(const std::string &_value)
 {
+  // Under some circumstances, latin locales (es_ES or pt_BR) will return a
+  // comma for decimal position instead of a dot, making the conversion
+  // to fail. See bug #60 for more information. Force to use always C
+  setlocale(LC_NUMERIC, "C");
+
   std::string str = _value;
   boost::trim(str);
 
-  if (str.empty() && this->required)
+  if (str.empty() && this->dataPtr->required)
   {
     sdferr << "Empty string used when setting a required parameter. Key["
       << this->GetKey() << "]\n";
@@ -149,7 +379,7 @@ bool Param::SetFromString(const std::string &_value)
   }
   else if (str.empty())
   {
-    this->value = this->defaultValue;
+    this->dataPtr->value = this->dataPtr->defaultValue;
     return true;
   }
 
@@ -163,11 +393,62 @@ bool Param::SetFromString(const std::string &_value)
   else if (lowerTmp == "false")
     tmp = "0";
 
+  bool isHex = tmp.compare(0, 2, "0x") == 0;
+
   try
   {
-    boost::apply_visitor(string_set(tmp), this->value);
+    // If the string is hex, try to use stoi and stoul, and then
+    // lexical cast as a last resort.
+    if (isHex)
+    {
+      if (this->dataPtr->typeName == "int")
+        this->dataPtr->value = std::stoi(tmp, NULL, 16);
+      else if (this->dataPtr->typeName == "unsigned int")
+      {
+        this->dataPtr->value = static_cast<unsigned int>(
+            std::stoul(tmp, NULL, 16));
+      }
+      else
+      {
+        boost::apply_visitor(string_set(tmp), this->dataPtr->value);
+      }
+    }
+    // Otherwise use stod, stof, and lexical cast
+    else
+    {
+      if (this->dataPtr->typeName == "int")
+        this->dataPtr->value = std::stoi(tmp, NULL, 10);
+      else if (this->dataPtr->typeName == "unsigned int")
+      {
+        this->dataPtr->value = static_cast<unsigned int>(
+            std::stoul(tmp, NULL, 10));
+      }
+      else if (this->dataPtr->typeName == "double")
+        this->dataPtr->value = std::stod(tmp);
+      else if (this->dataPtr->typeName == "float")
+        this->dataPtr->value = std::stof(tmp);
+      else
+        boost::apply_visitor(string_set(tmp), this->dataPtr->value);
+    }
+  }
+  // Catch invalid argument exception from std::stoi/stoul/stod/stof
+  catch(std::invalid_argument &)
+  {
+    sdferr << "Invalid argument. Unable to set value ["
+      << str << " ] for key["
+      << this->dataPtr->key << "].\n";
+    return false;
+  }
+  // Catch out of range exception from std::stoi/stoul/stod/stof
+  catch(std::out_of_range &)
+  {
+    sdferr << "Out of range. Unable to set value ["
+      << str << " ] for key["
+      << this->dataPtr->key << "].\n";
+    return false;
   }
-  catch(boost::bad_lexical_cast &e)
+  // Catch boost lexical cast exceptions
+  catch(boost::bad_lexical_cast &)
   {
     if (str == "inf" || str == "-inf")
     {
@@ -179,49 +460,77 @@ bool Param::SetFromString(const std::string &_value)
     else
     {
       sdferr << "Unable to set value [" <<  str
-        << "] for key[" << this->key << "]\n";
+        << "] for key[" << this->dataPtr->key << "]\n";
       return false;
     }
   }
 
-  this->set = true;
-  return this->set;
+  this->dataPtr->set = true;
+  return this->dataPtr->set;
 }
 
 //////////////////////////////////////////////////
 void Param::Reset()
 {
-  this->value = this->defaultValue;
-  this->set = false;
+  this->dataPtr->value = this->dataPtr->defaultValue;
+  this->dataPtr->set = false;
 }
 
 //////////////////////////////////////////////////
 boost::shared_ptr<Param> Param::Clone() const
 {
-  return boost::shared_ptr<Param>(new Param(this->key, this->typeName,
-        this->GetAsString(), this->required, this->description));
+  return boost::shared_ptr<Param>(
+  new Param(this->dataPtr->key, this->dataPtr->typeName,
+      this->GetAsString(), this->dataPtr->required,
+      this->dataPtr->description));
 }
 
 //////////////////////////////////////////////////
 const std::type_info &Param::GetType() const
 {
-  return this->value.type();
+  return this->dataPtr->value.type();
 }
 
 //////////////////////////////////////////////////
 const std::string &Param::GetTypeName() const
 {
-  return this->typeName;
+  return this->dataPtr->typeName;
 }
 
 /////////////////////////////////////////////////
 void Param::SetDescription(const std::string &_desc)
 {
-  this->description = _desc;
+  this->dataPtr->description = _desc;
 }
 
 /////////////////////////////////////////////////
 std::string Param::GetDescription() const
 {
-  return this->description;
+  return this->dataPtr->description;
+}
+
+/////////////////////////////////////////////////
+const std::string &Param::GetKey() const
+{
+  return this->dataPtr->key;
+}
+
+/////////////////////////////////////////////////
+bool Param::GetRequired() const
+{
+  return this->dataPtr->required;
+}
+
+/////////////////////////////////////////////////
+Param &Param::operator=(const Param &_param)
+{
+  this->dataPtr->value = _param.dataPtr->value;
+  this->dataPtr->defaultValue  = _param.dataPtr->defaultValue;
+  return *this;
+}
+
+/////////////////////////////////////////////////
+bool Param::GetSet() const
+{
+  return this->dataPtr->set;
 }
diff --git a/src/Param_TEST.cc b/src/Param_TEST.cc
index 2cb5e2c..acfc073 100644
--- a/src/Param_TEST.cc
+++ b/src/Param_TEST.cc
@@ -16,14 +16,25 @@
 */
 
 #include <gtest/gtest.h>
+#include <boost/version.hpp>
 #include "sdf/Param.hh"
 
+bool check_double(std::string num)
+{
+    const std::string name = "number";
+    const std::string type = "double";
+    const std::string def = "0.0";
+
+    sdf::Param param(name, type, def, true);
+    return param.SetFromString(num);
+}
+
 ////////////////////////////////////////////////////
 /// Test getting a bool using true/false and 1/0.
 TEST(Param, Bool)
 {
   sdf::Param boolParam("key", "bool", "true", false, "description");
-  bool value;
+  bool value = true;
   boolParam.Get<bool>(value);
   EXPECT_TRUE(value);
 
@@ -53,6 +64,161 @@ TEST(Param, Bool)
   strParam.Set("%");
   strParam.Get<bool>(value);
   EXPECT_FALSE(value);
+
+  boolParam.Set(true);
+  boost::any anyValue;
+  EXPECT_TRUE(boolParam.GetAny(anyValue));
+  try
+  {
+    value = boost::any_cast<bool>(anyValue);
+  }
+  catch(boost::bad_any_cast &/*_e*/)
+  {
+    FAIL();
+  }
+  EXPECT_TRUE(value);
+}
+
+////////////////////////////////////////////////////
+/// Test decimal number
+TEST(SetFromString, Decimals)
+{
+  ASSERT_TRUE(check_double("0.2345"));
+}
+
+////////////////////////////////////////////////////
+/// Test setting and reading hex int values.
+TEST(Param, HexInt)
+{
+  sdf::Param intParam("key", "int", "0", false, "description");
+  int value;
+  EXPECT_TRUE(intParam.Get<int>(value));
+  EXPECT_EQ(value, 0);
+
+  EXPECT_TRUE(intParam.SetFromString("0x01"));
+  EXPECT_TRUE(intParam.Get<int>(value));
+  EXPECT_EQ(value, 1);
+
+  EXPECT_TRUE(intParam.SetFromString("0xff"));
+  EXPECT_TRUE(intParam.Get<int>(value));
+  EXPECT_EQ(value, 255);
+
+  EXPECT_TRUE(intParam.SetFromString("0x00002"));
+  EXPECT_TRUE(intParam.Get<int>(value));
+  EXPECT_EQ(value, 2);
+
+  EXPECT_FALSE(intParam.SetFromString("0xffffffffffffffffffffffffffffffffff"));
+  EXPECT_TRUE(intParam.Get<int>(value));
+  EXPECT_EQ(value, 2);
+}
+
+////////////////////////////////////////////////////
+/// Test setting and reading hex unsigned int values.
+TEST(Param, HexUInt)
+{
+  sdf::Param uintParam("key", "unsigned int", "0", false, "description");
+  unsigned int value;
+  EXPECT_TRUE(uintParam.Get<unsigned int>(value));
+  EXPECT_EQ(value, 0u);
+
+  EXPECT_TRUE(uintParam.SetFromString("0x01"));
+  EXPECT_TRUE(uintParam.Get<unsigned int>(value));
+  EXPECT_EQ(value, 1u);
+
+  EXPECT_TRUE(uintParam.SetFromString("0xff"));
+  EXPECT_TRUE(uintParam.Get<unsigned int>(value));
+  EXPECT_EQ(value, 255u);
+
+  EXPECT_TRUE(uintParam.SetFromString("0x00002"));
+  EXPECT_TRUE(uintParam.Get<unsigned int>(value));
+  EXPECT_EQ(value, 2u);
+
+  EXPECT_FALSE(uintParam.SetFromString("0xffffffffffffffffffffffffffffffffff"));
+  EXPECT_TRUE(uintParam.Get<unsigned int>(value));
+  EXPECT_EQ(value, 2u);
+}
+
+////////////////////////////////////////////////////
+/// Test setting and reading hex and non-hex float values.
+TEST(Param, HexFloat)
+{
+  sdf::Param floatParam("key", "float", "0", false, "description");
+  float value;
+  EXPECT_TRUE(floatParam.Get<float>(value));
+  EXPECT_FLOAT_EQ(value, 0.0f);
+
+  // Boost 1.58 and higher parses hex integers into floating point variables
+  // successfully, while older versions don't
+#if (BOOST_VERSION >= 105800)
+  {
+    EXPECT_TRUE(floatParam.SetFromString("0x01"));
+    EXPECT_TRUE(floatParam.Get<float>(value));
+    EXPECT_FLOAT_EQ(value, 1.0f);
+  }
+#else
+  {
+    EXPECT_FALSE(floatParam.SetFromString("0x01"));
+    EXPECT_TRUE(floatParam.Get<float>(value));
+    EXPECT_FLOAT_EQ(value, 0.0f);
+  }
+#endif
+
+  EXPECT_TRUE(floatParam.SetFromString("0.123"));
+  EXPECT_TRUE(floatParam.Get<float>(value));
+  EXPECT_FLOAT_EQ(value, 0.123f);
+
+  EXPECT_FALSE(floatParam.SetFromString("1.0e100"));
+  EXPECT_TRUE(floatParam.Get<float>(value));
+  EXPECT_FLOAT_EQ(value, 0.123f);
+}
+
+////////////////////////////////////////////////////
+/// Test setting and reading hex and non-hex double values.
+TEST(Param, HexDouble)
+{
+  sdf::Param doubleParam("key", "double", "0", false, "description");
+  double value;
+  EXPECT_TRUE(doubleParam.Get<double>(value));
+  EXPECT_DOUBLE_EQ(value, 0.0);
+
+  // Boost 1.58 and higher parses hex integers into floating point variables
+  // successfully, while older versions don't
+#if (BOOST_VERSION >= 105800)
+  {
+    EXPECT_TRUE(doubleParam.SetFromString("0x01"));
+    EXPECT_TRUE(doubleParam.Get<double>(value));
+    EXPECT_DOUBLE_EQ(value, 1.0);
+  }
+#else
+  {
+    EXPECT_FALSE(doubleParam.SetFromString("0x01"));
+    EXPECT_TRUE(doubleParam.Get<double>(value));
+    EXPECT_DOUBLE_EQ(value, 0.0);
+  }
+#endif
+
+  EXPECT_TRUE(doubleParam.SetFromString("0.123"));
+  EXPECT_TRUE(doubleParam.Get<double>(value));
+  EXPECT_DOUBLE_EQ(value, 0.123);
+
+  EXPECT_FALSE(doubleParam.SetFromString("1.0e1000"));
+  EXPECT_TRUE(doubleParam.Get<double>(value));
+  EXPECT_DOUBLE_EQ(value, 0.123);
+}
+
+////////////////////////////////////////////////////
+/// Test setting and reading uint64_t values.
+TEST(Param, uint64t)
+{
+  sdf::Param uint64tParam("key", "uint64_t", "1", false, "description");
+  uint64_t value;
+  EXPECT_TRUE(uint64tParam.Get<uint64_t>(value));
+  EXPECT_EQ(value, 1u);
+
+  // Max uint64_t
+  EXPECT_TRUE(uint64tParam.SetFromString("18446744073709551615"));
+  EXPECT_TRUE(uint64tParam.Get<uint64_t>(value));
+  EXPECT_EQ(value, UINT64_MAX);
 }
 
 /////////////////////////////////////////////////
diff --git a/src/SDF.cc b/src/SDF.cc
index 16e93ce..0e52d72 100644
--- a/src/SDF.cc
+++ b/src/SDF.cc
@@ -25,7 +25,16 @@
 #include "sdf/sdf_config.h"
 
 using namespace sdf;
+
+/// \todo Remove this pragma when SDF::version is removed
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
 std::string SDF::version = SDF_VERSION;
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
 
 typedef std::list<boost::filesystem::path> PathList;
 typedef std::map<std::string, PathList> URIPathMap;
@@ -76,12 +85,17 @@ std::string sdf::findFile(const std::string &_filename, bool _searchLocalPath,
 
   // Next check the versioned install path.
   path = boost::filesystem::path(SDF_SHARE_PATH) / "sdformat" /
-    sdf::SDF::version / _filename;
+    sdf::SDF::Version() / _filename;
   if (boost::filesystem::exists(path))
     return path.string();
 
   // Next check SDF_PATH environment variable
+#ifndef _WIN32
   char *pathCStr = getenv("SDF_PATH");
+#else
+  const char *pathCStr = sdf::winGetEnv("SDF_PATH");
+#endif
+
   if (pathCStr)
   {
     std::vector<std::string> paths;
@@ -150,867 +164,36 @@ void sdf::addURIPath(const std::string &_uri, const std::string &_path)
 }
 
 /////////////////////////////////////////////////
-Element::Element()
-{
-  this->copyChildren = false;
-}
-
-/////////////////////////////////////////////////
-Element::~Element()
-{
-  this->parent.reset();
-  for (Param_V::iterator iter = this->attributes.begin();
-      iter != this->attributes.end(); ++iter)
-  {
-    (*iter).reset();
-  }
-  this->attributes.clear();
-
-  for (ElementPtr_V::iterator iter = this->elements.begin();
-      iter != this->elements.end(); ++iter)
-  {
-    (*iter).reset();
-  }
-
-  for (ElementPtr_V::iterator iter = this->elementDescriptions.begin();
-      iter != this->elementDescriptions.end(); ++iter)
-  {
-    (*iter).reset();
-  }
-  this->elements.clear();
-  this->elementDescriptions.clear();
-
-  this->value.reset();
-
-  // this->Reset();
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::GetParent() const
-{
-  return this->parent;
-}
-
-/////////////////////////////////////////////////
-void Element::SetParent(const ElementPtr _parent)
-{
-  this->parent = _parent;
-}
-
-/////////////////////////////////////////////////
-void Element::SetName(const std::string &_name)
-{
-  this->name = _name;
-}
-
-/////////////////////////////////////////////////
-const std::string &Element::GetName() const
-{
-  return this->name;
-}
-
-/////////////////////////////////////////////////
-void Element::SetRequired(const std::string &_req)
-{
-  this->required = _req;
-}
-
-/////////////////////////////////////////////////
-const std::string &Element::GetRequired() const
-{
-  return this->required;
-}
-
-/////////////////////////////////////////////////
-void Element::SetCopyChildren(bool _value)
-{
-  this->copyChildren = _value;
-}
-
-/////////////////////////////////////////////////
-bool Element::GetCopyChildren() const
-{
-  return this->copyChildren;
-}
-
-/////////////////////////////////////////////////
-void Element::AddValue(const std::string &_type,
-    const std::string &_defaultValue, bool _required,
-    const std::string &_description)
-{
-  this->value = this->CreateParam(this->name, _type, _defaultValue, _required,
-      _description);
-}
-
-/////////////////////////////////////////////////
-boost::shared_ptr<Param> Element::CreateParam(const std::string &_key,
-    const std::string &_type, const std::string &_defaultValue, bool _required,
-    const std::string &_description)
-{
-  return boost::shared_ptr<Param>(
-        new Param(_key, _type, _defaultValue, _required, _description));
-}
-
-/////////////////////////////////////////////////
-void Element::AddAttribute(const std::string &_key, const std::string &_type,
-    const std::string &_defaultValue, bool _required,
-    const std::string &_description)
-{
-  this->attributes.push_back(
-      this->CreateParam(_key, _type, _defaultValue, _required, _description));
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::Clone() const
-{
-  ElementPtr clone(new Element);
-  clone->description = this->description;
-  clone->name = this->name;
-  clone->required = this->required;
-  // clone->parent = this->parent;
-  clone->copyChildren = this->copyChildren;
-  clone->includeFilename = this->includeFilename;
-
-  Param_V::const_iterator aiter;
-  for (aiter = this->attributes.begin();
-      aiter != this->attributes.end(); ++aiter)
-  {
-    clone->attributes.push_back((*aiter)->Clone());
-  }
-
-  ElementPtr_V::const_iterator eiter;
-  for (eiter = this->elementDescriptions.begin();
-      eiter != this->elementDescriptions.end(); ++eiter)
-  {
-    clone->elementDescriptions.push_back((*eiter)->Clone());
-  }
-
-  for (eiter = this->elements.begin(); eiter != this->elements.end(); ++eiter)
-  {
-    clone->elements.push_back((*eiter)->Clone());
-    clone->elements.back()->parent = clone;
-  }
-
-  if (this->value)
-    clone->value = this->value->Clone();
-
-  return clone;
-}
-
-/////////////////////////////////////////////////
-void Element::Copy(const ElementPtr _elem)
-{
-  this->name = _elem->GetName();
-  this->description = _elem->GetDescription();
-  this->required = _elem->GetRequired();
-  this->copyChildren = _elem->GetCopyChildren();
-  this->includeFilename = _elem->includeFilename;
-
-  for (Param_V::iterator iter = _elem->attributes.begin();
-       iter != _elem->attributes.end(); ++iter)
-  {
-    if (!this->HasAttribute((*iter)->GetKey()))
-      this->attributes.push_back((*iter)->Clone());
-    ParamPtr param = this->GetAttribute((*iter)->GetKey());
-    (*param) = (**iter);
-  }
-
-  if (_elem->GetValue())
-  {
-    if (!this->value)
-      this->value = _elem->GetValue()->Clone();
-    else
-      *(this->value) = *(_elem->GetValue());
-  }
-
-  this->elementDescriptions.clear();
-  for (ElementPtr_V::const_iterator iter = _elem->elementDescriptions.begin();
-       iter != _elem->elementDescriptions.end(); ++iter)
-  {
-    this->elementDescriptions.push_back((*iter)->Clone());
-  }
-
-  this->elements.clear();
-  for (ElementPtr_V::iterator iter = _elem->elements.begin();
-       iter != _elem->elements.end(); ++iter)
-  {
-    ElementPtr elem = (*iter)->Clone();
-    elem->Copy(*iter);
-    elem->parent = shared_from_this();
-    this->elements.push_back(elem);
-  }
-}
-
-/////////////////////////////////////////////////
-void Element::PrintDescription(const std::string &_prefix)
-{
-  std::cout << _prefix << "<element name ='" << this->name
-            << "' required ='" << this->required << "'>\n";
-
-  std::cout << _prefix << "  <description>" << this->description
-            << "</description>\n";
-
-  Param_V::iterator aiter;
-  for (aiter = this->attributes.begin();
-      aiter != this->attributes.end(); ++aiter)
-  {
-    std::cout << _prefix << "  <attribute name ='"
-              << (*aiter)->GetKey() << "' type ='" << (*aiter)->GetTypeName()
-              << "' default ='" << (*aiter)->GetDefaultAsString()
-              << "' required ='" << (*aiter)->GetRequired() << "'/>\n";
-  }
-
-  if (this->GetCopyChildren())
-    std::cout << _prefix << "  <element copy_data ='true' required ='*'/>\n";
-
-  ElementPtr_V::iterator eiter;
-  for (eiter = this->elementDescriptions.begin();
-      eiter != this->elementDescriptions.end(); ++eiter)
-  {
-    (*eiter)->PrintDescription(_prefix + "  ");
-  }
-
-  std::cout << _prefix << "</element>\n";
-}
-
-/////////////////////////////////////////////////
-void Element::PrintDocRightPane(std::string &_html, int _spacing, int &_index)
-{
-  std::ostringstream stream;
-  ElementPtr_V::iterator eiter;
-
-  int start = _index++;
-
-  std::string childHTML;
-  for (eiter = this->elementDescriptions.begin();
-      eiter != this->elementDescriptions.end(); ++eiter)
-  {
-    (*eiter)->PrintDocRightPane(childHTML, _spacing + 4, _index);
-  }
-
-  stream << "<a name=\"" << this->name << start
-         << "\">&lt" << this->name << "&gt</a>";
-
-  stream << "<div style='padding-left:" << _spacing << "px;'>\n";
-
-  stream << "<div style='background-color: #ffffff'>\n";
-
-  stream << "<font style='font-weight:bold'>Description: </font>";
-  if (!this->description.empty())
-    stream << this->description << "<br>\n";
-  else
-    stream << "none<br>\n";
-
-  stream << "<font style='font-weight:bold'>Required: </font>"
-         << this->required << "   \n";
-
-  stream << "<font style='font-weight:bold'>Type: </font>";
-  if (this->value)
-  {
-    stream << this->value->GetTypeName()
-           << "   \n"
-           << "<font style='font-weight:bold'>Default: </font>"
-           << this->value->GetDefaultAsString() << '\n';
-  }
-  else
-    stream << "n/a\n";
-
-  stream << "</div>";
-
-  if (this->attributes.size() > 0)
-  {
-    stream << "<div style='background-color: #dedede; padding-left:10px; "
-           << "display:inline-block;'>\n";
-    stream << "<font style='font-weight:bold'>Attributes</font><br>";
-
-    Param_V::iterator aiter;
-    for (aiter = this->attributes.begin();
-        aiter != this->attributes.end(); ++aiter)
-    {
-      stream << "<div style='display: inline-block;padding-bottom: 4px;'>\n";
-
-      stream << "<div style='float:left; width: 80px;'>\n";
-      stream << "<font style='font-style: italic;'>" << (*aiter)->GetKey()
-        << "</font>: ";
-      stream << "</div>\n";
-
-      stream << "<div style='float:left; padding-left: 4px; width: 300px;'>\n";
-
-      if (!(*aiter)->GetDescription().empty())
-          stream << (*aiter)->GetDescription() << "<br>\n";
-      else
-          stream << "no description<br>\n";
-
-      stream << "<font style='font-weight:bold'>Type: </font>"
-             << (*aiter)->GetTypeName() << "   "
-        << "<font style='font-weight:bold'>Default: </font>"
-        << (*aiter)->GetDefaultAsString() << "<br>";
-      stream << "</div>\n";
-
-      stream << "</div>\n";
-    }
-    stream << "</div>\n";
-    stream << "<br>\n";
-  }
-
-  _html += stream.str();
-  _html += childHTML;
-  _html += "</div>\n";
-}
-
-/////////////////////////////////////////////////
-void Element::PrintDocLeftPane(std::string &_html, int _spacing, int &_index)
-{
-  std::ostringstream stream;
-  ElementPtr_V::iterator eiter;
-
-  int start = _index++;
-
-  std::string childHTML;
-  for (eiter = this->elementDescriptions.begin();
-      eiter != this->elementDescriptions.end(); ++eiter)
-  {
-    (*eiter)->PrintDocLeftPane(childHTML, _spacing + 4, _index);
-  }
-
-  stream << "<a id='" << start << "' onclick='highlight(" << start
-         << ");' href=\"#" << this->name << start
-         << "\">&lt" << this->name << "&gt</a>";
-
-  stream << "<div style='padding-left:" << _spacing << "px;'>\n";
-
-  _html += stream.str();
-  _html += childHTML;
-  _html += "</div>\n";
-}
-
-/////////////////////////////////////////////////
-void Element::PrintValues(std::string _prefix)
-{
-  std::cout << _prefix << "<" << this->name;
-
-  Param_V::iterator aiter;
-  for (aiter = this->attributes.begin();
-       aiter != this->attributes.end(); ++aiter)
-  {
-    std::cout << " " << (*aiter)->GetKey() << "='"
-      << (*aiter)->GetAsString() << "'";
-  }
-
-  if (this->elements.size() > 0)
-  {
-    std::cout << ">\n";
-    ElementPtr_V::iterator eiter;
-    for (eiter = this->elements.begin();
-        eiter != this->elements.end(); ++eiter)
-    {
-      (*eiter)->PrintValues(_prefix + "  ");
-    }
-    std::cout << _prefix << "</" << this->name << ">\n";
-  }
-  else
-  {
-    if (this->value)
-    {
-      std::cout << ">" << this->value->GetAsString()
-        << "</" << this->name << ">\n";
-    }
-    else
-    {
-      std::cout << "/>\n";
-    }
-  }
-}
-
-/////////////////////////////////////////////////
-std::string Element::ToString(const std::string &_prefix) const
-{
-  std::ostringstream out;
-  this->ToString(_prefix, out);
-  return out.str();
-}
-
-/////////////////////////////////////////////////
-void Element::ToString(const std::string &_prefix,
-                       std::ostringstream &_out) const
-{
-  if (this->includeFilename.empty())
-  {
-    _out << _prefix << "<" << this->name;
-
-    Param_V::const_iterator aiter;
-    for (aiter = this->attributes.begin();
-        aiter != this->attributes.end(); ++aiter)
-    {
-      _out << " " << (*aiter)->GetKey() << "='"
-           << (*aiter)->GetAsString() << "'";
-    }
-
-    if (this->elements.size() > 0)
-    {
-      _out << ">\n";
-      ElementPtr_V::const_iterator eiter;
-      for (eiter = this->elements.begin();
-          eiter != this->elements.end(); ++eiter)
-      {
-        (*eiter)->ToString(_prefix + "  ", _out);
-      }
-      _out << _prefix << "</" << this->name << ">\n";
-    }
-    else
-    {
-      if (this->value)
-      {
-        _out << ">" << this->value->GetAsString()
-             << "</" << this->name << ">\n";
-      }
-      else
-      {
-        _out << "/>\n";
-      }
-    }
-  }
-  else
-  {
-    _out << _prefix << "<include filename='"
-         << this->includeFilename << "'/>\n";
-  }
-}
-
-/////////////////////////////////////////////////
-bool Element::HasAttribute(const std::string &_key)
-{
-  return this->GetAttribute(_key) != NULL;
-}
-
-/////////////////////////////////////////////////
-bool Element::GetAttributeSet(const std::string &_key)
-{
-  bool result = false;
-  ParamPtr p = this->GetAttribute(_key);
-  if (p)
-    result = p->GetSet();
-
-  return result;
-}
-
-/////////////////////////////////////////////////
-ParamPtr Element::GetAttribute(const std::string &_key)
-{
-  Param_V::const_iterator iter;
-  for (iter = this->attributes.begin();
-      iter != this->attributes.end(); ++iter)
-  {
-    if ((*iter)->GetKey() == _key)
-      return (*iter);
-  }
-  return ParamPtr();
-}
-
-/////////////////////////////////////////////////
-unsigned int Element::GetAttributeCount() const
-{
-  return this->attributes.size();
-}
-
-/////////////////////////////////////////////////
-ParamPtr Element::GetAttribute(unsigned int _index) const
-{
-  ParamPtr result;
-  if (_index < this->attributes.size())
-    result = this->attributes[_index];
-
-  return result;
-}
-
-/////////////////////////////////////////////////
-unsigned int Element::GetElementDescriptionCount() const
-{
-  return this->elementDescriptions.size();
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::GetElementDescription(unsigned int _index) const
-{
-  ElementPtr result;
-  if (_index < this->elementDescriptions.size())
-    result = this->elementDescriptions[_index];
-  return result;
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::GetElementDescription(const std::string &_key) const
-{
-  ElementPtr_V::const_iterator iter;
-  for (iter = this->elementDescriptions.begin();
-       iter != this->elementDescriptions.end(); ++iter)
-  {
-    if ((*iter)->GetName() == _key)
-      return (*iter);
-  }
-
-  return ElementPtr();
-}
-
-/////////////////////////////////////////////////
-ParamPtr Element::GetValue()
-{
-  return this->value;
-}
-
-/////////////////////////////////////////////////
-bool Element::HasElement(const std::string &_name) const
-{
-  ElementPtr_V::const_iterator iter;
-  for (iter = this->elements.begin(); iter != this->elements.end(); ++iter)
-  {
-    if ((*iter)->GetName() == _name)
-      return true;
-  }
-
-  return false;
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::GetElementImpl(const std::string &_name) const
-{
-  ElementPtr_V::const_iterator iter;
-  for (iter = this->elements.begin(); iter != this->elements.end(); ++iter)
-  {
-    if ((*iter)->GetName() == _name)
-      return (*iter);
-  }
-
-  // gzdbg << "Unable to find element [" << _name << "] return empty\n";
-  return ElementPtr();
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::GetFirstElement() const
-{
-  if (this->elements.empty())
-    return ElementPtr();
-  else
-    return this->elements.front();
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::GetNextElement(const std::string &_name) const
-{
-  if (this->parent)
-  {
-    ElementPtr_V::const_iterator iter;
-    iter = std::find(this->parent->elements.begin(),
-        this->parent->elements.end(), shared_from_this());
-
-    if (iter == this->parent->elements.end())
-    {
-      return ElementPtr();
-    }
-
-    ++iter;
-    if (iter == this->parent->elements.end())
-      return ElementPtr();
-    else if (_name.empty())
-      return *(iter);
-    else
-    {
-      for (; iter != this->parent->elements.end(); ++iter)
-      {
-        if ((*iter)->GetName() == _name)
-          return (*iter);
-      }
-    }
-  }
-
-  return ElementPtr();
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::GetElement(const std::string &_name)
-{
-  if (this->HasElement(_name))
-    return this->GetElementImpl(_name);
-  else
-    return this->AddElement(_name);
-}
-
-/////////////////////////////////////////////////
-void Element::InsertElement(ElementPtr _elem)
-{
-  this->elements.push_back(_elem);
-}
-
-/////////////////////////////////////////////////
-bool Element::HasElementDescription(const std::string &_name)
-{
-  bool result = false;
-  ElementPtr_V::const_iterator iter;
-  for (iter = this->elementDescriptions.begin();
-       iter != this->elementDescriptions.end(); ++iter)
-  {
-    if ((*iter)->name == _name)
-    {
-      result = true;
-      break;
-    }
-  }
-
-  return result;
-}
-
-/////////////////////////////////////////////////
-ElementPtr Element::AddElement(const std::string &_name)
-{
-  ElementPtr_V::const_iterator iter, iter2;
-  for (iter = this->elementDescriptions.begin();
-      iter != this->elementDescriptions.end(); ++iter)
-  {
-    if ((*iter)->name == _name)
-    {
-      ElementPtr elem = (*iter)->Clone();
-      elem->SetParent(shared_from_this());
-      this->elements.push_back(elem);
-
-      // Add all child elements.
-      for (iter2 = elem->elementDescriptions.begin();
-           iter2 != elem->elementDescriptions.end(); ++iter2)
-      {
-        // Add only required child element
-        if ((*iter2)->GetRequired() == "1")
-        {
-          elem->AddElement((*iter2)->name);
-        }
-      }
-
-      return this->elements.back();
-    }
-  }
-  sdferr << "Missing element description for [" << _name << "]\n";
-  return ElementPtr();
-}
-
-/////////////////////////////////////////////////
-void Element::ClearElements()
-{
-  for (sdf::ElementPtr_V::iterator iter = this->elements.begin();
-      iter != this->elements.end(); ++iter)
-  {
-    (*iter)->ClearElements();
-  }
-
-  this->elements.clear();
-}
-
-/////////////////////////////////////////////////
-void Element::Update()
-{
-  for (sdf::Param_V::iterator iter = this->attributes.begin();
-      iter != this->attributes.end(); ++iter)
-  {
-    (*iter)->Update();
-  }
-
-  for (sdf::ElementPtr_V::iterator iter = this->elements.begin();
-      iter != this->elements.end(); ++iter)
-  {
-    (*iter)->Update();
-  }
-
-  if (this->value)
-    this->value->Update();
-}
-
-/////////////////////////////////////////////////
-void Element::Reset()
-{
-  for (ElementPtr_V::iterator iter = this->elements.begin();
-      iter != this->elements.end(); ++iter)
-  {
-    if (*iter)
-      (*iter)->Reset();
-    (*iter).reset();
-  }
-
-  for (ElementPtr_V::iterator iter = this->elementDescriptions.begin();
-      iter != this->elementDescriptions.end(); ++iter)
-  {
-    if (*iter)
-      (*iter)->Reset();
-    (*iter).reset();
-  }
-  this->elements.clear();
-  this->elementDescriptions.clear();
-
-  this->value.reset();
-
-  this->parent.reset();
-}
-
-/////////////////////////////////////////////////
-void Element::AddElementDescription(ElementPtr _elem)
-{
-  this->elementDescriptions.push_back(_elem);
-}
-
-/////////////////////////////////////////////////
-void Element::SetInclude(const std::string &_filename)
-{
-  this->includeFilename = _filename;
-}
-
-/////////////////////////////////////////////////
-std::string Element::GetInclude() const
-{
-  return this->includeFilename;
-}
-
-/////////////////////////////////////////////////
-std::string Element::GetDescription() const
-{
-  return this->description;
-}
-
-/////////////////////////////////////////////////
-void Element::SetDescription(const std::string &_desc)
-{
-  this->description = _desc;
-}
-
-/////////////////////////////////////////////////
-void Element::RemoveFromParent()
-{
-  if (this->parent)
-  {
-    ElementPtr_V::iterator iter;
-    iter = std::find(this->parent->elements.begin(),
-        this->parent->elements.end(), shared_from_this());
-
-    if (iter != this->parent->elements.end())
-    {
-      this->parent->elements.erase(iter);
-      this->parent.reset();
-    }
-  }
-}
-
-
-/////////////////////////////////////////////////
-bool Element::GetValueBool(const std::string &_key)
-{
-  return this->Get<bool>(_key);
-}
-
-/////////////////////////////////////////////////
-int Element::GetValueInt(const std::string &_key)
-{
-  return this->Get<int>(_key);
-}
-
-/////////////////////////////////////////////////
-float Element::GetValueFloat(const std::string &_key)
-{
-  return this->Get<float>(_key);
-}
-
-/////////////////////////////////////////////////
-double Element::GetValueDouble(const std::string &_key)
-{
-  return this->Get<double>(_key);
-}
-
-/////////////////////////////////////////////////
-unsigned int Element::GetValueUInt(const std::string &_key)
-{
-  return this->Get<unsigned int>(_key);
-}
-
-/////////////////////////////////////////////////
-char Element::GetValueChar(const std::string &_key)
-{
-  return this->Get<char>(_key);
-}
-
-/////////////////////////////////////////////////
-std::string Element::GetValueString(const std::string &_key)
-{
-  return this->Get<std::string>(_key);
-}
-
-/////////////////////////////////////////////////
-sdf::Vector3 Element::GetValueVector3(const std::string &_key)
-{
-  return this->Get<sdf::Vector3>(_key);
-}
-
-/////////////////////////////////////////////////
-sdf::Vector2d Element::GetValueVector2d(const std::string &_key)
-{
-  return this->Get<sdf::Vector2d>(_key);
-}
-
-/////////////////////////////////////////////////
-sdf::Quaternion Element::GetValueQuaternion(const std::string &_key)
-{
-  return this->Get<sdf::Quaternion>(_key);
-}
-
-/////////////////////////////////////////////////
-sdf::Pose Element::GetValuePose(const std::string &_key)
-{
-  return this->Get<sdf::Pose>(_key);
-}
-
-/////////////////////////////////////////////////
-sdf::Color Element::GetValueColor(const std::string &_key)
-{
-  return this->Get<sdf::Color>(_key);
-}
-
-/////////////////////////////////////////////////
-sdf::Time Element::GetValueTime(const std::string &_key)
-{
-  return this->Get<sdf::Time>(_key);
-}
-
-/////////////////////////////////////////////////
-void Element::RemoveChild(ElementPtr _child)
-{
-  SDF_ASSERT(_child, "Cannot remove a NULL child pointer");
-
-  ElementPtr_V::iterator iter;
-  iter = std::find(this->elements.begin(),
-                   this->elements.end(), _child);
-
-  if (iter != this->elements.end())
-  {
-    _child->SetParent(ElementPtr());
-    this->elements.erase(iter);
-  }
-}
-
+/// \todo Remove this pragma once this->root is removed
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
 /////////////////////////////////////////////////
 SDF::SDF()
-: root(new Element)
+  : root(new Element)
 {
 }
 
-
 /////////////////////////////////////////////////
 SDF::~SDF()
 {
 }
+/// \todo Remove this pragma once this->root is removed
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
 
 /////////////////////////////////////////////////
 void SDF::PrintDescription()
 {
-  this->root->PrintDescription("");
+  this->Root()->PrintDescription("");
 }
 
 /////////////////////////////////////////////////
 void SDF::PrintValues()
 {
-  this->root->PrintValues("");
+  this->Root()->PrintValues("");
 }
 
 /////////////////////////////////////////////////
@@ -1018,10 +201,10 @@ void SDF::PrintDoc()
 {
   std::string html, html2;
   int index = 0;
-  this->root->PrintDocLeftPane(html, 10, index);
+  this->Root()->PrintDocLeftPane(html, 10, index);
 
   index = 0;
-  this->root->PrintDocRightPane(html2, 10, index);
+  this->Root()->PrintDocRightPane(html2, 10, index);
 
   std::cout << "<!DOCTYPE HTML>\n"
   << "<html>\n"
@@ -1066,7 +249,7 @@ void SDF::PrintDoc()
   << "</head>\n<body>\n";
 
   std::cout << "<div style='padding:4px'>\n"
-            << "<h1>SDF " << SDF::version << "</h1>\n";
+            << "<h1>SDF " << SDF::Version() << "</h1>\n";
 
   std::cout << "<p>The Robot Modeling Language (SDF) is an XML file "
             << "format used to describe all the elements in a simulation "
@@ -1130,7 +313,7 @@ void SDF::PrintDoc()
 /////////////////////////////////////////////////
 void SDF::Write(const std::string &_filename)
 {
-  std::string string = this->root->ToString("");
+  std::string string = this->Root()->ToString("");
 
   std::ofstream out(_filename.c_str(), std::ios::out);
 
@@ -1149,12 +332,12 @@ std::string SDF::ToString() const
   std::ostringstream stream;
 
   stream << "<?xml version='1.0'?>\n";
-  if (this->root->GetName() != "sdf")
-    stream << "<sdf version='" << SDF::version << "'>\n";
+  if (this->Root()->GetName() != "sdf")
+    stream << "<sdf version='" << SDF::Version() << "'>\n";
 
-  stream << this->root->ToString("");
+  stream << this->Root()->ToString("");
 
-  if (this->root->GetName() != "sdf")
+  if (this->Root()->GetName() != "sdf")
     stream << "</sdf>";
 
   return stream.str();
@@ -1163,9 +346,43 @@ std::string SDF::ToString() const
 /////////////////////////////////////////////////
 void SDF::SetFromString(const std::string &_sdfData)
 {
-  sdf::initFile("root.sdf", this->root);
-  if (!sdf::readString(_sdfData, this->root))
+  sdf::initFile("root.sdf", this->Root());
+  if (!sdf::readString(_sdfData, this->Root()))
   {
     sdferr << "Unable to parse sdf string[" << _sdfData << "]\n";
   }
 }
+
+/// \todo Remove this pragma once this->root this->version is removed
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+/////////////////////////////////////////////////
+ElementPtr SDF::Root() const
+{
+  return this->root;
+}
+
+/////////////////////////////////////////////////
+void SDF::Root(const ElementPtr _root)
+{
+  this->root = _root;
+}
+
+/////////////////////////////////////////////////
+std::string SDF::Version()
+{
+  return version;
+}
+
+/////////////////////////////////////////////////
+void SDF::Version(const std::string &_version)
+{
+  version = _version;
+}
+
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
diff --git a/src/SDFExtension.cc b/src/SDFExtension.cc
new file mode 100644
index 0000000..1cb781c
--- /dev/null
+++ b/src/SDFExtension.cc
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2015 Open Source Robotics Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+*/
+
+#include "sdf/SDFExtension.hh"
+
+using namespace sdf;
+
+/////////////////////////////////////////////////
+SDFExtension::SDFExtension()
+{
+  this->material.clear();
+  this->visual_blobs.clear();
+  this->setStaticFlag = false;
+  this->gravity = true;
+  this->isDampingFactor = false;
+  this->isMaxContacts = false;
+  this->isMaxVel = false;
+  this->isMinDepth = false;
+  this->fdir1.clear();
+  this->isMu1 = false;
+  this->isMu2 = false;
+  this->isKp = false;
+  this->isKd = false;
+  this->selfCollide = false;
+  this->isLaserRetro = false;
+  this->isStopCfm = false;
+  this->isStopErp = false;
+  this->isStopKp = false;
+  this->isStopKd = false;
+  this->isInitialJointPosition = false;
+  this->isFudgeFactor = false;
+  this->isProvideFeedback = false;
+  this->isImplicitSpringDamper = false;
+  this->blobs.clear();
+
+  this->dampingFactor = 0;
+  this->maxContacts = 0;
+  this->maxVel = 0;
+  this->minDepth = 0;
+  this->mu1 = 0;
+  this->mu2 = 0;
+  this->kp = 100000000;
+  this->kd = 1;
+  this->laserRetro = 101;
+  this->stopCfm = 0;
+  this->stopErp = 0.1;
+  this->stopKp = 100000000;
+  this->stopKd = 1;
+  this->initialJointPosition = 0;
+  this->fudgeFactor = 1;
+
+  this->provideFeedback = false;
+  this->implicitSpringDamper = false;
+}
+
+/////////////////////////////////////////////////
+SDFExtension::SDFExtension(const SDFExtension &_ge)
+{
+  this->material = _ge.material;
+  this->visual_blobs = _ge.visual_blobs;
+  this->setStaticFlag = _ge.setStaticFlag;
+  this->gravity = _ge.gravity;
+  this->isDampingFactor = _ge.isDampingFactor;
+  this->isMaxContacts = _ge.isMaxContacts;
+  this->isMaxVel = _ge.isMaxVel;
+  this->isMinDepth = _ge.isMinDepth;
+  this->fdir1 = _ge.fdir1;
+  this->isMu1 = _ge.isMu1;
+  this->isMu2 = _ge.isMu2;
+  this->isKp = _ge.isKp;
+  this->isKd = _ge.isKd;
+  this->selfCollide = _ge.selfCollide;
+  this->isLaserRetro = _ge.isLaserRetro;
+  this->isStopKp = _ge.isStopKp;
+  this->isStopKd = _ge.isStopKd;
+  this->isStopCfm = _ge.isStopCfm;
+  this->isStopErp = _ge.isStopErp;
+  this->isInitialJointPosition = _ge.isInitialJointPosition;
+  this->isFudgeFactor = _ge.isFudgeFactor;
+  this->isProvideFeedback = _ge.isProvideFeedback;
+  this->isImplicitSpringDamper = _ge.isImplicitSpringDamper;
+  this->provideFeedback = _ge.provideFeedback;
+  this->implicitSpringDamper = _ge.implicitSpringDamper;
+  this->oldLinkName = _ge.oldLinkName;
+  this->reductionTransform = _ge.reductionTransform;
+  this->blobs = _ge.blobs;
+
+  this->dampingFactor = _ge.dampingFactor;
+  this->maxContacts = _ge.maxContacts;
+  this->maxVel = _ge.maxVel;
+  this->minDepth = _ge.minDepth;
+  this->mu1 = _ge.mu1;
+  this->mu2 = _ge.mu2;
+  this->kp = _ge.kp;
+  this->kd = _ge.kd;
+  this->laserRetro = _ge.laserRetro;
+  this->stopKp = _ge.stopKp;
+  this->stopKd = _ge.stopKd;
+  this->stopCfm = _ge.stopCfm;
+  this->stopErp = _ge.stopErp;
+  this->initialJointPosition = _ge.initialJointPosition;
+  this->fudgeFactor = _ge.fudgeFactor;
+}
diff --git a/src/SDF_TEST.cc b/src/SDF_TEST.cc
index 6f971d8..734e735 100644
--- a/src/SDF_TEST.cc
+++ b/src/SDF_TEST.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright 2012 Open Source Robotics Foundation
+ * Copyright 2012-2015 Open Source Robotics Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,26 +17,33 @@
 
 #include <gtest/gtest.h>
 #include <boost/filesystem.hpp>
+#include <boost/any.hpp>
+#include <ignition/math.hh>
 #include "test_config.h"
 #include "sdf/sdf.hh"
 
 ////////////////////////////////////////////////////
 // Testing fixture
-class RmlUpdate : public testing::Test
+class SDFUpdate : public testing::Test
 {
-  protected: RmlUpdate()
+  protected: SDFUpdate()
              {
                boost::filesystem::path path =
                  boost::filesystem::path(PROJECT_SOURCE_PATH)
                  / "sdf" / SDF_VERSION;
 
                // Store original env var.
+#ifndef _WIN32
                this->origSDFPath = getenv("SDF_PATH");
+#else
+               this->origSDFPath = const_cast<char*>(
+                   sdf::winGetEnv("SDF_PATH"));
+#endif
 
                setenv("SDF_PATH", path.string().c_str(), 1);
              }
 
-  protected: virtual void TearDown()
+  protected: virtual ~SDFUpdate()
              {
                // Restore original env var.
                // osx segfaults unless this check is in place
@@ -49,19 +56,19 @@ class RmlUpdate : public testing::Test
   private: char *origSDFPath;
 };
 
-class RmlUpdateFixture
+class SDFUpdateFixture
 {
   public:  std::string GetName() const {return this->name;}
   public:  bool GetFlag() const {return this->flag;}
-  public:  sdf::Pose GetPose() const {return this->pose;}
+  public:  ignition::math::Pose3d GetPose() const {return this->pose;}
   public:  std::string name;
   public:  bool flag;
-  public:  sdf::Pose pose;
+  public:  ignition::math::Pose3d pose;
 };
 
 ////////////////////////////////////////////////////
 /// Ensure that SDF::Update is working for attributes
-TEST_F(RmlUpdate, UpdateAttribute)
+TEST_F(SDFUpdate, UpdateAttribute)
 {
   // Set up a simple sdf model file
   std::ostringstream stream;
@@ -75,29 +82,29 @@ TEST_F(RmlUpdate, UpdateAttribute)
   sdfParsed.SetFromString(stream.str());
 
   // Verify correct parsing
-  EXPECT_TRUE(sdfParsed.root->HasElement("model"));
-  sdf::ElementPtr modelElem = sdfParsed.root->GetElement("model");
+  EXPECT_TRUE(sdfParsed.Root()->HasElement("model"));
+  sdf::ElementPtr modelElem = sdfParsed.Root()->GetElement("model");
 
   // Read name attribute value
   EXPECT_TRUE(modelElem->HasAttribute("name"));
   sdf::ParamPtr nameParam = modelElem->GetAttribute("name");
-  EXPECT_EQ(nameParam->GetType(), typeid(std::string));
+  EXPECT_TRUE(nameParam->IsType<std::string>());
 
   // Set test class variables based on sdf values
   // Set parameter update functions to test class accessors
-  RmlUpdateFixture fixture;
+  SDFUpdateFixture fixture;
   nameParam->Get(fixture.name);
-  nameParam->SetUpdateFunc(boost::bind(&RmlUpdateFixture::GetName, &fixture));
+  nameParam->SetUpdateFunc(boost::bind(&SDFUpdateFixture::GetName, &fixture));
 
   std::string nameCheck;
   int i;
   for (i = 0; i < 4; i++)
   {
     // Update test class variables
-    fixture.name[0] = 'd' + i;
+    fixture.name[0] = 'd' + static_cast<char>(i);
 
     // Update root sdf element
-    sdfParsed.root->Update();
+    sdfParsed.Root()->Update();
 
     // Expect sdf values to match test class variables
     nameParam->Get(nameCheck);
@@ -107,7 +114,7 @@ TEST_F(RmlUpdate, UpdateAttribute)
 
 ////////////////////////////////////////////////////
 /// Ensure that SDF::Update is working for elements
-TEST_F(RmlUpdate, UpdateElement)
+TEST_F(SDFUpdate, UpdateElement)
 {
   // Set up a simple sdf model file
   std::ostringstream stream;
@@ -121,40 +128,40 @@ TEST_F(RmlUpdate, UpdateElement)
   sdfParsed.SetFromString(stream.str());
 
   // Verify correct parsing
-  EXPECT_TRUE(sdfParsed.root->HasElement("model"));
-  sdf::ElementPtr modelElem = sdfParsed.root->GetElement("model");
+  EXPECT_TRUE(sdfParsed.Root()->HasElement("model"));
+  sdf::ElementPtr modelElem = sdfParsed.Root()->GetElement("model");
 
   // Read static element value
   EXPECT_TRUE(modelElem->HasElement("static"));
   sdf::ParamPtr staticParam = modelElem->GetElement("static")->GetValue();
-  EXPECT_TRUE(staticParam->GetType() == typeid(bool));
+  EXPECT_TRUE(staticParam->IsType<bool>());
 
   // Read pose element value
   EXPECT_TRUE(modelElem->HasElement("pose"));
   sdf::ParamPtr poseParam = modelElem->GetElement("pose")->GetValue();
-  EXPECT_TRUE(poseParam->GetType() == typeid(sdf::Pose));
+  EXPECT_TRUE(poseParam->IsType<ignition::math::Pose3d>());
 
   // Set test class variables based on sdf values
   // Set parameter update functions to test class accessors
-  RmlUpdateFixture fixture;
+  SDFUpdateFixture fixture;
   staticParam->Get(fixture.flag);
-  staticParam->SetUpdateFunc(boost::bind(&RmlUpdateFixture::GetFlag, &fixture));
+  staticParam->SetUpdateFunc(boost::bind(&SDFUpdateFixture::GetFlag, &fixture));
   poseParam->Get(fixture.pose);
-  poseParam->SetUpdateFunc(boost::bind(&RmlUpdateFixture::GetPose, &fixture));
+  poseParam->SetUpdateFunc(boost::bind(&SDFUpdateFixture::GetPose, &fixture));
 
   bool flagCheck;
-  sdf::Pose poseCheck;
+  ignition::math::Pose3d poseCheck;
   int i;
   for (i = 0; i < 4; i++)
   {
     // Update test class variables
     fixture.flag = !fixture.flag;
-    fixture.pose.pos.x = i;
-    fixture.pose.pos.y = i+10;
-    fixture.pose.pos.z = -i*i*i;
+    fixture.pose.Pos().X() = i;
+    fixture.pose.Pos().Y() = i+10;
+    fixture.pose.Pos().Z() = -i*i*i;
 
     // Update root sdf element
-    sdfParsed.root->Update();
+    sdfParsed.Root()->Update();
 
     // Expect sdf values to match test class variables
     staticParam->Get(flagCheck);
@@ -166,7 +173,7 @@ TEST_F(RmlUpdate, UpdateElement)
 
 ////////////////////////////////////////////////////
 /// Ensure that SDF::Element::RemoveFromParent is working
-TEST_F(RmlUpdate, ElementRemoveFromParent)
+TEST_F(SDFUpdate, ElementRemoveFromParent)
 {
   // Set up a simple sdf model file
   std::ostringstream stream;
@@ -190,12 +197,12 @@ TEST_F(RmlUpdate, ElementRemoveFromParent)
   sdf::ElementPtr elem;
 
   // Verify correct parsing
-  EXPECT_TRUE(sdfParsed.root->HasElement("model"));
-  elem = sdfParsed.root->GetElement("model");
+  EXPECT_TRUE(sdfParsed.Root()->HasElement("model"));
+  elem = sdfParsed.Root()->GetElement("model");
 
   // Select the second model named 'model2'
   elem = elem->GetNextElement("model");
-  EXPECT_TRUE(elem);
+  EXPECT_TRUE(elem != NULL);
   EXPECT_TRUE(elem->HasAttribute("name"));
   EXPECT_EQ(elem->Get<std::string>("name"), "model2");
 
@@ -203,7 +210,7 @@ TEST_F(RmlUpdate, ElementRemoveFromParent)
   elem->RemoveFromParent();
 
   // Get first model element again
-  elem = sdfParsed.root->GetElement("model");
+  elem = sdfParsed.Root()->GetElement("model");
   // Check name == model1
   EXPECT_TRUE(elem->HasAttribute("name"));
   EXPECT_EQ(elem->Get<std::string>("name"), "model1");
@@ -221,7 +228,7 @@ TEST_F(RmlUpdate, ElementRemoveFromParent)
 
 ////////////////////////////////////////////////////
 /// Ensure that SDF::Element::RemoveChild is working
-TEST_F(RmlUpdate, ElementRemoveChild)
+TEST_F(SDFUpdate, ElementRemoveChild)
 {
   // Set up a simple sdf model file
   std::ostringstream stream;
@@ -245,17 +252,17 @@ TEST_F(RmlUpdate, ElementRemoveChild)
   sdf::ElementPtr elem, elem2;
 
   // Verify correct parsing
-  EXPECT_TRUE(sdfParsed.root->HasElement("model"));
-  elem = sdfParsed.root->GetElement("model");
+  EXPECT_TRUE(sdfParsed.Root()->HasElement("model"));
+  elem = sdfParsed.Root()->GetElement("model");
 
   // Select the static element in model1
   elem2 = elem->GetElement("static");
-  EXPECT_TRUE(elem2);
+  EXPECT_TRUE(elem2 != NULL);
   EXPECT_FALSE(elem2->Get<bool>());
   elem->RemoveChild(elem2);
 
   // Get first model element again
-  elem = sdfParsed.root->GetElement("model");
+  elem = sdfParsed.Root()->GetElement("model");
   // Check name == model1
   EXPECT_TRUE(elem->HasAttribute("name"));
   EXPECT_EQ(elem->Get<std::string>("name"), "model1");
@@ -267,10 +274,10 @@ TEST_F(RmlUpdate, ElementRemoveChild)
   elem2 = elem->GetNextElement("model");
 
   // Remove model2
-  sdfParsed.root->RemoveChild(elem2);
+  sdfParsed.Root()->RemoveChild(elem2);
 
   // Get first model element again
-  elem = sdfParsed.root->GetElement("model");
+  elem = sdfParsed.Root()->GetElement("model");
   // Check name == model1
   EXPECT_TRUE(elem->HasAttribute("name"));
   EXPECT_EQ(elem->Get<std::string>("name"), "model1");
@@ -288,7 +295,7 @@ TEST_F(RmlUpdate, ElementRemoveChild)
 
 ////////////////////////////////////////////////////
 /// Ensure that getting empty values with empty keys returns correct values.
-TEST_F(RmlUpdate, EmptyValues)
+TEST_F(SDFUpdate, EmptyValues)
 {
   std::string emptyString;
   sdf::ElementPtr elem;
@@ -321,31 +328,40 @@ TEST_F(RmlUpdate, EmptyValues)
   EXPECT_EQ(elem->Get<std::string>(emptyString), "hello");
 
   elem.reset(new sdf::Element());
-  EXPECT_EQ(elem->Get<sdf::Vector2d>(emptyString), sdf::Vector2d());
+  EXPECT_EQ(elem->Get<ignition::math::Vector2d>(emptyString),
+      ignition::math::Vector2d());
   elem->AddValue("vector2d", "1 2", "0", "description");
-  EXPECT_EQ(elem->Get<sdf::Vector2d>(emptyString), sdf::Vector2d(1, 2));
+  EXPECT_EQ(elem->Get<ignition::math::Vector2d>(emptyString),
+      ignition::math::Vector2d(1, 2));
 
   elem.reset(new sdf::Element());
-  EXPECT_EQ(elem->Get<sdf::Vector3>(emptyString), sdf::Vector3());
+  EXPECT_EQ(elem->Get<ignition::math::Vector3d>(emptyString),
+      ignition::math::Vector3d());
   elem->AddValue("vector3", "1 2 3", "0", "description");
-  EXPECT_EQ(elem->Get<sdf::Vector3>(emptyString), sdf::Vector3(1, 2, 3));
+  EXPECT_EQ(elem->Get<ignition::math::Vector3d>(emptyString),
+      ignition::math::Vector3d(1, 2, 3));
 
   elem.reset(new sdf::Element());
-  EXPECT_EQ(elem->Get<sdf::Quaternion>(emptyString), sdf::Quaternion());
+  EXPECT_EQ(elem->Get<ignition::math::Quaterniond>(emptyString),
+            ignition::math::Quaterniond());
   elem->AddValue("quaternion", "1 2 3", "0", "description");
-  EXPECT_EQ(elem->Get<sdf::Quaternion>(emptyString),
-            sdf::Quaternion(-2.14159, 1.14159, -0.141593));
+  EXPECT_EQ(elem->Get<ignition::math::Quaterniond>(emptyString),
+            ignition::math::Quaterniond(-2.14159, 1.14159, -0.141593));
 
   elem.reset(new sdf::Element());
-  EXPECT_EQ(elem->Get<sdf::Pose>(emptyString), sdf::Pose());
-  elem->AddValue("pose", "1 2 3 4 5 6", "0", "description");
-  EXPECT_EQ(elem->Get<sdf::Pose>(emptyString), sdf::Pose(1, 2, 3, 4, 5, 6));
+  EXPECT_EQ(elem->Get<ignition::math::Pose3d>(emptyString),
+      ignition::math::Pose3d());
+  elem->AddValue("pose", "1.0 2.0 3.0 4.0 5.0 6.0", "0", "description");
+  EXPECT_EQ(elem->Get<ignition::math::Pose3d>(emptyString).Pos(),
+      ignition::math::Pose3d(1, 2, 3, 4, 5, 6).Pos());
+  EXPECT_EQ(elem->Get<ignition::math::Pose3d>(emptyString).Rot().Euler(),
+      ignition::math::Pose3d(1, 2, 3, 4, 5, 6).Rot().Euler());
 
   elem.reset(new sdf::Element());
   EXPECT_EQ(elem->Get<sdf::Color>(emptyString), sdf::Color());
   elem->AddValue("color", ".1 .2 .3 1.0", "0", "description");
   EXPECT_EQ(elem->Get<sdf::Color>(emptyString),
-            sdf::Color(.1, .2, .3, 1.0));
+            sdf::Color(.1f, .2f, .3f, 1.0f));
 
   elem.reset(new sdf::Element());
   EXPECT_EQ(elem->Get<sdf::Time>(emptyString), sdf::Time());
@@ -364,6 +380,167 @@ TEST_F(RmlUpdate, EmptyValues)
 }
 
 /////////////////////////////////////////////////
+TEST_F(SDFUpdate, GetAny)
+{
+  std::ostringstream stream;
+  // Test types double, bool, string, int, vector3, color, pose
+  stream << "<sdf version='1.5'>"
+         << "<world name='test'>"
+         << "   <physics type='ode'>"
+         << "     <gravity> 0 0 -7.1 </gravity>"
+         << "     <max_contacts>8</max_contacts>"
+         << "     <max_step_size>0.002</max_step_size>"
+         << "   </physics>"
+         << "   <model name='test_model'>"
+         << "     <pose>0 1 2 0 0 0</pose>"
+         << "     <static>true</static>"
+         << "     <link name='link1'>"
+         << "       <visual name='visual'>"
+         << "         <material>"
+         << "           <ambient>0.1 0.1 0.1 1</ambient>"
+         << "         </material>"
+         << "       </visual>"
+         << "     </link>"
+         << "   </model>"
+         << "</world>"
+         << "</sdf>";
+  sdf::SDF sdfParsed;
+  sdfParsed.SetFromString(stream.str());
+
+  // Verify correct parsing
+  EXPECT_TRUE(sdfParsed.Root()->HasElement("world"));
+  sdf::ElementPtr worldElem = sdfParsed.Root()->GetElement("world");
+
+  EXPECT_TRUE(worldElem->HasElement("model"));
+  sdf::ElementPtr modelElem = worldElem->GetElement("model");
+  EXPECT_TRUE(worldElem->HasElement("physics"));
+  sdf::ElementPtr physicsElem = worldElem->GetElement("physics");
+
+  {
+    boost::any anyValue = modelElem->GetAny("name");
+    try
+    {
+      EXPECT_EQ(boost::any_cast<std::string>(anyValue), "test_model");
+    }
+    catch(boost::bad_any_cast &/*_e*/)
+    {
+      FAIL();
+    }
+  }
+
+  {
+    EXPECT_TRUE(modelElem->HasElement("pose"));
+    sdf::ElementPtr poseElem = modelElem->GetElement("pose");
+    boost::any anyValue = poseElem->GetAny();
+    try
+    {
+      EXPECT_EQ(boost::any_cast<ignition::math::Pose3d>(anyValue),
+          ignition::math::Pose3d(0, 1, 2, 0, 0, 0));
+    }
+    catch(boost::bad_any_cast &/*_e*/)
+    {
+      FAIL();
+    }
+  }
+
+  {
+    EXPECT_TRUE(physicsElem->HasElement("gravity"));
+    boost::any anyValue = physicsElem->GetElement("gravity")->GetAny();
+    try
+    {
+      EXPECT_EQ(boost::any_cast<ignition::math::Vector3d>(anyValue),
+          ignition::math::Vector3d(0, 0, -7.1));
+    }
+    catch(boost::bad_any_cast &/*_e*/)
+    {
+      FAIL();
+    }
+  }
+
+  {
+    EXPECT_TRUE(physicsElem->HasElement("max_step_size"));
+    boost::any anyValue = physicsElem->GetElement("max_step_size")->GetAny();
+    try
+    {
+      EXPECT_NEAR(boost::any_cast<double>(anyValue), 0.002, 1e-6);
+    }
+    catch(boost::bad_any_cast &/*_e*/)
+    {
+      FAIL();
+    }
+  }
+
+  {
+    EXPECT_TRUE(physicsElem->HasElement("max_contacts"));
+    boost::any anyValue = physicsElem->GetElement("max_contacts")->GetAny();
+    try
+    {
+      EXPECT_EQ(boost::any_cast<int>(anyValue), 8);
+    }
+    catch(boost::bad_any_cast &/*_e*/)
+    {
+      FAIL();
+    }
+  }
+
+  {
+    EXPECT_TRUE(physicsElem->HasElement("gravity"));
+    boost::any anyValue = physicsElem->GetElement("gravity")->GetAny();
+    try
+    {
+      EXPECT_EQ(boost::any_cast<ignition::math::Vector3d>(anyValue),
+          ignition::math::Vector3d(0, 0, -7.1));
+    }
+    catch(boost::bad_any_cast &/*_e*/)
+    {
+      FAIL();
+    }
+  }
+
+  {
+    EXPECT_TRUE(modelElem->HasElement("static"));
+    boost::any anyValue = modelElem->GetElement("static")->GetAny();
+    try
+    {
+      EXPECT_EQ(boost::any_cast<bool>(anyValue), true);
+    }
+    catch(boost::bad_any_cast &/*_e*/)
+    {
+      FAIL();
+    }
+  }
+
+  {
+    EXPECT_TRUE(modelElem->HasElement("link"));
+    EXPECT_TRUE(modelElem->GetElement("link")->HasElement("visual"));
+    EXPECT_TRUE(modelElem->GetElement("link")->GetElement("visual")->
+        HasElement("material"));
+    sdf::ElementPtr materialElem = modelElem->GetElement("link")->
+        GetElement("visual")->GetElement("material");
+    EXPECT_TRUE(materialElem->HasElement("ambient"));
+    boost::any anyValue = materialElem->GetElement("ambient")->GetAny();
+    try
+    {
+      EXPECT_EQ(boost::any_cast<sdf::Color>(anyValue),
+          sdf::Color(0.1f, 0.1f, 0.1f, 1.0f));
+    }
+    catch(boost::bad_any_cast &/*_e*/)
+    {
+      FAIL();
+    }
+  }
+}
+
+/////////////////////////////////////////////////
+TEST_F(SDFUpdate, Version)
+{
+  EXPECT_STREQ(SDF_VERSION, sdf::SDF::Version().c_str());
+
+  sdf::SDF::Version("0.2.3");
+  EXPECT_STREQ("0.2.3", sdf::SDF::Version().c_str());
+}
+
+/////////////////////////////////////////////////
 /// Main
 int main(int argc, char **argv)
 {
diff --git a/src/Types.cc b/src/Types.cc
new file mode 100644
index 0000000..a7c649f
--- /dev/null
+++ b/src/Types.cc
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2015 Open Source Robotics Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#ifdef _WIN32
+#include <Windows.h>
+#endif
+
+/// \todo Remove this diagnositic push/pop in version 5
+#ifndef _WIN32
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+#include "sdf/Types.hh"
+#ifndef _WIN32
+#pragma GCC diagnostic pop
+#endif
+
+/////////////////////////////////////////////////
+#ifdef _WIN32
+const char *sdf::winGetEnv(const char *_name)
+{
+  const DWORD buffSize = 65535;
+  static char buffer[buffSize];
+  if (GetEnvironmentVariable(_name, buffer, buffSize))
+    return buffer;
+  return NULL;
+}
+#else
+const char *sdf::winGetEnv(const char * /*_name*/)
+{
+  return NULL;
+}
+#endif
diff --git a/src/parser.cc b/src/parser.cc
index 3484fba..222d86b 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -39,33 +39,41 @@ bool init(SDFPtr _sdf)
   std::string filename;
   std::string fileToFind = "root.sdf";
 
-  if (sdf::SDF::version == "1.0" || sdf::SDF::version == "1.2")
+  if (sdf::SDF::Version() == "1.0" || sdf::SDF::Version() == "1.2")
     fileToFind = "gazebo.sdf";
 
   filename = sdf::findFile(fileToFind);
 
   FILE *ftest = fopen(filename.c_str(), "r");
-  if (ftest && initFile(filename, _sdf))
+  if (ftest)
   {
-    result = true;
     fclose(ftest);
+    if (initFile(filename, _sdf))
+    {
+      result = true;
+    }
+    else
+    {
+      sdferr << "Unable to init SDF file[" << filename << "]\n";
+    }
   }
   else
+  {
     sdferr << "Unable to find or open SDF file[" << fileToFind << "]\n";
+  }
 
   return result;
 }
 
 //////////////////////////////////////////////////
-bool initFile(const std::string &_filename, SDFPtr _sdf)
+template <typename TPtr>
+inline bool _initFile(const std::string &_filename, TPtr _sdf)
 {
   std::string filename = sdf::findFile(_filename);
 
   TiXmlDocument xmlDoc;
   if (xmlDoc.LoadFile(filename))
-  {
     return initDoc(&xmlDoc, _sdf);
-  }
   else
     sdferr << "Unable to load file[" << _filename << "]\n";
 
@@ -73,17 +81,15 @@ bool initFile(const std::string &_filename, SDFPtr _sdf)
 }
 
 //////////////////////////////////////////////////
-bool initFile(const std::string &_filename, ElementPtr _sdf)
+bool initFile(const std::string &_filename, SDFPtr _sdf)
 {
-  std::string filename = sdf::findFile(_filename);
-
-  TiXmlDocument xmlDoc;
-  if (xmlDoc.LoadFile(filename))
-    return initDoc(&xmlDoc, _sdf);
-  else
-    sdferr << "Unable to load file[" << _filename << "]\n";
+  return _initFile(_filename, _sdf);
+}
 
-  return false;
+//////////////////////////////////////////////////
+bool initFile(const std::string &_filename, ElementPtr _sdf)
+{
+  return _initFile(_filename, _sdf);
 }
 
 //////////////////////////////////////////////////
@@ -91,46 +97,56 @@ bool initString(const std::string &_xmlString, SDFPtr _sdf)
 {
   TiXmlDocument xmlDoc;
   xmlDoc.Parse(_xmlString.c_str());
+  if (xmlDoc.Error())
+  {
+    sdferr << "Failed to parse string as XML: " << xmlDoc.ErrorDesc() << '\n';
+    return false;
+  }
 
   return initDoc(&xmlDoc, _sdf);
 }
 
 //////////////////////////////////////////////////
-bool initDoc(TiXmlDocument *_xmlDoc, SDFPtr _sdf)
+inline TiXmlElement *_initDocGetElement(TiXmlDocument *_xmlDoc)
 {
   if (!_xmlDoc)
   {
     sdferr << "Could not parse the xml\n";
-    return false;
+    return nullptr;
   }
 
-  TiXmlElement *xml = _xmlDoc->FirstChildElement("element");
-  if (!xml)
+  TiXmlElement *element = _xmlDoc->FirstChildElement("element");
+  if (!element)
   {
     sdferr << "Could not find the 'element' element in the xml file\n";
-    return false;
+    return nullptr;
   }
 
-  return initXml(xml, _sdf->root);
+  return element;
 }
 
 //////////////////////////////////////////////////
-bool initDoc(TiXmlDocument *_xmlDoc, ElementPtr _sdf)
+bool initDoc(TiXmlDocument *_xmlDoc, SDFPtr _sdf)
 {
-  if (!_xmlDoc)
+  auto element = _initDocGetElement(_xmlDoc);
+  if (!element)
   {
-    sdferr << "Could not parse the xml\n";
     return false;
   }
 
-  TiXmlElement *xml = _xmlDoc->FirstChildElement("element");
-  if (!xml)
+  return initXml(element, _sdf->Root());
+}
+
+//////////////////////////////////////////////////
+bool initDoc(TiXmlDocument *_xmlDoc, ElementPtr _sdf)
+{
+  auto element = _initDocGetElement(_xmlDoc);
+  if (!element)
   {
-    sdferr << "Could not find the 'element' element in the xml file\n";
     return false;
   }
 
-  return initXml(xml, _sdf);
+  return initXml(element, _sdf);
 }
 
 //////////////////////////////////////////////////
@@ -261,7 +277,12 @@ bool readFile(const std::string &_filename, SDFPtr _sdf)
     return false;
   }
 
-  xmlDoc.LoadFile(filename);
+  if (!xmlDoc.LoadFile(filename))
+  {
+    sdferr << "Error parsing XML in file [" << filename << "]: "
+           << xmlDoc.ErrorDesc() << '\n';
+    return false;
+  }
   if (readDoc(&xmlDoc, _sdf, filename))
     return true;
   else
@@ -288,6 +309,11 @@ bool readString(const std::string &_xmlString, SDFPtr _sdf)
 {
   TiXmlDocument xmlDoc;
   xmlDoc.Parse(_xmlString.c_str());
+  if (xmlDoc.Error())
+  {
+    sdferr << "Error parsing XML from string: " << xmlDoc.ErrorDesc() << '\n';
+    return false;
+  }
   if (readDoc(&xmlDoc, _sdf, "data-string"))
     return true;
   else
@@ -314,11 +340,16 @@ bool readString(const std::string &_xmlString, ElementPtr _sdf)
 {
   TiXmlDocument xmlDoc;
   xmlDoc.Parse(_xmlString.c_str());
+  if (xmlDoc.Error())
+  {
+    sdferr << "Error parsing XML from string: " << xmlDoc.ErrorDesc() << '\n';
+    return false;
+  }
   if (readDoc(&xmlDoc, _sdf, "data-string"))
     return true;
   else
   {
-    sdferr << "parse as sdf version " << SDF::version << " failed, "
+    sdferr << "parse as sdf version " << SDF::Version() << " failed, "
           << "should try to parse as old deprecated format\n";
     return false;
   }
@@ -340,17 +371,17 @@ bool readDoc(TiXmlDocument *_xmlDoc, SDFPtr _sdf, const std::string &_source)
 
   if (sdfNode && sdfNode->Attribute("version"))
   {
-    if (strcmp(sdfNode->Attribute("version"), SDF::version.c_str()) != 0)
+    if (strcmp(sdfNode->Attribute("version"), SDF::Version().c_str()) != 0)
     {
       sdfdbg << "Converting a deprecated source[" << _source << "].\n";
-      Converter::Convert(_xmlDoc, SDF::version);
+      Converter::Convert(_xmlDoc, SDF::Version());
     }
 
     // parse new sdf xml
-    TiXmlElement *elemXml = _xmlDoc->FirstChildElement(_sdf->root->GetName());
-    if (!readXml(elemXml, _sdf->root))
+    TiXmlElement *elemXml = _xmlDoc->FirstChildElement(_sdf->Root()->GetName());
+    if (!readXml(elemXml, _sdf->Root()))
     {
-      sdferr << "Unable to read element <" << _sdf->root->GetName() << ">\n";
+      sdferr << "Unable to read element <" << _sdf->Root()->GetName() << ">\n";
       return false;
     }
   }
@@ -363,10 +394,10 @@ bool readDoc(TiXmlDocument *_xmlDoc, SDFPtr _sdf, const std::string &_source)
       sdfdbg << "SDF <sdf> element has no version in file["
              << _source << "]\n";
     else if (strcmp(sdfNode->Attribute("version"),
-                    SDF::version.c_str()) != 0)
+                    SDF::Version().c_str()) != 0)
       sdfdbg << "SDF version ["
             << sdfNode->Attribute("version")
-            << "] is not " << SDF::version << "\n";
+            << "] is not " << SDF::Version() << "\n";
     return false;
   }
 
@@ -391,13 +422,13 @@ bool readDoc(TiXmlDocument *_xmlDoc, ElementPtr _sdf,
   if (sdfNode && sdfNode->Attribute("version"))
   {
     if (strcmp(sdfNode->Attribute("version"),
-               SDF::version.c_str()) != 0)
+               SDF::Version().c_str()) != 0)
     {
       sdfwarn << "Converting a deprecated SDF source[" << _source << "].\n";
-      Converter::Convert(_xmlDoc, SDF::version);
+      Converter::Convert(_xmlDoc, SDF::Version());
     }
 
-    TiXmlElement* elemXml = sdfNode;
+    TiXmlElement *elemXml = sdfNode;
     if (sdfNode->Value() != _sdf->GetName() &&
         sdfNode->FirstChildElement(_sdf->GetName()))
     {
@@ -420,10 +451,10 @@ bool readDoc(TiXmlDocument *_xmlDoc, ElementPtr _sdf,
     else if (!sdfNode->Attribute("version"))
       sdfdbg << "<sdf> element has no version\n";
     else if (strcmp(sdfNode->Attribute("version"),
-                    SDF::version.c_str()) != 0)
+                    SDF::Version().c_str()) != 0)
       sdfdbg << "SDF version ["
             << sdfNode->Attribute("version")
-            << "] is not " << SDF::version << "\n";
+            << "] is not " << SDF::Version() << "\n";
     return false;
   }
 
@@ -481,8 +512,8 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
     if (i == _sdf->GetAttributeCount())
     {
       sdfwarn << "XML Attribute[" << attribute->Name()
-             << "] in element[" << _xml->Value()
-             << "] not defined in SDF, ignoring.\n";
+              << "] in element[" << _xml->Value()
+              << "] not defined in SDF, ignoring.\n";
     }
 
     attribute = attribute->Next();
@@ -509,7 +540,7 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
     std::string filename;
 
     // Iterate over all the child elements
-    TiXmlElement* elemXml = NULL;
+    TiXmlElement *elemXml = NULL;
     for (elemXml = _xml->FirstChildElement(); elemXml;
          elemXml = elemXml->NextSiblingElement())
     {
@@ -594,6 +625,12 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
               filename = modelPath + "/" + sdfXML->GetText();
             }
           }
+          else
+          {
+            sdferr << "Error parsing XML in file ["
+                   << manifestPath.string() << "]: "
+                   << manifestDoc.ErrorDesc() << '\n';
+          }
         }
         else
         {
@@ -623,7 +660,7 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
           init(includeSDFTemplate);
         }
         SDFPtr includeSDF(new SDF);
-        includeSDF->root = includeSDFTemplate->root->Clone();
+        includeSDF->Root(includeSDFTemplate->Root()->Clone());
 
         if (!readFile(filename, includeSDF))
         {
@@ -633,21 +670,21 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
 
         if (elemXml->FirstChildElement("name"))
         {
-          includeSDF->root->GetElement("model")->GetAttribute(
+          includeSDF->Root()->GetElement("model")->GetAttribute(
               "name")->SetFromString(
                 elemXml->FirstChildElement("name")->GetText());
         }
 
         if (elemXml->FirstChildElement("pose"))
         {
-          includeSDF->root->GetElement("model")->GetElement(
+          includeSDF->Root()->GetElement("model")->GetElement(
               "pose")->GetValue()->SetFromString(
                 elemXml->FirstChildElement("pose")->GetText());
         }
 
         if (elemXml->FirstChildElement("static"))
         {
-          includeSDF->root->GetElement("model")->GetElement(
+          includeSDF->Root()->GetElement("model")->GetElement(
               "static")->GetValue()->SetFromString(
                 elemXml->FirstChildElement("static")->GetText());
         }
@@ -658,7 +695,7 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
           if (std::string("plugin") == childElemXml->Value())
           {
             sdf::ElementPtr pluginElem;
-            pluginElem = includeSDF->root->GetElement(
+            pluginElem = includeSDF->Root()->GetElement(
                 "model")->AddElement("plugin");
 
             pluginElem->GetAttribute("filename")->SetFromString(
@@ -670,18 +707,18 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
 
         if (_sdf->GetName() == "model")
         {
-          addNestedModel(_sdf, includeSDF->root);
+          addNestedModel(_sdf, includeSDF->Root());
         }
         else
         {
-          includeSDF->root->GetFirstElement()->SetParent(_sdf);
-          _sdf->InsertElement(includeSDF->root->GetFirstElement());
+          includeSDF->Root()->GetFirstElement()->SetParent(_sdf);
+          _sdf->InsertElement(includeSDF->Root()->GetFirstElement());
           // TODO: This was used to store the included filename so that when
           // a world is saved, the included model's SDF is not stored in the
           // world file. This highlights the need to make model inclusion
           // a core feature of SDF, and not a hack that that parser handles
-          // includeSDF->root->GetFirstElement()->SetInclude(elemXml->Attribute(
-          //      "filename"));
+          // includeSDF->Root()->GetFirstElement()->SetInclude(
+          // elemXml->Attribute("filename"));
         }
 
         continue;
@@ -710,10 +747,12 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
 
       if (descCounter == _sdf->GetElementDescriptionCount())
       {
-        sdferr << "XML Element[" << elemXml->Value()
+        sdfwarn << "XML Element[" << elemXml->Value()
           << "], child of element[" << _xml->Value()
-          << "] not defined in SDF. Ignoring.[" << _sdf->GetName() << "]\n";
-        return false;
+          << "] not defined in SDF. Ignoring[" << elemXml->Value() << "]. "
+          << "You may have an incorrect SDF file, or an sdformat version "
+          << "that doesn't support this element.\n";
+        continue;
       }
     }
 
@@ -752,7 +791,7 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf)
 void copyChildren(ElementPtr _sdf, TiXmlElement *_xml)
 {
   // Iterate over all the child elements
-  TiXmlElement* elemXml = NULL;
+  TiXmlElement *elemXml = NULL;
   for (elemXml = _xml->FirstChildElement(); elemXml;
        elemXml = elemXml->NextSiblingElement())
   {
@@ -805,8 +844,8 @@ void addNestedModel(ElementPtr _sdf, ElementPtr _includeSDF)
   ElementPtr elem = modelPtr->GetFirstElement();
   std::map<std::string, std::string> replace;
 
-  Pose modelPose =
-    modelPtr->Get<Pose>("pose");
+  ignition::math::Pose3d modelPose =
+    modelPtr->Get<ignition::math::Pose3d>("pose");
 
   std::string modelName = modelPtr->Get<std::string>("name");
   while (elem)
@@ -818,10 +857,12 @@ void addNestedModel(ElementPtr _sdf, ElementPtr _includeSDF)
       replace[elemName] = newName;
       if (elem->HasElementDescription("pose"))
       {
-        Pose newPose = Pose(
-          modelPose.pos +
-            modelPose.rot.RotateVector(elem->Get<Pose>("pose").pos),
-            modelPose.rot * elem->Get<Pose>("pose").rot);
+        ignition::math::Pose3d offsetPose =
+          elem->Get<ignition::math::Pose3d>("pose");
+        ignition::math::Pose3d newPose = ignition::math::Pose3d(
+          modelPose.Pos() +
+            modelPose.Rot().RotateVector(offsetPose.Pos()),
+            modelPose.Rot() * offsetPose.Rot());
         elem->GetElement("pose")->Set(newPose);
       }
     }
@@ -836,8 +877,8 @@ void addNestedModel(ElementPtr _sdf, ElementPtr _includeSDF)
       if (elem->HasElement("axis"))
       {
         ElementPtr axisElem = elem->GetElement("axis");
-        Vector3 newAxis =  modelPose.rot.RotateVector(
-          axisElem->Get<Vector3>("xyz"));
+        ignition::math::Vector3d newAxis =  modelPose.Rot().RotateVector(
+          axisElem->Get<ignition::math::Vector3d>("xyz"));
         axisElem->GetElement("xyz")->Set(newAxis);
       }
     }
diff --git a/src/parser_urdf.cc b/src/parser_urdf.cc
index e2f3c46..eb24023 100644
--- a/src/parser_urdf.cc
+++ b/src/parser_urdf.cc
@@ -19,11 +19,13 @@
 #include <algorithm>
 #include <string>
 #include <set>
+#include <ignition/math.hh>
 
 #include "urdf_model/model.h"
 #include "urdf_model/link.h"
 #include "urdf_parser/urdf_parser.h"
 
+#include "sdf/SDFExtension.hh"
 #include "sdf/parser_urdf.hh"
 #include "sdf/sdf.hh"
 
@@ -80,13 +82,13 @@ bool FixedJointShouldBeReduced(boost::shared_ptr<urdf::Joint> _jnt);
 ///   in extensions when doing fixed joint reduction
 void ReduceSDFExtensionSensorTransformReduction(
       std::vector<TiXmlElementPtr>::iterator _blobIt,
-      sdf::Pose _reductionTransform);
+      ignition::math::Pose3d _reductionTransform);
 
 /// reduced fixed joints:  apply transform reduction for projectors in
 ///   extensions when doing fixed joint reduction
 void ReduceSDFExtensionProjectorTransformReduction(
       std::vector<TiXmlElementPtr>::iterator _blobIt,
-      sdf::Pose _reductionTransform);
+      ignition::math::Pose3d _reductionTransform);
 
 
 /// reduced fixed joints:  apply transform reduction to extensions
@@ -116,7 +118,7 @@ void CreateVisual(TiXmlElement *_elem, ConstUrdfLinkPtr _link,
 
 /// create SDF Joint block based on URDF
 void CreateJoint(TiXmlElement *_root, ConstUrdfLinkPtr _link,
-      sdf::Pose &_currentTransform);
+      ignition::math::Pose3d &_currentTransform);
 
 /// insert extensions into links
 void InsertSDFExtensionLink(TiXmlElement *_elem, const std::string &_linkName);
@@ -131,15 +133,15 @@ void CreateCollisions(TiXmlElement* _elem, ConstUrdfLinkPtr _link);
 void CreateInertial(TiXmlElement *_elem, ConstUrdfLinkPtr _link);
 
 /// append transform (pose) to the end of the xml element
-void AddTransform(TiXmlElement *_elem, const sdf::Pose &_transform);
+void AddTransform(TiXmlElement *_elem, const ignition::math::Pose3d &_transform);
 
 /// create SDF from URDF link
 void CreateSDF(TiXmlElement *_root, ConstUrdfLinkPtr _link,
-      const sdf::Pose &_transform);
+      const ignition::math::Pose3d &_transform);
 
 /// create SDF Link block based on URDF
 void CreateLink(TiXmlElement *_root, ConstUrdfLinkPtr _link,
-      sdf::Pose &_currentTransform);
+      ignition::math::Pose3d &_currentTransform);
 
 
 /// print collision groups for debugging purposes
@@ -168,7 +170,8 @@ void ReduceSDFExtensionProjectorFrameReplace(
 void ReduceSDFExtensionPluginFrameReplace(
       std::vector<TiXmlElementPtr>::iterator _blobIt,
       UrdfLinkPtr _link, const std::string &_pluginName,
-      const std::string &_elementName, sdf::Pose _reductionTransform);
+      const std::string &_elementName,
+      ignition::math::Pose3d _reductionTransform);
 
 /// reduced fixed joints:  apply appropriate frame updates in urdf
 ///   extensions when doing fixed joint reduction
@@ -217,7 +220,8 @@ void CreateGeometry(TiXmlElement* _elem,
 std::string GetGeometryBoundingBox(boost::shared_ptr<urdf::Geometry> _geometry,
     double *_sizeVals);
 
-sdf::Pose inverseTransformToParentFrame(sdf::Pose _transformInLinkFrame,
+ignition::math::Pose3d inverseTransformToParentFrame(
+    ignition::math::Pose3d _transformInLinkFrame,
     urdf::Pose _parentToLinkTransform);
 
 /// reduced fixed joints: transform to parent frame
@@ -225,20 +229,22 @@ urdf::Pose TransformToParentFrame(urdf::Pose _transformInLinkFrame,
     urdf::Pose _parentToLinkTransform);
 
 /// reduced fixed joints: transform to parent frame
-sdf::Pose TransformToParentFrame(sdf::Pose _transformInLinkFrame,
+ignition::math::Pose3d TransformToParentFrame(
+    ignition::math::Pose3d _transformInLinkFrame,
     urdf::Pose _parentToLinkTransform);
 
 /// reduced fixed joints: transform to parent frame
-sdf::Pose TransformToParentFrame(sdf::Pose _transformInLinkFrame,
-    sdf::Pose _parentToLinkTransform);
+ignition::math::Pose3d TransformToParentFrame(
+    ignition::math::Pose3d _transformInLinkFrame,
+    ignition::math::Pose3d _parentToLinkTransform);
 
 /// reduced fixed joints: utility to copy between urdf::Pose and
 ///   math::Pose
-sdf::Pose CopyPose(urdf::Pose _pose);
+ignition::math::Pose3d CopyPose(urdf::Pose _pose);
 
 /// reduced fixed joints: utility to copy between urdf::Pose and
 ///   math::Pose
-urdf::Pose CopyPose(sdf::Pose _pose);
+urdf::Pose CopyPose(ignition::math::Pose3d _pose);
 
 /////////////////////////////////////////////////
 urdf::Vector3 ParseVector3(const std::string &_str, double _scale)
@@ -256,7 +262,7 @@ urdf::Vector3 ParseVector3(const std::string &_str, double _scale)
         vals.push_back(_scale
             * boost::lexical_cast<double>(pieces[i].c_str()));
       }
-      catch(boost::bad_lexical_cast &e)
+      catch(boost::bad_lexical_cast &)
       {
         sdferr << "xml key [" << _str
           << "][" << i << "] value [" << pieces[i]
@@ -1001,7 +1007,7 @@ void ReduceJointsToParent(UrdfLinkPtr _link)
     {
       // go down the tree until we hit a parent joint that is not fixed
       UrdfLinkPtr newParentLink = _link;
-      sdf::Pose jointAnchorTransform;
+      ignition::math::Pose3d jointAnchorTransform;
       while (newParentLink->parent_joint &&
           newParentLink->getParent()->name != "world" &&
           FixedJointShouldBeReduced(newParentLink->parent_joint) )
@@ -1086,13 +1092,13 @@ void AddKeyValue(TiXmlElement *_elem, const std::string &_key,
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void AddTransform(TiXmlElement *_elem, const sdf::Pose &_transform)
+void AddTransform(TiXmlElement *_elem, const ignition::math::Pose3d &_transform)
 {
-  sdf::Vector3 e = _transform.rot.GetAsEuler();
-  double cpose[6] = { _transform.pos.x, _transform.pos.y,
-    _transform.pos.z, e.x, e.y, e.z };
+  ignition::math::Vector3d e = _transform.Rot().Euler();
+  double cpose[6] = { _transform.Pos().X(), _transform.Pos().Y(),
+    _transform.Pos().Z(), e.X(), e.Y(), e.Z() };
 
-  /* set geometry transform */
+  // set geometry transform
   AddKeyValue(_elem, "pose", Values2str(6, cpose));
 }
 
@@ -1915,58 +1921,59 @@ void PrintCollisionGroups(UrdfLinkPtr _link)
 urdf::Pose TransformToParentFrame(
     urdf::Pose _transformInLinkFrame, urdf::Pose _parentToLinkTransform)
 {
-  // transform to sdf::Pose then call TransformToParentFrame
-  sdf::Pose p1 = CopyPose(_transformInLinkFrame);
-  sdf::Pose p2 = CopyPose(_parentToLinkTransform);
+  // transform to ignition::math::Pose3d then call TransformToParentFrame
+  ignition::math::Pose3d p1 = CopyPose(_transformInLinkFrame);
+  ignition::math::Pose3d p2 = CopyPose(_parentToLinkTransform);
   return CopyPose(TransformToParentFrame(p1, p2));
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-sdf::Pose TransformToParentFrame(sdf::Pose _transformInLinkFrame,
+ignition::math::Pose3d TransformToParentFrame(ignition::math::Pose3d _transformInLinkFrame,
     urdf::Pose _parentToLinkTransform)
 {
-  // transform to sdf::Pose then call TransformToParentFrame
-  sdf::Pose p2 = CopyPose(_parentToLinkTransform);
+  // transform to ignition::math::Pose3d then call TransformToParentFrame
+  ignition::math::Pose3d p2 = CopyPose(_parentToLinkTransform);
   return TransformToParentFrame(_transformInLinkFrame, p2);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-sdf::Pose TransformToParentFrame(sdf::Pose _transformInLinkFrame,
-    sdf::Pose _parentToLinkTransform)
+ignition::math::Pose3d TransformToParentFrame(
+    ignition::math::Pose3d _transformInLinkFrame,
+    ignition::math::Pose3d _parentToLinkTransform)
 {
-  sdf::Pose transformInParentLinkFrame;
+  ignition::math::Pose3d transformInParentLinkFrame;
   // rotate link pose to parentLink frame
-  transformInParentLinkFrame.pos =
-    _parentToLinkTransform.rot * _transformInLinkFrame.pos;
-  transformInParentLinkFrame.rot =
-    _parentToLinkTransform.rot * _transformInLinkFrame.rot;
+  transformInParentLinkFrame.Pos() =
+    _parentToLinkTransform.Rot() * _transformInLinkFrame.Pos();
+  transformInParentLinkFrame.Rot() =
+    _parentToLinkTransform.Rot() * _transformInLinkFrame.Rot();
   // translate link to parentLink frame
-  transformInParentLinkFrame.pos =
-    _parentToLinkTransform.pos + transformInParentLinkFrame.pos;
+  transformInParentLinkFrame.Pos() =
+    _parentToLinkTransform.Pos() + transformInParentLinkFrame.Pos();
 
   return transformInParentLinkFrame;
 }
 
 /////////////////////////////////////////////////
 /// reduced fixed joints: transform to parent frame
-sdf::Pose inverseTransformToParentFrame(
-    sdf::Pose _transformInLinkFrame,
+ignition::math::Pose3d inverseTransformToParentFrame(
+    ignition::math::Pose3d _transformInLinkFrame,
     urdf::Pose _parentToLinkTransform)
 {
-  sdf::Pose transformInParentLinkFrame;
+  ignition::math::Pose3d transformInParentLinkFrame;
   //   rotate link pose to parentLink frame
   urdf::Rotation ri = _parentToLinkTransform.rotation.GetInverse();
-  sdf::Quaternion q1(ri.w, ri.x, ri.y, ri.z);
-  transformInParentLinkFrame.pos = q1 * _transformInLinkFrame.pos;
+  ignition::math::Quaterniond q1(ri.w, ri.x, ri.y, ri.z);
+  transformInParentLinkFrame.Pos() = q1 * _transformInLinkFrame.Pos();
   urdf::Rotation r2 = _parentToLinkTransform.rotation.GetInverse();
-  sdf::Quaternion q3(r2.w, r2.x, r2.y, r2.z);
-  transformInParentLinkFrame.rot = q3 * _transformInLinkFrame.rot;
+  ignition::math::Quaterniond q3(r2.w, r2.x, r2.y, r2.z);
+  transformInParentLinkFrame.Rot() = q3 * _transformInLinkFrame.Rot();
   //   translate link to parentLink frame
-  transformInParentLinkFrame.pos.x = transformInParentLinkFrame.pos.x
+  transformInParentLinkFrame.Pos().X() = transformInParentLinkFrame.Pos().X()
     - _parentToLinkTransform.position.x;
-  transformInParentLinkFrame.pos.y = transformInParentLinkFrame.pos.y
+  transformInParentLinkFrame.Pos().Y() = transformInParentLinkFrame.Pos().Y()
     - _parentToLinkTransform.position.y;
-  transformInParentLinkFrame.pos.z = transformInParentLinkFrame.pos.z
+  transformInParentLinkFrame.Pos().Z() = transformInParentLinkFrame.Pos().Z()
     - _parentToLinkTransform.position.z;
 
   return transformInParentLinkFrame;
@@ -2157,15 +2164,15 @@ void URDF2SDF::ListSDFExtensions(const std::string &_reference)
 ////////////////////////////////////////////////////////////////////////////////
 void CreateSDF(TiXmlElement *_root,
     ConstUrdfLinkPtr _link,
-    const sdf::Pose &_transform)
+    const ignition::math::Pose3d &_transform)
 {
-  sdf::Pose _currentTransform = _transform;
+  ignition::math::Pose3d _currentTransform = _transform;
 
   // must have an <inertial> block and cannot have zero mass.
   //  allow det(I) == zero, in the case of point mass geoms.
   // @todo:  keyword "world" should be a constant defined somewhere else
   if (_link->name != "world" &&
-      ((!_link->inertial) || sdf::equal(_link->inertial->mass, 0.0)))
+      ((!_link->inertial) || ignition::math::equal(_link->inertial->mass, 0.0)))
   {
     if (!_link->child_links.empty())
       sdfdbg << "urdf2sdf: link[" << _link->name
@@ -2203,37 +2210,37 @@ void CreateSDF(TiXmlElement *_root,
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-sdf::Pose CopyPose(urdf::Pose _pose)
-{
-  sdf::Pose p;
-  p.pos.x = _pose.position.x;
-  p.pos.y = _pose.position.y;
-  p.pos.z = _pose.position.z;
-  p.rot.x = _pose.rotation.x;
-  p.rot.y = _pose.rotation.y;
-  p.rot.z = _pose.rotation.z;
-  p.rot.w = _pose.rotation.w;
+ignition::math::Pose3d CopyPose(urdf::Pose _pose)
+{
+  ignition::math::Pose3d p;
+  p.Pos().X() = _pose.position.x;
+  p.Pos().Y() = _pose.position.y;
+  p.Pos().Z() = _pose.position.z;
+  p.Rot().X() = _pose.rotation.x;
+  p.Rot().Y() = _pose.rotation.y;
+  p.Rot().Z() = _pose.rotation.z;
+  p.Rot().W() = _pose.rotation.w;
   return p;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-urdf::Pose CopyPose(sdf::Pose _pose)
+urdf::Pose CopyPose(ignition::math::Pose3d _pose)
 {
   urdf::Pose p;
-  p.position.x = _pose.pos.x;
-  p.position.y = _pose.pos.y;
-  p.position.z = _pose.pos.z;
-  p.rotation.x = _pose.rot.x;
-  p.rotation.y = _pose.rot.y;
-  p.rotation.z = _pose.rot.z;
-  p.rotation.w = _pose.rot.w;
+  p.position.x = _pose.Pos().X();
+  p.position.y = _pose.Pos().Y();
+  p.position.z = _pose.Pos().Z();
+  p.rotation.x = _pose.Rot().X();
+  p.rotation.y = _pose.Rot().Y();
+  p.rotation.z = _pose.Rot().Z();
+  p.rotation.w = _pose.Rot().W();
   return p;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void CreateLink(TiXmlElement *_root,
     ConstUrdfLinkPtr _link,
-    sdf::Pose &_currentTransform)
+    ignition::math::Pose3d &_currentTransform)
 {
   /* create new body */
   TiXmlElement *elem     = new TiXmlElement("link");
@@ -2242,7 +2249,7 @@ void CreateLink(TiXmlElement *_root,
   elem->SetAttribute("name", _link->name);
 
   /* compute global transform */
-  sdf::Pose localTransform;
+  ignition::math::Pose3d localTransform;
   // this is the transform from parent link to current _link
   // this transform does not exist for the root link
   if (_link->parent_joint)
@@ -2512,7 +2519,7 @@ void CreateInertial(TiXmlElement *_elem,
   _link->inertial->origin.rotation.getRPY(roll, pitch, yaw);
 
   /// add pose
-  sdf::Pose pose = CopyPose(_link->inertial->origin);
+  ignition::math::Pose3d pose = CopyPose(_link->inertial->origin);
   AddTransform(inertial, pose);
 
   // add mass
@@ -2541,7 +2548,7 @@ void CreateInertial(TiXmlElement *_elem,
 ////////////////////////////////////////////////////////////////////////////////
 void CreateJoint(TiXmlElement *_root,
     ConstUrdfLinkPtr _link,
-    sdf::Pose &_currentTransform)
+    ignition::math::Pose3d &_currentTransform)
 {
   /* compute the joint tag */
   std::string jtype;
@@ -2600,13 +2607,13 @@ void CreateJoint(TiXmlElement *_root,
     }
     else
     {
-      sdf::Vector3 rotatedJointAxis =
-        _currentTransform.rot.RotateVector(
-            sdf::Vector3(_link->parent_joint->axis.x,
+      ignition::math::Vector3d rotatedJointAxis =
+        _currentTransform.Rot().RotateVector(
+            ignition::math::Vector3d(_link->parent_joint->axis.x,
               _link->parent_joint->axis.y,
               _link->parent_joint->axis.z));
       double rotatedJointAxisArray[3] =
-      { rotatedJointAxis.x, rotatedJointAxis.y, rotatedJointAxis.z };
+      { rotatedJointAxis.X(), rotatedJointAxis.Y(), rotatedJointAxis.Z() };
       AddKeyValue(jointAxis, "xyz",
           Values2str(3, rotatedJointAxisArray));
       if (_link->parent_joint->dynamics)
@@ -2777,7 +2784,7 @@ TiXmlDocument URDF2SDF::InitModelString(const std::string &_urdfStr,
 
   /* initialize transform for the model, urdf is recursive,
      while sdf defines all links relative to model frame */
-  sdf::Pose transform;
+  ignition::math::Pose3d transform;
 
   /* parse sdf extension */
   TiXmlDocument urdfXml;
@@ -2872,7 +2879,7 @@ bool FixedJointShouldBeReduced(boost::shared_ptr<urdf::Joint> _jnt)
 ////////////////////////////////////////////////////////////////////////////////
 void ReduceSDFExtensionSensorTransformReduction(
     std::vector<TiXmlElementPtr>::iterator _blobIt,
-    sdf::Pose _reductionTransform)
+    ignition::math::Pose3d _reductionTransform)
 {
   // overwrite <xyz> and <rpy> if they exist
   if ((*_blobIt)->ValueStr() == "sensor")
@@ -2898,13 +2905,13 @@ void ReduceSDFExtensionSensorTransformReduction(
     }
 
     // convert reductionTransform to values
-    urdf::Vector3 reductionXyz(_reductionTransform.pos.x,
-        _reductionTransform.pos.y,
-        _reductionTransform.pos.z);
-    urdf::Rotation reductionQ(_reductionTransform.rot.x,
-        _reductionTransform.rot.y,
-        _reductionTransform.rot.z,
-        _reductionTransform.rot.w);
+    urdf::Vector3 reductionXyz(_reductionTransform.Pos().X(),
+        _reductionTransform.Pos().Y(),
+        _reductionTransform.Pos().Z());
+    urdf::Rotation reductionQ(_reductionTransform.Rot().X(),
+        _reductionTransform.Rot().Y(),
+        _reductionTransform.Rot().Z(),
+        _reductionTransform.Rot().W());
 
     urdf::Vector3 reductionRpy;
     reductionQ.getRPY(reductionRpy.x, reductionRpy.y, reductionRpy.z);
@@ -2926,7 +2933,7 @@ void ReduceSDFExtensionSensorTransformReduction(
 ////////////////////////////////////////////////////////////////////////////////
 void ReduceSDFExtensionProjectorTransformReduction(
     std::vector<TiXmlElementPtr>::iterator _blobIt,
-    sdf::Pose _reductionTransform)
+    ignition::math::Pose3d _reductionTransform)
 {
   // overwrite <pose> (xyz/rpy) if it exists
   if ((*_blobIt)->ValueStr() == "projector")
@@ -2951,13 +2958,13 @@ void ReduceSDFExtensionProjectorTransformReduction(
     if (poseKey) (*_blobIt)->RemoveChild(poseKey);
 
     // convert reductionTransform to values
-    urdf::Vector3 reductionXyz(_reductionTransform.pos.x,
-        _reductionTransform.pos.y,
-        _reductionTransform.pos.z);
-    urdf::Rotation reductionQ(_reductionTransform.rot.x,
-        _reductionTransform.rot.y,
-        _reductionTransform.rot.z,
-        _reductionTransform.rot.w);
+    urdf::Vector3 reductionXyz(_reductionTransform.Pos().X(),
+        _reductionTransform.Pos().Y(),
+        _reductionTransform.Pos().Z());
+    urdf::Rotation reductionQ(_reductionTransform.Rot().X(),
+        _reductionTransform.Rot().Y(),
+        _reductionTransform.Rot().Z(),
+        _reductionTransform.Rot().W());
 
     urdf::Vector3 reductionRpy;
     reductionQ.getRPY(reductionRpy.x, reductionRpy.y, reductionRpy.z);
@@ -3019,7 +3026,7 @@ void ReduceSDFExtensionPluginFrameReplace(
     std::vector<TiXmlElementPtr>::iterator _blobIt,
     UrdfLinkPtr _link,
     const std::string &_pluginName, const std::string &_elementName,
-    sdf::Pose _reductionTransform)
+    ignition::math::Pose3d _reductionTransform)
 {
   std::string linkName = _link->name;
   std::string newLinkName = _link->getParent()->name;
@@ -3046,7 +3053,8 @@ void ReduceSDFExtensionPluginFrameReplace(
         if (xyzKey)
         {
           urdf::Vector3 v1 = ParseVector3(xyzKey);
-          _reductionTransform.pos = sdf::Vector3(v1.x, v1.y, v1.z);
+          _reductionTransform.Pos() =
+            ignition::math::Vector3d(v1.x, v1.y, v1.z);
           // remove xyzOffset and rpyOffset
           (*_blobIt)->RemoveChild(xyzKey);
         }
@@ -3054,8 +3062,8 @@ void ReduceSDFExtensionPluginFrameReplace(
         if (rpyKey)
         {
           urdf::Vector3 rpy = ParseVector3(rpyKey, M_PI/180.0);
-          _reductionTransform.rot =
-            sdf::Quaternion::EulerToQuaternion(rpy.x, rpy.y, rpy.z);
+          _reductionTransform.Rot() =
+            ignition::math::Quaterniond::EulerToQuaternion(rpy.x, rpy.y, rpy.z);
           // remove xyzOffset and rpyOffset
           (*_blobIt)->RemoveChild(rpyKey);
         }
@@ -3069,12 +3077,12 @@ void ReduceSDFExtensionPluginFrameReplace(
         rpyKey = new TiXmlElement("rpyOffset");
 
         // create new offset xml blocks
-        urdf::Vector3 reductionXyz(_reductionTransform.pos.x,
-            _reductionTransform.pos.y,
-            _reductionTransform.pos.z);
-        urdf::Rotation reductionQ(_reductionTransform.rot.x,
-            _reductionTransform.rot.y, _reductionTransform.rot.z,
-            _reductionTransform.rot.w);
+        urdf::Vector3 reductionXyz(_reductionTransform.Pos().X(),
+            _reductionTransform.Pos().Y(),
+            _reductionTransform.Pos().Z());
+        urdf::Rotation reductionQ(_reductionTransform.Rot().X(),
+            _reductionTransform.Rot().Y(), _reductionTransform.Rot().Z(),
+            _reductionTransform.Rot().W());
 
         std::ostringstream xyzStream, rpyStream;
         xyzStream << reductionXyz.x << " " << reductionXyz.y << " "
diff --git a/src/parser_urdf_TEST.cc b/src/parser_urdf_TEST.cc
index 6988ad3..a8bbedd 100644
--- a/src/parser_urdf_TEST.cc
+++ b/src/parser_urdf_TEST.cc
@@ -20,12 +20,12 @@
 #include "sdf/sdf.hh"
 #include "sdf/parser_urdf.hh"
 
-class URDFParser : public ::testing::Test 
+class URDFParser : public ::testing::Test
 {
   public:
       TiXmlDocument get_empty()
       {
-          return TiXmlDocument(); 
+          return TiXmlDocument();
       }
 
       std::string get_minimal_urdf_txt()
@@ -50,37 +50,13 @@ class URDFParser : public ::testing::Test
           return stream.str();
       }
 
-      std::string get_full_model_urdf_txt()
-      {
-          std::ostringstream stream;
-          stream << "<robot name='test_robot'>"
-                 << "<link name='link1' />"
-                 << "  <link name='link2' />"
-                 << "  <link name='link3' />"
-                 << "  <link name='link4' />"
-                 << "  <joint name='joint1' type='continuous'>"
-                 << "    <parent link='link1'/>"
-                 << "    <child link='link2'/>"
-                 << "  </joint>"
-                 << "  <joint name='joint2' type='continuous'>"
-                 << "    <parent link='link1'/>"
-                 << "    <child link='link3'/>"
-                 << "  </joint>"
-                 << "  <joint name='joint3' type='continuous'>"
-                 << "    <parent link='link3'/>"
-                 << "    <child link='link4'/>"
-                 << "  </joint>"
-                 << "</robot>";
-          return stream.str();
-      }
-
       TiXmlDocument convert_str_to_xml(const std::string& urdf)
       {
           TiXmlDocument tmp;
           tmp.Parse(urdf.c_str());
           return tmp;
       }
-       
+
     protected:
         sdf::URDF2SDF parser_;
 };
diff --git a/src/urdf/urdf_model/color.h b/src/urdf/urdf_model/color.h
index df3dacf..918b8d8 100644
--- a/src/urdf/urdf_model/color.h
+++ b/src/urdf/urdf_model/color.h
@@ -73,9 +73,9 @@ public:
       {
         try
         {
-          rgba.push_back(boost::lexical_cast<double>(pieces[i].c_str()));
+          rgba.push_back(boost::lexical_cast<float>(pieces[i].c_str()));
         }
-        catch (boost::bad_lexical_cast &e)
+        catch (boost::bad_lexical_cast &)
         {
           return false;
         }
diff --git a/src/urdf/urdf_model/pose.h b/src/urdf/urdf_model/pose.h
index 5ffa414..b3e682f 100644
--- a/src/urdf/urdf_model/pose.h
+++ b/src/urdf/urdf_model/pose.h
@@ -1,13 +1,13 @@
 /*********************************************************************
 * Software License Agreement (BSD License)
-* 
+*
 *  Copyright (c) 2008, Willow Garage, Inc.
 *  All rights reserved.
-* 
+*
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
-* 
+*
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
@@ -17,7 +17,7 @@
 *   * Neither the name of the Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
-* 
+*
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -32,7 +32,9 @@
 *  POSSIBILITY OF SUCH DAMAGE.
 *********************************************************************/
 
+#ifndef _WIN32
 #pragma GCC system_header
+#endif
 /* Author: Wim Meeussen */
 
 #ifndef URDF_INTERFACE_POSE_H
@@ -60,7 +62,7 @@ public:
 
   void clear() {this->x=this->y=this->z=0.0;};
   void init(const std::string &vector_str)
-  { 
+  {
     this->clear();
     std::vector<std::string> pieces;
     std::vector<double> xyz;
@@ -70,20 +72,21 @@ public:
         try {
           xyz.push_back(boost::lexical_cast<double>(pieces[i].c_str()));
         }
-        catch (boost::bad_lexical_cast &e) {
-          throw ParseError("Unable to parse component [" + pieces[i] + "] to a double (while parsing a vector value)");
+        catch (boost::bad_lexical_cast &) {
+          throw ParseError("Unable to parse component [" + pieces[i]
+              + "] to a double (while parsing a vector value)");
         }
       }
     }
-    
+
     if (xyz.size() != 3)
       throw ParseError("Parser found " + boost::lexical_cast<std::string>(xyz.size())  + " elements but 3 expected while parsing vector [" + vector_str + "]");
-    
+
     this->x = xyz[0];
     this->y = xyz[1];
     this->z = xyz[2];
   }
-  
+
   Vector3 operator+(Vector3 vec)
   {
     return Vector3(this->x+vec.x,this->y+vec.y,this->z+vec.z);
@@ -147,13 +150,13 @@ public:
   double x,y,z,w;
 
   void init(const std::string &rotation_str)
-  { 
+  {
     this->clear();
     Vector3 rpy;
     rpy.init(rotation_str);
     setFromRPY(rpy.x, rpy.y, rpy.z);
   }
-  
+
   void clear() { this->x=this->y=this->z=0.0;this->w=1.0; }
 
   void normalize()
@@ -210,7 +213,7 @@ public:
     return result;
   };
   // Get the inverse of this quaternion
-  Rotation GetInverse() const 
+  Rotation GetInverse() const
   {
     Rotation q;
 
diff --git a/src/urdf/urdf_parser/joint.cpp b/src/urdf/urdf_parser/joint.cpp
index 59f0005..26ca416 100644
--- a/src/urdf/urdf_parser/joint.cpp
+++ b/src/urdf/urdf_parser/joint.cpp
@@ -1,13 +1,13 @@
 /*********************************************************************
 * Software Ligcense Agreement (BSD License)
-* 
+*
 *  Copyright (c) 2008, Willow Garage, Inc.
 *  All rights reserved.
-* 
+*
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
-* 
+*
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
@@ -17,7 +17,7 @@
 *   * Neither the name of the Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
-* 
+*
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -61,7 +61,7 @@ bool parseJointDynamics(JointDynamics &jd, TiXmlElement* config)
     {
       jd.damping = boost::lexical_cast<double>(damping_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("damping value (%s) is not a float: %s",damping_str, e.what());
       return false;
@@ -80,7 +80,7 @@ bool parseJointDynamics(JointDynamics &jd, TiXmlElement* config)
     {
       jd.friction = boost::lexical_cast<double>(friction_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("friction value (%s) is not a float: %s",friction_str, e.what());
       return false;
@@ -114,7 +114,7 @@ bool parseJointLimits(JointLimits &jl, TiXmlElement* config)
     {
       jl.lower = boost::lexical_cast<double>(lower_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("lower value (%s) is not a float: %s", lower_str, e.what());
       return false;
@@ -133,7 +133,7 @@ bool parseJointLimits(JointLimits &jl, TiXmlElement* config)
     {
       jl.upper = boost::lexical_cast<double>(upper_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("upper value (%s) is not a float: %s",upper_str, e.what());
       return false;
@@ -152,7 +152,7 @@ bool parseJointLimits(JointLimits &jl, TiXmlElement* config)
     {
       jl.effort = boost::lexical_cast<double>(effort_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("effort value (%s) is not a float: %s",effort_str, e.what());
       return false;
@@ -171,7 +171,7 @@ bool parseJointLimits(JointLimits &jl, TiXmlElement* config)
     {
       jl.velocity = boost::lexical_cast<double>(velocity_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("velocity value (%s) is not a float: %s",velocity_str, e.what());
       return false;
@@ -198,7 +198,7 @@ bool parseJointSafety(JointSafety &js, TiXmlElement* config)
     {
       js.soft_lower_limit = boost::lexical_cast<double>(soft_lower_limit_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("soft_lower_limit value (%s) is not a float: %s",soft_lower_limit_str, e.what());
       return false;
@@ -218,7 +218,7 @@ bool parseJointSafety(JointSafety &js, TiXmlElement* config)
     {
       js.soft_upper_limit = boost::lexical_cast<double>(soft_upper_limit_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("soft_upper_limit value (%s) is not a float: %s",soft_upper_limit_str, e.what());
       return false;
@@ -238,7 +238,7 @@ bool parseJointSafety(JointSafety &js, TiXmlElement* config)
     {
       js.k_position = boost::lexical_cast<double>(k_position_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("k_position value (%s) is not a float: %s",k_position_str, e.what());
       return false;
@@ -257,7 +257,7 @@ bool parseJointSafety(JointSafety &js, TiXmlElement* config)
     {
       js.k_velocity = boost::lexical_cast<double>(k_velocity_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("k_velocity value (%s) is not a float: %s",k_velocity_str, e.what());
       return false;
@@ -284,7 +284,7 @@ bool parseJointCalibration(JointCalibration &jc, TiXmlElement* config)
     {
       jc.rising.reset(new double(boost::lexical_cast<double>(rising_position_str)));
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("risingvalue (%s) is not a float: %s",rising_position_str, e.what());
       return false;
@@ -304,7 +304,7 @@ bool parseJointCalibration(JointCalibration &jc, TiXmlElement* config)
     {
       jc.falling.reset(new double(boost::lexical_cast<double>(falling_position_str)));
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("fallingvalue (%s) is not a float: %s",falling_position_str, e.what());
       return false;
@@ -328,14 +328,14 @@ bool parseJointMimic(JointMimic &jm, TiXmlElement* config)
   }
   else
     jm.joint_name = joint_name_str;
-  
+
   // Get mimic multiplier
   const char* multiplier_str = config->Attribute("multiplier");
 
   if (multiplier_str == NULL)
   {
     //logDebug("joint mimic: no multiplier, using default value of 1");
-    jm.multiplier = 1;    
+    jm.multiplier = 1;
   }
   else
   {
@@ -343,14 +343,14 @@ bool parseJointMimic(JointMimic &jm, TiXmlElement* config)
     {
       jm.multiplier = boost::lexical_cast<double>(multiplier_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("multiplier value (%s) is not a float: %s",multiplier_str, e.what());
       return false;
     }
   }
 
-  
+
   // Get mimic offset
   const char* offset_str = config->Attribute("offset");
   if (offset_str == NULL)
@@ -364,7 +364,7 @@ bool parseJointMimic(JointMimic &jm, TiXmlElement* config)
     {
       jm.offset = boost::lexical_cast<double>(offset_str);
     }
-    catch (boost::bad_lexical_cast &e)
+    catch (boost::bad_lexical_cast &/*e*/)
     {
       //logError("offset value (%s) is not a float: %s",offset_str, e.what());
       return false;
@@ -441,7 +441,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config)
     //logError("joint [%s] has no type, check to see if it's a reference.", joint.name.c_str());
     return false;
   }
-  
+
   std::string type_str = type_char;
   if (type_str == "planar")
     joint.type = Joint::PLANAR;
@@ -475,7 +475,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config)
         try {
           joint.axis.init(axis_xml->Attribute("xyz"));
         }
-        catch (ParseError &e) {
+        catch (ParseError &/*e*/) {
           joint.axis.clear();
           //logError("Malformed axis element for joint [%s]: %s", joint.name.c_str(), e.what());
           return false;
@@ -503,7 +503,7 @@ bool parseJoint(Joint &joint, TiXmlElement* config)
   }
   else if (joint.type == Joint::PRISMATIC)
   {
-    //logError("Joint [%s] is of type PRISMATIC without limits", joint.name.c_str()); 
+    //logError("Joint [%s] is of type PRISMATIC without limits", joint.name.c_str());
     return false;
   }
 
@@ -652,7 +652,7 @@ bool exportJoint(Joint &joint, TiXmlElement* xml)
   axis_xml->SetAttribute("xyz", urdf_export_helpers::values2str(joint.axis));
   joint_xml->LinkEndChild(axis_xml);
 
-  // parent 
+  // parent
   TiXmlElement * parent_xml = new TiXmlElement("parent");
   parent_xml->SetAttribute("link", joint.parent_link_name);
   joint_xml->LinkEndChild(parent_xml);
diff --git a/src/urdf/urdf_parser/link.cpp b/src/urdf/urdf_parser/link.cpp
index f5f432f..4a4173d 100644
--- a/src/urdf/urdf_parser/link.cpp
+++ b/src/urdf/urdf_parser/link.cpp
@@ -1,13 +1,13 @@
 /*********************************************************************
 * Software License Agreement (BSD License)
-* 
+*
 *  Copyright (c) 2008, Willow Garage, Inc.
 *  All rights reserved.
-* 
+*
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
-* 
+*
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
@@ -17,7 +17,7 @@
 *   * Neither the name of the Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
-* 
+*
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -60,7 +60,7 @@ bool parseMaterial(Material &material, TiXmlElement *config, bool only_name_is_o
     //logError("Material must contain a name attribute");
     return false;
   }
-  
+
   material.name = config->Attribute("name");
 
   // texture
@@ -84,7 +84,8 @@ bool parseMaterial(Material &material, TiXmlElement *config, bool only_name_is_o
         material.color.init(c->Attribute("rgba"));
         has_rgb = true;
       }
-      catch (ParseError &e) {  
+      catch (ParseError &/*e*/)
+      {
         material.color.clear();
         //logError(std::string("Material [" + material.name + "] has malformed color rgba values: " + e.what()).c_str());
       }
@@ -125,14 +126,14 @@ bool parseSphere(Sphere &s, TiXmlElement *c)
     //logError(stm.str().c_str());
     return false;
   }
-  
+
   return true;
 }
 
 bool parseBox(Box &b, TiXmlElement *c)
 {
   b.clear();
-  
+
   b.type = Geometry::BOX;
   if (!c->Attribute("size"))
   {
@@ -143,7 +144,7 @@ bool parseBox(Box &b, TiXmlElement *c)
   {
     b.dim.init(c->Attribute("size"));
   }
-  catch (ParseError &e)
+  catch (ParseError &/*e*/)
   {
     b.dim.clear();
     //logError(e.what());
@@ -168,7 +169,7 @@ bool parseCylinder(Cylinder &y, TiXmlElement *c)
   {
     y.length = boost::lexical_cast<double>(c->Attribute("length"));
   }
-  catch (boost::bad_lexical_cast &e)
+  catch (boost::bad_lexical_cast &/*e*/)
   {
     std::stringstream stm;
     stm << "length [" << c->Attribute("length") << "] is not a valid float";
@@ -180,7 +181,7 @@ bool parseCylinder(Cylinder &y, TiXmlElement *c)
   {
     y.radius = boost::lexical_cast<double>(c->Attribute("radius"));
   }
-  catch (boost::bad_lexical_cast &e)
+  catch (boost::bad_lexical_cast &/*e*/)
   {
     std::stringstream stm;
     stm << "radius [" << c->Attribute("radius") << "] is not a valid float";
@@ -207,9 +208,10 @@ bool parseMesh(Mesh &m, TiXmlElement *c)
     try {
       m.scale.init(c->Attribute("scale"));
     }
-    catch (ParseError &e) {
+    catch (ParseError &/*e*/) {
       m.scale.clear();
-      //logError("Mesh scale was specified, but could not be parsed: %s", e.what());
+      // logError("Mesh scale was specified,
+      // but could not be parsed: %s", e.what());
       return false;
     }
   }
@@ -259,14 +261,14 @@ boost::shared_ptr<Geometry> parseGeometry(TiXmlElement *g)
     Mesh *m = new Mesh();
     geom.reset(m);
     if (parseMesh(*m, shape))
-      return geom;    
+      return geom;
   }
   else
   {
     //logError("Unknown geometry type '%s'", type_name.c_str());
     return geom;
   }
-  
+
   return boost::shared_ptr<Geometry>();
 }
 
@@ -298,7 +300,7 @@ bool parseInertial(Inertial &i, TiXmlElement *config)
   {
     i.mass = boost::lexical_cast<double>(mass_xml->Attribute("value"));
   }
-  catch (boost::bad_lexical_cast &e)
+  catch (boost::bad_lexical_cast &/*e*/)
   {
     std::stringstream stm;
     stm << "Inertial: mass [" << mass_xml->Attribute("value")
@@ -329,7 +331,7 @@ bool parseInertial(Inertial &i, TiXmlElement *config)
     i.iyz  = boost::lexical_cast<double>(inertia_xml->Attribute("iyz"));
     i.izz  = boost::lexical_cast<double>(inertia_xml->Attribute("izz"));
   }
-  catch (boost::bad_lexical_cast &e)
+  catch (boost::bad_lexical_cast &/*e*/)
   {
     std::stringstream stm;
     stm << "Inertial: one of the inertia elements is not a valid double:"
@@ -375,7 +377,7 @@ bool parseVisual(Visual &vis, TiXmlElement *config)
       return false;
     }
     vis.material_name = mat->Attribute("name");
-    
+
     // try to parse material element in place
     vis.material.reset(new Material());
     if (!parseMaterial(*vis.material, mat, true))
@@ -383,12 +385,12 @@ bool parseVisual(Visual &vis, TiXmlElement *config)
       //logDebug("urdfdom: material has only name, actual material definition may be in the model");
     }
   }
-  
+
   return true;
 }
 
 bool parseCollision(Collision &col, TiXmlElement* config)
-{  
+{
   col.clear();
 
   // Origin
@@ -397,7 +399,7 @@ bool parseCollision(Collision &col, TiXmlElement* config)
     if (!parsePose(col.origin, o))
       return false;
   }
-  
+
   // Geometry
   TiXmlElement *geom = config->FirstChildElement("geometry");
   col.geometry = parseGeometry(geom);
@@ -413,7 +415,7 @@ bool parseCollision(Collision &col, TiXmlElement* config)
 
 bool parseLink(Link &link, TiXmlElement* config)
 {
-  
+
   link.clear();
 
   const char *name_char = config->Attribute("name");
@@ -458,14 +460,14 @@ bool parseLink(Link &link, TiXmlElement* config)
   // Assign the first visual to the .visual ptr, if it exists
   if (!link.visual_array.empty())
     link.visual = link.visual_array[0];
-  
+
   // Multiple Collisions (optional)
   for (TiXmlElement* col_xml = config->FirstChildElement("collision"); col_xml; col_xml = col_xml->NextSiblingElement("collision"))
   {
     boost::shared_ptr<Collision> col;
     col.reset(new Collision());
     if (parseCollision(*col, col_xml))
-    {      
+    {
       link.collision_array.push_back(col);
     }
     else
@@ -475,8 +477,8 @@ bool parseLink(Link &link, TiXmlElement* config)
       return false;
     }
   }
-  
-  // Collision (optional)  
+
+  // Collision (optional)
   // Assign the first collision to the .collision ptr, if it exists
   if (!link.collision_array.empty())
     link.collision = link.collision_array[0];
@@ -600,7 +602,7 @@ bool exportInertial(Inertial &i, TiXmlElement *xml)
   inertial_xml->LinkEndChild(inertia_xml);
 
   xml->LinkEndChild(inertial_xml);
-  
+
   return true;
 }
 
@@ -628,7 +630,7 @@ bool exportVisual(Visual &vis, TiXmlElement *xml)
 }
 
 bool exportCollision(Collision &col, TiXmlElement* xml)
-{  
+{
   // <collision group="default">
   //   <origin rpy="0 0 0" xyz="0 0 0"/>
   //   <geometry>
diff --git a/src/urdf/urdf_parser/model.cpp b/src/urdf/urdf_parser/model.cpp
index 149f647..1c4fbf5 100644
--- a/src/urdf/urdf_parser/model.cpp
+++ b/src/urdf/urdf_parser/model.cpp
@@ -1,13 +1,13 @@
 /*********************************************************************
 * Software License Agreement (BSD License)
-* 
+*
 *  Copyright (c) 2008, Willow Garage, Inc.
 *  All rights reserved.
-* 
+*
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
-* 
+*
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
@@ -17,7 +17,7 @@
 *   * Neither the name of the Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
-* 
+*
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -56,7 +56,7 @@ boost::shared_ptr<ModelInterface>  parseURDFFile(const std::string &path)
     }
 
     std::string xml_str((std::istreambuf_iterator<char>(stream)),
-	                     std::istreambuf_iterator<char>());
+                       std::istreambuf_iterator<char>());
     return urdf::parseURDF( xml_str );
 }
 
@@ -114,7 +114,8 @@ boost::shared_ptr<ModelInterface>  parseURDF(const std::string &xml_string)
         //logDebug("urdfdom: successfully added a new material '%s'", material->name.c_str());
       }
     }
-    catch (ParseError &e) {
+    catch (ParseError &)
+    {
       //logDebug("material xml is not initialized correctly");
       material.reset();
       model.reset();
@@ -170,7 +171,8 @@ boost::shared_ptr<ModelInterface>  parseURDF(const std::string &xml_string)
         //logDebug("urdfdom: successfully added a new link '%s'", link->name.c_str());
       }
     }
-    catch (ParseError &e) {
+    catch (ParseError &)
+    {
       //logDebug("link xml is not initialized correctly");
       model.reset();
       return model;
@@ -217,11 +219,11 @@ boost::shared_ptr<ModelInterface>  parseURDF(const std::string &xml_string)
   parent_link_tree.clear();
 
   // building tree: name mapping
-  try 
+  try
   {
     model->initTree(parent_link_tree);
   }
-  catch(ParseError &e)
+  catch(ParseError &)
   {
     //logDebug("Failed to build tree: %s", e.what());
     model.reset();
@@ -233,13 +235,13 @@ boost::shared_ptr<ModelInterface>  parseURDF(const std::string &xml_string)
   {
     model->initRoot(parent_link_tree);
   }
-  catch(ParseError &e)
+  catch(ParseError &)
   {
     //logDebug("Failed to find root link: %s", e.what());
     model.reset();
     return model;
   }
-  
+
   return model;
 }
 
@@ -261,13 +263,13 @@ TiXmlDocument*  exportURDF(const ModelInterface &model)
     exportMaterial(*(m->second), robot);
   }
 
-  for (std::map<std::string, boost::shared_ptr<Link> >::const_iterator l=model.links_.begin(); l!=model.links_.end(); l++)  
+  for (std::map<std::string, boost::shared_ptr<Link> >::const_iterator l=model.links_.begin(); l!=model.links_.end(); l++)
   {
     //logDebug("urdfdom: exporting link [%s]\n",l->second->name.c_str());
     exportLink(*(l->second), robot);
   }
-  	
-  for (std::map<std::string, boost::shared_ptr<Joint> >::const_iterator j=model.joints_.begin(); j!=model.joints_.end(); j++)  
+
+  for (std::map<std::string, boost::shared_ptr<Joint> >::const_iterator j=model.joints_.begin(); j!=model.joints_.end(); j++)
   {
     //logDebug("urdfdom: exporting joint [%s]\n",j->second->name.c_str());
     exportJoint(*(j->second), robot);
@@ -275,7 +277,7 @@ TiXmlDocument*  exportURDF(const ModelInterface &model)
 
   return doc;
 }
-    
+
 TiXmlDocument*  exportURDF(boost::shared_ptr<ModelInterface> &model)
 {
   return exportURDF(*model);
diff --git a/src/urdf/urdf_parser/pose.cpp b/src/urdf/urdf_parser/pose.cpp
index f00207e..d8b69a5 100644
--- a/src/urdf/urdf_parser/pose.cpp
+++ b/src/urdf/urdf_parser/pose.cpp
@@ -1,13 +1,13 @@
 /*********************************************************************
 * Software License Agreement (BSD License)
-* 
+*
 *  Copyright (c) 2008, Willow Garage, Inc.
 *  All rights reserved.
-* 
+*
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
-* 
+*
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
@@ -17,7 +17,7 @@
 *   * Neither the name of the Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
-* 
+*
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -99,8 +99,7 @@ bool parsePose(Pose &pose, TiXmlElement* xml)
       try {
         pose.position.init(xyz_str);
       }
-      catch (ParseError &e) {
-        //logError(e.what());
+      catch (ParseError &) {
         return false;
       }
     }
@@ -111,8 +110,7 @@ bool parsePose(Pose &pose, TiXmlElement* xml)
       try {
         pose.rotation.init(rpy_str);
       }
-      catch (ParseError &e) {
-        //logError(e.what());
+      catch (ParseError &) {
         return false;
       }
     }
diff --git a/src/urdf/urdf_parser/twist.cpp b/src/urdf/urdf_parser/twist.cpp
index 40c993b..ee210e6 100644
--- a/src/urdf/urdf_parser/twist.cpp
+++ b/src/urdf/urdf_parser/twist.cpp
@@ -1,13 +1,13 @@
 /*********************************************************************
 * Software License Agreement (BSD License)
-* 
+*
 *  Copyright (c) 2008, Willow Garage, Inc.
 *  All rights reserved.
-* 
+*
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
-* 
+*
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
@@ -17,7 +17,7 @@
 *   * Neither the name of the Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
-* 
+*
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -56,7 +56,8 @@ bool parseTwist(Twist &twist, TiXmlElement* xml)
       try {
         twist.linear.init(linear_char);
       }
-      catch (ParseError &e) {
+      catch (ParseError &/*e*/)
+      {
         twist.linear.clear();
         //logError("Malformed linear string [%s]: %s", linear_char, e.what());
         return false;
@@ -69,7 +70,8 @@ bool parseTwist(Twist &twist, TiXmlElement* xml)
       try {
         twist.angular.init(angular_char);
       }
-      catch (ParseError &e) {
+      catch (ParseError &/*e*/)
+      {
         twist.angular.clear();
         //logError("Malformed angular [%s]: %s", angular_char, e.what());
         return false;
diff --git a/src/urdf/urdf_parser/urdf_model_state.cpp b/src/urdf/urdf_parser/urdf_model_state.cpp
index da87c07..ec71116 100644
--- a/src/urdf/urdf_parser/urdf_model_state.cpp
+++ b/src/urdf/urdf_parser/urdf_model_state.cpp
@@ -1,13 +1,13 @@
 /*********************************************************************
 * Software License Agreement (BSD License)
-* 
+*
 *  Copyright (c) 2008, Willow Garage, Inc.
 *  All rights reserved.
-* 
+*
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
-* 
+*
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
@@ -17,7 +17,7 @@
 *   * Neither the name of the Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
-* 
+*
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -64,7 +64,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
       double sec = boost::lexical_cast<double>(time_stamp_char);
       ms.time_stamp.set(sec);
     }
-    catch (boost::bad_lexical_cast &e) {
+    catch (boost::bad_lexical_cast &/*e*/) {
       //logError("Parsing time stamp [%s] failed: %s", time_stamp_char, e.what());
       return false;
     }
@@ -84,7 +84,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
       //logError("No joint name given for the model_state.");
       return false;
     }
-    
+
     // parse position
     const char *position_char = joint_state_elem->Attribute("position");
     if (position_char)
@@ -97,7 +97,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
           try {
             joint_state->position.push_back(boost::lexical_cast<double>(pieces[i].c_str()));
           }
-          catch (boost::bad_lexical_cast &e) {
+          catch (boost::bad_lexical_cast &/*e*/) {
             throw ParseError("position element ("+ pieces[i] +") is not a valid float");
           }
         }
@@ -116,7 +116,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
           try {
             joint_state->velocity.push_back(boost::lexical_cast<double>(pieces[i].c_str()));
           }
-          catch (boost::bad_lexical_cast &e) {
+          catch (boost::bad_lexical_cast &/*e*/) {
             throw ParseError("velocity element ("+ pieces[i] +") is not a valid float");
           }
         }
@@ -135,7 +135,7 @@ bool parseModelState(ModelState &ms, TiXmlElement* config)
           try {
             joint_state->effort.push_back(boost::lexical_cast<double>(pieces[i].c_str()));
           }
-          catch (boost::bad_lexical_cast &e) {
+          catch (boost::bad_lexical_cast &/*e*/) {
             throw ParseError("effort element ("+ pieces[i] +") is not a valid float");
           }
         }
diff --git a/src/urdf/urdf_parser/urdf_parser.h b/src/urdf/urdf_parser/urdf_parser.h
index 57e836b..82cbc2c 100644
--- a/src/urdf/urdf_parser/urdf_parser.h
+++ b/src/urdf/urdf_parser/urdf_parser.h
@@ -31,8 +31,9 @@
 *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 *  POSSIBILITY OF SUCH DAMAGE.
 *********************************************************************/
-
+#ifndef _WIN32
 #pragma GCC system_header
+#endif
 /* Author: Wim Meeussen */
 
 #ifndef URDF_PARSER_URDF_PARSER_H
diff --git a/src/urdf/urdf_parser/urdf_sensor.cpp b/src/urdf/urdf_parser/urdf_sensor.cpp
index 6766c9d..f9e4467 100644
--- a/src/urdf/urdf_parser/urdf_sensor.cpp
+++ b/src/urdf/urdf_parser/urdf_sensor.cpp
@@ -1,13 +1,13 @@
 /*********************************************************************
 * Software License Agreement (BSD License)
-* 
+*
 *  Copyright (c) 2008, Willow Garage, Inc.
 *  All rights reserved.
-* 
+*
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
-* 
+*
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
@@ -17,7 +17,7 @@
 *   * Neither the name of the Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
-* 
+*
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
@@ -62,7 +62,7 @@ bool parseCamera(Camera &camera, TiXmlElement* config)
       {
         camera.width = boost::lexical_cast<unsigned int>(width_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
         //logError("Camera image width [%s] is not a valid int: %s", width_char, e.what());
         return false;
@@ -81,7 +81,7 @@ bool parseCamera(Camera &camera, TiXmlElement* config)
       {
         camera.height = boost::lexical_cast<unsigned int>(height_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
         //logError("Camera image height [%s] is not a valid int: %s", height_char, e.what());
         return false;
@@ -100,7 +100,7 @@ bool parseCamera(Camera &camera, TiXmlElement* config)
     {
       //logError("Camera sensor needs an image format attribute");
       return false;
-    }    
+    }
 
     const char* hfov_char = image->Attribute("hfov");
     if (hfov_char)
@@ -109,7 +109,7 @@ bool parseCamera(Camera &camera, TiXmlElement* config)
       {
         camera.hfov = boost::lexical_cast<double>(hfov_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
         //logError("Camera image hfov [%s] is not a valid float: %s", hfov_char, e.what());
         return false;
@@ -128,7 +128,7 @@ bool parseCamera(Camera &camera, TiXmlElement* config)
       {
         camera.near = boost::lexical_cast<double>(near_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
         //logError("Camera image near [%s] is not a valid float: %s", near_char, e.what());
         return false;
@@ -147,7 +147,7 @@ bool parseCamera(Camera &camera, TiXmlElement* config)
       {
         camera.far = boost::lexical_cast<double>(far_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
         //logError("Camera image far [%s] is not a valid float: %s", far_char, e.what());
         return false;
@@ -158,7 +158,7 @@ bool parseCamera(Camera &camera, TiXmlElement* config)
       //logError("Camera sensor needs an image far attribute");
       return false;
     }
-    
+
   }
   else
   {
@@ -181,9 +181,10 @@ bool parseRay(Ray &ray, TiXmlElement* config)
     {
       try
       {
-        ray.horizontal_samples = boost::lexical_cast<unsigned int>(samples_char);
+        ray.horizontal_samples =
+          boost::lexical_cast<unsigned int>(samples_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
         //logError("Ray horizontal samples [%s] is not a valid float: %s", samples_char, e.what());
         return false;
@@ -195,15 +196,17 @@ bool parseRay(Ray &ray, TiXmlElement* config)
     {
       try
       {
-        ray.horizontal_resolution = boost::lexical_cast<double>(resolution_char);
+        ray.horizontal_resolution =
+          boost::lexical_cast<double>(resolution_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
-        //logError("Ray horizontal resolution [%s] is not a valid float: %s", resolution_char, e.what());
+        // logError("Ray horizontal resolution [%s]
+        // is not a valid float: %s", resolution_char, e.what());
         return false;
       }
-    }   
-    
+    }
+
     const char* min_angle_char = horizontal->Attribute("min_angle");
     if (min_angle_char)
     {
@@ -211,9 +214,10 @@ bool parseRay(Ray &ray, TiXmlElement* config)
       {
         ray.horizontal_min_angle = boost::lexical_cast<double>(min_angle_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
-        //logError("Ray horizontal min_angle [%s] is not a valid float: %s", min_angle_char, e.what());
+        // logError("Ray horizontal min_angle[%s]
+        // is not a valid float: %s", min_angle_char, e.what());
         return false;
       }
     }
@@ -225,14 +229,15 @@ bool parseRay(Ray &ray, TiXmlElement* config)
       {
         ray.horizontal_max_angle = boost::lexical_cast<double>(max_angle_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
-        //logError("Ray horizontal max_angle [%s] is not a valid float: %s", max_angle_char, e.what());
+        // logError("Ray horizontal max_angle [%s]
+        // is not a valid float: %s", max_angle_char, e.what());
         return false;
       }
     }
   }
-  
+
   TiXmlElement *vertical = config->FirstChildElement("vertical");
   if (vertical)
   {
@@ -243,9 +248,10 @@ bool parseRay(Ray &ray, TiXmlElement* config)
       {
         ray.vertical_samples = boost::lexical_cast<unsigned int>(samples_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
-        //logError("Ray vertical samples [%s] is not a valid float: %s", samples_char, e.what());
+        // logError("Ray vertical samples [%s]
+        // is not a valid float: %s", samples_char, e.what());
         return false;
       }
     }
@@ -257,13 +263,14 @@ bool parseRay(Ray &ray, TiXmlElement* config)
       {
         ray.vertical_resolution = boost::lexical_cast<double>(resolution_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
-        //logError("Ray vertical resolution [%s] is not a valid float: %s", resolution_char, e.what());
+        // logError("Ray vertical resolution [%s]
+        // is not a valid float: %s", resolution_char, e.what());
         return false;
       }
-    }   
-    
+    }
+
     const char* min_angle_char = vertical->Attribute("min_angle");
     if (min_angle_char)
     {
@@ -271,9 +278,10 @@ bool parseRay(Ray &ray, TiXmlElement* config)
       {
         ray.vertical_min_angle = boost::lexical_cast<double>(min_angle_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
-        //logError("Ray vertical min_angle [%s] is not a valid float: %s", min_angle_char, e.what());
+        // logError("Ray vertical min_angle [%s]
+        // is not a valid float: %s", min_angle_char, e.what());
         return false;
       }
     }
@@ -285,9 +293,10 @@ bool parseRay(Ray &ray, TiXmlElement* config)
       {
         ray.vertical_max_angle = boost::lexical_cast<double>(max_angle_char);
       }
-      catch (boost::bad_lexical_cast &e)
+      catch (boost::bad_lexical_cast &/*e*/)
       {
-        //logError("Ray vertical max_angle [%s] is not a valid float: %s", max_angle_char, e.what());
+        // logError("Ray vertical max_angle [%s]
+        // is not a valid float: %s", max_angle_char, e.what());
         return false;
       }
     }
diff --git a/src/win/tinyxml/tinyxml.cpp b/src/win/tinyxml/tinyxml.cpp
index f113706..39bebe1 100644
--- a/src/win/tinyxml/tinyxml.cpp
+++ b/src/win/tinyxml/tinyxml.cpp
@@ -643,7 +643,9 @@ int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const
 	return attrib->QueryIntValue( ival );
 }
 
+#ifndef _WIN32
 #pragma GCC diagnostic ignored "-Wshadow"
+#endif
 int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* value ) const
 {
 	const TiXmlAttribute* node = attributeSet.Find( name );
@@ -655,7 +657,9 @@ int TiXmlElement::QueryUnsignedAttribute( const char* name, unsigned* value ) co
 	*value = (unsigned)ival;
 	return result;
 }
+#ifndef _WIN32
 #pragma GCC diagnostic pop
+#endif
 
 int TiXmlElement::QueryBoolAttribute( const char* name, bool* bval ) const
 {
diff --git a/src/win/tinyxml/tinyxmlparser.cpp b/src/win/tinyxml/tinyxmlparser.cpp
index eb871e5..c9d012d 100644
--- a/src/win/tinyxml/tinyxmlparser.cpp
+++ b/src/win/tinyxml/tinyxmlparser.cpp
@@ -105,7 +105,9 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
 	output += *length;
 
 	// Scary scary fall throughs.
+        #ifndef _WIN32
         #pragma GCC diagnostic ignored "-Wswitch-default"
+        #endif
 	switch (*length) 
 	{
 		case 4:
@@ -124,7 +126,9 @@ void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* leng
 			--output; 
 			*output = (char)(input | FIRST_BYTE_MARK[*length]);
 	}
+        #ifndef _WIN32
         #pragma GCC diagnostic pop
+        #endif
 }
 
 
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b701b58..520fcce 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -5,10 +5,12 @@ include_directories (
   ${PROJECT_SOURCE_DIR}/test/gtest/include
   ${PROJECT_SOURCE_DIR}/test/gtest
   ${PROJECT_SOURCE_DIR}/test
+  ${IGNITION-MATH_INCLUDE_DIRS}
 )
 
 link_directories(
   ${Boost_LIBRARY_DIRS}
+  ${IGNITION-MATH_LIBRARY_DIRS}
 )
 
 if (USE_EXTERNAL_URDF)
diff --git a/test/gtest/include/gtest/gtest-printers.h b/test/gtest/include/gtest/gtest-printers.h
index b00f91e..bc647b1 100644
--- a/test/gtest/include/gtest/gtest-printers.h
+++ b/test/gtest/include/gtest/gtest-printers.h
@@ -94,7 +94,9 @@
 
 #ifndef GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
 #define GTEST_INCLUDE_GTEST_GTEST_PRINTERS_H_
+#ifndef _WIN32
 #pragma GCC system_header
+#endif
 
 #include <ostream>  // NOLINT
 #include <sstream>
diff --git a/test/gtest/include/gtest/gtest-typed-test.h b/test/gtest/include/gtest/gtest-typed-test.h
index d5dc8be..9e62fdb 100644
--- a/test/gtest/include/gtest/gtest-typed-test.h
+++ b/test/gtest/include/gtest/gtest-typed-test.h
@@ -31,7 +31,10 @@
 
 #ifndef GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
 #define GTEST_INCLUDE_GTEST_GTEST_TYPED_TEST_H_
+
+#ifndef _WIN32
 #pragma GCC system_header
+#endif
 
 // This header implements typed tests and type-parameterized tests.
 
diff --git a/test/gtest/include/gtest/internal/gtest-port.h b/test/gtest/include/gtest/internal/gtest-port.h
index ab40df1..bc46459 100644
--- a/test/gtest/include/gtest/internal/gtest-port.h
+++ b/test/gtest/include/gtest/internal/gtest-port.h
@@ -39,7 +39,9 @@
 
 #ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
 #define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PORT_H_
+#ifndef _WIN32
 #pragma GCC system_header
+#endif
 
 // The user can define the following macros in the build script to
 // control Google Test's behavior.  If the user doesn't define a macro
diff --git a/test/gtest/src/gtest.cc b/test/gtest/src/gtest.cc
index 7ee9368..2ab80e2 100644
--- a/test/gtest/src/gtest.cc
+++ b/test/gtest/src/gtest.cc
@@ -33,7 +33,10 @@
 
 #include "gtest/gtest.h"
 #include "gtest/gtest-spi.h"
+
+#ifndef _WIN32
 #pragma GCC system_header
+#endif
 
 #include <ctype.h>
 #include <math.h>
diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt
index fb9c7e3..77d3eee 100644
--- a/test/integration/CMakeLists.txt
+++ b/test/integration/CMakeLists.txt
@@ -7,16 +7,27 @@ set(tests
   fixed_joint_reduction.cc
   force_torque_sensor.cc
   joint_axis_frame.cc
+  locale_fix.cc
+  parser_error_detection.cc
   plugin_attribute.cc
   plugin_bool.cc
   provide_feedback.cc
-  schema_test.cc
   urdf_joint_parameters.cc
 )
 
+find_program(XMLLINT_EXE xmllint)
+if (EXISTS ${XMLLINT_EXE})
+  set (tests ${tests} schema_test.cc)
+else()
+  BUILD_WARNING("xmllint not found. schema_test won't be run")
+endif()
+
 link_directories(${PROJECT_BINARY_DIR}/test)
 
 sdf_build_tests(${tests})
 
-# Need to run schema target (build .xsd files) before running schema_test
-add_dependencies(${TEST_TYPE}_schema_test schema)
+if (EXISTS ${XMLLINT_EXE})
+  # Need to run schema target (build .xsd files) before running schema_test
+  add_dependencies(${TEST_TYPE}_schema_test schema)
+endif()
+
diff --git a/test/integration/cfm_damping_implicit_spring_damper.cc b/test/integration/cfm_damping_implicit_spring_damper.cc
index f6b4d7d..97a72fe 100644
--- a/test/integration/cfm_damping_implicit_spring_damper.cc
+++ b/test/integration/cfm_damping_implicit_spring_damper.cc
@@ -48,7 +48,7 @@ TEST(SDFParser, CFMDampingSDFTest)
     unsetenv("SDF_PATH");
   }
 
-  sdf::ElementPtr model = robot->root->GetElement("model");
+  sdf::ElementPtr model = robot->Root()->GetElement("model");
   for (sdf::ElementPtr joint = model->GetElement("joint"); joint;
        joint = joint->GetNextElement("joint"))
   {
@@ -121,7 +121,7 @@ TEST(SDFParser, CFMDampingURDFTest)
     unsetenv("SDF_PATH");
   }
 
-  sdf::ElementPtr model = robot->root->GetElement("model");
+  sdf::ElementPtr model = robot->Root()->GetElement("model");
   for (sdf::ElementPtr joint = model->GetElement("joint"); joint;
        joint = joint->GetNextElement("joint"))
   {
diff --git a/test/integration/disable_fixed_joint_reduction.cc b/test/integration/disable_fixed_joint_reduction.cc
index 4055255..1425d3c 100644
--- a/test/integration/disable_fixed_joint_reduction.cc
+++ b/test/integration/disable_fixed_joint_reduction.cc
@@ -32,7 +32,7 @@ const std::string SDF_FIXED_JNT_NO_LUMPING = std::string(PROJECT_SOURCE_PATH)
 bool findJointInModel(std::string desired_joint_name, sdf::SDFPtr robot)
 {
   bool found = false;
-  sdf::ElementPtr model = robot->root->GetElement("model");
+  sdf::ElementPtr model = robot->Root()->GetElement("model");
   for (sdf::ElementPtr joint = model->GetElement("joint"); joint;
        joint = joint->GetNextElement("joint"))
   {
diff --git a/test/integration/fixed_joint_reduction.cc b/test/integration/fixed_joint_reduction.cc
index 4789069..9a19b7a 100644
--- a/test/integration/fixed_joint_reduction.cc
+++ b/test/integration/fixed_joint_reduction.cc
@@ -83,64 +83,69 @@ void FixedJointReductionEquivalence(const std::string &_file)
   }
 
   std::map<std::string, double> linkMasses;
-  std::map<std::string, sdf::Pose> linkPoses;
-  std::map<std::string, sdf::Vector3> mapIxxIyyIzz;
-  std::map<std::string, sdf::Vector3> mapIxyIxzIyz;
+  std::map<std::string, ignition::math::Pose3d> linkPoses;
+  std::map<std::string, ignition::math::Vector3d> mapIxxIyyIzz;
+  std::map<std::string, ignition::math::Vector3d> mapIxyIxzIyz;
 
   {
     std::string linkName = "link0";
     linkMasses[linkName] = 1000;
-    linkPoses[linkName] = sdf::Pose(0, 0, -0.5, 0, -0, 0);
-    mapIxxIyyIzz[linkName] = sdf::Vector3(1, 1, 1);
-    mapIxyIxzIyz[linkName] = sdf::Vector3(0, 0, 0);
+    linkPoses[linkName] = ignition::math::Pose3d(0, 0, -0.5, 0, -0, 0);
+    mapIxxIyyIzz[linkName] = ignition::math::Vector3d(1, 1, 1);
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d(0, 0, 0);
   }
 
   {
     std::string linkName = "link1";
     linkMasses[linkName] = 100;
-    linkPoses[linkName] = sdf::Pose(0, -1.5, 0, -2.14159, 0.141593, 0.858407);
-    mapIxxIyyIzz[linkName] = sdf::Vector3(2, 3, 4);
-    mapIxyIxzIyz[linkName] = sdf::Vector3(0, 0, 0);
+    linkPoses[linkName] =
+      ignition::math::Pose3d(0, -1.5, 0, -2.14159, 0.141593, 0.858407);
+    mapIxxIyyIzz[linkName] = ignition::math::Vector3d(2, 3, 4);
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d(0, 0, 0);
   }
 
   {
     std::string linkName = "link2";
     linkMasses[linkName] = 200;
-    linkPoses[linkName] = sdf::Pose(0.2, 0.4, 1, -1.14159, -0.141593, 1.5708);
-    mapIxxIyyIzz[linkName] = sdf::Vector3(5, 6, 7);
-    mapIxyIxzIyz[linkName] = sdf::Vector3(0, 0, 0);
+    linkPoses[linkName] =
+      ignition::math::Pose3d(0.2, 0.4, 1, -1.14159, -0.141593, 1.5708);
+    mapIxxIyyIzz[linkName] = ignition::math::Vector3d(5, 6, 7);
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d(0, 0, 0);
   }
 
   {
     std::string linkName = "link3";
     linkMasses[linkName] = 400;
     linkPoses[linkName] =
-      sdf::Pose(0.1, 0.2, 0.3, -1.14159, 0.141593, 0.858407);
-    mapIxxIyyIzz[linkName] = sdf::Vector3(8, 9, 10);
-    mapIxyIxzIyz[linkName] = sdf::Vector3(0, 0, 0);
+      ignition::math::Pose3d(0.1, 0.2, 0.3, -1.14159, 0.141593, 0.858407);
+    mapIxxIyyIzz[linkName] = ignition::math::Vector3d(8, 9, 10);
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d(0, 0, 0);
   }
 
   {
     std::string linkName = "link1a";
     linkMasses[linkName] = 700;
-    linkPoses[linkName] =
-      sdf::Pose(1.6, -2.72857, -0.342857, -2.14159, 0.141593, 0.858407);
-    mapIxxIyyIzz[linkName] = sdf::Vector3(576.477, 527.681, 420.127);
-    mapIxyIxzIyz[linkName] = sdf::Vector3(-65.6808, 134.562, 264.781);
+    linkPoses[linkName] = ignition::math::Pose3d(
+      1.6, -2.72857, -0.342857, -2.14159, 0.141593, 0.858407);
+    mapIxxIyyIzz[linkName] =
+      ignition::math::Vector3d(576.477, 527.681, 420.127);
+    mapIxyIxzIyz[linkName] =
+      ignition::math::Vector3d(-65.6808, 134.562, 264.781);
   }
 
   // Count collisions and visuals
   unsigned int countVisuals = 0;
   unsigned int countCollisions = 0;
 
-  sdf::ElementPtr model = robot->root->GetElement("model");
+  sdf::ElementPtr model = robot->Root()->GetElement("model");
   for (sdf::ElementPtr link = model->GetElement("link"); link;
        link = link->GetNextElement("link"))
   {
     std::string linkName = link->Get<std::string>("name");
     sdf::ElementPtr inertial = link->GetElement("inertial");
     double linkMass = inertial->Get<double>("mass");
-    sdf::Pose linkPose = inertial->Get<sdf::Pose>("pose");
+    ignition::math::Pose3d linkPose =
+      inertial->Get<ignition::math::Pose3d>("pose");
     sdf::ElementPtr inertia = inertial->GetElement("inertia");
     double ixx = inertia->Get<double>("ixx");
     double iyy = inertia->Get<double>("iyy");
@@ -162,12 +167,12 @@ void FixedJointReductionEquivalence(const std::string &_file)
 
     EXPECT_NEAR(linkMass, linkMasses[linkName], gc_tolerance);
     EXPECT_EQ(linkPose, linkPoses[linkName]);
-    EXPECT_NEAR(ixx, mapIxxIyyIzz[linkName].x, gc_tolerance);
-    EXPECT_NEAR(iyy, mapIxxIyyIzz[linkName].y, gc_tolerance);
-    EXPECT_NEAR(izz, mapIxxIyyIzz[linkName].z, gc_tolerance);
-    EXPECT_NEAR(ixy, mapIxyIxzIyz[linkName].x, gc_tolerance);
-    EXPECT_NEAR(ixz, mapIxyIxzIyz[linkName].y, gc_tolerance);
-    EXPECT_NEAR(iyz, mapIxyIxzIyz[linkName].z, gc_tolerance);
+    EXPECT_NEAR(ixx, mapIxxIyyIzz[linkName].X(), gc_tolerance);
+    EXPECT_NEAR(iyy, mapIxxIyyIzz[linkName].Y(), gc_tolerance);
+    EXPECT_NEAR(izz, mapIxxIyyIzz[linkName].Z(), gc_tolerance);
+    EXPECT_NEAR(ixy, mapIxyIxzIyz[linkName].X(), gc_tolerance);
+    EXPECT_NEAR(ixz, mapIxyIxzIyz[linkName].Y(), gc_tolerance);
+    EXPECT_NEAR(iyz, mapIxyIxzIyz[linkName].Z(), gc_tolerance);
 
     if (link->HasElement("collision"))
     {
@@ -225,67 +230,71 @@ TEST(SDFParser, FixedJointReductionSimple)
   }
 
   std::map<std::string, double> linkMasses;
-  std::map<std::string, sdf::Pose> linkPoses;
-  std::map<std::string, sdf::Vector3> mapIxxIyyIzz;
-  std::map<std::string, sdf::Vector3> mapIxyIxzIyz;
+  std::map<std::string, ignition::math::Pose3d> linkPoses;
+  std::map<std::string, ignition::math::Vector3d> mapIxxIyyIzz;
+  std::map<std::string, ignition::math::Vector3d> mapIxyIxzIyz;
 
-  const sdf::Vector3 defaultIxxIyyIzz(7, 9, 11);
+  const ignition::math::Vector3d defaultIxxIyyIzz(7, 9, 11);
   {
     std::string linkName = "link1";
     linkMasses[linkName] = 300;
-    linkPoses[linkName] = sdf::Pose();
+    linkPoses[linkName] = ignition::math::Pose3d();
     mapIxxIyyIzz[linkName] = defaultIxxIyyIzz;
-    mapIxyIxzIyz[linkName] = sdf::Vector3();
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d();
   }
 
   {
     std::string linkName = "link1a";
     linkMasses[linkName] = 300;
-    linkPoses[linkName] = sdf::Pose();
+    linkPoses[linkName] = ignition::math::Pose3d();
     mapIxxIyyIzz[linkName] = defaultIxxIyyIzz;
-    mapIxyIxzIyz[linkName] = sdf::Vector3();
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d();
   }
 
   {
     std::string linkName = "link1b";
     linkMasses[linkName] = 300;
-    linkPoses[linkName] = sdf::Pose();
+    linkPoses[linkName] = ignition::math::Pose3d();
     mapIxxIyyIzz[linkName] = defaultIxxIyyIzz;
-    mapIxyIxzIyz[linkName] = sdf::Vector3();
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d();
   }
 
   {
     std::string linkName = "link1c";
     linkMasses[linkName] = 300;
-    linkPoses[linkName] = sdf::Pose(0.2, 0, 0, 0, 0, 0);
-    mapIxxIyyIzz[linkName] = defaultIxxIyyIzz + sdf::Vector3(0, 6, 6);
-    mapIxyIxzIyz[linkName] = sdf::Vector3();
+    linkPoses[linkName] = ignition::math::Pose3d(0.2, 0, 0, 0, 0, 0);
+    mapIxxIyyIzz[linkName] =
+      defaultIxxIyyIzz + ignition::math::Vector3d(0, 6, 6);
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d();
   }
 
   {
     std::string linkName = "link1d";
     linkMasses[linkName] = 300;
-    linkPoses[linkName] = sdf::Pose(0.2, 0, 0, 0, 0, 0);
-    mapIxxIyyIzz[linkName] = defaultIxxIyyIzz + sdf::Vector3(0, 6, 6);
-    mapIxyIxzIyz[linkName] = sdf::Vector3();
+    linkPoses[linkName] = ignition::math::Pose3d(0.2, 0, 0, 0, 0, 0);
+    mapIxxIyyIzz[linkName] =
+      defaultIxxIyyIzz + ignition::math::Vector3d(0, 6, 6);
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d();
   }
 
   {
     std::string linkName = "link1e";
     linkMasses[linkName] = 300;
-    linkPoses[linkName] = sdf::Pose(0.2, 0, 0, 0, 0, 0);
-    mapIxxIyyIzz[linkName] = defaultIxxIyyIzz + sdf::Vector3(0, 6, 6);
-    mapIxyIxzIyz[linkName] = sdf::Vector3();
+    linkPoses[linkName] = ignition::math::Pose3d(0.2, 0, 0, 0, 0, 0);
+    mapIxxIyyIzz[linkName] =
+      defaultIxxIyyIzz + ignition::math::Vector3d(0, 6, 6);
+    mapIxyIxzIyz[linkName] = ignition::math::Vector3d();
   }
 
-  sdf::ElementPtr model = robot->root->GetElement("model");
+  sdf::ElementPtr model = robot->Root()->GetElement("model");
   for (sdf::ElementPtr link = model->GetElement("link"); link;
        link = link->GetNextElement("link"))
   {
     std::string linkName = link->Get<std::string>("name");
     sdf::ElementPtr inertial = link->GetElement("inertial");
     double linkMass = inertial->Get<double>("mass");
-    sdf::Pose linkPose = inertial->Get<sdf::Pose>("pose");
+    ignition::math::Pose3d linkPose =
+      inertial->Get<ignition::math::Pose3d>("pose");
     sdf::ElementPtr inertia = inertial->GetElement("inertia");
     double ixx = inertia->Get<double>("ixx");
     double iyy = inertia->Get<double>("iyy");
@@ -307,11 +316,11 @@ TEST(SDFParser, FixedJointReductionSimple)
 
     EXPECT_NEAR(linkMass, linkMasses[linkName], gc_tolerance);
     EXPECT_EQ(linkPose, linkPoses[linkName]);
-    EXPECT_NEAR(ixx, mapIxxIyyIzz[linkName].x, gc_tolerance);
-    EXPECT_NEAR(iyy, mapIxxIyyIzz[linkName].y, gc_tolerance);
-    EXPECT_NEAR(izz, mapIxxIyyIzz[linkName].z, gc_tolerance);
-    EXPECT_NEAR(ixy, mapIxyIxzIyz[linkName].x, gc_tolerance);
-    EXPECT_NEAR(ixz, mapIxyIxzIyz[linkName].y, gc_tolerance);
-    EXPECT_NEAR(iyz, mapIxyIxzIyz[linkName].z, gc_tolerance);
+    EXPECT_NEAR(ixx, mapIxxIyyIzz[linkName].X(), gc_tolerance);
+    EXPECT_NEAR(iyy, mapIxxIyyIzz[linkName].Y(), gc_tolerance);
+    EXPECT_NEAR(izz, mapIxxIyyIzz[linkName].Z(), gc_tolerance);
+    EXPECT_NEAR(ixy, mapIxyIxzIyz[linkName].X(), gc_tolerance);
+    EXPECT_NEAR(ixz, mapIxyIxzIyz[linkName].Y(), gc_tolerance);
+    EXPECT_NEAR(iyz, mapIxyIxzIyz[linkName].Z(), gc_tolerance);
   }
 }
diff --git a/test/integration/force_torque_sensor.cc b/test/integration/force_torque_sensor.cc
index 0cb2c62..d74a281 100644
--- a/test/integration/force_torque_sensor.cc
+++ b/test/integration/force_torque_sensor.cc
@@ -45,7 +45,7 @@ TEST(SDFParser, ForceTorqueSensorTest)
     unsetenv("SDF_PATH");
   }
 
-  sdf::ElementPtr model = robot->root->GetElement("model");
+  sdf::ElementPtr model = robot->Root()->GetElement("model");
   for (sdf::ElementPtr joint = model->GetElement("joint"); joint;
        joint = joint->GetNextElement("joint"))
   {
diff --git a/test/integration/joint_axis_frame.cc b/test/integration/joint_axis_frame.cc
index 7cf1ff5..741dae2 100644
--- a/test/integration/joint_axis_frame.cc
+++ b/test/integration/joint_axis_frame.cc
@@ -37,7 +37,8 @@ std::string get_sdf_string(std::string _version)
     << "      <xyz>1 0 0</xyz>"
     << "    </axis>"
     << "  </joint>"
-    << "</model>";
+    << "</model>"
+    << "</sdf>";
   return stream.str();
 }
 
@@ -63,7 +64,8 @@ TEST(JointAxisFrame, Version_1_4_missing)
     unsetenv("SDF_PATH");
   }
 
-  sdf::ElementPtr joint = model->root->GetElement("model")->GetElement("joint");
+  sdf::ElementPtr joint = model->Root()->GetElement(
+    "model")->GetElement("joint");
   sdf::ElementPtr axis = joint->GetElement("axis");
 
   axis->PrintValues("");
@@ -93,7 +95,8 @@ TEST(JointAxisFrame, Version_1_5_missing)
     unsetenv("SDF_PATH");
   }
 
-  sdf::ElementPtr joint = model->root->GetElement("model")->GetElement("joint");
+  sdf::ElementPtr joint = model->Root()->GetElement(
+    "model")->GetElement("joint");
   sdf::ElementPtr axis = joint->GetElement("axis");
   EXPECT_TRUE(axis->HasElement("use_parent_model_frame"));
   EXPECT_FALSE(axis->Get<bool>("use_parent_model_frame"));
diff --git a/test/integration/locale_fix.cc b/test/integration/locale_fix.cc
new file mode 100644
index 0000000..3d688d7
--- /dev/null
+++ b/test/integration/locale_fix.cc
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2015 Open Source Robotics Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+*/
+
+#include <gtest/gtest.h>
+#include <boost/filesystem.hpp>
+#include "sdf/sdf.hh"
+#include "sdf/parser_urdf.hh"
+
+#include "test_config.h"
+
+const std::string SDF_TEST_FILE = std::string(PROJECT_SOURCE_PATH)
+  + "/test/integration/numeric.sdf";
+
+// Windows supports the setlocale call but we can not extract the
+// available locales using the Linux call
+#ifndef _MSC_VER
+TEST(CheckFixForLocal, MakeTestToFail)
+{
+  // Check if any of the latin locales is avilable
+  FILE *fp = popen("locale -a | grep '^es\\|^pt_\\|^it_' | head -n 1", "r");
+
+  if (!fp)
+    FAIL() << "locale -a call failed";
+
+  char buffer[1024];
+  char *line = fgets(buffer, sizeof(buffer), fp);
+  pclose(fp);
+
+  // Do not run test if not available
+  if (!line)
+  {
+    std::cout << "No latin locale available. Skip test" << std::endl;
+    SUCCEED();
+    return;
+  }
+
+  setlocale(LC_NUMERIC, line);
+
+  // fix to allow make test without make install
+  char *pathCStr = getenv("SDF_PATH");
+  boost::filesystem::path path = PROJECT_SOURCE_PATH;
+  path = path / "sdf" / SDF_VERSION;
+  setenv("SDF_PATH", path.string().c_str(), 1);
+
+  sdf::SDFPtr p(new sdf::SDF());
+  sdf::init(p);
+  ASSERT_TRUE(sdf::readFile(SDF_TEST_FILE, p));
+
+  // clean up environment variables that we modified
+  if (pathCStr)
+  {
+    setenv("SDF_PATH", pathCStr, 1);
+  }
+  else
+  {
+    unsetenv("SDF_PATH");
+  }
+
+  sdf::ElementPtr elem = p->Root()->GetElement("world")
+    ->GetElement("physics")->GetElement("ode")->GetElement("solver")
+    ->GetElement("sor");
+  double angle = elem->Get<double>();
+  ASSERT_DOUBLE_EQ(angle, 0.823);
+
+  elem->Set<double>(0.423);
+
+  // TODO: automatic checking. Error is thrown to the log file and std::err
+  // We should check for "Error [Param.cc:186] Unable to set value"
+  // Problem is How to get the log file path without duplicating code
+}
+#endif
diff --git a/test/integration/numeric.sdf b/test/integration/numeric.sdf
new file mode 100644
index 0000000..a845c1c
--- /dev/null
+++ b/test/integration/numeric.sdf
@@ -0,0 +1,28 @@
+<?xml version="1.0" ?>
+<sdf version="1.5">
+  <world name="default">
+    <gui>
+      <camera name="user_camera">
+        <pose>10 0 3 0 0 3.141592</pose>
+      </camera>
+    </gui>
+    <physics type="ode">
+      <gravity>0.0 0.0 -10.00</gravity>
+      <ode>
+        <solver>
+          <type>quick</type>
+          <iters>100</iters>
+          <sor>0.823</sor>
+        </solver>
+        <constraints>
+          <cfm>0.0</cfm>
+          <erp>0.2</erp>
+          <contact_max_correcting_vel>0.1</contact_max_correcting_vel>
+          <contact_surface_layer>0.0</contact_surface_layer>
+        </constraints>
+      </ode>
+      <real_time_update_rate>0</real_time_update_rate>
+      <max_step_size>0.001</max_step_size>
+    </physics>
+   </world>
+</sdf>
diff --git a/test/integration/plugin_bool.cc b/test/integration/parser_error_detection.cc
similarity index 56%
copy from test/integration/plugin_bool.cc
copy to test/integration/parser_error_detection.cc
index 3356656..d1a2995 100644
--- a/test/integration/plugin_bool.cc
+++ b/test/integration/parser_error_detection.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Open Source Robotics Foundation
+ * Copyright 2015 Open Source Robotics Foundation
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -27,20 +27,27 @@ std::string get_sdf_string()
   std::ostringstream stream;
   stream
     << "<sdf version='" << SDF_VERSION << "'>"
-    << "<model name='model'>"
-    << "  <plugin name='example' filename='libexample.so'>"
-    << "    <value1>true</value1>"
-    << "    <value2>1</value2>"
-    << "    <value3>false</value3>"
-    << "    <value4>0</value4>"
-    << "  </plugin>"
-    << "</model>";
+    << "<model name=\"test\">"
+    << "  <link name=\"test1\">"
+    << "    <visual name=\"bad\">"
+    << "      <geometry>"
+    << "        <box><size>1 1 1</size></box>"
+    << "      </geometry_typo_bad>"
+    << "    </visual>"
+    << "    <visual name=\"good\">"
+    << "      <geometry>"
+    << "        <box><size>1 1 1</size></box>"
+    << "      </geometry>"
+    << "    </visual>"
+    << "  </link>"
+    << "</model>"
+    << "</sdf>";
   return stream.str();
 }
 
 ////////////////////////////////////////
-// make sure that we can read boolean values from inside a plugin
-TEST(PluginBool, ParseBoolValue)
+// make sure that XML errors get caught
+TEST(ParserErrorDetection, BadXML)
 {
   char *pathCStr = getenv("SDF_PATH");
   boost::filesystem::path path = PROJECT_SOURCE_PATH;
@@ -49,7 +56,7 @@ TEST(PluginBool, ParseBoolValue)
 
   sdf::SDFPtr model(new sdf::SDF());
   sdf::init(model);
-  ASSERT_TRUE(sdf::readString(get_sdf_string(), model));
+  ASSERT_FALSE(sdf::readString(get_sdf_string(), model));
   if (pathCStr)
   {
     setenv("SDF_PATH", pathCStr, 1);
@@ -58,19 +65,4 @@ TEST(PluginBool, ParseBoolValue)
   {
     unsetenv("SDF_PATH");
   }
-
-  sdf::ElementPtr plugin =
-    model->root->GetElement("model")->GetElement("plugin");
-
-  ASSERT_TRUE(plugin->HasElement("value1"));
-  EXPECT_TRUE(plugin->Get<bool>("value1"));
-
-  ASSERT_TRUE(plugin->HasElement("value2"));
-  EXPECT_TRUE(plugin->Get<bool>("value2"));
-
-  ASSERT_TRUE(plugin->HasElement("value3"));
-  EXPECT_FALSE(plugin->Get<bool>("value3"));
-
-  ASSERT_TRUE(plugin->HasElement("value4"));
-  EXPECT_FALSE(plugin->Get<bool>("value4"));
 }
diff --git a/test/integration/plugin_attribute.cc b/test/integration/plugin_attribute.cc
index cdb62a7..9aae26f 100644
--- a/test/integration/plugin_attribute.cc
+++ b/test/integration/plugin_attribute.cc
@@ -33,7 +33,8 @@ std::string get_sdf_string()
     << "    <user attribute='attribute' />"
     << "    <value attribute='attribute'>value</value>"
     << "  </plugin>"
-    << "</model>";
+    << "</model>"
+    << "</sdf>";
   return stream.str();
 }
 
@@ -59,7 +60,7 @@ TEST(PluginAttribute, ParseAttributes)
   }
 
   sdf::ElementPtr plugin =
-    model->root->GetElement("model")->GetElement("plugin");
+    model->Root()->GetElement("model")->GetElement("plugin");
   ASSERT_TRUE(plugin->HasElement("user"));
   {
     sdf::ElementPtr user = plugin->GetElement("user");
diff --git a/test/integration/plugin_bool.cc b/test/integration/plugin_bool.cc
index 3356656..2dfe792 100644
--- a/test/integration/plugin_bool.cc
+++ b/test/integration/plugin_bool.cc
@@ -34,7 +34,8 @@ std::string get_sdf_string()
     << "    <value3>false</value3>"
     << "    <value4>0</value4>"
     << "  </plugin>"
-    << "</model>";
+    << "</model>"
+    << "</sdf>";
   return stream.str();
 }
 
@@ -60,7 +61,7 @@ TEST(PluginBool, ParseBoolValue)
   }
 
   sdf::ElementPtr plugin =
-    model->root->GetElement("model")->GetElement("plugin");
+    model->Root()->GetElement("model")->GetElement("plugin");
 
   ASSERT_TRUE(plugin->HasElement("value1"));
   EXPECT_TRUE(plugin->Get<bool>("value1"));
diff --git a/test/integration/provide_feedback.cc b/test/integration/provide_feedback.cc
index e867886..99ce60a 100644
--- a/test/integration/provide_feedback.cc
+++ b/test/integration/provide_feedback.cc
@@ -45,7 +45,7 @@ TEST(SDFParser, ProvideFeedbackTest)
     unsetenv("SDF_PATH");
   }
 
-  sdf::ElementPtr model = robot->root->GetElement("model");
+  sdf::ElementPtr model = robot->Root()->GetElement("model");
   for (sdf::ElementPtr joint = model->GetElement("joint"); joint;
        joint = joint->GetNextElement("joint"))
   {
diff --git a/test/integration/urdf_joint_parameters.cc b/test/integration/urdf_joint_parameters.cc
index 255f77e..eccc71f 100644
--- a/test/integration/urdf_joint_parameters.cc
+++ b/test/integration/urdf_joint_parameters.cc
@@ -45,7 +45,7 @@ TEST(SDFParser, JointAxisParameters)
     unsetenv("SDF_PATH");
   }
 
-  sdf::ElementPtr model = robot->root->GetElement("model");
+  sdf::ElementPtr model = robot->Root()->GetElement("model");
 
   ASSERT_TRUE(model->HasElement("joint"));
   unsigned int bitmask = 0;
diff --git a/tools/code_check.sh b/tools/code_check.sh
index b3a44db..3f82336 100755
--- a/tools/code_check.sh
+++ b/tools/code_check.sh
@@ -21,6 +21,9 @@ echo "*:src/Assert.cc" >> $SUPPRESS
 echo "*:src/Console.cc" >> $SUPPRESS
 echo "*:src/parser.cc" >> $SUPPRESS
 echo "*:src/parser_urdf.cc" >> $SUPPRESS
+echo "*:src/Element.cc:467" >> $SUPPRESS
+echo "*:src/Element.cc:64" >> $SUPPRESS
+echo "*:src/Element.cc:739" >> $SUPPRESS
 
 CHECK_FILE_DIRS="./src ./include ./test/performance ./test/integration"
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/sdformat.git



More information about the debian-science-commits mailing list