From f7dcdd74fb900e79d5d12db4e022f6e9c83831a1 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Tue, 28 Apr 2020 23:14:28 +0200 Subject: [PATCH 01/42] Properly handle the requirement of C++17 at the CMake exported target level (#251) SDFormat 9 requires the use of C++17 in its public headers, however it does not correctly expose this requirement in its installed imported targets. In particular, at the moment the requirement of C++17 is only documented via adding the -std=c++17 flag in the `SDFormat_CXX_FLAGS` variable, but this strategy has two problems: * It does not work unless a user explicitly pass this flags to its compilation targets, and this is definitely not obvious if it is not using directly SDFormat, but he is linking sdformat transitively through Gazebo 11. * If a different C++ version is set at the CMake level, it is possible that the `-std=c++17` flag is ignored (it depends what is the order with which the flags are passed to the compiler). For CMake consumers, a better strategy is to use the target_compile_features and explicitly mark that that this library requires the `cxx_std_17` feature, as `PUBLIC` because it also required in the public headers. As the minimum required version of CMake is 3.10, we can use cxx_std_17 as it is available in CMake 3.10, see https://cmake.org/cmake/help/v3.10/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html#prop_gbl:CMAKE_CXX_KNOWN_FEATURES . Signed-off-by: Silvio Traversaro --- src/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 313883004..7dbb95369 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -162,6 +162,7 @@ if (NOT WIN32) endif() sdf_add_library(${sdf_target} ${sources}) +target_compile_features(${sdf_target} PUBLIC cxx_std_17) target_link_libraries(${sdf_target} PUBLIC ${IGNITION-MATH_LIBRARIES}) target_include_directories(${sdf_target} From ed963ac908541e32b9e340d16bc7272bb7687199 Mon Sep 17 00:00:00 2001 From: Steven Peters Date: Thu, 7 May 2020 12:16:50 -0700 Subject: [PATCH 02/42] Collision: don't load Surface without (#268) Signed-off-by: Steven Peters --- src/Collision.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Collision.cc b/src/Collision.cc index 11a66883e..47f4c33e5 100644 --- a/src/Collision.cc +++ b/src/Collision.cc @@ -130,8 +130,11 @@ Errors Collision::Load(ElementPtr _sdf) Errors geomErr = this->dataPtr->geom.Load(_sdf->GetElement("geometry")); errors.insert(errors.end(), geomErr.begin(), geomErr.end()); - // Load the surface parameters - this->dataPtr->surface.Load(_sdf->GetElement("surface")); + // Load the surface parameters if they are given + if (_sdf->HasElement("surface")) + { + this->dataPtr->surface.Load(_sdf->GetElement("surface")); + } return errors; } From e3d87453ff3a764bcf79210238a17afd969a2341 Mon Sep 17 00:00:00 2001 From: chapulina Date: Thu, 7 May 2020 16:16:07 -0700 Subject: [PATCH 03/42] [sdf8] Changelog links to BitBucket backup (#239) * [sdf8] Changelog links to BitBucket backup Signed-off-by: Louise Poubel * more fixes, new version of script Signed-off-by: Louise Poubel * [sdf7] Changelog links to BitBucket backup (#238) Signed-off-by: Louise Poubel * Update some more bitbucket issue references Signed-off-by: Steven Peters Co-authored-by: Steven Peters --- .hgignore => .gitignore | 1 - CMakeLists.txt | 2 +- Changelog.md | 622 ++++++++++++++++++++-------------------- INSTALL_WIN32.md | 2 +- Migration.md | 48 ++-- bitbucket-pipelines.yml | 2 +- doc/header.html | 2 +- doc/mainpage.html | 2 +- sdf/1.4/physics.sdf | 2 +- sdf/1.5/joint.sdf | 4 +- sdf/1.5/physics.sdf | 2 +- sdf/1.6/joint.sdf | 4 +- sdf/1.6/physics.sdf | 6 +- sdf/Migration.md | 30 +- src/Param.cc | 4 +- src/Param_TEST.cc | 4 +- src/SDF_TEST.cc | 8 +- 17 files changed, 372 insertions(+), 373 deletions(-) rename .hgignore => .gitignore (63%) diff --git a/.hgignore b/.gitignore similarity index 63% rename from .hgignore rename to .gitignore index 1b7892bf6..416ecfb5f 100644 --- a/.hgignore +++ b/.gitignore @@ -1,4 +1,3 @@ -syntax: glob build build_* diff --git a/CMakeLists.txt b/CMakeLists.txt index b73664b53..5bf81f001 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ set (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) # to choose the flag -std=gnu++14 instead of -std=c++14 when the C++14 # features are requested. Explicitly turning this flag off will force cmake to # choose -std=c++14. -# See https://bitbucket.org/ignitionrobotics/ign-cmake/issues/13 for more info. +# See https://github.com/ignitionrobotics/ign-cmake/issues/13 for more info. set(CMAKE_CXX_EXTENSIONS off) # Include GNUInstallDirs to get canonical paths diff --git a/Changelog.md b/Changelog.md index 7bbb9daae..11636b891 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,358 +3,358 @@ ### SDFormat 8.X.X (202X-XX-XX) 1. Increase output precision of URDF to SDF conversion, output -0 as 0. - * [Pull request 675](https://bitbucket.org/osrf/sdformat/pull-requests/675) + * [BitBucket pull request 675](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/675) 1. Fix homebrew build with external urdfdom. - * [Pull request 677](https://bitbucket.org/osrf/sdformat/pull-requests/677) - * [Pull request 686](https://bitbucket.org/osrf/sdformat/pull-requests/686) + * [BitBucket pull request 677](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/677) + * [BitBucket pull request 686](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/686) ### SDFormat 8.8.0 (2020-03-18) 1. Add Transparency to visual DOM - * [Pull request 671](https://bitbucket.org/osrf/sdformat/pull-requests/671) + * [BitBucket pull request 671](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/671) 1. Install the Windows `.dll` shared libraries to bin folder. - * [Pull request 659](https://bitbucket.org/osrf/sdformat/pull-requests/659) - * [Pull request 663](https://bitbucket.org/osrf/sdformat/pull-requests/663) + * [BitBucket pull request 659](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/659) + * [BitBucket pull request 663](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/663) 1. Fix cmake type for `tinyxml_INCLUDE_DIRS`. - * [Pull request 661](https://bitbucket.org/osrf/sdformat/pull-requests/661) - * [Pull request 663](https://bitbucket.org/osrf/sdformat/pull-requests/663) + * [BitBucket pull request 661](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/661) + * [BitBucket pull request 663](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/663) 1. Add functionality to generate aggregated SDFormat descriptions via CMake. - * [Pull request 665](https://bitbucket.org/osrf/sdformat/pull-requests/665) + * [BitBucket pull request 665](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/665) 1. Remove URI scheme, if present, when finding files. - * [Pull request 650](https://bitbucket.org/osrf/sdformat/pull-requests/650) - * [Pull request 652](https://bitbucket.org/osrf/sdformat/pull-requests/652) + * [BitBucket pull request 650](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/650) + * [BitBucket pull request 652](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/652) 1. Rename SDF to SDFormat / libsdformat on documentation - * [Pull request 666](https://bitbucket.org/osrf/sdformat/pull-requests/666) + * [BitBucket pull request 666](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/666) ### SDFormat 8.7.1 (2020-01-13) 1. Fix memory leaks in move assignment operator. - * [Pull request 641](https://bitbucket.org/osrf/sdformat/pull-requests/641) + * [BitBucket pull request 641](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/641) 1. Refactoring based on rule-of-five guidance to address memory leaks - * [Pull request 644](https://bitbucket.org/osrf/sdformat/pull-requests/644) + * [BitBucket pull request 644](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/644) ### SDFormat 8.7.0 (2019-12-13) 1. Remove some URDF error messages - * [Pull request 605](https://bitbucket.org/osrf/sdformat/pull-requests/605) + * [BitBucket pull request 605](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/605) 1. Fix parsing URDF without inside - * [Pull request 608](https://bitbucket.org/osrf/sdformat/pull-requests/608) + * [BitBucket pull request 608](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/608) 1. Backport URDF multiplication and linter - * [Pull request 632](https://bitbucket.org/osrf/sdformat/pull-requests/632) + * [BitBucket pull request 632](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/632) 1. Add clipping for depth camera on rgbd camera sensor - * [Pull request 628](https://bitbucket.org/osrf/sdformat/pull-requests/628) + * [BitBucket pull request 628](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/628) ### SDFormat 8.6.1 (2019-12-05) 1. Unversioned lib name for cmds - * [Pull request 612](https://bitbucket.org/osrf/sdformat/pull-requests/612) + * [BitBucket pull request 612](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/612) ### SDFormat 8.6.0 (2019-11-20) 1. configure.bat: use ign-math6, not gz11 - * [Pull request 595](https://bitbucket.org/osrf/sdformat/pull-requests/595) + * [BitBucket pull request 595](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/595) 1. Set `sdformat8_PKGCONFIG_*` variables in cmake config instead of `SDFormat_PKGCONFIG*`. - * [Pull request 594](https://bitbucket.org/osrf/sdformat/pull-requests/594) + * [BitBucket pull request 594](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/594) 1. Relax cmake check to allow compiling with gcc-7. - * [Pull request 592](https://bitbucket.org/osrf/sdformat/pull-requests/592) + * [BitBucket pull request 592](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/592) 1. Use custom callbacks when reading file (support Fuel URIs). - * [Pull request 591](https://bitbucket.org/osrf/sdformat/pull-requests/591) + * [BitBucket pull request 591](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/591) 1. Update visual DOM to parse `cast_shadows` property of a visual. - * [Pull request 590](https://bitbucket.org/osrf/sdformat/pull-requests/590) + * [BitBucket pull request 590](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/590) 1. Build `Utils_TEST` with Utils.cc explicitly passed since its symbols are not visible. - * [Pull request 572](https://bitbucket.org/osrf/sdformat/pull-requests/572) + * [BitBucket pull request 572](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/572) ### SDFormat 8.5.0 (2019-11-06) 1. Add `thermal_camera` sensor type - * [Pull request 586](https://bitbucket.org/osrf/sdformat/pull-requests/586) + * [BitBucket pull request 586](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/586) 1. Use inline namespaces in Utils.cc - * [Pull request 574](https://bitbucket.org/osrf/sdformat/pull-requests/574) + * [BitBucket pull request 574](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/574) 1. Convert `ign sdf` file inputs to absolute paths before processing them - * [Pull request 583](https://bitbucket.org/osrf/sdformat/pull-requests/583) + * [BitBucket pull request 583](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/583) 1. Add `emissive_map` to material sdf - * [Pull request 585](https://bitbucket.org/osrf/sdformat/pull-requests/585) + * [BitBucket pull request 585](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/585) 1. Converter: fix bug when converting across multiple versions. - * [Pull request 584](https://bitbucket.org/osrf/sdformat/pull-requests/584) - * [Pull request 573](https://bitbucket.org/osrf/sdformat/pull-requests/573) + * [BitBucket pull request 584](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/584) + * [BitBucket pull request 573](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/573) ### SDFormat 8.4.0 (2019-10-22) 1. Accept relative path in ``. - * [Pull request 558](https://bitbucket.org/osrf/sdformat/pull-requests/558) + * [BitBucket pull request 558](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/558) 1. Element: don't print unset attributes. - * [Pull request 571](https://bitbucket.org/osrf/sdformat/pull-requests/571) - * [Pull request 576](https://bitbucket.org/osrf/sdformat/pull-requests/576) + * [BitBucket pull request 571](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/571) + * [BitBucket pull request 576](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/576) 1. Lidar.hh: remove 'using namespace ignition'. - * [Pull request 577](https://bitbucket.org/osrf/sdformat/pull-requests/577) + * [BitBucket pull request 577](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/577) 1. Parse urdf files to sdf 1.5 instead of 1.4 to avoid `use_parent_model_frame`. - * [Pull request 575](https://bitbucket.org/osrf/sdformat/pull-requests/575) + * [BitBucket pull request 575](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/575) 1. Set camera intrinsics axis skew (s) default value to 0 - * [Pull request 504](https://bitbucket.org/osrf/sdformat/pull-requests/504) + * [BitBucket pull request 504](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/504) 1. SDF Root DOM: add ActorCount, ActorByIndex, and ActorNameExists. - * [Pull request 566](https://bitbucket.org/osrf/sdformat/pull-requests/566) + * [BitBucket pull request 566](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/566) 1. Avoid hardcoding /machine:x64 flag on 64-bit on MSVC with CMake >= 3.5. - * [Pull request 565](https://bitbucket.org/osrf/sdformat/pull-requests/565) + * [BitBucket pull request 565](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/565) 1. Move private headers from include/sdf to src folder. - * [Pull request 553](https://bitbucket.org/osrf/sdformat/pull-requests/553) + * [BitBucket pull request 553](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/553) 1. Fix ign library path on macOS. - * [Pull request 542](https://bitbucket.org/osrf/sdformat/pull-requests/542) - * [Pull request 564](https://bitbucket.org/osrf/sdformat/pull-requests/564) + * [BitBucket pull request 542](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/542) + * [BitBucket pull request 564](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/564) 1. Use `ign sdf --check` to check sibling elements of the same type for non-unique names. - * [Pull request 554](https://bitbucket.org/osrf/sdformat/pull-requests/554) + * [BitBucket pull request 554](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/554) 1. Converter: remove all matching elements specified by `` tag. - * [Pull request 551](https://bitbucket.org/osrf/sdformat/pull-requests/551) + * [BitBucket pull request 551](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/551) ### SDFormat 8.3.0 (2019-08-17) 1. Added Actor DOM - * [Pull request 547](https://bitbucket.org/osrf/sdformat/pull-requests/547) + * [BitBucket pull request 547](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/547) 1. Print cmake build warnings and errors to std_err - * [Pull request 549](https://bitbucket.org/osrf/sdformat/pull-requests/549) + * [BitBucket pull request 549](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/549) ### SDFormat 8.2.0 (2019-06-18) 1. Added RGBD Camera Sensor type. - * [Pull request 540](https://bitbucket.org/osrf/sdformat/pull-requests/540) + * [BitBucket pull request 540](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/540) ### SDFormat 8.1.0 (2019-05-20) 1. Change installation path of SDF description files to allow side-by-side installation. - * [pull request 538](https://bitbucket.org/osrf/sdformat/pull-requests/538) + * [BitBucket pull request 538](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/538) 1. Added Lidar Sensor DOM. Also added `lidar` and `gpu_lidar` as sensor types. These two types are equivalent to `ray` and `gpu_ray`. - * [Pull request 536](https://bitbucket.org/osrf/sdformat/pull-requests/536) + * [BitBucket pull request 536](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/536) 1. SDF Sensor DOM: copy update rate in copy constructor. - * [Pull request 534](https://bitbucket.org/osrf/sdformat/pull-requests/534) + * [BitBucket pull request 534](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/534) 1. Added IMU Sensor DOM. - * [Pull request 532](https://bitbucket.org/osrf/sdformat/pull-requests/532) + * [BitBucket pull request 532](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/532) 1. Added Camera Sensor DOM. - * [Pull request 531](https://bitbucket.org/osrf/sdformat/pull-requests/531) + * [BitBucket pull request 531](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/531) 1. Added wind to link dom. - * [Pull request 530](https://bitbucket.org/osrf/sdformat/pull-requests/530) + * [BitBucket pull request 530](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/530) 1. Added Sensor DOM `==` operator. - * [Pull request 529](https://bitbucket.org/osrf/sdformat/pull-requests/529) + * [BitBucket pull request 529](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/529) 1. Added AirPressure SDF DOM - * [Pull request 528](https://bitbucket.org/osrf/sdformat/pull-requests/528) + * [BitBucket pull request 528](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/528) 1. Update sdf noise elements - * [Pull request 525](https://bitbucket.org/osrf/sdformat/pull-requests/525) - * [Pull request 522](https://bitbucket.org/osrf/sdformat/pull-requests/522) + * [BitBucket pull request 525](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/525) + * [BitBucket pull request 522](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/522) 1. Apply rule of five for various DOM classes - * [Pull request 524](https://bitbucket.org/osrf/sdformat/pull-requests/524) + * [BitBucket pull request 524](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/524) 1. Support setting sensor types from a string. - * [Pull request 523](https://bitbucket.org/osrf/sdformat/pull-requests/523) + * [BitBucket pull request 523](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/523) 1. Added Altimeter SDF DOM - * [Pull request 527](https://bitbucket.org/osrf/sdformat/pull-requests/527) + * [BitBucket pull request 527](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/527) 1. Added Magnetometer SDF DOM - * [Pull request 518](https://bitbucket.org/osrf/sdformat/pull-requests/518) - * [Pull request 519](https://bitbucket.org/osrf/sdformat/pull-requests/519) + * [BitBucket pull request 518](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/518) + * [BitBucket pull request 519](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/519) 1. Add Scene SDF DOM - * [Pull request 517](https://bitbucket.org/osrf/sdformat/pull-requests/517) + * [BitBucket pull request 517](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/517) 1. Add PBR material SDF element - * [Pull request 512](https://bitbucket.org/osrf/sdformat/pull-requests/512) - * [Pull request 520](https://bitbucket.org/osrf/sdformat/pull-requests/520) - * [Pull request 535](https://bitbucket.org/osrf/sdformat/pull-requests/535) + * [BitBucket pull request 512](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/512) + * [BitBucket pull request 520](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/520) + * [BitBucket pull request 535](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/535) 1. Set geometry shapes - * [Pull request 515](https://bitbucket.org/osrf/sdformat/pull-requests/515) + * [BitBucket pull request 515](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/515) 1. Clarify names of libsdformat parser and SDF specification in Readme. - * [Pull request 514](https://bitbucket.org/osrf/sdformat/pull-requests/514) + * [BitBucket pull request 514](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/514) 1. Disable macOS tests failing due to issue 202. - * [Pull request 511](https://bitbucket.org/osrf/sdformat/pull-requests/511) - * [Issue 202](https://bitbucket.org/osrf/sdformat/issues/202) + * [BitBucket pull request 511](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/511) + * [Issue 202](https://github.com/osrf/sdformat/issues/202) ### SDFormat 8.0.0 (2019-03-01) 1. Rename depth camera from 'depth' to 'depth_camera' - * [Pull request 507](https://bitbucket.org/osrf/sdformat/pull-requests/507) + * [BitBucket pull request 507](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/507) 1. Rename enum Ray to Lidar - * [Pull request 502](https://bitbucket.org/osrf/sdformat/pull-requests/502) + * [BitBucket pull request 502](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/502) 1. Add support for files that have light tags in the root - * [Pull request 499](https://bitbucket.org/osrf/sdformat/pull-requests/499) + * [BitBucket pull request 499](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/499) 1. Fix locale problems of std::stringstream and of Param::ValueFromString - * [Pull request 492](https://bitbucket.org/osrf/sdformat/pull-requests/492) + * [BitBucket pull request 492](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/492) * Contribution by Silvio Traversaro 1. Add functions to set visual dom's geometry and material - * [Pull request 490](https://bitbucket.org/osrf/sdformat/pull-requests/490) + * [BitBucket pull request 490](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/490) 1. Change cmake project name to sdformat8, export cmake targets - * [Pull request 475](https://bitbucket.org/osrf/sdformat/pull-requests/475) - * [Pull request 476](https://bitbucket.org/osrf/sdformat/pull-requests/476) + * [BitBucket pull request 475](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/475) + * [BitBucket pull request 476](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/476) 1. SDF DOM: Add copy constructor and assignment operator to Light. Add lights to Link - * [Pull request 469](https://bitbucket.org/osrf/sdformat/pull-requests/469) + * [BitBucket pull request 469](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/469) 1. Make `` a required element for `` - * [Pull request #472](https://bitbucket.org/osrf/sdformat/pull-requests/472) + * [BitBucket pull request #472](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/472) 1. SDF DOM: Add DOM methods for setting axis and thread pitch in `sdf::Joint` - * [Pull request #471](https://bitbucket.org/osrf/sdformat/pull-requests/471) - * [Pull request #474](https://bitbucket.org/osrf/sdformat/pull-requests/474) + * [BitBucket pull request #471](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/471) + * [BitBucket pull request #474](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/474) 1. SDF DOM: Add copy constructors and assignment operator to JointAxis - * [Pull request #470](https://bitbucket.org/osrf/sdformat/pull-requests/470) + * [BitBucket pull request #470](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/470) 1. Removed boost - * [Pull request #438](https://bitbucket.org/osrf/sdformat/pull-requests/438) + * [BitBucket pull request #438](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/438) 1. Versioned namespace - * [Pull request 464](https://bitbucket.org/osrf/sdformat/pull-requests/464) + * [BitBucket pull request 464](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/464) 1. Versioned library install - * [Pull request 463](https://bitbucket.org/osrf/sdformat/pull-requests/463) + * [BitBucket pull request 463](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/463) 1. Add SetGeom to Collision - * [Pull request 465](https://bitbucket.org/osrf/sdformat/pull-requests/465) + * [BitBucket pull request 465](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/465) 1. SDF DOM: Add copy/move constructors and assignment operator to Geometry - * [Pull request 460](https://bitbucket.org/osrf/sdformat/pull-requests/460) + * [BitBucket pull request 460](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/460) 1. SDF DOM: Add copy/move constructors and assignment operator to Material - * [Pull request 461](https://bitbucket.org/osrf/sdformat/pull-requests/461) + * [BitBucket pull request 461](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/461) 1. Add collision_detector to dart physics config - * [Pull request 440](https://bitbucket.org/osrf/sdformat/pull-requests/440) + * [BitBucket pull request 440](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/440) 1. Fix cpack now that project name has version number - * [Pull request 478](https://bitbucket.org/osrf/sdformat/pull-requests/478) + * [BitBucket pull request 478](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/478) 1. Animation tension - * [Pull request 466](https://bitbucket.org/osrf/sdformat/pull-requests/466) + * [BitBucket pull request 466](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/466) 1. Add "geometry" for sonar collision shape - * [Pull request 479](https://bitbucket.org/osrf/sdformat/pull-requests/479) + * [BitBucket pull request 479](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/479) 1. Fix Gui copy constructor - * [Pull request 486](https://bitbucket.org/osrf/sdformat/pull-requests/486) + * [BitBucket pull request 486](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/486) 1. Sensor DOM - * [Pull request 488](https://bitbucket.org/osrf/sdformat/pull-requests/488) - * [Pull request 481](https://bitbucket.org/osrf/sdformat/pull-requests/481) + * [BitBucket pull request 488](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/488) + * [BitBucket pull request 481](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/481) ## SDFormat 7.0 ### SDFormat 7.0.0 (xxxx-xx-xx) 1. Build Utils_TEST with Utils.cc explicitly passed since its symbols are not visible. - * [Pull request 572](https://bitbucket.org/osrf/sdformat/pull-requests/572) + * [BitBucket pull request 572](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/572) 1. Parse urdf files to sdf 1.5 instead of 1.4 to avoid `use_parent_model_frame`. - * [Pull request 575](https://bitbucket.org/osrf/sdformat/pull-requests/575) + * [BitBucket pull request 575](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/575) 1. Set camera intrinsics axis skew (s) default value to 0 - * [Pull request 504](https://bitbucket.org/osrf/sdformat/pull-requests/504) + * [BitBucket pull request 504](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/504) 1. Avoid hardcoding /machine:x64 flag on 64-bit on MSVC with CMake >= 3.5. - * [Pull request 565](https://bitbucket.org/osrf/sdformat/pull-requests/565) + * [BitBucket pull request 565](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/565) 1. Prevent duplicate `use_parent_model_frame` tags during file conversion. - * [Pull request 573](https://bitbucket.org/osrf/sdformat/pull-requests/573) + * [BitBucket pull request 573](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/573) 1. Backport inline versioned namespace from version 8. - * [Pull request 557](https://bitbucket.org/osrf/sdformat/pull-requests/557) - * [pull request 464](https://bitbucket.org/osrf/sdformat/pull-requests/464) + * [BitBucket pull request 557](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/557) + * [BitBucket pull request 464](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/464) 1. Backport cmake and sdf spec changes from version 8. - * [Pull request 550](https://bitbucket.org/osrf/sdformat/pull-requests/550) - * [pull request 538](https://bitbucket.org/osrf/sdformat/pull-requests/538) - * [Pull request 525](https://bitbucket.org/osrf/sdformat/pull-requests/525) - * [Pull request 475](https://bitbucket.org/osrf/sdformat/pull-requests/475) - * [Pull request 476](https://bitbucket.org/osrf/sdformat/pull-requests/476) - * [Pull request 463](https://bitbucket.org/osrf/sdformat/pull-requests/463) + * [BitBucket pull request 550](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/550) + * [BitBucket pull request 538](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/538) + * [BitBucket pull request 525](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/525) + * [BitBucket pull request 475](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/475) + * [BitBucket pull request 476](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/476) + * [BitBucket pull request 463](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/463) 1. Fix ign library path on macOS. - * [Pull request 542](https://bitbucket.org/osrf/sdformat/pull-requests/542) + * [BitBucket pull request 542](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/542) 1. Preserve XML elements that are not part of the SDF specification. - * [Pull request 449](https://bitbucket.org/osrf/sdformat/pull-requests/449) + * [BitBucket pull request 449](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/449) 1. Embed SDF specification files directly in libsdformat.so. - * [Pull request 434](https://bitbucket.org/osrf/sdformat/pull-requests/434) + * [BitBucket pull request 434](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/434) 1. Removed support for SDF spec versions 1.0 and 1.2 - * [Pull request #432](https://bitbucket.org/osrf/sdformat/pull-requests/432) + * [BitBucket pull request #432](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/432) 1. SDF DOM: Additions to the document object model. - * [Pull request 433](https://bitbucket.org/osrf/sdformat/pull-requests/433) - * [Pull request 441](https://bitbucket.org/osrf/sdformat/pull-requests/441) - * [Pull request 442](https://bitbucket.org/osrf/sdformat/pull-requests/442) - * [Pull request 445](https://bitbucket.org/osrf/sdformat/pull-requests/445) - * [Pull request 451](https://bitbucket.org/osrf/sdformat/pull-requests/451) - * [Pull request 455](https://bitbucket.org/osrf/sdformat/pull-requests/455) - * [Pull request 481](https://bitbucket.org/osrf/sdformat/pull-requests/481) + * [BitBucket pull request 433](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/433) + * [BitBucket pull request 441](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/441) + * [BitBucket pull request 442](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/442) + * [BitBucket pull request 445](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/445) + * [BitBucket pull request 451](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/451) + * [BitBucket pull request 455](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/455) + * [BitBucket pull request 481](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/481) 1. SDF DOM: Add Element() accessor to Gui, JointAxis and World classes. - * [Pull request 450](https://bitbucket.org/osrf/sdformat/pull-requests/450) + * [BitBucket pull request 450](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/450) 1. Adds the equalivent of gz sdf -d to sdformat. The command line option will print the full description of the SDF spec. - * [Pull request 424](https://bitbucket.org/osrf/sdformat/pull-requests/424) + * [BitBucket pull request 424](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/424) 1. Adds the equalivent of gz sdf -p to sdformat. The command line option will convert and print the specified sdf file. - * [Pull request 494](https://bitbucket.org/osrf/sdformat/pull-requests/494) + * [BitBucket pull request 494](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/494) 1. SDF DOM: Additions to the document object model. - * [Pull request 393](https://bitbucket.org/osrf/sdformat/pull-requests/393) - * [Pull request 394](https://bitbucket.org/osrf/sdformat/pull-requests/394) - * [Pull request 395](https://bitbucket.org/osrf/sdformat/pull-requests/395) - * [Pull request 396](https://bitbucket.org/osrf/sdformat/pull-requests/396) - * [Pull request 397](https://bitbucket.org/osrf/sdformat/pull-requests/397) - * [Pull request 406](https://bitbucket.org/osrf/sdformat/pull-requests/406) - * [Pull request 407](https://bitbucket.org/osrf/sdformat/pull-requests/407) - * [Pull request 410](https://bitbucket.org/osrf/sdformat/pull-requests/410) - * [Pull request 415](https://bitbucket.org/osrf/sdformat/pull-requests/415) - * [Pull request 420](https://bitbucket.org/osrf/sdformat/pull-requests/420) + * [BitBucket pull request 393](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/393) + * [BitBucket pull request 394](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/394) + * [BitBucket pull request 395](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/395) + * [BitBucket pull request 396](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/396) + * [BitBucket pull request 397](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/397) + * [BitBucket pull request 406](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/406) + * [BitBucket pull request 407](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/407) + * [BitBucket pull request 410](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/410) + * [BitBucket pull request 415](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/415) + * [BitBucket pull request 420](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/420) ## SDFormat 6.0 @@ -362,85 +362,85 @@ ### SDFormat 6.X.X (20XX-XX-XX) 1. Parse urdf files to sdf 1.5 instead of 1.4 to avoid `use_parent_model_frame`. - * [Pull request 575](https://bitbucket.org/osrf/sdformat/pull-requests/575) + * [BitBucket pull request 575](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/575) 1. Set camera intrinsics axis skew (s) default value to 0 - * [Pull request 504](https://bitbucket.org/osrf/sdformat/pull-requests/504) + * [BitBucket pull request 504](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/504) 1. Avoid hardcoding /machine:x64 flag on 64-bit on MSVC with CMake >= 3.5. - * [Pull request 565](https://bitbucket.org/osrf/sdformat/pull-requests/565) + * [BitBucket pull request 565](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/565) 1. Fix ign library path on macOS. - * [Pull request 552](https://bitbucket.org/osrf/sdformat/pull-requests/552) + * [BitBucket pull request 552](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/552) 1. Use `ign sdf --check` to check sibling elements of the same type for non-unique names. - * [Pull request 554](https://bitbucket.org/osrf/sdformat/pull-requests/554) + * [BitBucket pull request 554](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/554) 1. Converter: remove all matching elements specified by `` tag. - * [Pull request 551](https://bitbucket.org/osrf/sdformat/pull-requests/551) + * [BitBucket pull request 551](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/551) ### SDFormat 6.2.0 (2019-01-17) 1. Add geometry for sonar collision shape - * [Pull request 495](https://bitbucket.org/osrf/sdformat/pull-requests/495) + * [BitBucket pull request 495](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/495) 1. Add camera intrinsics (fx, fy, cx, cy, s) - * [Pull request 496](https://bitbucket.org/osrf/sdformat/pull-requests/496) + * [BitBucket pull request 496](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/496) 1. Add actor trajectory tension parameter - * [Pull request 466](https://bitbucket.org/osrf/sdformat/pull-requests/466) + * [BitBucket pull request 466](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/466) ### SDFormat 6.1.0 (2018-10-04) 1. Add collision\_detector to dart physics config - * [Pull request 440](https://bitbucket.org/osrf/sdformat/pull-requests/440) + * [BitBucket pull request 440](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/440) 1. Fix Windows support for SDFormat6 - * [Pull request 401](https://bitbucket.org/osrf/sdformat/pull-requests/401) + * [BitBucket pull request 401](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/401) 1. root.sdf: default sdf version 1.6 - * [Pull request 425](https://bitbucket.org/osrf/sdformat/pull-requests/425) + * [BitBucket pull request 425](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/425) 1. parser\_urdf: print value of highstop instead of pointer address - * [Pull request 408](https://bitbucket.org/osrf/sdformat/pull-requests/408) + * [BitBucket pull request 408](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/408) 1. Tweak error output so jenkins doesn't think it's a compiler warning - * [Pull request 402](https://bitbucket.org/osrf/sdformat/pull-requests/402) + * [BitBucket pull request 402](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/402) ### SDFormat 6.0.0 (2018-01-25) 1. SDF DOM: Added a document object model. - * [Pull request 387](https://bitbucket.org/osrf/sdformat/pull-requests/387) - * [Pull request 389](https://bitbucket.org/osrf/sdformat/pull-requests/389) + * [BitBucket pull request 387](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/387) + * [BitBucket pull request 389](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/389) 1. Add simplified ``readFile`` function. - * [Pull request 347](https://bitbucket.org/osrf/sdformat/pull-requests/347) + * [BitBucket pull request 347](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/347) 1. Remove boost::lexical cast instances - * [Pull request 342](https://bitbucket.org/osrf/sdformat/pull-requests/342) + * [BitBucket pull request 342](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/342) 1. Remove boost regex and iostreams as dependencies - * [Pull request 302](https://bitbucket.org/osrf/sdformat/pull-requests/302) + * [BitBucket pull request 302](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/302) 1. Change certain error checks from asserts to throwing sdf::AssertionInternalError, which is more appropriate for a library. - * [Pull request 315](https://bitbucket.org/osrf/sdformat/pull-requests/315) + * [BitBucket pull request 315](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/315) 1. Updated the internal copy of urdfdom to 1.0, removing more of boost. - * [Pull request 324](https://bitbucket.org/osrf/sdformat/pull-requests/324) + * [BitBucket pull request 324](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/324) 1. urdfdom 1.0 is now required on all platforms. - * [Pull request 324](https://bitbucket.org/osrf/sdformat/pull-requests/324) + * [BitBucket pull request 324](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/324) 1. Remove boost filesystem as a dependency - * [Pull request 335](https://bitbucket.org/osrf/sdformat/pull-requests/335) - * [Pull request 338](https://bitbucket.org/osrf/sdformat/pull-requests/338) - * [Pull request 339](https://bitbucket.org/osrf/sdformat/pull-requests/339) + * [BitBucket pull request 335](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/335) + * [BitBucket pull request 338](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/338) + * [BitBucket pull request 339](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/339) 1. Deprecated sdf::Color, and switch to use ignition::math::Color - * [Pull request 330](https://bitbucket.org/osrf/sdformat/pull-requests/330) + * [BitBucket pull request 330](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/330) ## SDFormat 5.x @@ -449,83 +449,83 @@ ### SDFormat 5.3.0 (2017-11-13) 1. Added wrapper around root SDF for an SDF element - * [Pull request 378](https://bitbucket.org/osrf/sdformat/pull-request/378) - * [Pull request 372](https://bitbucket.org/osrf/sdformat/pull-request/372) + * [BitBucket pull request 378](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/378) + * [BitBucket pull request 372](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/372) 1. Add ODE parallelization parameters: threaded islands and position correction - * [Pull request 380](https://bitbucket.org/osrf/sdformat/pull-request/380) + * [BitBucket pull request 380](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/380) 1. surface.sdf: expand documentation of friction and slip coefficients - * [Pull request 343](https://bitbucket.org/osrf/sdformat/pull-request/343) + * [BitBucket pull request 343](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/343) 1. Add preserveFixedJoint option to the URDF parser - * [Pull request 352](https://bitbucket.org/osrf/sdformat/pull-request/352) + * [BitBucket pull request 352](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/352) 1. Add light as child of link - * [Pull request 373](https://bitbucket.org/osrf/sdformat/pull-request/373) + * [BitBucket pull request 373](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/373) ### SDFormat 5.2.0 (2017-08-03) 1. Added a block for DART-specific physics properties. - * [Pull request 369](https://bitbucket.org/osrf/sdformat/pull-requests/369) + * [BitBucket pull request 369](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/369) 1. Fix parser to read plugin child elements within an `` - * [Pull request 350](https://bitbucket.org/osrf/sdformat/pull-request/350) + * [BitBucket pull request 350](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/350) 1. Choosing models with more recent sdf version with `` tag - * [Pull request 291](https://bitbucket.org/osrf/sdformat/pull-request/291) - * [Issue 123](https://bitbucket.org/osrf/sdformat/issues/123) + * [BitBucket pull request 291](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/291) + * [Issue 123](https://github.com/osrf/sdformat/issues/123) 1. Added `` to 1.6 surface contact parameters - * [Pull request 318](https://bitbucket.org/osrf/sdformat/pull-request/318) + * [BitBucket pull request 318](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/318) 1. Support light insertion in state - * [Pull request 325](https://bitbucket.org/osrf/sdformat/pull-request/325) + * [BitBucket pull request 325](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/325) 1. Case insensitive boolean strings - * [Pull request 322](https://bitbucket.org/osrf/sdformat/pull-request/322) + * [BitBucket pull request 322](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/322) 1. Enable coverage testing - * [Pull request 317](https://bitbucket.org/osrf/sdformat/pull-request/317) + * [BitBucket pull request 317](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/317) 1. Add `friction_model` parameter to ode solver - * [Pull request 294](https://bitbucket.org/osrf/sdformat/pull-request/294) - * [Gazebo pull request 1522](https://bitbucket.org/osrf/gazebo/pull-request/1522) + * [BitBucket pull request 294](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/294) + * [Gazebo pull request 1522](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1522) 1. Add cmake `@PKG_NAME@_LIBRARY_DIRS` variable to cmake config file - * [Pull request 292](https://bitbucket.org/osrf/sdformat/pull-request/292) + * [BitBucket pull request 292](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/292) ### SDFormat 5.1.0 (2017-02-22) 1. Fixed `sdf::convertFile` and `sdf::convertString` always converting to latest version - * [Pull request 320](https://bitbucket.org/osrf/sdformat/pull-requests/320) + * [BitBucket pull request 320](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/320) 1. Added back the ability to set sdf version at runtime - * [Pull request 307](https://bitbucket.org/osrf/sdformat/pull-requests/307) + * [BitBucket pull request 307](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/307) ### SDFormat 5.0.0 (2017-01-25) 1. Removed SDFormat 4 deprecations - * [Pull request 295](https://bitbucket.org/osrf/sdformat/pull-requests/295) + * [BitBucket pull request 295](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/295) 1. Added an example - * [Pull request 275](https://bitbucket.org/osrf/sdformat/pull-requests/275) + * [BitBucket pull request 275](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/275) 1. Move functions that use TinyXML classes in private headers A contribution from Silvio Traversaro - * [Pull request 262](https://bitbucket.org/osrf/sdformat/pull-requests/262) + * [BitBucket pull request 262](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/262) 1. Fix issues found by the Coverity tool A contribution from Olivier Crave - * [Pull request 259](https://bitbucket.org/osrf/sdformat/pull-requests/259) + * [BitBucket pull request 259](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/259) 1. Add tag to allow for specification of initial joint position - * [Pull request 279](https://bitbucket.org/osrf/sdformat/pull-requests/279) + * [BitBucket pull request 279](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/279) 1. Require ignition-math3 as dependency - * [Pull request 299](https://bitbucket.org/osrf/sdformat/pull-requests/299) + * [BitBucket pull request 299](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/299) 1. Simplifier way of retrieving a value from SDF using Get - * [Pull request 285](https://bitbucket.org/osrf/sdformat/pull-requests/285) + * [BitBucket pull request 285](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/285) ## SDFormat 4.0 @@ -534,337 +534,337 @@ ### SDFormat 4.4.0 (2017-10-26) 1. Add ODE parallelization parameters: threaded islands and position correction - * [Pull request 380](https://bitbucket.org/osrf/sdformat/pull-request/380) + * [BitBucket pull request 380](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/380) 1. surface.sdf: expand documentation of friction and slip coefficients - * [Pull request 343](https://bitbucket.org/osrf/sdformat/pull-request/343) + * [BitBucket pull request 343](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/343) 1. Add preserveFixedJoint option to the URDF parser - * [Pull request 352](https://bitbucket.org/osrf/sdformat/pull-request/352) + * [BitBucket pull request 352](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/352) 1. Add light as child of link - * [Pull request 373](https://bitbucket.org/osrf/sdformat/pull-request/373) + * [BitBucket pull request 373](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/373) ### SDFormat 4.3.2 (2017-07-19) 1. Add documentation for `Element::GetFirstElement()` and `Element::GetNextElement()` - * [Pull request 341](https://bitbucket.org/osrf/sdformat/pull-request/341) + * [BitBucket pull request 341](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/341) 1. Fix parser to read plugin child elements within an `` - * [Pull request 350](https://bitbucket.org/osrf/sdformat/pull-request/350) + * [BitBucket pull request 350](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/350) ### SDFormat 4.3.1 (2017-03-24) 1. Fix segmentation Fault in `sdf::getBestSupportedModelVersion` - * [Pull request 327](https://bitbucket.org/osrf/sdformat/pull-requests/327) - * [Issue 152](https://bitbucket.org/osrf/sdformat/issues/152) + * [BitBucket pull request 327](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/327) + * [Issue 152](https://github.com/osrf/sdformat/issues/152) ### SDFormat 4.3.0 (2017-03-20) 1. Choosing models with more recent sdf version with `` tag - * [Pull request 291](https://bitbucket.org/osrf/sdformat/pull-request/291) - * [Issue 123](https://bitbucket.org/osrf/sdformat/issues/123) + * [BitBucket pull request 291](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/291) + * [Issue 123](https://github.com/osrf/sdformat/issues/123) 1. Added `` to 1.6 surface contact parameters - * [Pull request 318](https://bitbucket.org/osrf/sdformat/pull-request/318) + * [BitBucket pull request 318](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/318) 1. Support light insertion in state - * [Pull request 325](https://bitbucket.org/osrf/sdformat/pull-request/325) + * [BitBucket pull request 325](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/325) 1. Case insensitive boolean strings - * [Pull request 322](https://bitbucket.org/osrf/sdformat/pull-request/322) + * [BitBucket pull request 322](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/322) 1. Enable coverage testing - * [Pull request 317](https://bitbucket.org/osrf/sdformat/pull-request/317) + * [BitBucket pull request 317](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/317) 1. Add `friction_model` parameter to ode solver - * [Pull request 294](https://bitbucket.org/osrf/sdformat/pull-request/294) - * [Gazebo pull request 1522](https://bitbucket.org/osrf/gazebo/pull-request/1522) + * [BitBucket pull request 294](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/294) + * [Gazebo pull request 1522](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-requests/1522) 1. Added `sampling` parameter to `` SDF element. - * [Pull request 293](https://bitbucket.org/osrf/sdformat/pull-request/293) + * [BitBucket pull request 293](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/293) 1. Added Migration guide - * [Pull request 290](https://bitbucket.org/osrf/sdformat/pull-request/290) + * [BitBucket pull request 290](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/290) 1. Add cmake `@PKG_NAME@_LIBRARY_DIRS` variable to cmake config file - * [Pull request 292](https://bitbucket.org/osrf/sdformat/pull-request/292) + * [BitBucket pull request 292](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/292) ### SDFormat 4.2.0 (2016-10-10) 1. Added tag to specify ODE friction model. - * [Pull request 294](https://bitbucket.org/osrf/sdformat/pull-request/294) + * [BitBucket pull request 294](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/294) 1. Fix URDF to SDF `self_collide` bug. - * [Pull request 287](https://bitbucket.org/osrf/sdformat/pull-request/287) + * [BitBucket pull request 287](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/287) 1. Added IMU orientation specification to SDF. - * [Pull request 284](https://bitbucket.org/osrf/sdformat/pull-request/284) + * [BitBucket pull request 284](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/284) ### SDFormat 4.1.1 (2016-07-08) 1. Added documentation and animation to `` element. - * [Pull request 280](https://bitbucket.org/osrf/sdformat/pull-request/280) + * [BitBucket pull request 280](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/280) 1. Added tag to specify initial joint position - * [Pull request 279](https://bitbucket.org/osrf/sdformat/pull-request/279) + * [BitBucket pull request 279](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/279) ### SDFormat 4.1.0 (2016-04-01) 1. Added SDF conversion functions to parser including sdf::convertFile and sdf::convertString. - * [Pull request 266](https://bitbucket.org/osrf/sdformat/pull-request/266) + * [BitBucket pull request 266](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/266) 1. Added an upload script - * [Pull request 256](https://bitbucket.org/osrf/sdformat/pull-request/256) + * [BitBucket pull request 256](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/256) ### SDFormat 4.0.0 (2015-01-12) 1. Boost pointers and boost::function in the public API have been replaced by their std::equivalents (C++11 standard) 1. Move gravity and magnetic_field tags from physics to world - * [Pull request 247](https://bitbucket.org/osrf/sdformat/pull-request/247) + * [BitBucket pull request 247](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/247) 1. Switch lump link prefix from lump:: to lump_ - * [Pull request 245](https://bitbucket.org/osrf/sdformat/pull-request/245) + * [BitBucket pull request 245](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/245) 1. New element. A contribution from Olivier Crave - * [Pull request 240](https://bitbucket.org/osrf/sdformat/pull-request/240) + * [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. Add scale to model state - * [Pull request 246](https://bitbucket.org/osrf/sdformat/pull-request/246) + * [BitBucket pull request 246](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/246) 1. Use stof functions to parse hex strings as floating point params. A contribution from Rich Mattes - * [Pull request 250](https://bitbucket.org/osrf/sdformat/pull-request/250) + * [BitBucket pull request 250](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/250) 1. Fix memory leaks. A contribution from Silvio Traversaro - * [Pull request 249](https://bitbucket.org/osrf/sdformat/pull-request/249) + * [BitBucket pull request 249](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/249) 1. Update SDF to version 1.6: new style for representing the noise properties of an `imu` - * [Pull request 243](https://bitbucket.org/osrf/sdformat/pull-request/243) - * [Pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) + * [BitBucket pull request 243](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/243) + * [BitBucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) ## SDFormat 3.0 ### SDFormat 3.X.X (201X-XX-XX) 1. Improve precision of floating point parameters - * [Pull request 273](https://bitbucket.org/osrf/sdformat/pull-requests/273) - * [Pull request 276](https://bitbucket.org/osrf/sdformat/pull-requests/276) + * [BitBucket pull request 273](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/273) + * [BitBucket pull request 276](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/276) ### SDFormat 3.7.0 (2015-11-20) 1. Add spring pass through for sdf3 - * [Design document](https://bitbucket.org/osrf/gazebo_design/pull-requests/23) - * [Pull request 242](https://bitbucket.org/osrf/sdformat/pull-request/242) + * [Design document](https://github.com/osrf/gazebo_design/pull-requests/23) + * [BitBucket pull request 242](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/242) 1. Support frame specification in SDF - * [Pull request 237](https://bitbucket.org/osrf/sdformat/pull-request/237) + * [BitBucket pull request 237](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/237) 1. Remove boost from SDFExtension - * [Pull request 229](https://bitbucket.org/osrf/sdformat/pull-request/229) + * [BitBucket pull request 229](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/229) ### SDFormat 3.6.0 (2015-10-27) 1. Add light state - * [Pull request 227](https://bitbucket.org/osrf/sdformat/pull-request/227) + * [BitBucket pull request 227](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/227) 1. redo pull request #222 for sdf3 branch - * [Pull request 232](https://bitbucket.org/osrf/sdformat/pull-request/232) + * [BitBucket pull request 232](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/232) 1. Fix links in API documentation - * [Pull request 231](https://bitbucket.org/osrf/sdformat/pull-request/231) + * [BitBucket pull request 231](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/231) ### SDFormat 3.5.0 (2015-10-07) 1. Camera lens description (Replaces #213) - * [Pull request 215](https://bitbucket.org/osrf/sdformat/pull-request/215) + * [BitBucket pull request 215](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/215) 1. Fix shared pointer reference loop in Element and memory leak (#104) - * [Pull request 230](https://bitbucket.org/osrf/sdformat/pull-request/230) + * [BitBucket pull request 230](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/230) ### SDFormat 3.4.0 (2015-10-05) 1. Support nested model states - * [Pull request 223](https://bitbucket.org/osrf/sdformat/pull-request/223) + * [BitBucket pull request 223](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/223) 1. Cleaner way to set SDF_PATH for tests - * [Pull request 226](https://bitbucket.org/osrf/sdformat/pull-request/226) + * [BitBucket pull request 226](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/226) ### SDFormat 3.3.0 (2015-09-15) 1. Windows Boost linking errors - * [Pull request 206](https://bitbucket.org/osrf/sdformat/pull-request/206) + * [BitBucket pull request 206](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/206) 1. Nested SDF -> sdf3 - * [Pull request 221](https://bitbucket.org/osrf/sdformat/pull-request/221) + * [BitBucket pull request 221](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/221) 1. Pointer types - * [Pull request 218](https://bitbucket.org/osrf/sdformat/pull-request/218) + * [BitBucket pull request 218](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/218) 1. Torsional friction default surface radius not infinity - * [Pull request 217](https://bitbucket.org/osrf/sdformat/pull-request/217) + * [BitBucket pull request 217](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/217) ### SDFormat 3.2.2 (2015-08-24) 1. Added battery element (contribution from Olivier Crave) - * [Pull request #204](https://bitbucket.org/osrf/sdformat/pull-request/204) + * [BitBucket pull request #204](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/204) 1. Torsional friction backport - * [Pull request #211](https://bitbucket.org/osrf/sdformat/pull-request/211) + * [BitBucket pull request #211](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/211) 1. Allow Visual Studio 2015 - * [Pull request #208](https://bitbucket.org/osrf/sdformat/pull-request/208) + * [BitBucket pull request #208](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/208) ### SDFormat 3.1.1 (2015-08-03) 1. Fix tinyxml linking error - * [Pull request #209](https://bitbucket.org/osrf/sdformat/pull-request/209) + * [BitBucket pull request #209](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/209) ### SDFormat 3.1.0 (2015-08-02) 1. Added logical camera sensor to SDF - * [Pull request #207](https://bitbucket.org/osrf/sdformat/pull-request/207) + * [BitBucket pull request #207](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/207) ### SDFormat 3.0.0 (2015-07-24) 1. Added battery to SDF - * [Pull request 204](https://bitbucket.org/osrf/sdformat/pull-request/204) + * [BitBucket pull request 204](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/204) 1. Added altimeter sensor to SDF - * [Pull request #197](https://bitbucket.org/osrf/sdformat/pull-request/197) + * [BitBucket pull request #197](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/197) 1. Added magnetometer sensor to SDF - * [Pull request 198](https://bitbucket.org/osrf/sdformat/pull-request/198) + * [BitBucket pull request 198](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/198) 1. Fix detection of XML parsing errors - * [Pull request 190](https://bitbucket.org/osrf/sdformat/pull-request/190) + * [BitBucket pull request 190](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/190) 1. Support for fixed joints - * [Pull request 194](https://bitbucket.org/osrf/sdformat/pull-request/194) + * [BitBucket pull request 194](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/194) 1. Adding iterations to state - * [Pull request 188](https://bitbucket.org/osrf/sdformat/pull-request/188) + * [BitBucket pull request 188](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/188) 1. Convert to use ignition-math - * [Pull request 173](https://bitbucket.org/osrf/sdformat/pull-request/173) + * [BitBucket pull request 173](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/173) 1. Add world origin to scene - * [Pull request 183](https://bitbucket.org/osrf/sdformat/pull-request/183) + * [BitBucket pull request 183](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/183) 1. Fix collide bitmask - * [Pull request 182](https://bitbucket.org/osrf/sdformat/pull-request/182) + * [BitBucket pull request 182](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/182) 1. Adding meta information to visuals - * [Pull request 180](https://bitbucket.org/osrf/sdformat/pull-request/180) + * [BitBucket pull request 180](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/180) 1. Add projection type to gui camera - * [Pull request 178](https://bitbucket.org/osrf/sdformat/pull-request/178) + * [BitBucket pull request 178](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/178) 1. Fix print description to include attribute description - * [Pull request 170](https://bitbucket.org/osrf/sdformat/pull-request/170) + * [BitBucket pull request 170](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/170) 1. Add -std=c++11 flag to sdf_config.cmake.in and sdformat.pc.in, needed by downstream code - * [Pull request 172](https://bitbucket.org/osrf/sdformat/pull-request/172) + * [BitBucket pull request 172](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/172) 1. Added boost::any accessor for Param and Element - * [Pull request 166](https://bitbucket.org/osrf/sdformat/pull-request/166) + * [BitBucket pull request 166](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/166) 1. Remove tinyxml from dependency list - * [Pull request 152](https://bitbucket.org/osrf/sdformat/pull-request/152) + * [BitBucket pull request 152](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/152) 1. Added self_collide element for model - * [Pull request 149](https://bitbucket.org/osrf/sdformat/pull-request/149) + * [BitBucket pull request 149](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/149) 1. Added a collision bitmask field to sdf-1.5 and c++11 support - * [Pull request 145](https://bitbucket.org/osrf/sdformat/pull-request/145) + * [BitBucket pull request 145](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/145) 1. Fix problems with latin locales and decimal numbers (issue #60) - * [Pull request 147](https://bitbucket.org/osrf/sdformat/pull-request/147) - * [Issue 60](https://bitbucket.org/osrf/sdformat/issues/60) + * [BitBucket pull request 147](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/147) + * [Issue 60](https://github.com/osrf/sdformat/issues/60) ## SDFormat 2.x 1. rename cfm_damping --> implicit_spring_damper - * [Pull request 59](https://bitbucket.org/osrf/sdformat/pull-request/59) + * [BitBucket pull request 59](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/59) 1. add gear_ratio and reference_body for gearbox joint. - * [Pull request 62](https://bitbucket.org/osrf/sdformat/pull-request/62) + * [BitBucket pull request 62](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/62) 1. Update joint stop stiffness and dissipation - * [Pull request 61](https://bitbucket.org/osrf/sdformat/pull-request/61) + * [BitBucket pull request 61](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/61) 1. Support for GNUInstallDirs - * [Pull request 64](https://bitbucket.org/osrf/sdformat/pull-request/64) + * [BitBucket pull request 64](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/64) 1. `` element used by DEM heightmaps - * [Pull request 67](https://bitbucket.org/osrf/sdformat/pull-request/67) + * [BitBucket pull request 67](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/67) 1. Do not export urdf symbols in sdformat 1.4 - * [Pull request 75](https://bitbucket.org/osrf/sdformat/pull-request/75) + * [BitBucket pull request 75](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/75) 1. adding deformable properties per issue #32 - * [Pull request 78](https://bitbucket.org/osrf/sdformat/pull-request/78) - * [Issue 32](https://bitbucket.org/osrf/sdformat/issues/32) + * [BitBucket pull request 78](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/78) + * [Issue 32](https://github.com/osrf/sdformat/issues/32) 1. Support to use external URDF - * [Pull request 77](https://bitbucket.org/osrf/sdformat/pull-request/77) + * [BitBucket pull request 77](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/77) 1. Add lighting element to visual - * [Pull request 79](https://bitbucket.org/osrf/sdformat/pull-request/79) + * [BitBucket pull request 79](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/79) 1. SDF 1.5: add flag to fix joint axis frame #43 (gazebo issue 494) - * [Pull request 83](https://bitbucket.org/osrf/sdformat/pull-request/83) - * [Issue 43](https://bitbucket.org/osrf/sdformat/issues/43) - * [Gazebo issue 494](https://bitbucket.org/osrf/gazebo/issues/494) + * [BitBucket pull request 83](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/83) + * [Issue 43](https://github.com/osrf/sdformat/issues/43) + * [Gazebo issue 494](https://github.com/osrf/gazebo/issues/494) 1. Implement SDF_PROTOCOL_VERSION (issue #51) - * [Pull request 90](https://bitbucket.org/osrf/sdformat/pull-request/90) + * [BitBucket pull request 90](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/90) 1. Port sdformat to compile on Windows (MSVC) - * [Pull request 101](https://bitbucket.org/osrf/sdformat/pull-request/101) + * [BitBucket pull request 101](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/101) 1. Separate material properties in material.sdf - * [Pull request 104](https://bitbucket.org/osrf/sdformat/pull-request/104) + * [BitBucket pull request 104](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/104) 1. Add road textures (repeat pull request #104 for sdf_2.0) - * [Pull request 105](https://bitbucket.org/osrf/sdformat/pull-request/105) + * [BitBucket pull request 105](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/105) 1. Add Extruded Polylines as a model - * [Pull request 93](https://bitbucket.org/osrf/sdformat/pull-request/93) + * [BitBucket pull request 93](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/93) 1. Added polyline for sdf_2.0 - * [Pull request 106](https://bitbucket.org/osrf/sdformat/pull-request/106) + * [BitBucket pull request 106](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/106) 1. Add spring_reference and spring_stiffness tags to joint axis dynamics - * [Pull request 102](https://bitbucket.org/osrf/sdformat/pull-request/102) + * [BitBucket pull request 102](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/102) 1. Fix actor static - * [Pull request 110](https://bitbucket.org/osrf/sdformat/pull-request/110) + * [BitBucket pull request 110](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/110) 1. New element - * [Pull request 112](https://bitbucket.org/osrf/sdformat/pull-request/112) + * [BitBucket pull request 112](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/112) 1. Add camera distortion element - * [Pull request 120](https://bitbucket.org/osrf/sdformat/pull-request/120) + * [BitBucket pull request 120](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/120) 1. Inclusion of magnetic field strength sensor - * [Pull request 123](https://bitbucket.org/osrf/sdformat/pull-request/123) + * [BitBucket pull request 123](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/123) 1. Properly add URDF gazebo extensions blobs to SDF joint elements - * [Pull request 125](https://bitbucket.org/osrf/sdformat/pull-request/125) + * [BitBucket pull request 125](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/125) 1. Allow gui plugins to be specified in SDF - * [Pull request 127](https://bitbucket.org/osrf/sdformat/pull-request/127) + * [BitBucket pull request 127](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/127) 1. Backport magnetometer - * [Pull request 128](https://bitbucket.org/osrf/sdformat/pull-request/128) + * [BitBucket pull request 128](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/128) 1. Add flag for MOI rescaling to sdf 1.4 - * [Pull request 121](https://bitbucket.org/osrf/sdformat/pull-request/121) + * [BitBucket pull request 121](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/121) 1. Parse urdf joint friction parameters, add corresponding test - * [Pull request 129](https://bitbucket.org/osrf/sdformat/pull-request/129) + * [BitBucket pull request 129](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/129) 1. Allow reading of boolean values from plugin elements. - * [Pull request 132](https://bitbucket.org/osrf/sdformat/pull-request/132) + * [BitBucket pull request 132](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/132) 1. Implement generation of XML Schema files (issue #2) - * [Pull request 91](https://bitbucket.org/osrf/sdformat/pull-request/91) + * [BitBucket pull request 91](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/91) 1. Fix build for OS X 10.10 - * [Pull request 135](https://bitbucket.org/osrf/sdformat/pull-request/135) + * [BitBucket pull request 135](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/135) 1. Improve performance in loading SDF elements - * [Pull request 138](https://bitbucket.org/osrf/sdformat/pull-request/138) + * [BitBucket pull request 138](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/138) 1. Added urdf gazebo extension option to disable fixed joint lumping - * [Pull request 133](https://bitbucket.org/osrf/sdformat/pull-request/133) + * [BitBucket pull request 133](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/133) 1. Support urdfdom 0.3 (alternative to pull request #122) - * [Pull request 141](https://bitbucket.org/osrf/sdformat/pull-request/141) + * [BitBucket pull request 141](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/141) 1. Update list of supported joint types - * [Pull request 142](https://bitbucket.org/osrf/sdformat/pull-request/142) + * [BitBucket pull request 142](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/142) 1. Ignore unknown elements - * [Pull request 148](https://bitbucket.org/osrf/sdformat/pull-request/148) + * [BitBucket pull request 148](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/148) 1. Physics preset attributes - * [Pull request 146](https://bitbucket.org/osrf/sdformat/pull-request/146) + * [BitBucket pull request 146](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/146) 1. Backport fix for latin locales (pull request #147) - * [Pull request 150](https://bitbucket.org/osrf/sdformat/pull-request/150) + * [BitBucket pull request 150](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/150) ## SDFormat 1.4 ### SDFormat 1.4.8 (2013-09-06) 1. Fix inertia transformations when reducing fixed joints in URDF - * [Pull request 48](https://bitbucket.org/osrf/sdformat/pull-request/48/fix-for-issue-22-reducing-inertia-across/diff) + * [BitBucket pull request 48](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/48/fix-for-issue-22-reducing-inertia-across/diff) 1. Add element to support terrain paging in gazebo - * [Pull request 47](https://bitbucket.org/osrf/sdformat/pull-request/47/add-element-inside-heightmap/diff) + * [BitBucket pull request 47](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/47/add-element-inside-heightmap/diff) 1. Further reduce console output when using URDF models - * [Pull request 46](https://bitbucket.org/osrf/sdformat/pull-request/46/convert-a-few-more-sdfwarns-to-sdflog-fix/diff) - * [Commit](https://bitbucket.org/osrf/sdformat/commits/b15d5a1ecc57abee6691618d02d59bbc3d1b84dc) + * [BitBucket pull request 46](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/46/convert-a-few-more-sdfwarns-to-sdflog-fix/diff) + * [Commit](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/commits/b15d5a1ecc57abee6691618d02d59bbc3d1b84dc) ### SDFormat 1.4.7 (2013-08-22) 1. Direct console messages to std_err - * [Pull request 44](https://bitbucket.org/osrf/sdformat/pull-request/44/fix-19-direct-all-messages-to-std_err) + * [BitBucket pull request 44](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/44/fix-19-direct-all-messages-to-std_err) ### SDFormat 1.4.6 (2013-08-20) 1. Add tags for GPS sensor and sensor noise - * [Pull request 36](https://bitbucket.org/osrf/sdformat/pull-request/36/gps-sensor-sensor-noise-and-spherical) + * [BitBucket pull request 36](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/36/gps-sensor-sensor-noise-and-spherical) 1. Add tags for wireless transmitter/receiver models - * [Pull request 34](https://bitbucket.org/osrf/sdformat/pull-request/34/transceiver-support) - * [Pull request 43](https://bitbucket.org/osrf/sdformat/pull-request/43/updated-description-of-the-transceiver-sdf) + * [BitBucket pull request 34](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/34/transceiver-support) + * [BitBucket pull request 43](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/43/updated-description-of-the-transceiver-sdf) 1. Add tags for playback of audio files in Gazebo - * [Pull request 26](https://bitbucket.org/osrf/sdformat/pull-request/26/added-audio-tags) - * [Pull request 35](https://bitbucket.org/osrf/sdformat/pull-request/35/move-audio-to-link-and-playback-on-contact) + * [BitBucket pull request 26](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/26/added-audio-tags) + * [BitBucket pull request 35](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/35/move-audio-to-link-and-playback-on-contact) 1. Add tags for simbody physics parameters - * [Pull request 32](https://bitbucket.org/osrf/sdformat/pull-request/32/merging-some-updates-from-simbody-branch) + * [BitBucket pull request 32](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/32/merging-some-updates-from-simbody-branch) 1. Log messages to a file, reduce console output - * [Pull request 33](https://bitbucket.org/osrf/sdformat/pull-request/33/log-messages-to-file-8) + * [BitBucket pull request 33](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/33/log-messages-to-file-8) 1. Generalize ode's element - * [Pull request 38](https://bitbucket.org/osrf/sdformat/pull-request/38/add-provide_feedback-for-bullet-joint) + * [BitBucket pull request 38](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/38/add-provide_feedback-for-bullet-joint) 1. Various bug, style and test fixes ### SDFormat 1.4.5 (2013-07-23) diff --git a/INSTALL_WIN32.md b/INSTALL_WIN32.md index d1af0cfaa..2d6e7b217 100644 --- a/INSTALL_WIN32.md +++ b/INSTALL_WIN32.md @@ -22,7 +22,7 @@ Windows `cmd` for configuring and building. 1. Clone sdformat - hg clone https://bitbucket.org/osrf/sdformat + git clone https://github.com/osrf/sdformat 1. Load your compiler setup, e.g. (note that we are asking for the 64-bit toolchain here): diff --git a/Migration.md b/Migration.md index 4ced1552f..464946022 100644 --- a/Migration.md +++ b/Migration.md @@ -18,7 +18,7 @@ but with improved human-readability.. 1. + Change installation path of SDF description files to allow side-by-side installation. + `{prefix}/share/sdformat/1.*/*.sdf` -> `{prefix}/share/sdformat8/1.*/*.sdf` - + [pull request 538](https://bitbucket.org/osrf/sdformat/pull-requests/538) + + [BitBucket pull request 538](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/538) ## SDFormat 5.x to 6.x @@ -83,22 +83,22 @@ but with improved human-readability.. 1. **`gravity` and `magnetic_field` elements are moved from `physics` to `world`** + In physics element: gravity and magnetic_field tags have been moved from Physics to World element. - + [pull request 247](https://bitbucket.org/osrf/sdformat/pull-requests/247) - + [gazebo pull request 2090](https://bitbucket.org/osrf/gazebo/pull-requests/2090) + + [BitBucket pull request 247](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/247) + + [gazebo pull request 2090](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-requests/2090) 1. **New noise for IMU** + A new style for representing the noise properties of an `imu` was implemented - in [pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) + in [BitBucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) for sdf 1.5 and the old style was declared as deprecated. The old style has been removed from sdf 1.6 with the conversion script updating to the new style. - + [pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) - + [pull request 243](https://bitbucket.org/osrf/sdformat/pull-requests/243) - + [pull request 244](https://bitbucket.org/osrf/sdformat/pull-requests/244) + + [BitBucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) + + [BitBucket pull request 243](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/243) + + [BitBucket pull request 244](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/244) 1. **Lump:: prefix in link names** + Changed to \_fixed_joint_lump__ to avoid confusion with scoped names - + [Pull request 245](https://bitbucket.org/osrf/sdformat/pull-request/245) + + [BitBucket pull request 245](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/245) ## SDF protocol 1.5 to 1.6 @@ -114,27 +114,27 @@ but with improved human-readability.. + min: 0.0 + max: 1.0 + required: 0 - + [pull request 466](https://bitbucket.org/osrf/sdformat/pull-requests/466) + + [BitBucket pull request 466](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/466) 1. **camera.sdf** `depth_camera/clip` sub-elements: `near`, `far` + description: Clipping parameters for depth camera on rgbd camera sensor. - + [pull request 628](https://bitbucket.org/osrf/sdformat/pull-requests/628) + + [BitBucket pull request 628](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/628) 1. **camera.sdf** `intrinsics` sub-elements: `fx`, `fy`, `cx`, `cy`, `s` + description: Camera intrinsic parameters for setting a custom perspective projection matrix. - + [pull request 496](https://bitbucket.org/osrf/sdformat/pull-requests/496) + + [BitBucket pull request 496](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/496) 1. **link.sdf** `enable_wind` element + description: If true, the link is affected by the wind + type: bool + default: false + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **link.sdf** `light` element + included from `light.sdf` with required="*", so a link can have any number of attached lights. - + [pull request 373](https://bitbucket.org/osrf/sdformat/pull-requests/373) + + [BitBucket pull request 373](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/373) 1. **model.sdf** `enable_wind` element + description: If set to true, all links in the model will be affected by @@ -142,14 +142,14 @@ but with improved human-readability.. + type: bool + default: false + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **model_state.sdf** `scale` element + description: Scale for the 3 dimensions of the model. + type: vector3 + default: "1 1 1" + required: 0 - + [pull request 246](https://bitbucket.org/osrf/sdformat/pull-requests/246) + + [BitBucket pull request 246](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/246) 1. **physics.sdf** `dart::collision_detector` element + description: The collision detector for DART to use. @@ -157,7 +157,7 @@ but with improved human-readability.. + type: string + default: fcl + required: 0 - + [pull request 440](https://bitbucket.org/osrf/sdformat/pull-requests/440) + + [BitBucket pull request 440](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/440) 1. **physics.sdf** `dart::solver::solver_type` element + description: The DART LCP/constraint solver to use. @@ -165,31 +165,31 @@ but with improved human-readability.. + type: string + default: dantzig + required: 0 - + [pull request 369](https://bitbucket.org/osrf/sdformat/pull-requests/369) + + [BitBucket pull request 369](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/369) 1. **physics.sdf** `island_threads` element under `ode::solver` + description: Number of threads to use for "islands" of disconnected models. + type: int + default: 0 + required: 0 - + [pull request 380](https://bitbucket.org/osrf/sdformat/pull-requests/380) + + [BitBucket pull request 380](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/380) 1. **physics.sdf** `thread_position_correction` element under `ode::solver` + description: Flag to use threading to speed up position correction computation. + type: bool + default: 0 + required: 0 - + [pull request 380](https://bitbucket.org/osrf/sdformat/pull-requests/380) + + [BitBucket pull request 380](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/380) 1. **sonar.sdf** `geometry` element + description: The sonar collision shape. Currently supported geometries are: "cone" and "sphere". + type: string + default: "cone" + required: 0 - + [pull request 495](https://bitbucket.org/osrf/sdformat/pull-requests/495) + + [BitBucket pull request 495](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/495) 1. **state.sdf** allow `light` tags within `insertions` element - * [pull request 325](https://bitbucket.org/osrf/sdformat/pull-request/325) + * [BitBucket pull request 325](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/325) 1. **surface.sdf** `category_bitmask` element + description: Bitmask for category of collision filtering. @@ -198,16 +198,16 @@ but with improved human-readability.. + type: unsigned int + default: 65535 + required: 0 - + [pull request 318](https://bitbucket.org/osrf/sdformat/pull-requests/318) + + [BitBucket pull request 318](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/318) 1. **world.sdf** `wind` element + description: The wind tag specifies the type and properties of the wind. + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **world.sdf** `wind::linear_velocity` element + description: Linear velocity of the wind. + type: vector3 + default: "0 0 0" + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 5d9d76838..b2ebf1b7e 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -10,7 +10,7 @@ pipelines: - sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' - wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - - apt-get update - - apt -y install cmake build-essential curl git mercurial libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck + - apt -y install cmake build-essential curl git libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck - gcc -v - g++ -v - gcov -v diff --git a/doc/header.html b/doc/header.html index d4b88ef24..f2e06b44a 100644 --- a/doc/header.html +++ b/doc/header.html @@ -41,7 +41,7 @@

Tutorials
Download
--> -
Report Documentation Issues
+
Report Documentation Issues
diff --git a/doc/mainpage.html b/doc/mainpage.html index 11ed37316..404390775 100644 --- a/doc/mainpage.html +++ b/doc/mainpage.html @@ -5,7 +5,7 @@ Desctiption Format API. The code reference is divided into the groups below. Should you find problems with this documentation - typos, unclear phrases, or insufficient detail - please create a new bitbucket issue. + href="https://github.com/osrf/sdf/issues/new">new GitHub issue. Include sufficient detail to quickly locate the problematic documentation, and set the issue's fields accordingly: Assignee - blank; Kind - bug; Priority - minor; Version - blank. diff --git a/sdf/1.4/physics.sdf b/sdf/1.4/physics.sdf index 2cb836fa1..2f50db2e7 100644 --- a/sdf/1.4/physics.sdf +++ b/sdf/1.4/physics.sdf @@ -177,7 +177,7 @@ Flag to enable dynamic rescaling of moment of inertia in constrained directions. See gazebo pull request 1114 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1114 + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1114 diff --git a/sdf/1.5/joint.sdf b/sdf/1.5/joint.sdf index 1e5a7a7a2..e63d6f765 100644 --- a/sdf/1.5/joint.sdf +++ b/sdf/1.5/joint.sdf @@ -55,7 +55,7 @@ Flag to interpret the axis xyz element in the parent model frame instead of joint frame. Provided for Gazebo compatibility - (see https://bitbucket.org/osrf/gazebo/issue/494 ). + (see https://github.com/osrf/gazebo/issue/494 ). @@ -114,7 +114,7 @@ Flag to interpret the axis xyz element in the parent model frame instead of joint frame. Provided for Gazebo compatibility - (see https://bitbucket.org/osrf/gazebo/issue/494 ). + (see https://github.com/osrf/gazebo/issue/494 ). diff --git a/sdf/1.5/physics.sdf b/sdf/1.5/physics.sdf index f4f0bf918..3e065e76e 100644 --- a/sdf/1.5/physics.sdf +++ b/sdf/1.5/physics.sdf @@ -189,7 +189,7 @@ Flag to enable dynamic rescaling of moment of inertia in constrained directions. See gazebo pull request 1114 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1114 + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1114 diff --git a/sdf/1.6/joint.sdf b/sdf/1.6/joint.sdf index 92f354f93..2173ebfb5 100644 --- a/sdf/1.6/joint.sdf +++ b/sdf/1.6/joint.sdf @@ -61,7 +61,7 @@ Flag to interpret the axis xyz element in the parent model frame instead of joint frame. Provided for Gazebo compatibility - (see https://bitbucket.org/osrf/gazebo/issue/494 ). + (see https://github.com/osrf/gazebo/issue/494 ). @@ -125,7 +125,7 @@ Flag to interpret the axis xyz element in the parent model frame instead of joint frame. Provided for Gazebo compatibility - (see https://bitbucket.org/osrf/gazebo/issue/494 ). + (see https://github.com/osrf/gazebo/issue/494 ). diff --git a/sdf/1.6/physics.sdf b/sdf/1.6/physics.sdf index e0277e4a2..38c22f633 100644 --- a/sdf/1.6/physics.sdf +++ b/sdf/1.6/physics.sdf @@ -200,7 +200,7 @@ Flag to enable dynamic rescaling of moment of inertia in constrained directions. See gazebo pull request 1114 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1114 + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1114 @@ -213,8 +213,8 @@ cone_model: friction force magnitude limited in proportion to normal force. See gazebo pull request 1522 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1522 - https://bitbucket.org/osrf/gazebo/commits/8c05ad64967c + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1522 + https://github.com/osrf/gazebo/commit/968dccafdfbfca09c9b3326f855612076fed7e6f diff --git a/sdf/Migration.md b/sdf/Migration.md index ac531d8d9..b4cc18a60 100644 --- a/sdf/Migration.md +++ b/sdf/Migration.md @@ -24,14 +24,14 @@ but with improved human-readability. + type: unsigned int + default: 2 + required: 0 - + [pull request 293](https://bitbucket.org/osrf/sdformat/pull-requests/293) + + [Bitbucket pull request 293](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/293) 1. **link.sdf** `enable_wind` element + description: If true, the link is affected by the wind + type: bool + default: false + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [Bitbucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **model.sdf** `enable_wind` element + description: If set to true, all links in the model @@ -40,14 +40,14 @@ but with improved human-readability. + type: bool + default: false + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [Bitbucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **model_state.sdf** `scale` element + description: Scale for the 3 dimensions of the model. + type: vector3 + default: "1 1 1" + required: 0 - + [pull request 246](https://bitbucket.org/osrf/sdformat/pull-requests/246) + + [Bitbucket pull request 246](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/246) 1. **physics.sdf** `friction_model` element + description: Name of ODE friction model to use. Valid values include: @@ -55,39 +55,39 @@ but with improved human-readability. in proportion to normal force. + box_model: friction forces limited to constant in two directions. + cone_model: friction force magnitude limited in proportion to normal force. - See [gazebo pull request 1522](https://bitbucket.org/osrf/gazebo/pull-request/1522) - (merged in [gazebo 8c05ad64967c](https://bitbucket.org/osrf/gazebo/commits/8c05ad64967c)) + See [gazebo pull request 1522](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1522) + (merged in [gazebo 8c05ad64967c](https://github.com/osrf/gazebo/commit/968dccafdfbfca09c9b3326f855612076fed7e6f)) for the implementation of this feature. + type: string + default: "pyramid_model" + required: 0 - + [pull request 294](https://bitbucket.org/osrf/sdformat/pull-requests/294) + + [Bitbucket pull request 294](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/294) 1. **world.sdf** `wind` element + description: The wind tag specifies the type and properties of the wind. + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [Bitbucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **world.sdf** `wind::linear_velocity` element + description: Linear velocity of the wind. + type: vector3 + default: "0 0 0" + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [Bitbucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) ### Modifications 1. `gravity` and `magnetic_field` elements are moved from `physics` to `world` - + [pull request 247](https://bitbucket.org/osrf/sdformat/pull-requests/247) - + [gazebo pull request 2090](https://bitbucket.org/osrf/gazebo/pull-requests/2090) + + [Bitbucket pull request 247](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/247) + + [gazebo pull request 2090](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-requests/2090) 1. A new style for representing the noise properties of an `imu` was implemented - in [pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) + in [Bitbucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) for sdf 1.5 and the old style was declared as deprecated. The old style has been removed from sdf 1.6 with the conversion script updating to the new style. - + [pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) - + [pull request 243](https://bitbucket.org/osrf/sdformat/pull-requests/243) - + [pull request 244](https://bitbucket.org/osrf/sdformat/pull-requests/244) + + [Bitbucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) + + [Bitbucket pull request 243](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/243) + + [Bitbucket pull request 244](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/244) diff --git a/src/Param.cc b/src/Param.cc index 5aef725fd..0ab69a43a 100644 --- a/src/Param.cc +++ b/src/Param.cc @@ -34,8 +34,8 @@ using namespace sdf; // comma. To avoid that the SDF parsing is influenced by the current // global C or C++ locale, we define a custom std::stringstream variant // that always uses the std::locale::classic() locale. -// See issues https://bitbucket.org/osrf/sdformat/issues/60 -// and https://bitbucket.org/osrf/sdformat/issues/207 for more details. +// See issues https://github.com/osrf/sdformat/issues/60 +// and https://github.com/osrf/sdformat/issues/207 for more details. namespace sdf { inline namespace SDF_VERSION_NAMESPACE { diff --git a/src/Param_TEST.cc b/src/Param_TEST.cc index 204c77d95..a9c2172c0 100644 --- a/src/Param_TEST.cc +++ b/src/Param_TEST.cc @@ -157,7 +157,7 @@ TEST(Param, HexUInt) TEST(Param, HexFloat) { // Microsoft does not parse hex values properly. -// https://bitbucket.org/osrf/sdformat/issues/114 +// https://github.com/osrf/sdformat/issues/114 #ifndef _MSC_VER sdf::Param floatParam("key", "float", "0", false, "description"); float value; @@ -192,7 +192,7 @@ TEST(Param, HexDouble) EXPECT_DOUBLE_EQ(value, 0.0); // Microsoft does not parse hex values properly. -// https://bitbucket.org/osrf/sdformat/issues/114 +// https://github.com/osrf/sdformat/issues/114 #ifndef _MSC_VER EXPECT_TRUE(doubleParam.SetFromString("0x01")); EXPECT_TRUE(doubleParam.Get(value)); diff --git a/src/SDF_TEST.cc b/src/SDF_TEST.cc index 2fd65d906..27f194ad4 100644 --- a/src/SDF_TEST.cc +++ b/src/SDF_TEST.cc @@ -133,7 +133,7 @@ TEST(SDF, UpdateElement) EXPECT_EQ(flagCheck, fixture.flag); poseParam->Get(poseCheck); // test fails on homebrew see issue 202 - // https://bitbucket.org/osrf/sdformat/issues/202 + // https://github.com/osrf/sdformat/issues/202 #ifndef __APPLE__ EXPECT_EQ(poseCheck, fixture.pose); #endif @@ -420,7 +420,7 @@ TEST(SDF, GetAny) catch(std::bad_any_cast &/*_e*/) { // test fails on homebrew see issue 202 - // https://bitbucket.org/osrf/sdformat/issues/202 + // https://github.com/osrf/sdformat/issues/202 #ifndef __APPLE__ FAIL(); #endif @@ -438,7 +438,7 @@ TEST(SDF, GetAny) catch(std::bad_any_cast &/*_e*/) { // test fails on homebrew see issue 202 - // https://bitbucket.org/osrf/sdformat/issues/202 + // https://github.com/osrf/sdformat/issues/202 #ifndef __APPLE__ FAIL(); #endif @@ -482,7 +482,7 @@ TEST(SDF, GetAny) catch(std::bad_any_cast &/*_e*/) { // test fails on homebrew see issue 202 - // https://bitbucket.org/osrf/sdformat/issues/202 + // https://github.com/osrf/sdformat/issues/202 #ifndef __APPLE__ FAIL(); #endif From 53653c39583eb2f0e3fa44080b713ad3dfbf8bee Mon Sep 17 00:00:00 2001 From: chapulina Date: Fri, 8 May 2020 00:03:15 -0700 Subject: [PATCH 04/42] [sdf9] Changelog links to BitBucket backup (#240) * [sdf9] Changelog links to BitBucket backup Signed-off-by: Louise Poubel * [sdf8] Changelog links to BitBucket backup Signed-off-by: Louise Poubel * [sdf7] Changelog links to BitBucket backup (#238) Signed-off-by: Louise Poubel * Convert bitbucket links for sdf9 Signed-off-by: Steven Peters * Fix link in API documentation Signed-off-by: Steven Peters Co-authored-by: Steven Peters --- .hgignore => .gitignore | 1 - CMakeLists.txt | 2 +- Changelog.md | 754 ++++++++++++++++++++-------------------- INSTALL_WIN32.md | 2 +- Migration.md | 84 ++--- bitbucket-pipelines.yml | 2 +- doc/header.html | 2 +- doc/mainpage.html | 2 +- sdf/1.4/physics.sdf | 2 +- sdf/1.5/joint.sdf | 4 +- sdf/1.5/physics.sdf | 2 +- sdf/1.6/joint.sdf | 4 +- sdf/1.6/physics.sdf | 6 +- sdf/1.7/physics.sdf | 6 +- sdf/Migration.md | 30 +- src/FrameSemantics.cc | 2 +- src/Param.cc | 4 +- src/Param_TEST.cc | 4 +- src/SDF_TEST.cc | 8 +- 19 files changed, 460 insertions(+), 461 deletions(-) rename .hgignore => .gitignore (63%) diff --git a/.hgignore b/.gitignore similarity index 63% rename from .hgignore rename to .gitignore index 1b7892bf6..416ecfb5f 100644 --- a/.hgignore +++ b/.gitignore @@ -1,4 +1,3 @@ -syntax: glob build build_* diff --git a/CMakeLists.txt b/CMakeLists.txt index c0b934f94..a91461de4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,7 +51,7 @@ set (CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON) # to choose the flag -std=gnu++14 instead of -std=c++14 when the C++14 # features are requested. Explicitly turning this flag off will force cmake to # choose -std=c++14. -# See https://bitbucket.org/ignitionrobotics/ign-cmake/issues/13 for more info. +# See https://github.com/ignitionrobotics/ign-cmake/issues/13 for more info. set(CMAKE_CXX_EXTENSIONS off) # Include GNUInstallDirs to get canonical paths diff --git a/Changelog.md b/Changelog.md index 3813b4017..adb6da437 100644 --- a/Changelog.md +++ b/Changelog.md @@ -3,549 +3,549 @@ ### SDFormat 9.X.X (202X-XX-XX) 1. Fix homebrew build with external urdfdom. - * [Pull request 677](https://bitbucket.org/osrf/sdformat/pull-requests/677) - * [Pull request 686](https://bitbucket.org/osrf/sdformat/pull-requests/686) + * [BitBucket pull request 677](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/677) + * [BitBucket pull request 686](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/686) ### SDFormat 9.2.0 (2020-04-02) 1. Remove URI scheme, if present, when finding files. - * [Pull request 650](https://bitbucket.org/osrf/sdformat/pull-requests/650) - * [Pull request 652](https://bitbucket.org/osrf/sdformat/pull-requests/652) + * [BitBucket pull request 650](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/650) + * [BitBucket pull request 652](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/652) 1. Build `Utils_TEST` with Utils.cc explicitly passed since its symbols are not visible. - * [Pull request 572](https://bitbucket.org/osrf/sdformat/pull-requests/572) + * [BitBucket pull request 572](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/572) 1. Keep the URDF style of specifying kinematics when converting URDF to SDF by using frame semantics. - * [Pull request 676](https://bitbucket.org/osrf/sdformat/pull-requests/676) + * [BitBucket pull request 676](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/676) 1. Increase output precision of URDF to SDF conversion, output -0 as 0. - * [Pull request 675](https://bitbucket.org/osrf/sdformat/pull-requests/675) + * [BitBucket pull request 675](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/675) 1. Add test of URDF frame semantics. - * [Pull request 680](https://bitbucket.org/osrf/sdformat/pull-requests/680) + * [BitBucket pull request 680](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/680) 1. Support frame semantics for models nested with - * [Pull request 668](https://bitbucket.org/osrf/sdformat/pull-requests/668) + * [BitBucket pull request 668](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/668) 1. Add surface DOM - * [pull request 660](https://bitbucket.org/osrf/sdformat/pull-requests/660) + * [BitBucket pull request 660](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/660) 1. Add Transparency to visual DOM - * [Pull request 671](https://bitbucket.org/osrf/sdformat/pull-requests/671) + * [BitBucket pull request 671](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/671) 1. Add camera visibility mask and visual visibility flags - * [Pull request 673](https://bitbucket.org/osrf/sdformat/pull-requests/673) + * [BitBucket pull request 673](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/673) 1. Include overrides for actor and light - * [Pull request 669](https://bitbucket.org/osrf/sdformat/pull-requests/669) + * [BitBucket pull request 669](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/669) 1. Add functionality to generate aggregated SDFormat descriptions via CMake. - * [Pull request 667](https://bitbucket.org/osrf/sdformat/pull-requests/667) - * [Pull request 665](https://bitbucket.org/osrf/sdformat/pull-requests/665) + * [BitBucket pull request 667](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/667) + * [BitBucket pull request 665](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/665) 1. parser addNestedModel: check `//axis/xyz/@expressed_in` before rotating joint axis. - * [Pull request 657](https://bitbucket.org/osrf/sdformat/pull-requests/657) - * [Issue 219](https://bitbucket.org/osrf/sdformat/issues/219) + * [BitBucket pull request 657](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/657) + * [Issue 219](https://github.com/osrf/sdformat/issues/219) 1. Remove TinyXML symbols from public API: Deprecate URDF2SDF - * [Pull request 658](https://bitbucket.org/osrf/sdformat/pull-requests/658) + * [BitBucket pull request 658](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/658) 1. Remove TinyXML symbols from public API: Move uninstalled headers - * [Pull request 662](https://bitbucket.org/osrf/sdformat/pull-requests/662) + * [BitBucket pull request 662](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/662) 1. Install the Windows `.dll` shared libraries to bin folder. - * [Pull request 659](https://bitbucket.org/osrf/sdformat/pull-requests/659) - * [Pull request 663](https://bitbucket.org/osrf/sdformat/pull-requests/663) + * [BitBucket pull request 659](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/659) + * [BitBucket pull request 663](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/663) 1. Fix cmake type for `tinyxml_INCLUDE_DIRS`. - * [Pull request 661](https://bitbucket.org/osrf/sdformat/pull-requests/661) - * [Pull request 663](https://bitbucket.org/osrf/sdformat/pull-requests/663) + * [BitBucket pull request 661](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/661) + * [BitBucket pull request 663](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/663) 1. Rename SDF to SDFormat / libsdformat on documentation - * [Pull request 666](https://bitbucket.org/osrf/sdformat/pull-requests/666) + * [BitBucket pull request 666](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/666) ### SDFormat 9.1.0 (2020-01-29) 1. Remove URI scheme, if present, when finding files. - * [Pull request 653](https://bitbucket.org/osrf/sdformat/pull-requests/653) + * [BitBucket pull request 653](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/653) 1. Fix parsing of pose elements under `` - * [Pull request 649](https://bitbucket.org/osrf/sdformat/pull-requests/649) + * [BitBucket pull request 649](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/649) 1. Parser: add readFileWithoutConversion and readStringWithoutConversion. - * [Pull request 647](https://bitbucket.org/osrf/sdformat/pull-requests/647) + * [BitBucket pull request 647](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/647) 1. Added accessors to `ignition::math::[Boxd, Cylinderd, Planed, Sphered]` in the matching `sdf::[Box, Cylinder, Plane, Sphere]` classes. - * [Pull request 639](https://bitbucket.org/osrf/sdformat/pull-requests/639) + * [BitBucket pull request 639](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/639) 1. Forward port of adjustments for memory leaks: - [Pull Request 641](https://bitbucket.org/osrf/sdformat/pull-requests/641) and - [Pull Request 644](https://bitbucket.org/osrf/sdformat/pull-requests/644) - * [Pull Request 645](https://bitbucket.org/osrf/sdformat/pull-requests/645) + * [BitBucket pull request 641](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/641) and + * [BitBucket pull request 644](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/644) + * [BitBucket pull request 645](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/645) 1. sdf 1.7: remove `//world/joint` element since it has never been used. - * [Pull request 637](https://bitbucket.org/osrf/sdformat/pull-requests/637) + * [BitBucket pull request 637](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/637) 1. Add clipping for depth camera on rgbd camera sensor - * [Pull request 628](https://bitbucket.org/osrf/sdformat/pull-requests/628) + * [BitBucket pull request 628](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/628) 1. Add tests to confirm that world is not allowed as child link of a joint. - * [Pull request 634](https://bitbucket.org/osrf/sdformat/pull-requests/634) + * [BitBucket pull request 634](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/634) 1. Fix link pose multiplication for URDF. - * [Pull request 630](https://bitbucket.org/osrf/sdformat/pull-requests/630) + * [BitBucket pull request 630](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/630) 1. Enable linter for URDF parser and fix style. - * [Pull request 631](https://bitbucket.org/osrf/sdformat/pull-requests/631) + * [BitBucket pull request 631](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/631) 1. Converter: fix memory leak pointed out by ASan. - * [Pull request 638](https://bitbucket.org/osrf/sdformat/pull-requests/638) + * [BitBucket pull request 638](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/638) 1. Access the original parsed version of an SDF document with `Element::OriginalVersion`. - * [Pull request 640](https://bitbucket.org/osrf/sdformat/pull-requests/640) + * [BitBucket pull request 640](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/640) 1. Model::Load: fail fast if an sdf 1.7 file has name collisions. - * [Pull request 648](https://bitbucket.org/osrf/sdformat/pull-requests/648) + * [BitBucket pull request 648](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/648) 1. Keep DOM objects even if they were loaded with errors. - * [Pull request 655](https://bitbucket.org/osrf/sdformat/pull-requests/655) + * [BitBucket pull request 655](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/655) ### SDFormat 9.0.0 (2019-12-10) 1. Move recursiveSameTypeUniqueNames from ign.cc to parser.cc and make public. - * [Pull request 606](https://bitbucket.org/osrf/sdformat/pull-requests/606) + * [BitBucket pull request 606](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/606) 1. Check that joints have valid parent and child names in `ign sdf --check`. - * [Pull request 609](https://bitbucket.org/osrf/sdformat/pull-requests/609) + * [BitBucket pull request 609](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/609) 1. Model DOM: error when trying to load nested models, which aren't yet supported. - * [Pull request 610](https://bitbucket.org/osrf/sdformat/pull-requests/610) + * [BitBucket pull request 610](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/610) 1. Use consistent namespaces in Filesystem. - * [Pull request 567](https://bitbucket.org/osrf/sdformat/pull-requests/567) + * [BitBucket pull request 567](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/567) 1. Enforce rules about reserved names and unique names among sibling elements. - * [Pull request 600](https://bitbucket.org/osrf/sdformat/pull-requests/600) + * [BitBucket pull request 600](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/600) 1. Relax name checking, so name collisions generate warnings and names are automatically changed. - * [Pull request 621](https://bitbucket.org/osrf/sdformat/pull-requests/621) + * [BitBucket pull request 621](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/621) 1. Unversioned library name for ign tool commands. - * [Pull request 612](https://bitbucket.org/osrf/sdformat/pull-requests/612) + * [BitBucket pull request 612](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/612) 1. Initial version of sdformat 1.7 specification. - * [Pull request 588](https://bitbucket.org/osrf/sdformat/pull-requests/588) + * [BitBucket pull request 588](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/588) 1. Converter: add `` element for converting fixed values. - * [Pull request 580](https://bitbucket.org/osrf/sdformat/pull-requests/580) + * [BitBucket pull request 580](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/580) 1. Converter: add `descendant_name` attribute to recursively search for elements to convert. - * [Pull request 596](https://bitbucket.org/osrf/sdformat/pull-requests/596) + * [BitBucket pull request 596](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/596) 1. sdf 1.7: replace `use_parent_model_frame` element with `//axis/xyz/@expressed_in` attribute. - * [Pull request 589](https://bitbucket.org/osrf/sdformat/pull-requests/589) + * [BitBucket pull request 589](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/589) 1. sdf 1.7: replace `//pose/@frame` attribute with `//pose/@relative_to` attribute. - * [Pull request 597](https://bitbucket.org/osrf/sdformat/pull-requests/597) + * [BitBucket pull request 597](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/597) 1. sdf 1.7: add `//model/@canonical_link` attribute and require models to have at least one link. - * [Pull request 601](https://bitbucket.org/osrf/sdformat/pull-requests/601) + * [BitBucket pull request 601](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/601) 1. Static models: allow them to have no links and skip building FrameAttachedToGraph. - * [Pull request 626](https://bitbucket.org/osrf/sdformat/pull-requests/626) + * [BitBucket pull request 626](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/626) 1. sdf 1.7: add `//frame/attached_to`, only allow frames in model and world, add Frame DOM. - * [pull request 603](https://bitbucket.org/osrf/sdformat/pull-requests/603) + * [BitBucket pull request 603](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/603) 1. FrameSemantics API: add FrameAttachedToGraph and functions for building graph and resolving attached-to body. - * [Pull request 613](https://bitbucket.org/osrf/sdformat/pull-requests/613) + * [BitBucket pull request 613](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/613) 1. FrameSemantics API: add PoseRelativeToGraph and functions for building graph and resolving poses. - * [Pull request 614](https://bitbucket.org/osrf/sdformat/pull-requests/614) + * [BitBucket pull request 614](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/614) 1. Build and validate graphs during Model::Load and World::Load. - * [Pull request 615](https://bitbucket.org/osrf/sdformat/pull-requests/615) + * [BitBucket pull request 615](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/615) 1. Add SemanticPose class with implementation for Link. - * [Pull request 616](https://bitbucket.org/osrf/sdformat/pull-requests/616) + * [BitBucket pull request 616](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/616) 1. Add JointAxis::ResolveXyz and Joint::SemanticPose. - * [Pull request 617](https://bitbucket.org/osrf/sdformat/pull-requests/617) + * [BitBucket pull request 617](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/617) 1. Implement SemanticPose() for Collision, Frame, Light, Model, Sensor, Visual. - * [Pull request 618](https://bitbucket.org/osrf/sdformat/pull-requests/618) + * [BitBucket pull request 618](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/618) 1. Add Frame::ResolveAttachedToBody API for resolving the attached-to body of a frame. - * [Pull request 619](https://bitbucket.org/osrf/sdformat/pull-requests/619) + * [BitBucket pull request 619](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/619) 1. DOM API: deprecate `(Set)?PoseFrame` API and replace with `(Set)?PoseRelativeTo` - * [Pull request 598](https://bitbucket.org/osrf/sdformat/pull-requests/598) + * [BitBucket pull request 598](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/598) 1. DOM API: deprecate `(Set)?Pose` API and replace with `(Set)?RawPose` - * [Pull request 599](https://bitbucket.org/osrf/sdformat/pull-requests/599) + * [BitBucket pull request 599](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/599) 1. Hide FrameSemantics implementation. - * [Pull request 622](https://bitbucket.org/osrf/sdformat/pull-requests/622) - * [Pull request 623](https://bitbucket.org/osrf/sdformat/pull-requests/623) + * [BitBucket pull request 622](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/622) + * [BitBucket pull request 623](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/623) ## SDFormat 8.0 ### SDFormat 8.X.X (202X-XX-XX) 1. Increase output precision of URDF to SDF conversion, output -0 as 0. - * [Pull request 675](https://bitbucket.org/osrf/sdformat/pull-requests/675) + * [BitBucket pull request 675](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/675) 1. Fix homebrew build with external urdfdom. - * [Pull request 677](https://bitbucket.org/osrf/sdformat/pull-requests/677) - * [Pull request 686](https://bitbucket.org/osrf/sdformat/pull-requests/686) + * [BitBucket pull request 677](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/677) + * [BitBucket pull request 686](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/686) ### SDFormat 8.8.0 (2020-03-18) 1. Add Transparency to visual DOM - * [Pull request 671](https://bitbucket.org/osrf/sdformat/pull-requests/671) + * [BitBucket pull request 671](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/671) 1. Install the Windows `.dll` shared libraries to bin folder. - * [Pull request 659](https://bitbucket.org/osrf/sdformat/pull-requests/659) - * [Pull request 663](https://bitbucket.org/osrf/sdformat/pull-requests/663) + * [BitBucket pull request 659](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/659) + * [BitBucket pull request 663](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/663) 1. Fix cmake type for `tinyxml_INCLUDE_DIRS`. - * [Pull request 661](https://bitbucket.org/osrf/sdformat/pull-requests/661) - * [Pull request 663](https://bitbucket.org/osrf/sdformat/pull-requests/663) + * [BitBucket pull request 661](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/661) + * [BitBucket pull request 663](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/663) 1. Add functionality to generate aggregated SDFormat descriptions via CMake. - * [Pull request 665](https://bitbucket.org/osrf/sdformat/pull-requests/665) + * [BitBucket pull request 665](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/665) 1. Remove URI scheme, if present, when finding files. - * [Pull request 650](https://bitbucket.org/osrf/sdformat/pull-requests/650) - * [Pull request 652](https://bitbucket.org/osrf/sdformat/pull-requests/652) + * [BitBucket pull request 650](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/650) + * [BitBucket pull request 652](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/652) 1. Rename SDF to SDFormat / libsdformat on documentation - * [Pull request 666](https://bitbucket.org/osrf/sdformat/pull-requests/666) + * [BitBucket pull request 666](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/666) ### SDFormat 8.7.1 (2020-01-13) 1. Fix memory leaks in move assignment operator. - * [Pull request 641](https://bitbucket.org/osrf/sdformat/pull-requests/641) + * [BitBucket pull request 641](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/641) 1. Refactoring based on rule-of-five guidance to address memory leaks - * [Pull request 644](https://bitbucket.org/osrf/sdformat/pull-requests/644) + * [BitBucket pull request 644](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/644) ### SDFormat 8.7.0 (2019-12-13) 1. Remove some URDF error messages - * [Pull request 605](https://bitbucket.org/osrf/sdformat/pull-requests/605) + * [BitBucket pull request 605](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/605) 1. Fix parsing URDF without inside - * [Pull request 608](https://bitbucket.org/osrf/sdformat/pull-requests/608) + * [BitBucket pull request 608](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/608) 1. Backport URDF multiplication and linter - * [Pull request 632](https://bitbucket.org/osrf/sdformat/pull-requests/632) + * [BitBucket pull request 632](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/632) 1. Add clipping for depth camera on rgbd camera sensor - * [Pull request 628](https://bitbucket.org/osrf/sdformat/pull-requests/628) + * [BitBucket pull request 628](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/628) ### SDFormat 8.6.1 (2019-12-05) 1. Unversioned lib name for cmds - * [Pull request 612](https://bitbucket.org/osrf/sdformat/pull-requests/612) + * [BitBucket pull request 612](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/612) ### SDFormat 8.6.0 (2019-11-20) 1. configure.bat: use ign-math6, not gz11 - * [Pull request 595](https://bitbucket.org/osrf/sdformat/pull-requests/595) + * [BitBucket pull request 595](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/595) 1. Set `sdformat8_PKGCONFIG_*` variables in cmake config instead of `SDFormat_PKGCONFIG*`. - * [Pull request 594](https://bitbucket.org/osrf/sdformat/pull-requests/594) + * [BitBucket pull request 594](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/594) 1. Relax cmake check to allow compiling with gcc-7. - * [Pull request 592](https://bitbucket.org/osrf/sdformat/pull-requests/592) + * [BitBucket pull request 592](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/592) 1. Use custom callbacks when reading file (support Fuel URIs). - * [Pull request 591](https://bitbucket.org/osrf/sdformat/pull-requests/591) + * [BitBucket pull request 591](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/591) 1. Update visual DOM to parse `cast_shadows` property of a visual. - * [Pull request 590](https://bitbucket.org/osrf/sdformat/pull-requests/590) + * [BitBucket pull request 590](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/590) 1. Build `Utils_TEST` with Utils.cc explicitly passed since its symbols are not visible. - * [Pull request 572](https://bitbucket.org/osrf/sdformat/pull-requests/572) + * [BitBucket pull request 572](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/572) ### SDFormat 8.5.0 (2019-11-06) 1. Add `thermal_camera` sensor type - * [Pull request 586](https://bitbucket.org/osrf/sdformat/pull-requests/586) + * [BitBucket pull request 586](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/586) 1. Use inline namespaces in Utils.cc - * [Pull request 574](https://bitbucket.org/osrf/sdformat/pull-requests/574) + * [BitBucket pull request 574](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/574) 1. Convert `ign sdf` file inputs to absolute paths before processing them - * [Pull request 583](https://bitbucket.org/osrf/sdformat/pull-requests/583) + * [BitBucket pull request 583](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/583) 1. Add `emissive_map` to material sdf - * [Pull request 585](https://bitbucket.org/osrf/sdformat/pull-requests/585) + * [BitBucket pull request 585](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/585) 1. Converter: fix bug when converting across multiple versions. - * [Pull request 584](https://bitbucket.org/osrf/sdformat/pull-requests/584) - * [Pull request 573](https://bitbucket.org/osrf/sdformat/pull-requests/573) + * [BitBucket pull request 584](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/584) + * [BitBucket pull request 573](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/573) ### SDFormat 8.4.0 (2019-10-22) 1. Accept relative path in ``. - * [Pull request 558](https://bitbucket.org/osrf/sdformat/pull-requests/558) + * [BitBucket pull request 558](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/558) 1. Element: don't print unset attributes. - * [Pull request 571](https://bitbucket.org/osrf/sdformat/pull-requests/571) - * [Pull request 576](https://bitbucket.org/osrf/sdformat/pull-requests/576) + * [BitBucket pull request 571](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/571) + * [BitBucket pull request 576](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/576) 1. Lidar.hh: remove 'using namespace ignition'. - * [Pull request 577](https://bitbucket.org/osrf/sdformat/pull-requests/577) + * [BitBucket pull request 577](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/577) 1. Parse urdf files to sdf 1.5 instead of 1.4 to avoid `use_parent_model_frame`. - * [Pull request 575](https://bitbucket.org/osrf/sdformat/pull-requests/575) + * [BitBucket pull request 575](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/575) 1. Set camera intrinsics axis skew (s) default value to 0 - * [Pull request 504](https://bitbucket.org/osrf/sdformat/pull-requests/504) + * [BitBucket pull request 504](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/504) 1. SDF Root DOM: add ActorCount, ActorByIndex, and ActorNameExists. - * [Pull request 566](https://bitbucket.org/osrf/sdformat/pull-requests/566) + * [BitBucket pull request 566](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/566) 1. Avoid hardcoding /machine:x64 flag on 64-bit on MSVC with CMake >= 3.5. - * [Pull request 565](https://bitbucket.org/osrf/sdformat/pull-requests/565) + * [BitBucket pull request 565](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/565) 1. Move private headers from include/sdf to src folder. - * [Pull request 553](https://bitbucket.org/osrf/sdformat/pull-requests/553) + * [BitBucket pull request 553](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/553) 1. Fix ign library path on macOS. - * [Pull request 542](https://bitbucket.org/osrf/sdformat/pull-requests/542) - * [Pull request 564](https://bitbucket.org/osrf/sdformat/pull-requests/564) + * [BitBucket pull request 542](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/542) + * [BitBucket pull request 564](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/564) 1. Use `ign sdf --check` to check sibling elements of the same type for non-unique names. - * [Pull request 554](https://bitbucket.org/osrf/sdformat/pull-requests/554) + * [BitBucket pull request 554](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/554) 1. Converter: remove all matching elements specified by `` tag. - * [Pull request 551](https://bitbucket.org/osrf/sdformat/pull-requests/551) + * [BitBucket pull request 551](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/551) ### SDFormat 8.3.0 (2019-08-17) 1. Added Actor DOM - * [Pull request 547](https://bitbucket.org/osrf/sdformat/pull-requests/547) + * [BitBucket pull request 547](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/547) 1. Print cmake build warnings and errors to std_err - * [Pull request 549](https://bitbucket.org/osrf/sdformat/pull-requests/549) + * [BitBucket pull request 549](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/549) ### SDFormat 8.2.0 (2019-06-18) 1. Added RGBD Camera Sensor type. - * [Pull request 540](https://bitbucket.org/osrf/sdformat/pull-requests/540) + * [BitBucket pull request 540](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/540) ### SDFormat 8.1.0 (2019-05-20) 1. Change installation path of SDF description files to allow side-by-side installation. - * [pull request 538](https://bitbucket.org/osrf/sdformat/pull-requests/538) + * [BitBucket pull request 538](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/538) 1. Added Lidar Sensor DOM. Also added `lidar` and `gpu_lidar` as sensor types. These two types are equivalent to `ray` and `gpu_ray`. - * [Pull request 536](https://bitbucket.org/osrf/sdformat/pull-requests/536) + * [BitBucket pull request 536](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/536) 1. SDF Sensor DOM: copy update rate in copy constructor. - * [Pull request 534](https://bitbucket.org/osrf/sdformat/pull-requests/534) + * [BitBucket pull request 534](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/534) 1. Added IMU Sensor DOM. - * [Pull request 532](https://bitbucket.org/osrf/sdformat/pull-requests/532) + * [BitBucket pull request 532](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/532) 1. Added Camera Sensor DOM. - * [Pull request 531](https://bitbucket.org/osrf/sdformat/pull-requests/531) + * [BitBucket pull request 531](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/531) 1. Added wind to link dom. - * [Pull request 530](https://bitbucket.org/osrf/sdformat/pull-requests/530) + * [BitBucket pull request 530](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/530) 1. Added Sensor DOM `==` operator. - * [Pull request 529](https://bitbucket.org/osrf/sdformat/pull-requests/529) + * [BitBucket pull request 529](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/529) 1. Added AirPressure SDF DOM - * [Pull request 528](https://bitbucket.org/osrf/sdformat/pull-requests/528) + * [BitBucket pull request 528](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/528) 1. Update sdf noise elements - * [Pull request 525](https://bitbucket.org/osrf/sdformat/pull-requests/525) - * [Pull request 522](https://bitbucket.org/osrf/sdformat/pull-requests/522) + * [BitBucket pull request 525](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/525) + * [BitBucket pull request 522](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/522) 1. Apply rule of five for various DOM classes - * [Pull request 524](https://bitbucket.org/osrf/sdformat/pull-requests/524) + * [BitBucket pull request 524](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/524) 1. Support setting sensor types from a string. - * [Pull request 523](https://bitbucket.org/osrf/sdformat/pull-requests/523) + * [BitBucket pull request 523](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/523) 1. Added Altimeter SDF DOM - * [Pull request 527](https://bitbucket.org/osrf/sdformat/pull-requests/527) + * [BitBucket pull request 527](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/527) 1. Added Magnetometer SDF DOM - * [Pull request 518](https://bitbucket.org/osrf/sdformat/pull-requests/518) - * [Pull request 519](https://bitbucket.org/osrf/sdformat/pull-requests/519) + * [BitBucket pull request 518](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/518) + * [BitBucket pull request 519](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/519) 1. Add Scene SDF DOM - * [Pull request 517](https://bitbucket.org/osrf/sdformat/pull-requests/517) + * [BitBucket pull request 517](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/517) 1. Add PBR material SDF element - * [Pull request 512](https://bitbucket.org/osrf/sdformat/pull-requests/512) - * [Pull request 520](https://bitbucket.org/osrf/sdformat/pull-requests/520) - * [Pull request 535](https://bitbucket.org/osrf/sdformat/pull-requests/535) + * [BitBucket pull request 512](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/512) + * [BitBucket pull request 520](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/520) + * [BitBucket pull request 535](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/535) 1. Set geometry shapes - * [Pull request 515](https://bitbucket.org/osrf/sdformat/pull-requests/515) + * [BitBucket pull request 515](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/515) 1. Clarify names of libsdformat parser and SDF specification in Readme. - * [Pull request 514](https://bitbucket.org/osrf/sdformat/pull-requests/514) + * [BitBucket pull request 514](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/514) 1. Disable macOS tests failing due to issue 202. - * [Pull request 511](https://bitbucket.org/osrf/sdformat/pull-requests/511) - * [Issue 202](https://bitbucket.org/osrf/sdformat/issues/202) + * [BitBucket pull request 511](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/511) + * [Issue 202](https://github.com/osrf/sdformat/issues/202) ### SDFormat 8.0.0 (2019-03-01) 1. Rename depth camera from 'depth' to 'depth_camera' - * [Pull request 507](https://bitbucket.org/osrf/sdformat/pull-requests/507) + * [BitBucket pull request 507](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/507) 1. Rename enum Ray to Lidar - * [Pull request 502](https://bitbucket.org/osrf/sdformat/pull-requests/502) + * [BitBucket pull request 502](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/502) 1. Add support for files that have light tags in the root - * [Pull request 499](https://bitbucket.org/osrf/sdformat/pull-requests/499) + * [BitBucket pull request 499](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/499) 1. Fix locale problems of std::stringstream and of Param::ValueFromString - * [Pull request 492](https://bitbucket.org/osrf/sdformat/pull-requests/492) + * [BitBucket pull request 492](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/492) * Contribution by Silvio Traversaro 1. Add functions to set visual dom's geometry and material - * [Pull request 490](https://bitbucket.org/osrf/sdformat/pull-requests/490) + * [BitBucket pull request 490](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/490) 1. Change cmake project name to sdformat8, export cmake targets - * [Pull request 475](https://bitbucket.org/osrf/sdformat/pull-requests/475) - * [Pull request 476](https://bitbucket.org/osrf/sdformat/pull-requests/476) + * [BitBucket pull request 475](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/475) + * [BitBucket pull request 476](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/476) 1. SDF DOM: Add copy constructor and assignment operator to Light. Add lights to Link - * [Pull request 469](https://bitbucket.org/osrf/sdformat/pull-requests/469) + * [BitBucket pull request 469](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/469) 1. Make `` a required element for `` - * [Pull request #472](https://bitbucket.org/osrf/sdformat/pull-requests/472) + * [BitBucket pull request #472](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/472) 1. SDF DOM: Add DOM methods for setting axis and thread pitch in `sdf::Joint` - * [Pull request #471](https://bitbucket.org/osrf/sdformat/pull-requests/471) - * [Pull request #474](https://bitbucket.org/osrf/sdformat/pull-requests/474) + * [BitBucket pull request #471](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/471) + * [BitBucket pull request #474](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/474) 1. SDF DOM: Add copy constructors and assignment operator to JointAxis - * [Pull request #470](https://bitbucket.org/osrf/sdformat/pull-requests/470) + * [BitBucket pull request #470](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/470) 1. Removed boost - * [Pull request #438](https://bitbucket.org/osrf/sdformat/pull-requests/438) + * [BitBucket pull request #438](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/438) 1. Versioned namespace - * [Pull request 464](https://bitbucket.org/osrf/sdformat/pull-requests/464) + * [BitBucket pull request 464](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/464) 1. Versioned library install - * [Pull request 463](https://bitbucket.org/osrf/sdformat/pull-requests/463) + * [BitBucket pull request 463](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/463) 1. Add SetGeom to Collision - * [Pull request 465](https://bitbucket.org/osrf/sdformat/pull-requests/465) + * [BitBucket pull request 465](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/465) 1. SDF DOM: Add copy/move constructors and assignment operator to Geometry - * [Pull request 460](https://bitbucket.org/osrf/sdformat/pull-requests/460) + * [BitBucket pull request 460](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/460) 1. SDF DOM: Add copy/move constructors and assignment operator to Material - * [Pull request 461](https://bitbucket.org/osrf/sdformat/pull-requests/461) + * [BitBucket pull request 461](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/461) 1. Add collision_detector to dart physics config - * [Pull request 440](https://bitbucket.org/osrf/sdformat/pull-requests/440) + * [BitBucket pull request 440](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/440) 1. Fix cpack now that project name has version number - * [Pull request 478](https://bitbucket.org/osrf/sdformat/pull-requests/478) + * [BitBucket pull request 478](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/478) 1. Animation tension - * [Pull request 466](https://bitbucket.org/osrf/sdformat/pull-requests/466) + * [BitBucket pull request 466](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/466) 1. Add "geometry" for sonar collision shape - * [Pull request 479](https://bitbucket.org/osrf/sdformat/pull-requests/479) + * [BitBucket pull request 479](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/479) 1. Fix Gui copy constructor - * [Pull request 486](https://bitbucket.org/osrf/sdformat/pull-requests/486) + * [BitBucket pull request 486](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/486) 1. Sensor DOM - * [Pull request 488](https://bitbucket.org/osrf/sdformat/pull-requests/488) - * [Pull request 481](https://bitbucket.org/osrf/sdformat/pull-requests/481) + * [BitBucket pull request 488](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/488) + * [BitBucket pull request 481](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/481) ## SDFormat 7.0 ### SDFormat 7.0.0 (xxxx-xx-xx) 1. Build Utils_TEST with Utils.cc explicitly passed since its symbols are not visible. - * [Pull request 572](https://bitbucket.org/osrf/sdformat/pull-requests/572) + * [BitBucket pull request 572](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/572) 1. Parse urdf files to sdf 1.5 instead of 1.4 to avoid `use_parent_model_frame`. - * [Pull request 575](https://bitbucket.org/osrf/sdformat/pull-requests/575) + * [BitBucket pull request 575](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/575) 1. Set camera intrinsics axis skew (s) default value to 0 - * [Pull request 504](https://bitbucket.org/osrf/sdformat/pull-requests/504) + * [BitBucket pull request 504](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/504) 1. Avoid hardcoding /machine:x64 flag on 64-bit on MSVC with CMake >= 3.5. - * [Pull request 565](https://bitbucket.org/osrf/sdformat/pull-requests/565) + * [BitBucket pull request 565](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/565) 1. Prevent duplicate `use_parent_model_frame` tags during file conversion. - * [Pull request 573](https://bitbucket.org/osrf/sdformat/pull-requests/573) + * [BitBucket pull request 573](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/573) 1. Backport inline versioned namespace from version 8. - * [Pull request 557](https://bitbucket.org/osrf/sdformat/pull-requests/557) - * [pull request 464](https://bitbucket.org/osrf/sdformat/pull-requests/464) + * [BitBucket pull request 557](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/557) + * [BitBucket pull request 464](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/464) 1. Backport cmake and sdf spec changes from version 8. - * [Pull request 550](https://bitbucket.org/osrf/sdformat/pull-requests/550) - * [pull request 538](https://bitbucket.org/osrf/sdformat/pull-requests/538) - * [Pull request 525](https://bitbucket.org/osrf/sdformat/pull-requests/525) - * [Pull request 475](https://bitbucket.org/osrf/sdformat/pull-requests/475) - * [Pull request 476](https://bitbucket.org/osrf/sdformat/pull-requests/476) - * [Pull request 463](https://bitbucket.org/osrf/sdformat/pull-requests/463) + * [BitBucket pull request 550](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/550) + * [BitBucket pull request 538](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/538) + * [BitBucket pull request 525](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/525) + * [BitBucket pull request 475](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/475) + * [BitBucket pull request 476](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/476) + * [BitBucket pull request 463](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/463) 1. Fix ign library path on macOS. - * [Pull request 542](https://bitbucket.org/osrf/sdformat/pull-requests/542) + * [BitBucket pull request 542](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/542) 1. Preserve XML elements that are not part of the SDF specification. - * [Pull request 449](https://bitbucket.org/osrf/sdformat/pull-requests/449) + * [BitBucket pull request 449](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/449) 1. Embed SDF specification files directly in libsdformat.so. - * [Pull request 434](https://bitbucket.org/osrf/sdformat/pull-requests/434) + * [BitBucket pull request 434](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/434) 1. Removed support for SDF spec versions 1.0 and 1.2 - * [Pull request #432](https://bitbucket.org/osrf/sdformat/pull-requests/432) + * [BitBucket pull request #432](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/432) 1. SDF DOM: Additions to the document object model. - * [Pull request 433](https://bitbucket.org/osrf/sdformat/pull-requests/433) - * [Pull request 441](https://bitbucket.org/osrf/sdformat/pull-requests/441) - * [Pull request 442](https://bitbucket.org/osrf/sdformat/pull-requests/442) - * [Pull request 445](https://bitbucket.org/osrf/sdformat/pull-requests/445) - * [Pull request 451](https://bitbucket.org/osrf/sdformat/pull-requests/451) - * [Pull request 455](https://bitbucket.org/osrf/sdformat/pull-requests/455) - * [Pull request 481](https://bitbucket.org/osrf/sdformat/pull-requests/481) + * [BitBucket pull request 433](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/433) + * [BitBucket pull request 441](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/441) + * [BitBucket pull request 442](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/442) + * [BitBucket pull request 445](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/445) + * [BitBucket pull request 451](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/451) + * [BitBucket pull request 455](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/455) + * [BitBucket pull request 481](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/481) 1. SDF DOM: Add Element() accessor to Gui, JointAxis and World classes. - * [Pull request 450](https://bitbucket.org/osrf/sdformat/pull-requests/450) + * [BitBucket pull request 450](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/450) 1. Adds the equalivent of gz sdf -d to sdformat. The command line option will print the full description of the SDF spec. - * [Pull request 424](https://bitbucket.org/osrf/sdformat/pull-requests/424) + * [BitBucket pull request 424](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/424) 1. Adds the equalivent of gz sdf -p to sdformat. The command line option will convert and print the specified sdf file. - * [Pull request 494](https://bitbucket.org/osrf/sdformat/pull-requests/494) + * [BitBucket pull request 494](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/494) 1. SDF DOM: Additions to the document object model. - * [Pull request 393](https://bitbucket.org/osrf/sdformat/pull-requests/393) - * [Pull request 394](https://bitbucket.org/osrf/sdformat/pull-requests/394) - * [Pull request 395](https://bitbucket.org/osrf/sdformat/pull-requests/395) - * [Pull request 396](https://bitbucket.org/osrf/sdformat/pull-requests/396) - * [Pull request 397](https://bitbucket.org/osrf/sdformat/pull-requests/397) - * [Pull request 406](https://bitbucket.org/osrf/sdformat/pull-requests/406) - * [Pull request 407](https://bitbucket.org/osrf/sdformat/pull-requests/407) - * [Pull request 410](https://bitbucket.org/osrf/sdformat/pull-requests/410) - * [Pull request 415](https://bitbucket.org/osrf/sdformat/pull-requests/415) - * [Pull request 420](https://bitbucket.org/osrf/sdformat/pull-requests/420) + * [BitBucket pull request 393](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/393) + * [BitBucket pull request 394](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/394) + * [BitBucket pull request 395](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/395) + * [BitBucket pull request 396](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/396) + * [BitBucket pull request 397](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/397) + * [BitBucket pull request 406](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/406) + * [BitBucket pull request 407](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/407) + * [BitBucket pull request 410](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/410) + * [BitBucket pull request 415](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/415) + * [BitBucket pull request 420](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/420) ## SDFormat 6.0 @@ -553,85 +553,85 @@ ### SDFormat 6.X.X (20XX-XX-XX) 1. Parse urdf files to sdf 1.5 instead of 1.4 to avoid `use_parent_model_frame`. - * [Pull request 575](https://bitbucket.org/osrf/sdformat/pull-requests/575) + * [BitBucket pull request 575](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/575) 1. Set camera intrinsics axis skew (s) default value to 0 - * [Pull request 504](https://bitbucket.org/osrf/sdformat/pull-requests/504) + * [BitBucket pull request 504](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/504) 1. Avoid hardcoding /machine:x64 flag on 64-bit on MSVC with CMake >= 3.5. - * [Pull request 565](https://bitbucket.org/osrf/sdformat/pull-requests/565) + * [BitBucket pull request 565](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/565) 1. Fix ign library path on macOS. - * [Pull request 552](https://bitbucket.org/osrf/sdformat/pull-requests/552) + * [BitBucket pull request 552](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/552) 1. Use `ign sdf --check` to check sibling elements of the same type for non-unique names. - * [Pull request 554](https://bitbucket.org/osrf/sdformat/pull-requests/554) + * [BitBucket pull request 554](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/554) 1. Converter: remove all matching elements specified by `` tag. - * [Pull request 551](https://bitbucket.org/osrf/sdformat/pull-requests/551) + * [BitBucket pull request 551](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/551) ### SDFormat 6.2.0 (2019-01-17) 1. Add geometry for sonar collision shape - * [Pull request 495](https://bitbucket.org/osrf/sdformat/pull-requests/495) + * [BitBucket pull request 495](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/495) 1. Add camera intrinsics (fx, fy, cx, cy, s) - * [Pull request 496](https://bitbucket.org/osrf/sdformat/pull-requests/496) + * [BitBucket pull request 496](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/496) 1. Add actor trajectory tension parameter - * [Pull request 466](https://bitbucket.org/osrf/sdformat/pull-requests/466) + * [BitBucket pull request 466](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/466) ### SDFormat 6.1.0 (2018-10-04) 1. Add collision\_detector to dart physics config - * [Pull request 440](https://bitbucket.org/osrf/sdformat/pull-requests/440) + * [BitBucket pull request 440](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/440) 1. Fix Windows support for SDFormat6 - * [Pull request 401](https://bitbucket.org/osrf/sdformat/pull-requests/401) + * [BitBucket pull request 401](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/401) 1. root.sdf: default sdf version 1.6 - * [Pull request 425](https://bitbucket.org/osrf/sdformat/pull-requests/425) + * [BitBucket pull request 425](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/425) 1. parser\_urdf: print value of highstop instead of pointer address - * [Pull request 408](https://bitbucket.org/osrf/sdformat/pull-requests/408) + * [BitBucket pull request 408](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/408) 1. Tweak error output so jenkins doesn't think it's a compiler warning - * [Pull request 402](https://bitbucket.org/osrf/sdformat/pull-requests/402) + * [BitBucket pull request 402](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/402) ### SDFormat 6.0.0 (2018-01-25) 1. SDF DOM: Added a document object model. - * [Pull request 387](https://bitbucket.org/osrf/sdformat/pull-requests/387) - * [Pull request 389](https://bitbucket.org/osrf/sdformat/pull-requests/389) + * [BitBucket pull request 387](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/387) + * [BitBucket pull request 389](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/389) 1. Add simplified ``readFile`` function. - * [Pull request 347](https://bitbucket.org/osrf/sdformat/pull-requests/347) + * [BitBucket pull request 347](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/347) 1. Remove boost::lexical cast instances - * [Pull request 342](https://bitbucket.org/osrf/sdformat/pull-requests/342) + * [BitBucket pull request 342](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/342) 1. Remove boost regex and iostreams as dependencies - * [Pull request 302](https://bitbucket.org/osrf/sdformat/pull-requests/302) + * [BitBucket pull request 302](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/302) 1. Change certain error checks from asserts to throwing sdf::AssertionInternalError, which is more appropriate for a library. - * [Pull request 315](https://bitbucket.org/osrf/sdformat/pull-requests/315) + * [BitBucket pull request 315](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/315) 1. Updated the internal copy of urdfdom to 1.0, removing more of boost. - * [Pull request 324](https://bitbucket.org/osrf/sdformat/pull-requests/324) + * [BitBucket pull request 324](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/324) 1. urdfdom 1.0 is now required on all platforms. - * [Pull request 324](https://bitbucket.org/osrf/sdformat/pull-requests/324) + * [BitBucket pull request 324](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/324) 1. Remove boost filesystem as a dependency - * [Pull request 335](https://bitbucket.org/osrf/sdformat/pull-requests/335) - * [Pull request 338](https://bitbucket.org/osrf/sdformat/pull-requests/338) - * [Pull request 339](https://bitbucket.org/osrf/sdformat/pull-requests/339) + * [BitBucket pull request 335](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/335) + * [BitBucket pull request 338](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/338) + * [BitBucket pull request 339](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/339) 1. Deprecated sdf::Color, and switch to use ignition::math::Color - * [Pull request 330](https://bitbucket.org/osrf/sdformat/pull-requests/330) + * [BitBucket pull request 330](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/330) ## SDFormat 5.x @@ -640,83 +640,83 @@ ### SDFormat 5.3.0 (2017-11-13) 1. Added wrapper around root SDF for an SDF element - * [Pull request 378](https://bitbucket.org/osrf/sdformat/pull-request/378) - * [Pull request 372](https://bitbucket.org/osrf/sdformat/pull-request/372) + * [BitBucket pull request 378](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/378) + * [BitBucket pull request 372](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/372) 1. Add ODE parallelization parameters: threaded islands and position correction - * [Pull request 380](https://bitbucket.org/osrf/sdformat/pull-request/380) + * [BitBucket pull request 380](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/380) 1. surface.sdf: expand documentation of friction and slip coefficients - * [Pull request 343](https://bitbucket.org/osrf/sdformat/pull-request/343) + * [BitBucket pull request 343](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/343) 1. Add preserveFixedJoint option to the URDF parser - * [Pull request 352](https://bitbucket.org/osrf/sdformat/pull-request/352) + * [BitBucket pull request 352](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/352) 1. Add light as child of link - * [Pull request 373](https://bitbucket.org/osrf/sdformat/pull-request/373) + * [BitBucket pull request 373](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/373) ### SDFormat 5.2.0 (2017-08-03) 1. Added a block for DART-specific physics properties. - * [Pull request 369](https://bitbucket.org/osrf/sdformat/pull-requests/369) + * [BitBucket pull request 369](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/369) 1. Fix parser to read plugin child elements within an `` - * [Pull request 350](https://bitbucket.org/osrf/sdformat/pull-request/350) + * [BitBucket pull request 350](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/350) 1. Choosing models with more recent sdf version with `` tag - * [Pull request 291](https://bitbucket.org/osrf/sdformat/pull-request/291) - * [Issue 123](https://bitbucket.org/osrf/sdformat/issues/123) + * [BitBucket pull request 291](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/291) + * [Issue 123](https://github.com/osrf/sdformat/issues/123) 1. Added `` to 1.6 surface contact parameters - * [Pull request 318](https://bitbucket.org/osrf/sdformat/pull-request/318) + * [BitBucket pull request 318](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/318) 1. Support light insertion in state - * [Pull request 325](https://bitbucket.org/osrf/sdformat/pull-request/325) + * [BitBucket pull request 325](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/325) 1. Case insensitive boolean strings - * [Pull request 322](https://bitbucket.org/osrf/sdformat/pull-request/322) + * [BitBucket pull request 322](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/322) 1. Enable coverage testing - * [Pull request 317](https://bitbucket.org/osrf/sdformat/pull-request/317) + * [BitBucket pull request 317](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/317) 1. Add `friction_model` parameter to ode solver - * [Pull request 294](https://bitbucket.org/osrf/sdformat/pull-request/294) - * [Gazebo pull request 1522](https://bitbucket.org/osrf/gazebo/pull-request/1522) + * [BitBucket pull request 294](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/294) + * [Gazebo pull request 1522](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1522) 1. Add cmake `@PKG_NAME@_LIBRARY_DIRS` variable to cmake config file - * [Pull request 292](https://bitbucket.org/osrf/sdformat/pull-request/292) + * [BitBucket pull request 292](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-request/292) ### SDFormat 5.1.0 (2017-02-22) 1. Fixed `sdf::convertFile` and `sdf::convertString` always converting to latest version - * [Pull request 320](https://bitbucket.org/osrf/sdformat/pull-requests/320) + * [BitBucket pull request 320](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/320) 1. Added back the ability to set sdf version at runtime - * [Pull request 307](https://bitbucket.org/osrf/sdformat/pull-requests/307) + * [BitBucket pull request 307](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/307) ### SDFormat 5.0.0 (2017-01-25) 1. Removed SDFormat 4 deprecations - * [Pull request 295](https://bitbucket.org/osrf/sdformat/pull-requests/295) + * [BitBucket pull request 295](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/295) 1. Added an example - * [Pull request 275](https://bitbucket.org/osrf/sdformat/pull-requests/275) + * [BitBucket pull request 275](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/275) 1. Move functions that use TinyXML classes in private headers A contribution from Silvio Traversaro - * [Pull request 262](https://bitbucket.org/osrf/sdformat/pull-requests/262) + * [BitBucket pull request 262](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/262) 1. Fix issues found by the Coverity tool A contribution from Olivier Crave - * [Pull request 259](https://bitbucket.org/osrf/sdformat/pull-requests/259) + * [BitBucket pull request 259](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/259) 1. Add tag to allow for specification of initial joint position - * [Pull request 279](https://bitbucket.org/osrf/sdformat/pull-requests/279) + * [BitBucket pull request 279](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/279) 1. Require ignition-math3 as dependency - * [Pull request 299](https://bitbucket.org/osrf/sdformat/pull-requests/299) + * [BitBucket pull request 299](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/299) 1. Simplifier way of retrieving a value from SDF using Get - * [Pull request 285](https://bitbucket.org/osrf/sdformat/pull-requests/285) + * [BitBucket pull request 285](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/285) ## SDFormat 4.0 @@ -725,337 +725,337 @@ ### SDFormat 4.4.0 (2017-10-26) 1. Add ODE parallelization parameters: threaded islands and position correction - * [Pull request 380](https://bitbucket.org/osrf/sdformat/pull-request/380) + * [BitBucket pull request 380](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/380) 1. surface.sdf: expand documentation of friction and slip coefficients - * [Pull request 343](https://bitbucket.org/osrf/sdformat/pull-request/343) + * [BitBucket pull request 343](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/343) 1. Add preserveFixedJoint option to the URDF parser - * [Pull request 352](https://bitbucket.org/osrf/sdformat/pull-request/352) + * [BitBucket pull request 352](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/352) 1. Add light as child of link - * [Pull request 373](https://bitbucket.org/osrf/sdformat/pull-request/373) + * [BitBucket pull request 373](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/373) ### SDFormat 4.3.2 (2017-07-19) 1. Add documentation for `Element::GetFirstElement()` and `Element::GetNextElement()` - * [Pull request 341](https://bitbucket.org/osrf/sdformat/pull-request/341) + * [BitBucket pull request 341](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/341) 1. Fix parser to read plugin child elements within an `` - * [Pull request 350](https://bitbucket.org/osrf/sdformat/pull-request/350) + * [BitBucket pull request 350](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/350) ### SDFormat 4.3.1 (2017-03-24) 1. Fix segmentation Fault in `sdf::getBestSupportedModelVersion` - * [Pull request 327](https://bitbucket.org/osrf/sdformat/pull-requests/327) - * [Issue 152](https://bitbucket.org/osrf/sdformat/issues/152) + * [BitBucket pull request 327](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/327) + * [Issue 152](https://github.com/osrf/sdformat/issues/152) ### SDFormat 4.3.0 (2017-03-20) 1. Choosing models with more recent sdf version with `` tag - * [Pull request 291](https://bitbucket.org/osrf/sdformat/pull-request/291) - * [Issue 123](https://bitbucket.org/osrf/sdformat/issues/123) + * [BitBucket pull request 291](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/291) + * [Issue 123](https://github.com/osrf/sdformat/issues/123) 1. Added `` to 1.6 surface contact parameters - * [Pull request 318](https://bitbucket.org/osrf/sdformat/pull-request/318) + * [BitBucket pull request 318](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/318) 1. Support light insertion in state - * [Pull request 325](https://bitbucket.org/osrf/sdformat/pull-request/325) + * [BitBucket pull request 325](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/325) 1. Case insensitive boolean strings - * [Pull request 322](https://bitbucket.org/osrf/sdformat/pull-request/322) + * [BitBucket pull request 322](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/322) 1. Enable coverage testing - * [Pull request 317](https://bitbucket.org/osrf/sdformat/pull-request/317) + * [BitBucket pull request 317](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/317) 1. Add `friction_model` parameter to ode solver - * [Pull request 294](https://bitbucket.org/osrf/sdformat/pull-request/294) - * [Gazebo pull request 1522](https://bitbucket.org/osrf/gazebo/pull-request/1522) + * [BitBucket pull request 294](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/294) + * [Gazebo pull request 1522](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-requests/1522) 1. Added `sampling` parameter to `` SDF element. - * [Pull request 293](https://bitbucket.org/osrf/sdformat/pull-request/293) + * [BitBucket pull request 293](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/293) 1. Added Migration guide - * [Pull request 290](https://bitbucket.org/osrf/sdformat/pull-request/290) + * [BitBucket pull request 290](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/290) 1. Add cmake `@PKG_NAME@_LIBRARY_DIRS` variable to cmake config file - * [Pull request 292](https://bitbucket.org/osrf/sdformat/pull-request/292) + * [BitBucket pull request 292](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/292) ### SDFormat 4.2.0 (2016-10-10) 1. Added tag to specify ODE friction model. - * [Pull request 294](https://bitbucket.org/osrf/sdformat/pull-request/294) + * [BitBucket pull request 294](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/294) 1. Fix URDF to SDF `self_collide` bug. - * [Pull request 287](https://bitbucket.org/osrf/sdformat/pull-request/287) + * [BitBucket pull request 287](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/287) 1. Added IMU orientation specification to SDF. - * [Pull request 284](https://bitbucket.org/osrf/sdformat/pull-request/284) + * [BitBucket pull request 284](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/284) ### SDFormat 4.1.1 (2016-07-08) 1. Added documentation and animation to `` element. - * [Pull request 280](https://bitbucket.org/osrf/sdformat/pull-request/280) + * [BitBucket pull request 280](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/280) 1. Added tag to specify initial joint position - * [Pull request 279](https://bitbucket.org/osrf/sdformat/pull-request/279) + * [BitBucket pull request 279](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/279) ### SDFormat 4.1.0 (2016-04-01) 1. Added SDF conversion functions to parser including sdf::convertFile and sdf::convertString. - * [Pull request 266](https://bitbucket.org/osrf/sdformat/pull-request/266) + * [BitBucket pull request 266](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/266) 1. Added an upload script - * [Pull request 256](https://bitbucket.org/osrf/sdformat/pull-request/256) + * [BitBucket pull request 256](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/256) ### SDFormat 4.0.0 (2015-01-12) 1. Boost pointers and boost::function in the public API have been replaced by their std::equivalents (C++11 standard) 1. Move gravity and magnetic_field tags from physics to world - * [Pull request 247](https://bitbucket.org/osrf/sdformat/pull-request/247) + * [BitBucket pull request 247](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/247) 1. Switch lump link prefix from lump:: to lump_ - * [Pull request 245](https://bitbucket.org/osrf/sdformat/pull-request/245) + * [BitBucket pull request 245](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/245) 1. New element. A contribution from Olivier Crave - * [Pull request 240](https://bitbucket.org/osrf/sdformat/pull-request/240) + * [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. Add scale to model state - * [Pull request 246](https://bitbucket.org/osrf/sdformat/pull-request/246) + * [BitBucket pull request 246](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/246) 1. Use stof functions to parse hex strings as floating point params. A contribution from Rich Mattes - * [Pull request 250](https://bitbucket.org/osrf/sdformat/pull-request/250) + * [BitBucket pull request 250](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/250) 1. Fix memory leaks. A contribution from Silvio Traversaro - * [Pull request 249](https://bitbucket.org/osrf/sdformat/pull-request/249) + * [BitBucket pull request 249](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/249) 1. Update SDF to version 1.6: new style for representing the noise properties of an `imu` - * [Pull request 243](https://bitbucket.org/osrf/sdformat/pull-request/243) - * [Pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) + * [BitBucket pull request 243](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/243) + * [BitBucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) ## SDFormat 3.0 ### SDFormat 3.X.X (201X-XX-XX) 1. Improve precision of floating point parameters - * [Pull request 273](https://bitbucket.org/osrf/sdformat/pull-requests/273) - * [Pull request 276](https://bitbucket.org/osrf/sdformat/pull-requests/276) + * [BitBucket pull request 273](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/273) + * [BitBucket pull request 276](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/276) ### SDFormat 3.7.0 (2015-11-20) 1. Add spring pass through for sdf3 - * [Design document](https://bitbucket.org/osrf/gazebo_design/pull-requests/23) - * [Pull request 242](https://bitbucket.org/osrf/sdformat/pull-request/242) + * [Design document](https://github.com/osrf/gazebo_design/pull-requests/23) + * [BitBucket pull request 242](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/242) 1. Support frame specification in SDF - * [Pull request 237](https://bitbucket.org/osrf/sdformat/pull-request/237) + * [BitBucket pull request 237](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/237) 1. Remove boost from SDFExtension - * [Pull request 229](https://bitbucket.org/osrf/sdformat/pull-request/229) + * [BitBucket pull request 229](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/229) ### SDFormat 3.6.0 (2015-10-27) 1. Add light state - * [Pull request 227](https://bitbucket.org/osrf/sdformat/pull-request/227) + * [BitBucket pull request 227](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/227) 1. redo pull request #222 for sdf3 branch - * [Pull request 232](https://bitbucket.org/osrf/sdformat/pull-request/232) + * [BitBucket pull request 232](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/232) 1. Fix links in API documentation - * [Pull request 231](https://bitbucket.org/osrf/sdformat/pull-request/231) + * [BitBucket pull request 231](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/231) ### SDFormat 3.5.0 (2015-10-07) 1. Camera lens description (Replaces #213) - * [Pull request 215](https://bitbucket.org/osrf/sdformat/pull-request/215) + * [BitBucket pull request 215](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/215) 1. Fix shared pointer reference loop in Element and memory leak (#104) - * [Pull request 230](https://bitbucket.org/osrf/sdformat/pull-request/230) + * [BitBucket pull request 230](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/230) ### SDFormat 3.4.0 (2015-10-05) 1. Support nested model states - * [Pull request 223](https://bitbucket.org/osrf/sdformat/pull-request/223) + * [BitBucket pull request 223](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/223) 1. Cleaner way to set SDF_PATH for tests - * [Pull request 226](https://bitbucket.org/osrf/sdformat/pull-request/226) + * [BitBucket pull request 226](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/226) ### SDFormat 3.3.0 (2015-09-15) 1. Windows Boost linking errors - * [Pull request 206](https://bitbucket.org/osrf/sdformat/pull-request/206) + * [BitBucket pull request 206](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/206) 1. Nested SDF -> sdf3 - * [Pull request 221](https://bitbucket.org/osrf/sdformat/pull-request/221) + * [BitBucket pull request 221](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/221) 1. Pointer types - * [Pull request 218](https://bitbucket.org/osrf/sdformat/pull-request/218) + * [BitBucket pull request 218](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/218) 1. Torsional friction default surface radius not infinity - * [Pull request 217](https://bitbucket.org/osrf/sdformat/pull-request/217) + * [BitBucket pull request 217](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/217) ### SDFormat 3.2.2 (2015-08-24) 1. Added battery element (contribution from Olivier Crave) - * [Pull request #204](https://bitbucket.org/osrf/sdformat/pull-request/204) + * [BitBucket pull request #204](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/204) 1. Torsional friction backport - * [Pull request #211](https://bitbucket.org/osrf/sdformat/pull-request/211) + * [BitBucket pull request #211](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/211) 1. Allow Visual Studio 2015 - * [Pull request #208](https://bitbucket.org/osrf/sdformat/pull-request/208) + * [BitBucket pull request #208](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/208) ### SDFormat 3.1.1 (2015-08-03) 1. Fix tinyxml linking error - * [Pull request #209](https://bitbucket.org/osrf/sdformat/pull-request/209) + * [BitBucket pull request #209](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/209) ### SDFormat 3.1.0 (2015-08-02) 1. Added logical camera sensor to SDF - * [Pull request #207](https://bitbucket.org/osrf/sdformat/pull-request/207) + * [BitBucket pull request #207](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/207) ### SDFormat 3.0.0 (2015-07-24) 1. Added battery to SDF - * [Pull request 204](https://bitbucket.org/osrf/sdformat/pull-request/204) + * [BitBucket pull request 204](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/204) 1. Added altimeter sensor to SDF - * [Pull request #197](https://bitbucket.org/osrf/sdformat/pull-request/197) + * [BitBucket pull request #197](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/197) 1. Added magnetometer sensor to SDF - * [Pull request 198](https://bitbucket.org/osrf/sdformat/pull-request/198) + * [BitBucket pull request 198](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/198) 1. Fix detection of XML parsing errors - * [Pull request 190](https://bitbucket.org/osrf/sdformat/pull-request/190) + * [BitBucket pull request 190](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/190) 1. Support for fixed joints - * [Pull request 194](https://bitbucket.org/osrf/sdformat/pull-request/194) + * [BitBucket pull request 194](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/194) 1. Adding iterations to state - * [Pull request 188](https://bitbucket.org/osrf/sdformat/pull-request/188) + * [BitBucket pull request 188](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/188) 1. Convert to use ignition-math - * [Pull request 173](https://bitbucket.org/osrf/sdformat/pull-request/173) + * [BitBucket pull request 173](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/173) 1. Add world origin to scene - * [Pull request 183](https://bitbucket.org/osrf/sdformat/pull-request/183) + * [BitBucket pull request 183](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/183) 1. Fix collide bitmask - * [Pull request 182](https://bitbucket.org/osrf/sdformat/pull-request/182) + * [BitBucket pull request 182](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/182) 1. Adding meta information to visuals - * [Pull request 180](https://bitbucket.org/osrf/sdformat/pull-request/180) + * [BitBucket pull request 180](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/180) 1. Add projection type to gui camera - * [Pull request 178](https://bitbucket.org/osrf/sdformat/pull-request/178) + * [BitBucket pull request 178](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/178) 1. Fix print description to include attribute description - * [Pull request 170](https://bitbucket.org/osrf/sdformat/pull-request/170) + * [BitBucket pull request 170](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/170) 1. Add -std=c++11 flag to sdf_config.cmake.in and sdformat.pc.in, needed by downstream code - * [Pull request 172](https://bitbucket.org/osrf/sdformat/pull-request/172) + * [BitBucket pull request 172](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/172) 1. Added boost::any accessor for Param and Element - * [Pull request 166](https://bitbucket.org/osrf/sdformat/pull-request/166) + * [BitBucket pull request 166](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/166) 1. Remove tinyxml from dependency list - * [Pull request 152](https://bitbucket.org/osrf/sdformat/pull-request/152) + * [BitBucket pull request 152](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/152) 1. Added self_collide element for model - * [Pull request 149](https://bitbucket.org/osrf/sdformat/pull-request/149) + * [BitBucket pull request 149](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/149) 1. Added a collision bitmask field to sdf-1.5 and c++11 support - * [Pull request 145](https://bitbucket.org/osrf/sdformat/pull-request/145) + * [BitBucket pull request 145](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/145) 1. Fix problems with latin locales and decimal numbers (issue #60) - * [Pull request 147](https://bitbucket.org/osrf/sdformat/pull-request/147) - * [Issue 60](https://bitbucket.org/osrf/sdformat/issues/60) + * [BitBucket pull request 147](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/147) + * [Issue 60](https://github.com/osrf/sdformat/issues/60) ## SDFormat 2.x 1. rename cfm_damping --> implicit_spring_damper - * [Pull request 59](https://bitbucket.org/osrf/sdformat/pull-request/59) + * [BitBucket pull request 59](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/59) 1. add gear_ratio and reference_body for gearbox joint. - * [Pull request 62](https://bitbucket.org/osrf/sdformat/pull-request/62) + * [BitBucket pull request 62](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/62) 1. Update joint stop stiffness and dissipation - * [Pull request 61](https://bitbucket.org/osrf/sdformat/pull-request/61) + * [BitBucket pull request 61](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/61) 1. Support for GNUInstallDirs - * [Pull request 64](https://bitbucket.org/osrf/sdformat/pull-request/64) + * [BitBucket pull request 64](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/64) 1. `` element used by DEM heightmaps - * [Pull request 67](https://bitbucket.org/osrf/sdformat/pull-request/67) + * [BitBucket pull request 67](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/67) 1. Do not export urdf symbols in sdformat 1.4 - * [Pull request 75](https://bitbucket.org/osrf/sdformat/pull-request/75) + * [BitBucket pull request 75](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/75) 1. adding deformable properties per issue #32 - * [Pull request 78](https://bitbucket.org/osrf/sdformat/pull-request/78) - * [Issue 32](https://bitbucket.org/osrf/sdformat/issues/32) + * [BitBucket pull request 78](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/78) + * [Issue 32](https://github.com/osrf/sdformat/issues/32) 1. Support to use external URDF - * [Pull request 77](https://bitbucket.org/osrf/sdformat/pull-request/77) + * [BitBucket pull request 77](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/77) 1. Add lighting element to visual - * [Pull request 79](https://bitbucket.org/osrf/sdformat/pull-request/79) + * [BitBucket pull request 79](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/79) 1. SDF 1.5: add flag to fix joint axis frame #43 (gazebo issue 494) - * [Pull request 83](https://bitbucket.org/osrf/sdformat/pull-request/83) - * [Issue 43](https://bitbucket.org/osrf/sdformat/issues/43) - * [Gazebo issue 494](https://bitbucket.org/osrf/gazebo/issues/494) + * [BitBucket pull request 83](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/83) + * [Issue 43](https://github.com/osrf/sdformat/issues/43) + * [Gazebo issue 494](https://github.com/osrf/gazebo/issues/494) 1. Implement SDF_PROTOCOL_VERSION (issue #51) - * [Pull request 90](https://bitbucket.org/osrf/sdformat/pull-request/90) + * [BitBucket pull request 90](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/90) 1. Port sdformat to compile on Windows (MSVC) - * [Pull request 101](https://bitbucket.org/osrf/sdformat/pull-request/101) + * [BitBucket pull request 101](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/101) 1. Separate material properties in material.sdf - * [Pull request 104](https://bitbucket.org/osrf/sdformat/pull-request/104) + * [BitBucket pull request 104](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/104) 1. Add road textures (repeat pull request #104 for sdf_2.0) - * [Pull request 105](https://bitbucket.org/osrf/sdformat/pull-request/105) + * [BitBucket pull request 105](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/105) 1. Add Extruded Polylines as a model - * [Pull request 93](https://bitbucket.org/osrf/sdformat/pull-request/93) + * [BitBucket pull request 93](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/93) 1. Added polyline for sdf_2.0 - * [Pull request 106](https://bitbucket.org/osrf/sdformat/pull-request/106) + * [BitBucket pull request 106](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/106) 1. Add spring_reference and spring_stiffness tags to joint axis dynamics - * [Pull request 102](https://bitbucket.org/osrf/sdformat/pull-request/102) + * [BitBucket pull request 102](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/102) 1. Fix actor static - * [Pull request 110](https://bitbucket.org/osrf/sdformat/pull-request/110) + * [BitBucket pull request 110](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/110) 1. New element - * [Pull request 112](https://bitbucket.org/osrf/sdformat/pull-request/112) + * [BitBucket pull request 112](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/112) 1. Add camera distortion element - * [Pull request 120](https://bitbucket.org/osrf/sdformat/pull-request/120) + * [BitBucket pull request 120](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/120) 1. Inclusion of magnetic field strength sensor - * [Pull request 123](https://bitbucket.org/osrf/sdformat/pull-request/123) + * [BitBucket pull request 123](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/123) 1. Properly add URDF gazebo extensions blobs to SDF joint elements - * [Pull request 125](https://bitbucket.org/osrf/sdformat/pull-request/125) + * [BitBucket pull request 125](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/125) 1. Allow gui plugins to be specified in SDF - * [Pull request 127](https://bitbucket.org/osrf/sdformat/pull-request/127) + * [BitBucket pull request 127](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/127) 1. Backport magnetometer - * [Pull request 128](https://bitbucket.org/osrf/sdformat/pull-request/128) + * [BitBucket pull request 128](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/128) 1. Add flag for MOI rescaling to sdf 1.4 - * [Pull request 121](https://bitbucket.org/osrf/sdformat/pull-request/121) + * [BitBucket pull request 121](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/121) 1. Parse urdf joint friction parameters, add corresponding test - * [Pull request 129](https://bitbucket.org/osrf/sdformat/pull-request/129) + * [BitBucket pull request 129](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/129) 1. Allow reading of boolean values from plugin elements. - * [Pull request 132](https://bitbucket.org/osrf/sdformat/pull-request/132) + * [BitBucket pull request 132](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/132) 1. Implement generation of XML Schema files (issue #2) - * [Pull request 91](https://bitbucket.org/osrf/sdformat/pull-request/91) + * [BitBucket pull request 91](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/91) 1. Fix build for OS X 10.10 - * [Pull request 135](https://bitbucket.org/osrf/sdformat/pull-request/135) + * [BitBucket pull request 135](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/135) 1. Improve performance in loading SDF elements - * [Pull request 138](https://bitbucket.org/osrf/sdformat/pull-request/138) + * [BitBucket pull request 138](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/138) 1. Added urdf gazebo extension option to disable fixed joint lumping - * [Pull request 133](https://bitbucket.org/osrf/sdformat/pull-request/133) + * [BitBucket pull request 133](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/133) 1. Support urdfdom 0.3 (alternative to pull request #122) - * [Pull request 141](https://bitbucket.org/osrf/sdformat/pull-request/141) + * [BitBucket pull request 141](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/141) 1. Update list of supported joint types - * [Pull request 142](https://bitbucket.org/osrf/sdformat/pull-request/142) + * [BitBucket pull request 142](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/142) 1. Ignore unknown elements - * [Pull request 148](https://bitbucket.org/osrf/sdformat/pull-request/148) + * [BitBucket pull request 148](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/148) 1. Physics preset attributes - * [Pull request 146](https://bitbucket.org/osrf/sdformat/pull-request/146) + * [BitBucket pull request 146](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/146) 1. Backport fix for latin locales (pull request #147) - * [Pull request 150](https://bitbucket.org/osrf/sdformat/pull-request/150) + * [BitBucket pull request 150](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/150) ## SDFormat 1.4 ### SDFormat 1.4.8 (2013-09-06) 1. Fix inertia transformations when reducing fixed joints in URDF - * [Pull request 48](https://bitbucket.org/osrf/sdformat/pull-request/48/fix-for-issue-22-reducing-inertia-across/diff) + * [BitBucket pull request 48](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/48/fix-for-issue-22-reducing-inertia-across/diff) 1. Add element to support terrain paging in gazebo - * [Pull request 47](https://bitbucket.org/osrf/sdformat/pull-request/47/add-element-inside-heightmap/diff) + * [BitBucket pull request 47](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/47/add-element-inside-heightmap/diff) 1. Further reduce console output when using URDF models - * [Pull request 46](https://bitbucket.org/osrf/sdformat/pull-request/46/convert-a-few-more-sdfwarns-to-sdflog-fix/diff) - * [Commit](https://bitbucket.org/osrf/sdformat/commits/b15d5a1ecc57abee6691618d02d59bbc3d1b84dc) + * [BitBucket pull request 46](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/46/convert-a-few-more-sdfwarns-to-sdflog-fix/diff) + * [Commit](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/commits/b15d5a1ecc57abee6691618d02d59bbc3d1b84dc) ### SDFormat 1.4.7 (2013-08-22) 1. Direct console messages to std_err - * [Pull request 44](https://bitbucket.org/osrf/sdformat/pull-request/44/fix-19-direct-all-messages-to-std_err) + * [BitBucket pull request 44](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/44/fix-19-direct-all-messages-to-std_err) ### SDFormat 1.4.6 (2013-08-20) 1. Add tags for GPS sensor and sensor noise - * [Pull request 36](https://bitbucket.org/osrf/sdformat/pull-request/36/gps-sensor-sensor-noise-and-spherical) + * [BitBucket pull request 36](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/36/gps-sensor-sensor-noise-and-spherical) 1. Add tags for wireless transmitter/receiver models - * [Pull request 34](https://bitbucket.org/osrf/sdformat/pull-request/34/transceiver-support) - * [Pull request 43](https://bitbucket.org/osrf/sdformat/pull-request/43/updated-description-of-the-transceiver-sdf) + * [BitBucket pull request 34](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/34/transceiver-support) + * [BitBucket pull request 43](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/43/updated-description-of-the-transceiver-sdf) 1. Add tags for playback of audio files in Gazebo - * [Pull request 26](https://bitbucket.org/osrf/sdformat/pull-request/26/added-audio-tags) - * [Pull request 35](https://bitbucket.org/osrf/sdformat/pull-request/35/move-audio-to-link-and-playback-on-contact) + * [BitBucket pull request 26](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/26/added-audio-tags) + * [BitBucket pull request 35](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/35/move-audio-to-link-and-playback-on-contact) 1. Add tags for simbody physics parameters - * [Pull request 32](https://bitbucket.org/osrf/sdformat/pull-request/32/merging-some-updates-from-simbody-branch) + * [BitBucket pull request 32](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/32/merging-some-updates-from-simbody-branch) 1. Log messages to a file, reduce console output - * [Pull request 33](https://bitbucket.org/osrf/sdformat/pull-request/33/log-messages-to-file-8) + * [BitBucket pull request 33](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/33/log-messages-to-file-8) 1. Generalize ode's element - * [Pull request 38](https://bitbucket.org/osrf/sdformat/pull-request/38/add-provide_feedback-for-bullet-joint) + * [BitBucket pull request 38](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/38/add-provide_feedback-for-bullet-joint) 1. Various bug, style and test fixes ### SDFormat 1.4.5 (2013-07-23) diff --git a/INSTALL_WIN32.md b/INSTALL_WIN32.md index d1af0cfaa..2d6e7b217 100644 --- a/INSTALL_WIN32.md +++ b/INSTALL_WIN32.md @@ -22,7 +22,7 @@ Windows `cmd` for configuring and building. 1. Clone sdformat - hg clone https://bitbucket.org/osrf/sdformat + git clone https://github.com/osrf/sdformat 1. Load your compiler setup, e.g. (note that we are asking for the 64-bit toolchain here): diff --git a/Migration.md b/Migration.md index 592c93e9d..a9cc6a395 100644 --- a/Migration.md +++ b/Migration.md @@ -105,7 +105,7 @@ but with improved human-readability.. 1. + Change installation path of SDF description files to allow side-by-side installation. + `{prefix}/share/sdformat/1.*/*.sdf` -> `{prefix}/share/sdformat8/1.*/*.sdf` - + [pull request 538](https://bitbucket.org/osrf/sdformat/pull-requests/538) + + [BitBucket pull request 538](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/538) ## SDFormat 5.x to 6.x @@ -170,22 +170,22 @@ but with improved human-readability.. 1. **`gravity` and `magnetic_field` elements are moved from `physics` to `world`** + In physics element: gravity and `magnetic_field` tags have been moved from Physics to World element. - + [pull request 247](https://bitbucket.org/osrf/sdformat/pull-requests/247) - + [gazebo pull request 2090](https://bitbucket.org/osrf/gazebo/pull-requests/2090) + + [BitBucket pull request 247](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/247) + + [gazebo pull request 2090](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-requests/2090) 1. **New noise for IMU** + A new style for representing the noise properties of an `imu` was implemented - in [pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) + in [BitBucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) for sdf 1.5 and the old style was declared as deprecated. The old style has been removed from sdf 1.6 with the conversion script updating to the new style. - + [pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) - + [pull request 243](https://bitbucket.org/osrf/sdformat/pull-requests/243) - + [pull request 244](https://bitbucket.org/osrf/sdformat/pull-requests/244) + + [BitBucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) + + [BitBucket pull request 243](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/243) + + [BitBucket pull request 244](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/244) 1. **Lump:: prefix in link names** + Changed to `_fixed_joint_lump__` to avoid confusion with scoped names - + [Pull request 245](https://bitbucket.org/osrf/sdformat/pull-request/245) + + [BitBucket pull request 245](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/245) ## SDF protocol 1.6 to 1.7 @@ -198,7 +198,7 @@ but with improved human-readability.. + type: string + default: "" + required: * - + [pull request 603](https://bitbucket.org/osrf/sdformat/pull-requests/603) + + [BitBucket pull request 603](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/603) 1. **joint.sdf** `//axis/xyz/@expressed_in` and `//axis2/xyz/@expressed_in` attributes + description: The name of the frame in which the `//axis/xyz` value is @@ -208,7 +208,7 @@ but with improved human-readability.. + type: string + default: "" + required: 0 - + [pull request 589](https://bitbucket.org/osrf/sdformat/pull-requests/589) + + [BitBucket pull request 589](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/589) 1. **model.sdf** `//model/@canonical_link` attribute + description: The name of the canonical link in this model to which the @@ -218,17 +218,17 @@ but with improved human-readability.. + type: string + default: "" + required: 0 - + [pull request 601](https://bitbucket.org/osrf/sdformat/pull-requests/601) + + [BitBucket pull request 601](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/601) 1. **world.sdf** `//world/frame` element is now allowed. - + [pull request 603](https://bitbucket.org/osrf/sdformat/pull-requests/603) + + [BitBucket pull request 603](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/603) ### Modifications 1. A non-static model must have at least one link, as specified in the [proposal](http://sdformat.org/tutorials?tut=pose_frame_semantics_proposal&cat=pose_semantics_docs-model-frame-and-canonical-link). - + [pull request 601](https://bitbucket.org/osrf/sdformat/pull-requests/601) - + [pull request 626](https://bitbucket.org/osrf/sdformat/pull-requests/626) + + [BitBucket pull request 601](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/601) + + [BitBucket pull request 626](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/626) 1. Unique names for all sibling elements: + As described in the [proposal](http://sdformat.org/tutorials?tut=pose_frame_semantics_proposal&cat=pose_semantics_docs-2-unique-names-for-all-sibling-elements), @@ -238,7 +238,7 @@ but with improved human-readability.. Some existing SDFormat models may not comply with this requirement. The `ign sdf --check` command can be used to identify models that violate this requirement. - + [pull request 600](https://bitbucket.org/osrf/sdformat/pull-requests/600) + + [BitBucket pull request 600](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/600) 1. Reserved names: + As described in the [proposal](http://sdformat.org/tutorials?tut=pose_frame_semantics_proposal&cat=pose_semantics_docs-3-reserved-names), @@ -253,10 +253,10 @@ but with improved human-readability.. for implicit model / world frames, respectively). 1. **joint.sdf** `//joint/child` may no longer be specified as `world`. - + [pull request 634](https://bitbucket.org/osrf/sdformat/pull-requests/634) + + [BitBucket pull request 634](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/634) 1. **pose.sdf** `//pose/@frame` attribute is renamed to `//pose/@relative_to`. - + [pull request 597](https://bitbucket.org/osrf/sdformat/pull-requests/597) + + [BitBucket pull request 597](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/597) ### Removals @@ -278,17 +278,17 @@ but with improved human-readability.. + projector + sensor + visual - + [pull request 603](https://bitbucket.org/osrf/sdformat/pull-requests/603) + + [BitBucket pull request 603](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/603) 1. **actor.sdf** `static` element was deprecated in - [pull request 280](https://bitbucket.org/osrf/sdformat/pull-requests/280) + [BitBucket pull request 280](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/280) and is now removed. - + [pull request 588](https://bitbucket.org/osrf/sdformat/pull-requests/588) + + [BitBucket pull request 588](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/588) 1. **imu.sdf** `topic` element was deprecated in - [pull request 532](https://bitbucket.org/osrf/sdformat/pull-requests/532) + [BitBucket pull request 532](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/532) and is now removed. - + [pull request 588](https://bitbucket.org/osrf/sdformat/pull-requests/588) + + [BitBucket pull request 588](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/588) 1. **joint.sdf** `//axis/use_parent_model_frame` and `//axis2/use_parent_model_frame` elements are removed in favor of the `//axis/xyz/@expressed_in` and @@ -296,15 +296,15 @@ but with improved human-readability.. When migrating from sdf 1.6, a `use_parent_model_frame` value of `true` will be mapped to a value of `__model__` for the `expressed_in` attribute. - + [pull request 589](https://bitbucket.org/osrf/sdformat/pull-requests/589) + + [BitBucket pull request 589](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/589) 1. **joint.sdf** `//physics/ode/provide_feedback` was deprecated in - [pull request 38](https://bitbucket.org/osrf/sdformat/pull-requests/38) + [BitBucket pull request 38](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/38) and is now removed. - + [pull request 588](https://bitbucket.org/osrf/sdformat/pull-requests/588) + + [BitBucket pull request 588](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/588) 1. **world.sdf** `//world/joint` was removed as it has never been used. - + [pull request 637](https://bitbucket.org/osrf/sdformat/pull-requests/637) + + [BitBucket pull request 637](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/637) ## SDF protocol 1.5 to 1.6 @@ -320,27 +320,27 @@ but with improved human-readability.. + min: 0.0 + max: 1.0 + required: 0 - + [pull request 466](https://bitbucket.org/osrf/sdformat/pull-requests/466) + + [BitBucket pull request 466](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/466) 1. **camera.sdf** `depth_camera/clip` sub-elements: `near`, `far` + description: Clipping parameters for depth camera on rgbd camera sensor. - + [pull request 628](https://bitbucket.org/osrf/sdformat/pull-requests/628) + + [BitBucket pull request 628](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/628) 1. **camera.sdf** `intrinsics` sub-elements: `fx`, `fy`, `cx`, `cy`, `s` + description: Camera intrinsic parameters for setting a custom perspective projection matrix. - + [pull request 496](https://bitbucket.org/osrf/sdformat/pull-requests/496) + + [BitBucket pull request 496](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/496) 1. **link.sdf** `enable_wind` element + description: If true, the link is affected by the wind + type: bool + default: false + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **link.sdf** `light` element + included from `light.sdf` with `required="*"`, so a link can have any number of attached lights. - + [pull request 373](https://bitbucket.org/osrf/sdformat/pull-requests/373) + + [BitBucket pull request 373](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/373) 1. **model.sdf** `enable_wind` element + description: If set to true, all links in the model will be affected by @@ -348,14 +348,14 @@ but with improved human-readability.. + type: bool + default: false + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **model_state.sdf** `scale` element + description: Scale for the 3 dimensions of the model. + type: vector3 + default: "1 1 1" + required: 0 - + [pull request 246](https://bitbucket.org/osrf/sdformat/pull-requests/246) + + [BitBucket pull request 246](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/246) 1. **physics.sdf** `dart::collision_detector` element + description: The collision detector for DART to use. @@ -363,7 +363,7 @@ but with improved human-readability.. + type: string + default: fcl + required: 0 - + [pull request 440](https://bitbucket.org/osrf/sdformat/pull-requests/440) + + [BitBucket pull request 440](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/440) 1. **physics.sdf** `dart::solver::solver_type` element + description: The DART LCP/constraint solver to use. @@ -371,31 +371,31 @@ but with improved human-readability.. + type: string + default: dantzig + required: 0 - + [pull request 369](https://bitbucket.org/osrf/sdformat/pull-requests/369) + + [BitBucket pull request 369](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/369) 1. **physics.sdf** `island_threads` element under `ode::solver` + description: Number of threads to use for "islands" of disconnected models. + type: int + default: 0 + required: 0 - + [pull request 380](https://bitbucket.org/osrf/sdformat/pull-requests/380) + + [BitBucket pull request 380](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/380) 1. **physics.sdf** `thread_position_correction` element under `ode::solver` + description: Flag to use threading to speed up position correction computation. + type: bool + default: 0 + required: 0 - + [pull request 380](https://bitbucket.org/osrf/sdformat/pull-requests/380) + + [BitBucket pull request 380](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/380) 1. **sonar.sdf** `geometry` element + description: The sonar collision shape. Currently supported geometries are: "cone" and "sphere". + type: string + default: "cone" + required: 0 - + [pull request 495](https://bitbucket.org/osrf/sdformat/pull-requests/495) + + [BitBucket pull request 495](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/495) 1. **state.sdf** allow `light` tags within `insertions` element - * [pull request 325](https://bitbucket.org/osrf/sdformat/pull-request/325) + * [BitBucket pull request 325](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/325) 1. **surface.sdf** `category_bitmask` element + description: Bitmask for category of collision filtering. @@ -404,16 +404,16 @@ but with improved human-readability.. + type: unsigned int + default: 65535 + required: 0 - + [pull request 318](https://bitbucket.org/osrf/sdformat/pull-requests/318) + + [BitBucket pull request 318](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/318) 1. **world.sdf** `wind` element + description: The wind tag specifies the type and properties of the wind. + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **world.sdf** `wind::linear_velocity` element + description: Linear velocity of the wind. + type: vector3 + default: "0 0 0" + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [BitBucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 5d9d76838..b2ebf1b7e 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -10,7 +10,7 @@ pipelines: - sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' - wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - - apt-get update - - apt -y install cmake build-essential curl git mercurial libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck + - apt -y install cmake build-essential curl git libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck - gcc -v - g++ -v - gcov -v diff --git a/doc/header.html b/doc/header.html index d4b88ef24..896ea0e43 100644 --- a/doc/header.html +++ b/doc/header.html @@ -41,7 +41,7 @@

Tutorials
Download
--> -
Report Documentation Issues
+
Report Documentation Issues

diff --git a/doc/mainpage.html b/doc/mainpage.html index 11ed37316..6c02f04ba 100644 --- a/doc/mainpage.html +++ b/doc/mainpage.html @@ -5,7 +5,7 @@ Desctiption Format API. The code reference is divided into the groups below. Should you find problems with this documentation - typos, unclear phrases, or insufficient detail - please create a new bitbucket issue. + href="https://github.com/osrf/sdformat/issues/new">new GitHub issue. Include sufficient detail to quickly locate the problematic documentation, and set the issue's fields accordingly: Assignee - blank; Kind - bug; Priority - minor; Version - blank. diff --git a/sdf/1.4/physics.sdf b/sdf/1.4/physics.sdf index 2cb836fa1..2f50db2e7 100644 --- a/sdf/1.4/physics.sdf +++ b/sdf/1.4/physics.sdf @@ -177,7 +177,7 @@ Flag to enable dynamic rescaling of moment of inertia in constrained directions. See gazebo pull request 1114 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1114 + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1114 diff --git a/sdf/1.5/joint.sdf b/sdf/1.5/joint.sdf index 1e5a7a7a2..e63d6f765 100644 --- a/sdf/1.5/joint.sdf +++ b/sdf/1.5/joint.sdf @@ -55,7 +55,7 @@ Flag to interpret the axis xyz element in the parent model frame instead of joint frame. Provided for Gazebo compatibility - (see https://bitbucket.org/osrf/gazebo/issue/494 ). + (see https://github.com/osrf/gazebo/issue/494 ). @@ -114,7 +114,7 @@ Flag to interpret the axis xyz element in the parent model frame instead of joint frame. Provided for Gazebo compatibility - (see https://bitbucket.org/osrf/gazebo/issue/494 ). + (see https://github.com/osrf/gazebo/issue/494 ). diff --git a/sdf/1.5/physics.sdf b/sdf/1.5/physics.sdf index f4f0bf918..3e065e76e 100644 --- a/sdf/1.5/physics.sdf +++ b/sdf/1.5/physics.sdf @@ -189,7 +189,7 @@ Flag to enable dynamic rescaling of moment of inertia in constrained directions. See gazebo pull request 1114 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1114 + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1114 diff --git a/sdf/1.6/joint.sdf b/sdf/1.6/joint.sdf index 92f354f93..2173ebfb5 100644 --- a/sdf/1.6/joint.sdf +++ b/sdf/1.6/joint.sdf @@ -61,7 +61,7 @@ Flag to interpret the axis xyz element in the parent model frame instead of joint frame. Provided for Gazebo compatibility - (see https://bitbucket.org/osrf/gazebo/issue/494 ). + (see https://github.com/osrf/gazebo/issue/494 ). @@ -125,7 +125,7 @@ Flag to interpret the axis xyz element in the parent model frame instead of joint frame. Provided for Gazebo compatibility - (see https://bitbucket.org/osrf/gazebo/issue/494 ). + (see https://github.com/osrf/gazebo/issue/494 ). diff --git a/sdf/1.6/physics.sdf b/sdf/1.6/physics.sdf index e0277e4a2..38c22f633 100644 --- a/sdf/1.6/physics.sdf +++ b/sdf/1.6/physics.sdf @@ -200,7 +200,7 @@ Flag to enable dynamic rescaling of moment of inertia in constrained directions. See gazebo pull request 1114 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1114 + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1114 @@ -213,8 +213,8 @@ cone_model: friction force magnitude limited in proportion to normal force. See gazebo pull request 1522 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1522 - https://bitbucket.org/osrf/gazebo/commits/8c05ad64967c + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1522 + https://github.com/osrf/gazebo/commit/968dccafdfbfca09c9b3326f855612076fed7e6f diff --git a/sdf/1.7/physics.sdf b/sdf/1.7/physics.sdf index e0277e4a2..38c22f633 100644 --- a/sdf/1.7/physics.sdf +++ b/sdf/1.7/physics.sdf @@ -200,7 +200,7 @@ Flag to enable dynamic rescaling of moment of inertia in constrained directions. See gazebo pull request 1114 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1114 + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1114 @@ -213,8 +213,8 @@ cone_model: friction force magnitude limited in proportion to normal force. See gazebo pull request 1522 for the implementation of this feature. - https://bitbucket.org/osrf/gazebo/pull-request/1522 - https://bitbucket.org/osrf/gazebo/commits/8c05ad64967c + https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1522 + https://github.com/osrf/gazebo/commit/968dccafdfbfca09c9b3326f855612076fed7e6f diff --git a/sdf/Migration.md b/sdf/Migration.md index 26535b54e..ac1b362f8 100644 --- a/sdf/Migration.md +++ b/sdf/Migration.md @@ -26,14 +26,14 @@ but with improved human-readability. + type: unsigned int + default: 2 + required: 0 - + [pull request 293](https://bitbucket.org/osrf/sdformat/pull-requests/293) + + [Bitbucket pull request 293](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/293) 1. **link.sdf** `enable_wind` element + description: If true, the link is affected by the wind + type: bool + default: false + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [Bitbucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **model.sdf** `enable_wind` element + description: If set to true, all links in the model @@ -42,14 +42,14 @@ but with improved human-readability. + type: bool + default: false + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [Bitbucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **model_state.sdf** `scale` element + description: Scale for the 3 dimensions of the model. + type: vector3 + default: "1 1 1" + required: 0 - + [pull request 246](https://bitbucket.org/osrf/sdformat/pull-requests/246) + + [Bitbucket pull request 246](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/246) 1. **physics.sdf** `friction_model` element + description: Name of ODE friction model to use. Valid values include: @@ -57,39 +57,39 @@ but with improved human-readability. in proportion to normal force. + box_model: friction forces limited to constant in two directions. + cone_model: friction force magnitude limited in proportion to normal force. - See [gazebo pull request 1522](https://bitbucket.org/osrf/gazebo/pull-request/1522) - (merged in [gazebo 8c05ad64967c](https://bitbucket.org/osrf/gazebo/commits/8c05ad64967c)) + See [gazebo pull request 1522](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-request/1522) + (merged in [gazebo 8c05ad64967c](https://github.com/osrf/gazebo/commit/968dccafdfbfca09c9b3326f855612076fed7e6f)) for the implementation of this feature. + type: string + default: "pyramid_model" + required: 0 - + [pull request 294](https://bitbucket.org/osrf/sdformat/pull-requests/294) + + [Bitbucket pull request 294](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/294) 1. **world.sdf** `wind` element + description: The wind tag specifies the type and properties of the wind. + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [Bitbucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) 1. **world.sdf** `wind::linear_velocity` element + description: Linear velocity of the wind. + type: vector3 + default: "0 0 0" + required: 0 - + [pull request 240](https://bitbucket.org/osrf/sdformat/pull-requests/240) + + [Bitbucket pull request 240](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/240) ### Modifications 1. `gravity` and `magnetic_field` elements are moved from `physics` to `world` - + [pull request 247](https://bitbucket.org/osrf/sdformat/pull-requests/247) - + [gazebo pull request 2090](https://bitbucket.org/osrf/gazebo/pull-requests/2090) + + [Bitbucket pull request 247](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/247) + + [gazebo pull request 2090](https://osrf-migration.github.io/gazebo-gh-pages/#!/osrf/gazebo/pull-requests/2090) 1. A new style for representing the noise properties of an `imu` was implemented - in [pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) + in [Bitbucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) for sdf 1.5 and the old style was declared as deprecated. The old style has been removed from sdf 1.6 with the conversion script updating to the new style. - + [pull request 199](https://bitbucket.org/osrf/sdformat/pull-requests/199) - + [pull request 243](https://bitbucket.org/osrf/sdformat/pull-requests/243) - + [pull request 244](https://bitbucket.org/osrf/sdformat/pull-requests/244) + + [Bitbucket pull request 199](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/199) + + [Bitbucket pull request 243](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/243) + + [Bitbucket pull request 244](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/244) diff --git a/src/FrameSemantics.cc b/src/FrameSemantics.cc index d0fcfe769..6f606e3a4 100644 --- a/src/FrameSemantics.cc +++ b/src/FrameSemantics.cc @@ -34,7 +34,7 @@ inline namespace SDF_VERSION_NAMESPACE { // The following two functions were originally submitted to ign-math, // but were not accepted as they were not generic enough. // For now, they will be kept here. -// https://bitbucket.org/ignitionrobotics/ign-math/pull-requests/333 +// https://osrf-migration.github.io/ignition-gh-pages/#!/ignitionrobotics/ign-math/pull-requests/333 /// \brief Starting from a given vertex in a directed graph, traverse edges /// in reverse direction to find a source vertex (has only outgoing edges). diff --git a/src/Param.cc b/src/Param.cc index 5aef725fd..0ab69a43a 100644 --- a/src/Param.cc +++ b/src/Param.cc @@ -34,8 +34,8 @@ using namespace sdf; // comma. To avoid that the SDF parsing is influenced by the current // global C or C++ locale, we define a custom std::stringstream variant // that always uses the std::locale::classic() locale. -// See issues https://bitbucket.org/osrf/sdformat/issues/60 -// and https://bitbucket.org/osrf/sdformat/issues/207 for more details. +// See issues https://github.com/osrf/sdformat/issues/60 +// and https://github.com/osrf/sdformat/issues/207 for more details. namespace sdf { inline namespace SDF_VERSION_NAMESPACE { diff --git a/src/Param_TEST.cc b/src/Param_TEST.cc index 204c77d95..a9c2172c0 100644 --- a/src/Param_TEST.cc +++ b/src/Param_TEST.cc @@ -157,7 +157,7 @@ TEST(Param, HexUInt) TEST(Param, HexFloat) { // Microsoft does not parse hex values properly. -// https://bitbucket.org/osrf/sdformat/issues/114 +// https://github.com/osrf/sdformat/issues/114 #ifndef _MSC_VER sdf::Param floatParam("key", "float", "0", false, "description"); float value; @@ -192,7 +192,7 @@ TEST(Param, HexDouble) EXPECT_DOUBLE_EQ(value, 0.0); // Microsoft does not parse hex values properly. -// https://bitbucket.org/osrf/sdformat/issues/114 +// https://github.com/osrf/sdformat/issues/114 #ifndef _MSC_VER EXPECT_TRUE(doubleParam.SetFromString("0x01")); EXPECT_TRUE(doubleParam.Get(value)); diff --git a/src/SDF_TEST.cc b/src/SDF_TEST.cc index 8a0c2bb43..a947cf55c 100644 --- a/src/SDF_TEST.cc +++ b/src/SDF_TEST.cc @@ -133,7 +133,7 @@ TEST(SDF, UpdateElement) EXPECT_EQ(flagCheck, fixture.flag); poseParam->Get(poseCheck); // test fails on homebrew see issue 202 - // https://bitbucket.org/osrf/sdformat/issues/202 + // https://github.com/osrf/sdformat/issues/202 #ifndef __APPLE__ EXPECT_EQ(poseCheck, fixture.pose); #endif @@ -420,7 +420,7 @@ TEST(SDF, GetAny) catch(std::bad_any_cast &/*_e*/) { // test fails on homebrew see issue 202 - // https://bitbucket.org/osrf/sdformat/issues/202 + // https://github.com/osrf/sdformat/issues/202 #ifndef __APPLE__ FAIL(); #endif @@ -438,7 +438,7 @@ TEST(SDF, GetAny) catch(std::bad_any_cast &/*_e*/) { // test fails on homebrew see issue 202 - // https://bitbucket.org/osrf/sdformat/issues/202 + // https://github.com/osrf/sdformat/issues/202 #ifndef __APPLE__ FAIL(); #endif @@ -482,7 +482,7 @@ TEST(SDF, GetAny) catch(std::bad_any_cast &/*_e*/) { // test fails on homebrew see issue 202 - // https://bitbucket.org/osrf/sdformat/issues/202 + // https://github.com/osrf/sdformat/issues/202 #ifndef __APPLE__ FAIL(); #endif From 4bdfb0a4a3c1848dc8806bd9eda030944a81236e Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Fri, 15 May 2020 10:49:59 -0700 Subject: [PATCH 05/42] Add sdf9 changelog entries for #240, #251, #268 Signed-off-by: Steve Peters --- Changelog.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Changelog.md b/Changelog.md index adb6da437..7dc58a1b8 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,15 @@ ### SDFormat 9.X.X (202X-XX-XX) +1. Change bitbucket links to GitHub. + * [Pull request 240](https://github.com/osrf/sdformat/pull/240) + +1. Collision: don't load Surface without ``. + * [Pull request 268](https://github.com/osrf/sdformat/pull/268) + +1. Properly handle the requirement of C++17 at the CMake exported target level. + * [Pull request 251](https://github.com/osrf/sdformat/pull/251) + 1. Fix homebrew build with external urdfdom. * [BitBucket pull request 677](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/677) * [BitBucket pull request 686](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/686) From e33839f10debefd13306b4347014bdda21e0666b Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Fri, 15 May 2020 23:29:33 +0200 Subject: [PATCH 06/42] Observe the CMake variable BUILD_TESTING if it is defined (#269) For backward compatibility if it is not defined compile the tests Signed-off-by: Silvio --- CMakeLists.txt | 10 +++- src/CMakeLists.txt | 136 +++++++++++++++++++++++---------------------- 2 files changed, 78 insertions(+), 68 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a91461de4..309a85590 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -265,7 +265,15 @@ else (build_errors) link_directories(${PROJECT_BINARY_DIR}/src) - add_subdirectory(test) + if (NOT DEFINED BUILD_TESTING OR BUILD_TESTING) + set(BUILD_SDF_TEST TRUE) + else() + set(BUILD_SDF_TEST FALSE) + endif() + + if (BUILD_SDF_TEST) + add_subdirectory(test) + endif() add_subdirectory(src) add_subdirectory(include/sdf) add_subdirectory(sdf) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7dbb95369..c283a00a1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -91,74 +91,76 @@ else() include_directories(${URDF_INCLUDE_DIRS}) endif() -set (gtest_sources - Actor_TEST.cc - AirPressure_TEST.cc - Altimeter_TEST.cc - Atmosphere_TEST.cc - Box_TEST.cc - Camera_TEST.cc - Collision_TEST.cc - Console_TEST.cc - Cylinder_TEST.cc - Element_TEST.cc - Error_TEST.cc - Exception_TEST.cc - Frame_TEST.cc - Filesystem_TEST.cc - Geometry_TEST.cc - Gui_TEST.cc - Imu_TEST.cc - Joint_TEST.cc - JointAxis_TEST.cc - Lidar_TEST.cc - Light_TEST.cc - Link_TEST.cc - Magnetometer_TEST.cc - Material_TEST.cc - Mesh_TEST.cc - Model_TEST.cc - Noise_TEST.cc - parser_urdf_TEST.cc - Param_TEST.cc - parser_TEST.cc - Pbr_TEST.cc - Physics_TEST.cc - Plane_TEST.cc - Root_TEST.cc - Scene_TEST.cc - SemanticPose_TEST.cc - SDF_TEST.cc - Sensor_TEST.cc - Sphere_TEST.cc - Surface_TEST.cc - Types_TEST.cc - Visual_TEST.cc - World_TEST.cc -) - -# Build this test file only if Ignition Tools is installed. -if (IGNITION-TOOLS_BINARY_DIRS) - set (gtest_sources ${gtest_sources} - ign_TEST.cc +if (BUILD_SDF_TEST) + set (gtest_sources + Actor_TEST.cc + AirPressure_TEST.cc + Altimeter_TEST.cc + Atmosphere_TEST.cc + Box_TEST.cc + Camera_TEST.cc + Collision_TEST.cc + Console_TEST.cc + Cylinder_TEST.cc + Element_TEST.cc + Error_TEST.cc + Exception_TEST.cc + Frame_TEST.cc + Filesystem_TEST.cc + Geometry_TEST.cc + Gui_TEST.cc + Imu_TEST.cc + Joint_TEST.cc + JointAxis_TEST.cc + Lidar_TEST.cc + Light_TEST.cc + Link_TEST.cc + Magnetometer_TEST.cc + Material_TEST.cc + Mesh_TEST.cc + Model_TEST.cc + Noise_TEST.cc + parser_urdf_TEST.cc + Param_TEST.cc + parser_TEST.cc + Pbr_TEST.cc + Physics_TEST.cc + Plane_TEST.cc + Root_TEST.cc + Scene_TEST.cc + SemanticPose_TEST.cc + SDF_TEST.cc + Sensor_TEST.cc + Sphere_TEST.cc + Surface_TEST.cc + Types_TEST.cc + Visual_TEST.cc + World_TEST.cc ) -endif() - -sdf_build_tests(${gtest_sources}) - -if (NOT WIN32) - set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS Utils.cc) - sdf_build_tests(Utils_TEST.cc) -endif() - -if (NOT WIN32) - set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS FrameSemantics.cc) - sdf_build_tests(FrameSemantics_TEST.cc) -endif() - -if (NOT WIN32) - set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS Converter.cc) - sdf_build_tests(Converter_TEST.cc) + + # Build this test file only if Ignition Tools is installed. + if (IGNITION-TOOLS_BINARY_DIRS) + set (gtest_sources ${gtest_sources} + ign_TEST.cc + ) + endif() + + sdf_build_tests(${gtest_sources}) + + if (NOT WIN32) + set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS Utils.cc) + sdf_build_tests(Utils_TEST.cc) + endif() + + if (NOT WIN32) + set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS FrameSemantics.cc) + sdf_build_tests(FrameSemantics_TEST.cc) + endif() + + if (NOT WIN32) + set(SDF_BUILD_TESTS_EXTRA_EXE_SRCS Converter.cc) + sdf_build_tests(Converter_TEST.cc) + endif() endif() sdf_add_library(${sdf_target} ${sources}) From 6ba0bbebf4090c86c81be918320573bced7b6f57 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 12 May 2020 18:06:34 -0700 Subject: [PATCH 07/42] Param_TEST: test parsing +Inf and -Inf Signed-off-by: Steve Peters --- src/Param_TEST.cc | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/Param_TEST.cc b/src/Param_TEST.cc index a9c2172c0..24f587c20 100644 --- a/src/Param_TEST.cc +++ b/src/Param_TEST.cc @@ -17,6 +17,7 @@ #include #include +#include #include @@ -25,7 +26,7 @@ #include "sdf/Exception.hh" #include "sdf/Param.hh" -bool check_double(std::string num) +bool check_double(const std::string &num) { const std::string name = "number"; const std::string type = "double"; @@ -100,6 +101,42 @@ TEST(SetFromString, Decimals) ASSERT_TRUE(check_double("0.2345")); } +//////////////////////////////////////////////////// +/// Test Inf +TEST(SetFromString, DoublePositiveInf) +{ + ASSERT_TRUE(std::numeric_limits::has_infinity); + std::vector positiveInfStrings{ + "inf", "Inf", "INF", "+inf", "+Inf", "+INF"}; + for (const auto &infString : positiveInfStrings) + { + sdf::Param doubleParam("key", "double", "0", false, "description"); + double value = 0.; + + EXPECT_TRUE(doubleParam.SetFromString(infString)); + doubleParam.Get(value); + EXPECT_DOUBLE_EQ(std::numeric_limits::infinity(), value); + } +} + +//////////////////////////////////////////////////// +/// Test -Inf +TEST(SetFromString, DoubleNegativeInf) +{ + ASSERT_TRUE(std::numeric_limits::is_iec559); + std::vector negativeInfStrings{ + "-inf", "-Inf", "-INF"}; + for (const auto &infString : negativeInfStrings) + { + sdf::Param doubleParam("key", "double", "0", false, "description"); + double value = 0.; + + EXPECT_TRUE(doubleParam.SetFromString(infString)); + doubleParam.Get(value); + EXPECT_DOUBLE_EQ(- std::numeric_limits::infinity(), value); + } +} + //////////////////////////////////////////////////// /// Test setting and reading hex int values. TEST(Param, HexInt) From b6f73d9fe0e55c9933b1d369dda2771e14ec6ef9 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Mon, 18 May 2020 16:07:12 -0700 Subject: [PATCH 08/42] Add sdf9 changelog entries for #269, #277. Signed-off-by: Steve Peters --- Changelog.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Changelog.md b/Changelog.md index 7dc58a1b8..31d8b668d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,12 @@ 1. Change bitbucket links to GitHub. * [Pull request 240](https://github.com/osrf/sdformat/pull/240) +1. Param_TEST: test parsing +Inf and -Inf. + * [Pull request 277](https://github.com/osrf/sdformat/pull/277) + +1. Observe the CMake variable `BUILD_TESTING` if it is defined. + * [Pull request 269](https://github.com/osrf/sdformat/pull/269) + 1. Collision: don't load Surface without ``. * [Pull request 268](https://github.com/osrf/sdformat/pull/268) From 33d24e611fd37e8bfd8c0de97233cc80af222d25 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 30 Jun 2020 16:29:08 -0700 Subject: [PATCH 09/42] Backport bionic actions CI to sdf9 (#311) Signed-off-by: Steve Peters --- .github/workflows/linux-ubuntu-bionic.yml | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/linux-ubuntu-bionic.yml diff --git a/.github/workflows/linux-ubuntu-bionic.yml b/.github/workflows/linux-ubuntu-bionic.yml new file mode 100644 index 000000000..236f50289 --- /dev/null +++ b/.github/workflows/linux-ubuntu-bionic.yml @@ -0,0 +1,72 @@ +name: Ubuntu Bionic / Linux + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Install base dependencies + run: | + sudo apt update; + sudo apt -y install wget lsb-release gnupg; + sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list'; + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743; + sudo apt-get update; + sudo apt -y install cmake build-essential curl g++-8 git mercurial libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck; + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8; + # workaround for https://github.com/rubygems/rubygems/issues/3068 + # suggested in https://github.com/rubygems/rubygems/issues/3068#issuecomment-574775885 + sudo gem update --system 3.0.6; + - name: Install lcov + run: | + git clone https://github.com/linux-test-project/lcov.git -b v1.14; + cd lcov; + sudo make install; + cd ..; + - name: Static checking before building - fail fast + run: sh tools/code_check.sh + - name: Install ignition dependencies + run: | + sudo apt -y install \ + libignition-cmake2-dev \ + libignition-math6-dev \ + libignition-tools-dev \ + liburdfdom-dev; + - name: cmake + run: | + mkdir build; + cd build; + cmake .. -DCMAKE_BUILD_TYPE=coverage; + - name: make sdf_descriptions + working-directory: build + run: make sdf_descriptions + - name: make + working-directory: build + run: make + - name: make test + env: + CTEST_OUTPUT_ON_FAILURE: 1 + working-directory: build + run: make test + - name: make coverage + working-directory: build + run: make coverage VERBOSE=1 + - name: Upload to codecov + working-directory: build + # disable gcov output with `-X gcovout -X gcov` + run: bash <(curl -s https://codecov.io/bash) -X gcovout -X gcov + - name: make install + working-directory: build + run: sudo make install + - name: Compile example code + working-directory: examples + run: | + mkdir build; + cd build; + cmake ..; + make; + ./simple ../simple.sdf; From 7b7e53313112df07b6683b0696b9099ecc4314c1 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 30 Jun 2020 16:29:34 -0700 Subject: [PATCH 10/42] Backport bionic actions CI to sdf8 (#310) Signed-off-by: Steve Peters --- .github/workflows/linux-ubuntu-bionic.yml | 72 +++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/linux-ubuntu-bionic.yml diff --git a/.github/workflows/linux-ubuntu-bionic.yml b/.github/workflows/linux-ubuntu-bionic.yml new file mode 100644 index 000000000..236f50289 --- /dev/null +++ b/.github/workflows/linux-ubuntu-bionic.yml @@ -0,0 +1,72 @@ +name: Ubuntu Bionic / Linux + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: Install base dependencies + run: | + sudo apt update; + sudo apt -y install wget lsb-release gnupg; + sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list'; + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743; + sudo apt-get update; + sudo apt -y install cmake build-essential curl g++-8 git mercurial libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck; + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8; + # workaround for https://github.com/rubygems/rubygems/issues/3068 + # suggested in https://github.com/rubygems/rubygems/issues/3068#issuecomment-574775885 + sudo gem update --system 3.0.6; + - name: Install lcov + run: | + git clone https://github.com/linux-test-project/lcov.git -b v1.14; + cd lcov; + sudo make install; + cd ..; + - name: Static checking before building - fail fast + run: sh tools/code_check.sh + - name: Install ignition dependencies + run: | + sudo apt -y install \ + libignition-cmake2-dev \ + libignition-math6-dev \ + libignition-tools-dev \ + liburdfdom-dev; + - name: cmake + run: | + mkdir build; + cd build; + cmake .. -DCMAKE_BUILD_TYPE=coverage; + - name: make sdf_descriptions + working-directory: build + run: make sdf_descriptions + - name: make + working-directory: build + run: make + - name: make test + env: + CTEST_OUTPUT_ON_FAILURE: 1 + working-directory: build + run: make test + - name: make coverage + working-directory: build + run: make coverage VERBOSE=1 + - name: Upload to codecov + working-directory: build + # disable gcov output with `-X gcovout -X gcov` + run: bash <(curl -s https://codecov.io/bash) -X gcovout -X gcov + - name: make install + working-directory: build + run: sudo make install + - name: Compile example code + working-directory: examples + run: | + mkdir build; + cd build; + cmake ..; + make; + ./simple ../simple.sdf; From 2968b2516be6f9fcd6ca0b3ea633e6d7caba5793 Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Wed, 1 Jul 2020 08:03:48 +0800 Subject: [PATCH 11/42] Fix Actor.cc copy operators and restructure tests (#301) * Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova Co-authored-by: Ian Chen Co-authored-by: Steve Peters --- Changelog.md | 3 + src/Actor.cc | 16 +- src/Actor_TEST.cc | 556 +++++++++++++++++++++------------- test/integration/actor_dom.cc | 25 ++ test/sdf/world_complete.sdf | 9 + 5 files changed, 384 insertions(+), 225 deletions(-) diff --git a/Changelog.md b/Changelog.md index 11636b891..12dd30546 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,9 @@ ### SDFormat 8.X.X (202X-XX-XX) +1. Fix Actor copy operators and increase test coverage. + * [Pull request 301](https://github.com/osrf/sdformat/pull/301) + 1. Increase output precision of URDF to SDF conversion, output -0 as 0. * [BitBucket pull request 675](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/675) diff --git a/src/Actor.cc b/src/Actor.cc index 0a1667331..636a82c01 100644 --- a/src/Actor.cc +++ b/src/Actor.cc @@ -129,9 +129,8 @@ Animation::~Animation() ////////////////////////////////////////////////// Animation::Animation(const Animation &_animation) - : dataPtr(new AnimationPrivate) + : dataPtr(new AnimationPrivate(*_animation.dataPtr)) { - this->CopyFrom(_animation); } ///////////////////////////////////////////////// @@ -156,6 +155,7 @@ Animation &Animation::operator=(Animation &&_animation) ///////////////////////////////////////////////// void Animation::CopyFrom(const Animation &_animation) { + // TODO(anyone) Deprecate function this->dataPtr->name = _animation.dataPtr->name; this->dataPtr->filename = _animation.dataPtr->filename; this->dataPtr->scale = _animation.dataPtr->scale; @@ -269,9 +269,8 @@ Waypoint::~Waypoint() ////////////////////////////////////////////////// Waypoint::Waypoint(const Waypoint &_waypoint) - : dataPtr(new WaypointPrivate) + : dataPtr(new WaypointPrivate(*_waypoint.dataPtr)) { - this->CopyFrom(_waypoint); } ///////////////////////////////////////////////// @@ -296,6 +295,7 @@ Waypoint &Waypoint::operator=(Waypoint &&_waypoint) ///////////////////////////////////////////////// void Waypoint::CopyFrom(const Waypoint &_waypoint) { + // TODO(anyone) deprecate function this->dataPtr->time = _waypoint.dataPtr->time; this->dataPtr->pose = _waypoint.dataPtr->pose; } @@ -364,9 +364,8 @@ Trajectory::~Trajectory() ////////////////////////////////////////////////// Trajectory::Trajectory(const Trajectory &_trajectory) - : dataPtr(new TrajectoryPrivate) + : dataPtr(new TrajectoryPrivate(*_trajectory.dataPtr)) { - this->CopyFrom(_trajectory); } ///////////////////////////////////////////////// @@ -391,6 +390,7 @@ Trajectory &Trajectory::operator=(Trajectory &&_trajectory) ///////////////////////////////////////////////// void Trajectory::CopyFrom(const Trajectory &_trajectory) { + // TODO(anyone) deprecate function this->dataPtr->id = _trajectory.dataPtr->id; this->dataPtr->type = _trajectory.dataPtr->type; this->dataPtr->tension = _trajectory.dataPtr->tension; @@ -501,9 +501,8 @@ Actor::~Actor() ////////////////////////////////////////////////// Actor::Actor(const Actor &_actor) - : dataPtr(new ActorPrivate) + : dataPtr(new ActorPrivate(*_actor.dataPtr)) { - this->CopyFrom(_actor); } ///////////////////////////////////////////////// @@ -528,6 +527,7 @@ Actor &Actor::operator=(Actor &&_actor) ////////////////////////////////////////////////// void Actor::CopyFrom(const Actor &_actor) { + // TODO(anyone) deprecate function this->dataPtr->name = _actor.dataPtr->name; this->dataPtr->pose = _actor.dataPtr->pose; this->dataPtr->poseFrame = _actor.dataPtr->poseFrame; diff --git a/src/Actor_TEST.cc b/src/Actor_TEST.cc index 37f11aab9..2b36ad5e2 100644 --- a/src/Actor_TEST.cc +++ b/src/Actor_TEST.cc @@ -19,6 +19,127 @@ #include #include "sdf/Actor.hh" +///////////////////////////////////////////////// +sdf::Animation CreateDummyAnimation() +{ + sdf::Animation animation; + animation.SetName("animation"); + animation.SetFilename("animation_filename"); + animation.SetFilePath("animation_filepath"); + animation.SetScale(1.234); + animation.SetInterpolateX(true); + return animation; +} + +///////////////////////////////////////////////// +bool AnimationsEqual(const sdf::Animation &_anim1, const sdf::Animation &_anim2) +{ + constexpr double EPS = 1e-6; + return (_anim1.Name() == _anim2.Name()) && + (_anim1.Filename() == _anim2.Filename()) && + (_anim1.FilePath() == _anim2.FilePath()) && + (std::abs(_anim1.Scale() - _anim2.Scale()) < EPS) && + (_anim1.InterpolateX() == _anim2.InterpolateX()); +} + +///////////////////////////////////////////////// +sdf::Trajectory CreateDummyTrajectory() +{ + sdf::Trajectory trajectory; + sdf::Waypoint waypoint; + waypoint.SetTime(0.12); + waypoint.SetPose({3, 2, 1, 0, IGN_PI, 0}); + trajectory.SetId(1234); + trajectory.SetType("trajectory_type"); + trajectory.SetTension(4.567); + trajectory.AddWaypoint(waypoint); + return trajectory; +} + +///////////////////////////////////////////////// +bool TrajectoriesEqual(const sdf::Trajectory &_traj1, + const sdf::Trajectory &_traj2) +{ + constexpr double EPS = 1e-6; + bool waypointsEqual = true; + if (_traj1.WaypointCount() != _traj2.WaypointCount()) + { + return false; + } + for (uint64_t wp_idx = 0; wp_idx < _traj1.WaypointCount(); ++wp_idx) + { + auto wp1 = _traj1.WaypointByIndex(wp_idx); + auto wp2 = _traj2.WaypointByIndex(wp_idx); + waypointsEqual &= (std::abs(wp1->Time() - wp2->Time()) < EPS) && + wp1->Pose() == wp2->Pose(); + } + return waypointsEqual && + (_traj1.Id() == _traj2.Id()) && + (_traj1.Type() == _traj2.Type()) && + (std::abs(_traj1.Tension() - _traj2.Tension()) < EPS); +} + +///////////////////////////////////////////////// +sdf::Actor CreateDummyActor() +{ + sdf::Actor actor; + actor.SetName("test_dummy_actor"); + actor.SetPose({3, 2, 1, 0, IGN_PI, 0}); + actor.SetPoseFrame("ground_plane"); + actor.SetSkinFilename("walk.dae"); + actor.SetSkinScale(2.0); + actor.SetScriptLoop(true); + actor.SetScriptDelayStart(2.8); + actor.SetScriptAutoStart(false); + actor.SetFilePath("/home/path/to/model.sdf"); + // Add a dummy trajectory and animation as well + actor.AddTrajectory(CreateDummyTrajectory()); + actor.AddAnimation(CreateDummyAnimation()); + return actor; +} + +///////////////////////////////////////////////// +bool ActorsEqual(const sdf::Actor &_actor1, const sdf::Actor &_actor2) +{ + constexpr double EPS = 1e-6; + // Check animations, trajectories and properties + bool animationsEqual = true; + if (_actor1.AnimationCount() != _actor2.AnimationCount()) + { + return false; + } + for (uint64_t anim_idx = 0; anim_idx < _actor1.AnimationCount(); ++anim_idx) + { + animationsEqual &= AnimationsEqual( + *_actor1.AnimationByIndex(anim_idx), + *_actor2.AnimationByIndex(anim_idx)); + } + bool trajectoriesEqual = true; + if (_actor1.TrajectoryCount() != _actor2.TrajectoryCount()) + { + return false; + } + for (uint64_t traj_idx = 0; traj_idx < _actor1.TrajectoryCount(); ++traj_idx) + { + trajectoriesEqual &= TrajectoriesEqual( + *_actor1.TrajectoryByIndex(traj_idx), + *_actor2.TrajectoryByIndex(traj_idx)); + } + return animationsEqual && trajectoriesEqual && + (_actor1.Name() == _actor2.Name()) && + (_actor1.Pose() == _actor2.Pose()) && + (_actor1.PoseFrame() == _actor2.PoseFrame()) && + (_actor1.SkinFilename() == _actor2.SkinFilename()) && + (std::abs(_actor1.SkinScale() - _actor2.SkinScale()) < EPS) && + (_actor1.ScriptLoop() == _actor2.ScriptLoop()) && + (std::abs(_actor1.ScriptDelayStart() - _actor2.ScriptDelayStart()) < EPS) && + (_actor1.ScriptAutoStart() == _actor2.ScriptAutoStart()) && + (_actor1.FilePath() == _actor2.FilePath()) && + (_actor1.LinkCount() == _actor2.LinkCount()) && + (_actor1.JointCount() == _actor2.JointCount()) && + (_actor1.Element() == _actor2.Element()); +} + ///////////////////////////////////////////////// TEST(DOMActor, DefaultConstruction) { @@ -63,227 +184,42 @@ TEST(DOMActor, DefaultConstruction) ///////////////////////////////////////////////// TEST(DOMActor, CopyConstructor) { - sdf::Actor actor; - actor.SetName("test_copy_actor"); - actor.SetPose({3, 2, 1, 0, IGN_PI, 0}); - actor.SetPoseFrame("ground_plane"); - actor.SetSkinFilename("walk.dae"); - actor.SetSkinScale(2.0); - actor.SetScriptLoop(true); - actor.SetScriptDelayStart(2.8); - actor.SetScriptAutoStart(false); - actor.SetFilePath("/home/path/to/model.sdf"); - + sdf::Actor actor = CreateDummyActor(); sdf::Actor actor2(actor); - EXPECT_EQ("test_copy_actor", actor2.Name()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.Pose()); - EXPECT_EQ("ground_plane", actor2.PoseFrame()); - EXPECT_EQ("/home/path/to/model.sdf", actor2.FilePath()); - - EXPECT_EQ(0u, actor2.AnimationCount()); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(0)); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(1)); - EXPECT_FALSE(actor2.AnimationNameExists("")); - EXPECT_FALSE(actor2.AnimationNameExists("default")); - - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_EQ(0u, actor2.TrajectoryCount()); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(0)); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(1)); - EXPECT_FALSE(actor2.TrajectoryIdExists(0)); - EXPECT_FALSE(actor2.TrajectoryIdExists(1)); - - EXPECT_TRUE(actor2.ScriptLoop()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); - - EXPECT_EQ(0u, actor2.LinkCount()); - EXPECT_EQ(nullptr, actor2.LinkByIndex(0)); - EXPECT_EQ(nullptr, actor2.LinkByIndex(1)); - EXPECT_FALSE(actor2.LinkNameExists("")); - - EXPECT_EQ(0u, actor2.JointCount()); - EXPECT_EQ(nullptr, actor2.JointByIndex(0)); - EXPECT_EQ(nullptr, actor2.JointByIndex(1)); - EXPECT_FALSE(actor2.JointNameExists("")); + EXPECT_TRUE(ActorsEqual(actor, actor2)); } ///////////////////////////////////////////////// TEST(DOMActor, CopyAssignmentOperator) { - sdf::Actor actor; - actor.SetName("test_actor_assignment"); - actor.SetPose({3, 2, 1, 0, IGN_PI, 0}); - actor.SetPoseFrame("ground_plane"); - actor.SetSkinFilename("walk.dae"); - actor.SetSkinScale(2.0); - actor.SetScriptLoop(true); - actor.SetScriptDelayStart(2.8); - actor.SetScriptAutoStart(false); - actor.SetFilePath("/home/path/to/model.sdf"); - + sdf::Actor actor = CreateDummyActor(); sdf::Actor actor2; actor2 = actor; - EXPECT_EQ("test_actor_assignment", actor2.Name()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.Pose()); - EXPECT_EQ("ground_plane", actor2.PoseFrame()); - EXPECT_EQ("/home/path/to/model.sdf", actor2.FilePath()); - - EXPECT_EQ(0u, actor2.AnimationCount()); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(0)); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(1)); - EXPECT_FALSE(actor2.AnimationNameExists("")); - EXPECT_FALSE(actor2.AnimationNameExists("default")); - - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_EQ(0u, actor2.TrajectoryCount()); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(0)); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(1)); - EXPECT_FALSE(actor2.TrajectoryIdExists(0)); - EXPECT_FALSE(actor2.TrajectoryIdExists(1)); - - EXPECT_TRUE(actor2.ScriptLoop()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); - - EXPECT_EQ(0u, actor2.LinkCount()); - EXPECT_EQ(nullptr, actor2.LinkByIndex(0)); - EXPECT_EQ(nullptr, actor2.LinkByIndex(1)); - EXPECT_FALSE(actor2.LinkNameExists("")); - - EXPECT_EQ(0u, actor2.JointCount()); - EXPECT_EQ(nullptr, actor2.JointByIndex(0)); - EXPECT_EQ(nullptr, actor2.JointByIndex(1)); - EXPECT_FALSE(actor2.JointNameExists("")); + EXPECT_TRUE(ActorsEqual(actor, actor2)); } ///////////////////////////////////////////////// TEST(DOMActor, MoveConstructor) { - sdf::Actor actor; - actor.SetName("test_actor_assignment"); - actor.SetPose({3, 2, 1, 0, IGN_PI, 0}); - actor.SetPoseFrame("ground_plane"); - actor.SetSkinFilename("walk.dae"); - actor.SetSkinScale(2.0); - actor.SetScriptLoop(true); - actor.SetScriptDelayStart(2.8); - actor.SetScriptAutoStart(false); - actor.SetFilePath("/home/path/to/model.sdf"); - + sdf::Actor actor = CreateDummyActor(); sdf::Actor actor2(std::move(actor)); - EXPECT_EQ("test_actor_assignment", actor2.Name()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.Pose()); - EXPECT_EQ("ground_plane", actor2.PoseFrame()); - EXPECT_EQ("/home/path/to/model.sdf", actor2.FilePath()); - - EXPECT_EQ(0u, actor2.AnimationCount()); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(0)); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(1)); - EXPECT_FALSE(actor2.AnimationNameExists("")); - EXPECT_FALSE(actor2.AnimationNameExists("default")); - - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_EQ(0u, actor2.TrajectoryCount()); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(0)); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(1)); - EXPECT_FALSE(actor2.TrajectoryIdExists(0)); - EXPECT_FALSE(actor2.TrajectoryIdExists(1)); - - EXPECT_TRUE(actor2.ScriptLoop()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); - - EXPECT_EQ(0u, actor2.LinkCount()); - EXPECT_EQ(nullptr, actor2.LinkByIndex(0)); - EXPECT_EQ(nullptr, actor2.LinkByIndex(1)); - EXPECT_FALSE(actor2.LinkNameExists("")); - - EXPECT_EQ(0u, actor2.JointCount()); - EXPECT_EQ(nullptr, actor2.JointByIndex(0)); - EXPECT_EQ(nullptr, actor2.JointByIndex(1)); - EXPECT_FALSE(actor2.JointNameExists("")); + EXPECT_TRUE(ActorsEqual(CreateDummyActor(), actor2)); } ///////////////////////////////////////////////// TEST(DOMActor, MoveAssignment) { - sdf::Actor actor; - actor.SetName("test_actor_assignment"); - actor.SetPose({3, 2, 1, 0, IGN_PI, 0}); - actor.SetPoseFrame("ground_plane"); - actor.SetSkinFilename("walk.dae"); - actor.SetSkinScale(2.0); - actor.SetScriptLoop(true); - actor.SetScriptDelayStart(2.8); - actor.SetScriptAutoStart(false); - actor.SetFilePath("/home/path/to/model.sdf"); - + sdf::Actor actor = CreateDummyActor(); sdf::Actor actor2; actor2 = std::move(actor); - EXPECT_EQ("test_actor_assignment", actor2.Name()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.Pose()); - EXPECT_EQ("ground_plane", actor2.PoseFrame()); - EXPECT_EQ("/home/path/to/model.sdf", actor2.FilePath()); - - EXPECT_EQ(0u, actor2.AnimationCount()); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(0)); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(1)); - EXPECT_FALSE(actor2.AnimationNameExists("")); - EXPECT_FALSE(actor2.AnimationNameExists("default")); - - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_EQ(0u, actor2.TrajectoryCount()); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(0)); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(1)); - EXPECT_FALSE(actor2.TrajectoryIdExists(0)); - EXPECT_FALSE(actor2.TrajectoryIdExists(1)); - - EXPECT_TRUE(actor2.ScriptLoop()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); - - EXPECT_EQ(0u, actor2.LinkCount()); - EXPECT_EQ(nullptr, actor2.LinkByIndex(0)); - EXPECT_EQ(nullptr, actor2.LinkByIndex(1)); - EXPECT_FALSE(actor2.LinkNameExists("")); - - EXPECT_EQ(0u, actor2.JointCount()); - EXPECT_EQ(nullptr, actor2.JointByIndex(0)); - EXPECT_EQ(nullptr, actor2.JointByIndex(1)); - EXPECT_FALSE(actor2.JointNameExists("")); + EXPECT_TRUE(ActorsEqual(CreateDummyActor(), actor2)); } ///////////////////////////////////////////////// TEST(DOMActor, CopyAssignmentAfterMove) { - sdf::Actor actor1; - actor1.SetName("actor1"); - actor1.SetPose({3, 2, 1, 0, IGN_PI, 0}); - actor1.SetPoseFrame("ground_plane_1"); - actor1.SetSkinFilename("walk.dae"); - actor1.SetSkinScale(2.0); - actor1.SetScriptLoop(true); - actor1.SetScriptDelayStart(2.8); - actor1.SetScriptAutoStart(false); - + sdf::Actor actor1 = CreateDummyActor(); sdf::Actor actor2; - actor2.SetName("actor2"); - actor2.SetPose({1, 2, 3, 0, IGN_PI, 0}); - actor2.SetPoseFrame("ground_plane_2"); - actor2.SetSkinFilename("run.dae"); - actor2.SetSkinScale(0.5); - actor2.SetScriptLoop(false); - actor2.SetScriptDelayStart(0.8); - actor2.SetScriptAutoStart(true); // This is similar to what std::swap does except it uses std::move for each // assignment @@ -291,29 +227,8 @@ TEST(DOMActor, CopyAssignmentAfterMove) actor1 = actor2; actor2 = tmp; - EXPECT_EQ("actor2", actor1.Name()); - EXPECT_EQ("actor1", actor2.Name()); - - EXPECT_EQ(ignition::math::Pose3d(1, 2, 3, 0, IGN_PI, 0), actor1.Pose()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.Pose()); - - EXPECT_EQ("ground_plane_2", actor1.PoseFrame()); - EXPECT_EQ("ground_plane_1", actor2.PoseFrame()); - - EXPECT_EQ("run.dae", actor1.SkinFilename()); - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - - EXPECT_DOUBLE_EQ(0.5, actor1.SkinScale()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_FALSE(actor1.ScriptLoop()); - EXPECT_TRUE(actor2.ScriptLoop()); - - EXPECT_DOUBLE_EQ(0.8, actor1.ScriptDelayStart()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - - EXPECT_TRUE(actor1.ScriptAutoStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); + EXPECT_TRUE(ActorsEqual(sdf::Actor(), actor1)); + EXPECT_TRUE(ActorsEqual(CreateDummyActor(), actor2)); } ////////////////////////////////////////////////// @@ -380,3 +295,210 @@ TEST(DOMActor, Add) EXPECT_EQ(456u, actor.TrajectoryByIndex(1)->Id()); EXPECT_EQ("trajectory2", actor.TrajectoryByIndex(1)->Type()); } + +////////////////////////////////////////////////// +TEST(DOMAnimation, DefaultConstruction) +{ + sdf::Animation anim; + + EXPECT_EQ(anim.Name(), "__default__"); + EXPECT_EQ(anim.Filename(), "__default__"); + EXPECT_EQ(anim.FilePath(), ""); + EXPECT_DOUBLE_EQ(anim.Scale(), 1.0); + EXPECT_EQ(anim.InterpolateX(), false); +} + +////////////////////////////////////////////////// +TEST(DOMAnimation, CopyConstructor) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2(anim1); + EXPECT_TRUE(AnimationsEqual(anim1, anim2)); +} + +////////////////////////////////////////////////// +TEST(DOMAnimation, CopyAssignmentOperator) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2; + anim2 = anim1; + EXPECT_TRUE(AnimationsEqual(anim1, anim2)); +} + +////////////////////////////////////////////////// +TEST(DOMAnimation, MoveConstructor) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2(std::move(anim1)); + EXPECT_TRUE(AnimationsEqual(CreateDummyAnimation(), anim2)); +} + +////////////////////////////////////////////////// +TEST(DOMAnimation, MoveAssignment) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2; + anim2 = std::move(anim1); + EXPECT_TRUE(AnimationsEqual(CreateDummyAnimation(), anim2)); +} + +///////////////////////////////////////////////// +TEST(DOMAnimation, CopyAssignmentAfterMove) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2; + + // This is similar to what std::swap does except it uses std::move for each + // assignment + sdf::Animation tmp = std::move(anim1); + anim1 = anim2; + anim2 = tmp; + + EXPECT_TRUE(AnimationsEqual(sdf::Animation(), anim1)); + EXPECT_TRUE(AnimationsEqual(CreateDummyAnimation(), anim2)); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, DefaultConstruction) +{ + sdf::Waypoint waypoint; + EXPECT_DOUBLE_EQ(waypoint.Time(), 0.0); + EXPECT_EQ(waypoint.Pose(), ignition::math::Pose3d::Zero); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, CopyConstructor) +{ + sdf::Waypoint waypoint1; + waypoint1.SetTime(1.23); + waypoint1.SetPose({3, 2, 1, 0, IGN_PI, 0}); + + sdf::Waypoint waypoint2(waypoint1); + EXPECT_DOUBLE_EQ(waypoint1.Time(), waypoint2.Time()); + EXPECT_EQ(waypoint1.Pose(), waypoint2.Pose()); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, CopyAssignmentOperator) +{ + sdf::Waypoint waypoint1; + waypoint1.SetTime(1.23); + waypoint1.SetPose({3, 2, 1, 0, IGN_PI, 0}); + + sdf::Waypoint waypoint2; + waypoint2 = waypoint1; + EXPECT_DOUBLE_EQ(waypoint1.Time(), waypoint2.Time()); + EXPECT_EQ(waypoint1.Pose(), waypoint2.Pose()); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, MoveConstructor) +{ + sdf::Waypoint waypoint1; + ignition::math::Pose3d pose1(3, 2, 1, 0, IGN_PI, 0); + waypoint1.SetTime(1.23); + waypoint1.SetPose(pose1); + + sdf::Waypoint waypoint2(std::move(waypoint1)); + EXPECT_DOUBLE_EQ(1.23, waypoint2.Time()); + EXPECT_EQ(pose1, waypoint2.Pose()); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, MoveAssignment) +{ + sdf::Waypoint waypoint1; + ignition::math::Pose3d pose1(3, 2, 1, 0, IGN_PI, 0); + waypoint1.SetTime(1.23); + waypoint1.SetPose(pose1); + + sdf::Waypoint waypoint2; + waypoint2 = std::move(waypoint1); + EXPECT_DOUBLE_EQ(1.23, waypoint2.Time()); + EXPECT_EQ(pose1, waypoint2.Pose()); +} + +///////////////////////////////////////////////// +TEST(DOMWaypoint, CopyAssignmentAfterMove) +{ + sdf::Waypoint waypoint1; + ignition::math::Pose3d pose1(3, 2, 1, 0, IGN_PI, 0); + waypoint1.SetTime(1.23); + waypoint1.SetPose(pose1); + sdf::Waypoint waypoint2; + ignition::math::Pose3d pose2(1, 2, 3, 1, 2, IGN_PI); + waypoint2.SetTime(3.45); + waypoint2.SetPose(pose2); + + // This is similar to what std::swap does except it uses std::move for each + // assignment + sdf::Waypoint tmp = std::move(waypoint1); + waypoint1 = waypoint2; + waypoint2 = tmp; + + EXPECT_DOUBLE_EQ(1.23, waypoint2.Time()); + EXPECT_EQ(pose1, waypoint2.Pose()); + EXPECT_DOUBLE_EQ(3.45, waypoint1.Time()); + EXPECT_EQ(pose2, waypoint1.Pose()); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, DefaultConstruction) +{ + sdf::Trajectory trajectory; + + EXPECT_EQ(trajectory.Id(), 0u); + EXPECT_EQ(trajectory.Type(), "__default__"); + EXPECT_DOUBLE_EQ(trajectory.Tension(), 0.0); + EXPECT_EQ(trajectory.WaypointCount(), 0u); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, CopyConstructor) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2(trajectory1); + EXPECT_TRUE(TrajectoriesEqual(trajectory1, trajectory2)); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, CopyAssignmentOperator) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2; + trajectory2 = trajectory1; + EXPECT_TRUE(TrajectoriesEqual(trajectory1, trajectory2)); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, MoveConstructor) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2(std::move(trajectory1)); + EXPECT_TRUE(TrajectoriesEqual(CreateDummyTrajectory(), trajectory2)); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, MoveAssignment) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2; + trajectory2 = std::move(trajectory1); + EXPECT_TRUE(TrajectoriesEqual(CreateDummyTrajectory(), trajectory2)); +} + +///////////////////////////////////////////////// +TEST(DOMTrajectory, CopyAssignmentAfterMove) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2; + + // This is similar to what std::swap does except it uses std::move for each + // assignment + sdf::Trajectory tmp = std::move(trajectory1); + trajectory1 = trajectory2; + trajectory2 = tmp; + + EXPECT_TRUE(TrajectoriesEqual(sdf::Trajectory(), trajectory1)); + EXPECT_TRUE(TrajectoriesEqual(CreateDummyTrajectory(), trajectory2)); +} diff --git a/test/integration/actor_dom.cc b/test/integration/actor_dom.cc index b644309d9..0aed36f05 100644 --- a/test/integration/actor_dom.cc +++ b/test/integration/actor_dom.cc @@ -134,5 +134,30 @@ TEST(DOMActor, LoadActors) EXPECT_TRUE(actor2->ScriptLoop()); EXPECT_DOUBLE_EQ(1.0, actor2->ScriptDelayStart()); EXPECT_TRUE(actor2->ScriptAutoStart()); + + EXPECT_EQ(2u, actor2->LinkCount()); + EXPECT_EQ(1u, actor2->JointCount()); } +////////////////////////////////////////////////// +TEST(DOMActor, CopySdfLoadedProperties) +{ + // Verify that copying an actor also copies the underlying ElementPtr + // Joints and Links + const std::string testFile = + sdf::filesystem::append(PROJECT_SOURCE_PATH, "test", "sdf", + "world_complete.sdf"); + + sdf::Root root; + sdf::Errors errors = root.Load(testFile); + + ASSERT_NE(nullptr, root.Element()); + + const sdf::World *world = root.WorldByIndex(0); + const sdf::Actor *actor2 = world->ActorByIndex(1); + sdf::Actor actor1(*actor2); + + EXPECT_EQ(actor1.Element().get(), actor2->Element().get()); + EXPECT_EQ(actor1.LinkCount(), actor2->LinkCount()); + EXPECT_EQ(actor1.JointCount(), actor2->JointCount()); +} diff --git a/test/sdf/world_complete.sdf b/test/sdf/world_complete.sdf index 0a3f5fc33..dcec05cea 100644 --- a/test/sdf/world_complete.sdf +++ b/test/sdf/world_complete.sdf @@ -160,6 +160,15 @@ + + + + + + 0 0 0 1 0 0 + link1 + link2 + From 91b454fa795b3af47ad749439d6bec2662deb3c4 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 6 Aug 2020 11:15:44 -0700 Subject: [PATCH 12/42] Find python3 in cmake, fix warning (#328) * Also use python3 in test Signed-off-by: Steve Peters --- cmake/SearchForStuff.cmake | 2 +- test/integration/element_memory_leak.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 965f1ecf7..86c810671 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -84,7 +84,7 @@ endif() ################################################ # Find the Python interpreter for running the # check_test_ran.py script -find_package(PythonInterp QUIET) +find_package(PythonInterp 3 QUIET) ################################################ # Find psutil python package for memory tests diff --git a/test/integration/element_memory_leak.cc b/test/integration/element_memory_leak.cc index f85c49786..aee5f7b8e 100644 --- a/test/integration/element_memory_leak.cc +++ b/test/integration/element_memory_leak.cc @@ -71,7 +71,7 @@ const std::string sdfString( const std::string getMemInfoPath = sdf::filesystem::append(PROJECT_SOURCE_PATH, "tools", "get_mem_info.py"); -const std::string pythonMeminfo("python " + getMemInfoPath); +const std::string pythonMeminfo("python3 " + getMemInfoPath); int getMemoryUsage() { From 99b7d9fdc435f8206e67970f4b6c290e6595ba58 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 6 Aug 2020 12:28:47 -0700 Subject: [PATCH 13/42] Changelog for #328 Signed-off-by: Steve Peters --- Changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Changelog.md b/Changelog.md index 31d8b668d..126a55c2c 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,9 @@ ### SDFormat 9.X.X (202X-XX-XX) +1. Find python3 in cmake, fix cmake warning. + * [Pull request 328](https://github.com/osrf/sdformat/pull/328) + 1. Change bitbucket links to GitHub. * [Pull request 240](https://github.com/osrf/sdformat/pull/240) From 731983609cdec313f3fa8256bcae57678481a9f7 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Mon, 17 Aug 2020 10:41:57 -0700 Subject: [PATCH 14/42] [sdf9] Support nested models in DOM and frame semantics (#316) Nested model elements (`//model/model`) are currently supported in the SDFormat 1.7 spec, but are not supported by the DOM API or frame semantics operations in libsdformat 9.2. Per Amendment 1 of the SDFormat 1.7 proposal (sdformat.org/tutorials?tut=pose_frame_semantics_proposal#amendment-1-directly-nested-models), this PR adds support for nested models in the DOM API and frame semantics (fixing #283) through three steps: * adding `Model::Model*` methods for accessing nested models via the DOM API (047ec96) * loading nested models in `Model::Load` (b57fea2, step 3 of model parsing stages (sdformat.org/tutorials?tut=pose_frame_semantics_proposal#1-model)) * supporting nested models (`//model/model`) in frame semantics as opaque frames to match how models in the world scope (`//world/model`) are treated (85e0b4f, steps 6-9 of model parsing stages (sdformat.org/tutorials?tut=pose_frame_semantics_proposal#1-model)) The first two steps are straightforward, while the 3rd step adds new behavior. This behavior is added to `libsdformat9` because it is compatible with the SDFormat 1.7 spec (which supports nested models) and makes the treatment of models more consistent with regard to frame semantics. In libsdformat 9.2.0, a `//world/model` supports frame semantics: they have frames that can be referenced by name with `//pose/@relative_to` and `//world/frame/@attached_to` values can resolve to a `//world/model`. This extends that same behavior to nested `//model/model` elements; they now have their own frames in the frame and pose graphs, and a `//model/frame` is permitted to attach to a model. This does not add support for referencing elements within a model via the `::` syntax in the frame semantics or DOM APIs. That will be added in SDFormat 1.8 (see #293). Signed-off-by: Steve Peters --- CMakeLists.txt | 2 +- Changelog.md | 5 + Migration.md | 6 +- include/sdf/Model.hh | 28 +++- sdf/1.7/frame.sdf | 2 +- src/FrameSemantics.cc | 151 +++++++++++++++--- src/FrameSemantics.hh | 5 + src/Model.cc | 133 +++++++++++++-- src/Model_TEST.cc | 14 ++ src/SemanticPose.cc | 2 +- src/World.cc | 5 +- src/ign_TEST.cc | 67 ++++++-- src/parser.cc | 5 +- test/integration/frame.cc | 55 ++++++- test/integration/joint_dom.cc | 2 +- test/integration/link_dom.cc | 2 +- test/integration/model_dom.cc | 106 +++++++++++- .../model_frame_attached_to_nested_model.sdf | 11 ++ test/sdf/model_invalid_nested_joint_child.sdf | 16 ++ test/sdf/model_nested_model_relative_to.sdf | 18 +++ 20 files changed, 569 insertions(+), 66 deletions(-) create mode 100644 test/sdf/model_frame_attached_to_nested_model.sdf create mode 100644 test/sdf/model_invalid_nested_joint_child.sdf create mode 100644 test/sdf/model_nested_model_relative_to.sdf diff --git a/CMakeLists.txt b/CMakeLists.txt index 309a85590..3e5264c3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ project (sdformat9) set (SDF_PROTOCOL_VERSION 1.7) set (SDF_MAJOR_VERSION 9) -set (SDF_MINOR_VERSION 2) +set (SDF_MINOR_VERSION 3) set (SDF_PATCH_VERSION 0) set (SDF_VERSION ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}) diff --git a/Changelog.md b/Changelog.md index 126a55c2c..82333b517 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,6 +2,11 @@ ### SDFormat 9.X.X (202X-XX-XX) +### SDFormat 9.3.0 (2020-XX-XX) + +1. Support nested models in DOM and frame semantics. + * [Pull request 316](https://github.com/osrf/sdformat/pull/316) + 1. Find python3 in cmake, fix cmake warning. * [Pull request 328](https://github.com/osrf/sdformat/pull/328) diff --git a/Migration.md b/Migration.md index a9cc6a395..90385a0c9 100644 --- a/Migration.md +++ b/Migration.md @@ -45,6 +45,10 @@ but with improved human-readability.. + const Frame \*FrameByIndex(const uint64\_t) const + const Frame \*FrameByName(const std::string &) const + bool FrameNameExists(const std::string &) const + + uint64\_t ModelCount() const + + const Model \*ModelByIndex(const uint64\_t) const + + const Model \*ModelByName(const std::string &) const + + bool ModelNameExists(const std::string &) const + sdf::SemanticPose SemanticPose() const 1. **sdf/SDFImpl.hh** @@ -194,7 +198,7 @@ but with improved human-readability.. 1. **frame.sdf** `//frame/@attached_to` attribute + description: Name of the link or frame to which this frame is attached. If a frame is specified, recursively following the attached\_to attributes - of the specified frames must lead to the name of a link or the world frame. + of the specified frames must lead to the name of a link, a model, or the world frame. + type: string + default: "" + required: * diff --git a/include/sdf/Model.hh b/include/sdf/Model.hh index 018801982..677407212 100644 --- a/include/sdf/Model.hh +++ b/include/sdf/Model.hh @@ -198,6 +198,29 @@ namespace sdf /// \return True if there exists an explicit frame with the given name. public: bool FrameNameExists(const std::string &_name) const; + /// \brief Get the number of nested models. + /// \return Number of nested models contained in this Model object. + public: uint64_t ModelCount() const; + + /// \brief Get a nested model based on an index. + /// \param[in] _index Index of the nested model. The index should be in the + /// range [0..ModelCount()). + /// \return Pointer to the model. Nullptr if the index does not exist. + /// \sa uint64_t ModelCount() const + public: const Model *ModelByIndex(const uint64_t _index) const; + + /// \brief Get whether a nested model name exists. + /// \param[in] _name Name of the nested model to check. + /// \return True if there exists a nested model with the given name. + public: bool ModelNameExists(const std::string &_name) const; + + /// \brief Get a nested model based on a name. + /// \param[in] _name Name of the nested model. + /// \return Pointer to the model. Nullptr if a model with the given name + /// does not exist. + /// \sa bool ModelNameExists(const std::string &_name) const + public: const Model *ModelByName(const std::string &_name) const; + /// \brief Get the pose of the model. This is the pose of the model /// as specified in SDF ( ... ), and is /// typically used to express the position and rotation of a model in a @@ -281,9 +304,10 @@ namespace sdf /// \brief Give a weak pointer to the PoseRelativeToGraph to be used /// for resolving poses. This is private and is intended to be called by - /// World::Load. + /// World::Load and Model::Load if this is a nested model. /// \param[in] _graph Weak pointer to PoseRelativeToGraph. - private: void SetPoseRelativeToGraph( + /// \return Error if graph pointer is invalid. + private: sdf::Errors SetPoseRelativeToGraph( std::weak_ptr _graph); /// \brief Allow World::Load to call SetPoseRelativeToGraph. diff --git a/sdf/1.7/frame.sdf b/sdf/1.7/frame.sdf index be28ffe9b..dcc1c3397 100644 --- a/sdf/1.7/frame.sdf +++ b/sdf/1.7/frame.sdf @@ -10,7 +10,7 @@ Name of the link or frame to which this frame is attached. If a frame is specified, recursively following the attached_to attributes - of the specified frames must lead to the name of a link or the world frame. + of the specified frames must lead to the name of a link, a model, or the world frame. diff --git a/src/FrameSemantics.cc b/src/FrameSemantics.cc index 6f606e3a4..a3918ab7a 100644 --- a/src/FrameSemantics.cc +++ b/src/FrameSemantics.cc @@ -285,6 +285,23 @@ Errors buildFrameAttachedToGraph( _out.map[frame->Name()] = frameId; } + // add nested model vertices + for (uint64_t m = 0; m < _model->ModelCount(); ++m) + { + auto nestedModel = _model->ModelByIndex(m); + if (_out.map.count(nestedModel->Name()) > 0) + { + errors.push_back({ErrorCode::DUPLICATE_NAME, + "Nested model with non-unique name [" + nestedModel->Name() + + "] detected in model with name [" + _model->Name() + + "]."}); + continue; + } + auto nestedModelId = + _out.graph.AddVertex(nestedModel->Name(), sdf::FrameType::MODEL).Id(); + _out.map[nestedModel->Name()] = nestedModelId; + } + // add frame edges for (uint64_t f = 0; f < _model->FrameCount(); ++f) { @@ -302,7 +319,7 @@ Errors buildFrameAttachedToGraph( errors.push_back({ErrorCode::FRAME_ATTACHED_TO_INVALID, "attached_to name[" + attachedTo + "] specified by frame with name[" + frame->Name() + - "] does not match a link, joint, or frame name " + "] does not match a nested model, link, joint, or frame name " "in model with name[" + _model->Name() + "]."}); continue; } @@ -352,9 +369,9 @@ Errors buildFrameAttachedToGraph( } // add model vertices - for (uint64_t l = 0; l < _world->ModelCount(); ++l) + for (uint64_t m = 0; m < _world->ModelCount(); ++m) { - auto model = _world->ModelByIndex(l); + auto model = _world->ModelByIndex(m); if (_out.map.count(model->Name()) > 0) { errors.push_back({ErrorCode::DUPLICATE_NAME, @@ -537,6 +554,30 @@ Errors buildPoseRelativeToGraph( } } + // add nested model vertices and default edge if relative_to is empty + for (uint64_t m = 0; m < _model->ModelCount(); ++m) + { + auto nestedModel = _model->ModelByIndex(m); + if (_out.map.count(nestedModel->Name()) > 0) + { + errors.push_back({ErrorCode::DUPLICATE_NAME, + "Nested model with non-unique name [" + nestedModel->Name() + + "] detected in model with name [" + _model->Name() + + "]."}); + continue; + } + auto nestedModelId = + _out.graph.AddVertex(nestedModel->Name(), sdf::FrameType::MODEL).Id(); + _out.map[nestedModel->Name()] = nestedModelId; + + if (nestedModel->PoseRelativeTo().empty()) + { + // relative_to is empty, so add edge from implicit model frame + // to nestedModel + _out.graph.AddEdge({modelFrameId, nestedModelId}, nestedModel->RawPose()); + } + } + // now that all vertices have been added to the graph, // add the edges that reference other vertices @@ -559,7 +600,7 @@ Errors buildPoseRelativeToGraph( errors.push_back({ErrorCode::POSE_RELATIVE_TO_INVALID, "relative_to name[" + relativeTo + "] specified by link with name[" + link->Name() + - "] does not match a link, joint, or frame name " + "] does not match a nested model, link, joint, or frame name " "in model with name[" + _model->Name() + "]."}); continue; } @@ -594,7 +635,7 @@ Errors buildPoseRelativeToGraph( errors.push_back({ErrorCode::POSE_RELATIVE_TO_INVALID, "relative_to name[" + relativeTo + "] specified by joint with name[" + joint->Name() + - "] does not match a link, joint, or frame name " + "] does not match a nested model, link, joint, or frame name " "in model with name[" + _model->Name() + "]."}); continue; } @@ -643,7 +684,7 @@ Errors buildPoseRelativeToGraph( errors.push_back({errorCode, typeForErrorMsg + " name[" + relativeTo + "] specified by frame with name[" + frame->Name() + - "] does not match a link, joint, or frame name " + "] does not match a nested model, link, joint, or frame name " "in model with name[" + _model->Name() + "]."}); continue; } @@ -659,6 +700,41 @@ Errors buildPoseRelativeToGraph( _out.graph.AddEdge({relativeToId, frameId}, frame->RawPose()); } + for (uint64_t m = 0; m < _model->ModelCount(); ++m) + { + auto nestedModel = _model->ModelByIndex(m); + + // check if we've already added a default edge + const std::string relativeTo = nestedModel->PoseRelativeTo(); + if (relativeTo.empty()) + { + continue; + } + + auto nestedModelId = _out.map.at(nestedModel->Name()); + + // look for vertex in graph that matches relative_to value + if (_out.map.count(relativeTo) != 1) + { + errors.push_back({ErrorCode::POSE_RELATIVE_TO_INVALID, + "relative_to name[" + relativeTo + + "] specified by nested model with name[" + nestedModel->Name() + + "] does not match a nested model, link, joint, or frame name " + "in model with name[" + _model->Name() + "]."}); + continue; + } + auto relativeToId = _out.map[relativeTo]; + if (nestedModel->Name() == relativeTo) + { + errors.push_back({ErrorCode::POSE_RELATIVE_TO_CYCLE, + "relative_to name[" + relativeTo + + "] is identical to nested model name[" + nestedModel->Name() + + "], causing a graph cycle " + "in model with name[" + _model->Name() + "]."}); + } + _out.graph.AddEdge({relativeToId, nestedModelId}, nestedModel->RawPose()); + } + return errors; } @@ -916,6 +992,22 @@ Errors validateFrameAttachedToGraph(const FrameAttachedToGraph &_in) "in MODEL attached_to graph."}); } break; + case sdf::FrameType::MODEL: + if ("__model__" != vertexPair.second.get().Name()) + { + if (outDegree != 0) + { + errors.push_back({ErrorCode::FRAME_ATTACHED_TO_GRAPH_ERROR, + "FrameAttachedToGraph error, " + "nested MODEL vertex with name [" + + vertexPair.second.get().Name() + + "] should have no outgoing edges " + "in MODEL attached_to graph."}); + } + break; + } + // fall through to default case for __model__ + [[fallthrough]]; default: if (outDegree == 0) { @@ -1065,22 +1157,26 @@ Errors validatePoseRelativeToGraph(const PoseRelativeToGraph &_in) "should not have type WORLD in MODEL relative_to graph."}); break; case sdf::FrameType::MODEL: - if (inDegree != 0) + if ("__model__" == vertexPair.second.get().Name()) { - errors.push_back({ErrorCode::POSE_RELATIVE_TO_GRAPH_ERROR, - "PoseRelativeToGraph error, " - "MODEL vertex with name [" + - vertexPair.second.get().Name() + - "] should have no incoming edges " - "in MODEL relative_to graph."}); + if (inDegree != 0) + { + errors.push_back({ErrorCode::POSE_RELATIVE_TO_GRAPH_ERROR, + "PoseRelativeToGraph error, " + "MODEL vertex with name [__model__" + "] should have no incoming edges " + "in MODEL relative_to graph."}); + } + break; } - break; + // fall through to default case for nested models + [[fallthrough]]; default: if (inDegree == 0) { errors.push_back({ErrorCode::POSE_RELATIVE_TO_GRAPH_ERROR, "PoseRelativeToGraph error, " - "Non-MODEL vertex with name [" + + "Vertex with name [" + vertexPair.second.get().Name() + "] is disconnected; it should have 1 incoming edge " + "in MODEL relative_to graph."}); @@ -1206,13 +1302,26 @@ Errors resolveFrameAttachedToBody( return errors; } - if (_in.scopeName == "__model__" && sinkVertex.Data() != FrameType::LINK) + if (_in.scopeName == "__model__") { - errors.push_back({ErrorCode::FRAME_ATTACHED_TO_GRAPH_ERROR, - "Graph has __model__ scope but sink vertex named [" + - sinkVertex.Name() + "] does not have FrameType LINK " - "when starting from vertex with name [" + _vertexName + "]."}); - return errors; + if (sinkVertex.Data() == FrameType::MODEL && + sinkVertex.Name() == "__model__") + { + errors.push_back({ErrorCode::FRAME_ATTACHED_TO_GRAPH_ERROR, + "Graph with __model__ scope has sink vertex named [__model__] " + "when starting from vertex with name [" + _vertexName + "], " + "which is not permitted."}); + return errors; + } + else if (sinkVertex.Data() != FrameType::LINK && + sinkVertex.Data() != FrameType::MODEL) + { + errors.push_back({ErrorCode::FRAME_ATTACHED_TO_GRAPH_ERROR, + "Graph has __model__ scope but sink vertex named [" + + sinkVertex.Name() + "] does not have FrameType LINK OR MODEL " + "when starting from vertex with name [" + _vertexName + "]."}); + return errors; + } } _attachedToBody = sinkVertex.Name(); diff --git a/src/FrameSemantics.hh b/src/FrameSemantics.hh index 8de5bb040..a6c1a59df 100644 --- a/src/FrameSemantics.hh +++ b/src/FrameSemantics.hh @@ -32,6 +32,11 @@ /// The Frame Semantics Utilities construct and operate on graphs representing /// the kinematics, frame attached_to, and pose relative_to relationships /// defined within models and world. +/// +/// Note that all graphs should only contain relative names (e.g. "my_link"), +/// not absolute names ("top_model::nested_model::my_link"). +/// Graphs inside nested models (currently via directly nested models in +/// //model or //world elements) will be explicitly separate graphs. namespace sdf { // Inline bracket to help doxygen filtering. diff --git a/src/Model.cc b/src/Model.cc index fe8be53ee..f359075ca 100644 --- a/src/Model.cc +++ b/src/Model.cc @@ -67,6 +67,9 @@ class sdf::ModelPrivate /// \brief The frames specified in this model. public: std::vector frames; + /// \brief The nested models specified in this model. + public: std::vector models; + /// \brief The SDF element pointer used during load. public: sdf::ElementPtr sdf; @@ -76,8 +79,11 @@ class sdf::ModelPrivate /// \brief Pose Relative-To Graph constructed during Load. public: std::shared_ptr poseGraph; - /// \brief Pose Relative-To Graph in parent (world) scope. + /// \brief Pose Relative-To Graph in parent (world or __model__) scope. public: std::weak_ptr parentPoseGraph; + + /// \brief Scope name of parent Pose Relative-To Graph (world or __model__). + public: std::string parentPoseGraphScopeName; }; ///////////////////////////////////////////////// @@ -112,6 +118,10 @@ Model::Model(const Model &_model) { link.SetPoseRelativeToGraph(this->dataPtr->poseGraph); } + for (auto &model : this->dataPtr->models) + { + model.SetPoseRelativeToGraph(this->dataPtr->poseGraph); + } for (auto &joint : this->dataPtr->joints) { joint.SetPoseRelativeToGraph(this->dataPtr->poseGraph); @@ -197,14 +207,6 @@ Errors Model::Load(ElementPtr _sdf) // Load the pose. Ignore the return value since the model pose is optional. loadPose(_sdf, this->dataPtr->pose, this->dataPtr->poseRelativeTo); - // Nested models are not yet supported. - if (_sdf->HasElement("model")) - { - errors.push_back({ErrorCode::NESTED_MODELS_UNSUPPORTED, - "Nested models are not yet supported by DOM objects, " - "skipping model [" + this->dataPtr->name + "]."}); - } - if (!_sdf->HasUniqueChildNames()) { sdfwarn << "Non-unique names detected in XML children of model with name[" @@ -215,17 +217,56 @@ Errors Model::Load(ElementPtr _sdf) // name collisions std::unordered_set frameNames; + // Load nested models. + Errors nestedModelLoadErrors = loadUniqueRepeated(_sdf, "model", + this->dataPtr->models); + errors.insert(errors.end(), + nestedModelLoadErrors.begin(), + nestedModelLoadErrors.end()); + + // Nested models are loaded first, and loadUniqueRepeated ensures there are no + // duplicate names, so these names can be added to frameNames without + // checking uniqueness. + for (const auto &model : this->dataPtr->models) + { + frameNames.insert(model.Name()); + } + // Load all the links. Errors linkLoadErrors = loadUniqueRepeated(_sdf, "link", this->dataPtr->links); errors.insert(errors.end(), linkLoadErrors.begin(), linkLoadErrors.end()); - // Links are loaded first, and loadUniqueRepeated ensures there are no - // duplicate names, so these names can be added to frameNames without - // checking uniqueness. - for (const auto &link : this->dataPtr->links) + // Check links for name collisions and modify and warn if so. + for (auto &link : this->dataPtr->links) { - frameNames.insert(link.Name()); + std::string linkName = link.Name(); + if (frameNames.count(linkName) > 0) + { + // This link has a name collision + if (sdfVersion < ignition::math::SemanticVersion(1, 7)) + { + // This came from an old file, so try to workaround by renaming link + linkName += "_link"; + int i = 0; + while (frameNames.count(linkName) > 0) + { + linkName = link.Name() + "_link" + std::to_string(i++); + } + sdfwarn << "Link with name [" << link.Name() << "] " + << "in model with name [" << this->Name() << "] " + << "has a name collision, changing link name to [" + << linkName << "].\n"; + link.SetName(linkName); + } + else + { + sdferr << "Link with name [" << link.Name() << "] " + << "in model with name [" << this->Name() << "] " + << "has a name collision. Please rename this link.\n"; + } + } + frameNames.insert(linkName); } // If the model is not static: @@ -348,6 +389,13 @@ Errors Model::Load(ElementPtr _sdf) { link.SetPoseRelativeToGraph(this->dataPtr->poseGraph); } + for (auto &model : this->dataPtr->models) + { + Errors setPoseRelativeToGraphErrors = + model.SetPoseRelativeToGraph(this->dataPtr->poseGraph); + errors.insert(errors.end(), setPoseRelativeToGraphErrors.begin(), + setPoseRelativeToGraphErrors.end()); + } for (auto &joint : this->dataPtr->joints) { joint.SetPoseRelativeToGraph(this->dataPtr->poseGraph); @@ -527,6 +575,46 @@ const Frame *Model::FrameByName(const std::string &_name) const return nullptr; } +///////////////////////////////////////////////// +uint64_t Model::ModelCount() const +{ + return this->dataPtr->models.size(); +} + +///////////////////////////////////////////////// +const Model *Model::ModelByIndex(const uint64_t _index) const +{ + if (_index < this->dataPtr->models.size()) + return &this->dataPtr->models[_index]; + return nullptr; +} + +///////////////////////////////////////////////// +bool Model::ModelNameExists(const std::string &_name) const +{ + for (auto const &m : this->dataPtr->models) + { + if (m.Name() == _name) + { + return true; + } + } + return false; +} + +///////////////////////////////////////////////// +const Model *Model::ModelByName(const std::string &_name) const +{ + for (auto const &m : this->dataPtr->models) + { + if (m.Name() == _name) + { + return &m; + } + } + return nullptr; +} + ///////////////////////////////////////////////// const Link *Model::CanonicalLink() const { @@ -601,10 +689,23 @@ void Model::SetPoseRelativeTo(const std::string &_frame) } ///////////////////////////////////////////////// -void Model::SetPoseRelativeToGraph( +Errors Model::SetPoseRelativeToGraph( std::weak_ptr _graph) { + Errors errors; + + auto graph = _graph.lock(); + if (!graph) + { + errors.push_back({ErrorCode::POSE_RELATIVE_TO_GRAPH_ERROR, + "Tried to set PoseRelativeToGraph with invalid pointer."}); + return errors; + } + + this->dataPtr->parentPoseGraphScopeName = graph->sourceName; this->dataPtr->parentPoseGraph = _graph; + + return errors; } ///////////////////////////////////////////////// @@ -613,7 +714,7 @@ sdf::SemanticPose Model::SemanticPose() const return sdf::SemanticPose( this->dataPtr->pose, this->dataPtr->poseRelativeTo, - "world", + this->dataPtr->parentPoseGraphScopeName, this->dataPtr->parentPoseGraph); } diff --git a/src/Model_TEST.cc b/src/Model_TEST.cc index 2d5293e75..86584b4a5 100644 --- a/src/Model_TEST.cc +++ b/src/Model_TEST.cc @@ -47,21 +47,35 @@ TEST(DOMModel, Construction) model.SetEnableWind(true); EXPECT_TRUE(model.EnableWind()); + EXPECT_EQ(0u, model.ModelCount()); + EXPECT_EQ(nullptr, model.ModelByIndex(0)); + EXPECT_EQ(nullptr, model.ModelByIndex(1)); + EXPECT_EQ(nullptr, model.ModelByName("")); + EXPECT_EQ(nullptr, model.ModelByName("default")); + EXPECT_FALSE(model.ModelNameExists("")); + EXPECT_FALSE(model.ModelNameExists("default")); + EXPECT_EQ(0u, model.LinkCount()); EXPECT_EQ(nullptr, model.LinkByIndex(0)); EXPECT_EQ(nullptr, model.LinkByIndex(1)); + EXPECT_EQ(nullptr, model.LinkByName("")); + EXPECT_EQ(nullptr, model.LinkByName("default")); EXPECT_FALSE(model.LinkNameExists("")); EXPECT_FALSE(model.LinkNameExists("default")); EXPECT_EQ(0u, model.JointCount()); EXPECT_EQ(nullptr, model.JointByIndex(0)); EXPECT_EQ(nullptr, model.JointByIndex(1)); + EXPECT_EQ(nullptr, model.JointByName("")); + EXPECT_EQ(nullptr, model.JointByName("default")); EXPECT_FALSE(model.JointNameExists("")); EXPECT_FALSE(model.JointNameExists("default")); EXPECT_EQ(0u, model.FrameCount()); EXPECT_EQ(nullptr, model.FrameByIndex(0)); EXPECT_EQ(nullptr, model.FrameByIndex(1)); + EXPECT_EQ(nullptr, model.FrameByName("")); + EXPECT_EQ(nullptr, model.FrameByName("default")); EXPECT_FALSE(model.FrameNameExists("")); EXPECT_FALSE(model.FrameNameExists("default")); diff --git a/src/SemanticPose.cc b/src/SemanticPose.cc index 01e7f904e..eefc7d51c 100644 --- a/src/SemanticPose.cc +++ b/src/SemanticPose.cc @@ -106,7 +106,7 @@ Errors SemanticPose::Resolve( auto graph = this->dataPtr->poseRelativeToGraph.lock(); if (!graph) { - errors.push_back({ErrorCode::ELEMENT_INVALID, + errors.push_back({ErrorCode::POSE_RELATIVE_TO_GRAPH_ERROR, "SemanticPose has invalid pointer to PoseRelativeToGraph."}); return errors; } diff --git a/src/World.cc b/src/World.cc index c21646155..38ac9c1b3 100644 --- a/src/World.cc +++ b/src/World.cc @@ -372,7 +372,10 @@ Errors World::Load(sdf::ElementPtr _sdf) } for (auto &model : this->dataPtr->models) { - model.SetPoseRelativeToGraph(this->dataPtr->poseRelativeToGraph); + Errors setPoseRelativeToGraphErrors = + model.SetPoseRelativeToGraph(this->dataPtr->poseRelativeToGraph); + errors.insert(errors.end(), setPoseRelativeToGraphErrors.begin(), + setPoseRelativeToGraphErrors.end()); } for (auto &light : this->dataPtr->lights) { diff --git a/src/ign_TEST.cc b/src/ign_TEST.cc index b98c6e752..49ef7e680 100644 --- a/src/ign_TEST.cc +++ b/src/ign_TEST.cc @@ -275,6 +275,17 @@ TEST(check, SDF) std::string::npos) << output; } + // Check an SDF file with an invalid model without links. + { + std::string path = pathBase +"/model_without_links.sdf"; + + // Check model_without_links.sdf + std::string output = + custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); + EXPECT_NE(output.find("Error: A model must have at least one link."), + std::string::npos) << output; + } + // Check an SDF file with a nested model. { std::string path = pathBase +"/nested_model.sdf"; @@ -282,9 +293,7 @@ TEST(check, SDF) // Check nested_model.sdf std::string output = custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); - EXPECT_NE(output.find("Error: Nested models are not yet supported by DOM " - "objects, skipping model [top_level_model]."), - std::string::npos) << output; + EXPECT_EQ("Valid.\n", output) << output; } // Check an invalid SDF file that uses reserved names. @@ -353,6 +362,17 @@ TEST(check, SDF) EXPECT_EQ("Valid.\n", output) << output; } + // Check an SDF file with model frames attached_to a nested model. + // This is a valid file. + { + std::string path = pathBase +"/model_frame_attached_to_nested_model.sdf"; + + // Check model_frame_attached_to_nested_model.sdf + std::string output = + custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); + EXPECT_EQ("Valid.\n", output) << output; + } + // Check an SDF file with model frames with invalid attached_to attributes. { std::string path = pathBase +"/model_frame_invalid_attached_to.sdf"; @@ -361,8 +381,8 @@ TEST(check, SDF) std::string output = custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); EXPECT_NE(output.find("Error: attached_to name[A] specified by frame with " - "name[F3] does not match a link, joint, or frame " - "name in model with " + "name[F3] does not match a nested model, link, " + "joint, or frame name in model with " "name[model_frame_invalid_attached_to]."), std::string::npos) << output; EXPECT_NE(output.find("Error: attached_to name[F4] is identical to frame " @@ -435,8 +455,8 @@ TEST(check, SDF) std::string output = custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); EXPECT_NE(output.find("Error: relative_to name[A] specified by link with " - "name[L] does not match a link, joint, or frame " - "name in model with " + "name[L] does not match a nested model, link, " + "joint, or frame name in model with " "name[model_invalid_link_relative_to]."), std::string::npos) << output; EXPECT_NE(output.find("Error: relative_to name[self_cycle] is identical to " @@ -445,6 +465,31 @@ TEST(check, SDF) std::string::npos) << output; } + // Check an SDF file with nested_models using the relative_to attribute. + // This is a valid file. + { + std::string path = pathBase +"/model_nested_model_relative_to.sdf"; + + // Check model_nested_model_relative_to.sdf + std::string output = + custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); + EXPECT_EQ("Valid.\n", output) << output; + } + + // Check an invalid SDF file with a joint that specifies a child link + // within a sibling nested model using the unsupported :: syntax. + { + std::string path = pathBase +"/model_invalid_nested_joint_child.sdf"; + + // Check model_invalid_nested_joint_child.sdf + std::string output = + custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); + EXPECT_NE(output.find("Error: Child link with name[M::C] specified by " + "joint with name[J] not found in model with " + "name[model_invalid_nested_joint_child]."), + std::string::npos) << output; + } + // Check an SDF file with joints using the relative_to attribute. // This is a valid file. { @@ -464,8 +509,8 @@ TEST(check, SDF) std::string output = custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); EXPECT_NE(output.find("Error: relative_to name[A] specified by joint with " - "name[J] does not match a link, joint, or frame " - "name in model with " + "name[J] does not match a nested model, link, " + "joint, or frame name in model with " "name[model_invalid_joint_relative_to]."), std::string::npos) << output; EXPECT_NE(output.find("Error: relative_to name[Jcycle] is identical to " @@ -504,8 +549,8 @@ TEST(check, SDF) std::string output = custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); EXPECT_NE(output.find("Error: relative_to name[A] specified by frame with " - "name[F] does not match a link, joint, or frame " - "name in model with " + "name[F] does not match a nested model, link, " + "joint, or frame name in model with " "name[model_invalid_frame_relative_to]."), std::string::npos) << output; EXPECT_NE(output.find("Error: relative_to name[cycle] is identical to " diff --git a/src/parser.cc b/src/parser.cc index 5e7fdbf27..911ef50c4 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -1523,13 +1523,14 @@ bool checkFrameAttachedToNames(const sdf::Root *_root) modelResult = false; } else if (!_model->LinkNameExists(attachedTo) && + !_model->ModelNameExists(attachedTo) && !_model->JointNameExists(attachedTo) && !_model->FrameNameExists(attachedTo)) { std::cerr << "Error: attached_to name[" << attachedTo << "] specified by frame with name[" << frame->Name() - << "] does not match a link, joint, or frame name " - << "in model with name[" << _model->Name() + << "] does not match a nested model, link, joint, " + << "or frame name in model with name[" << _model->Name() << "]." << std::endl; modelResult = false; diff --git a/test/integration/frame.cc b/test/integration/frame.cc index 6c9c89b12..02542f232 100644 --- a/test/integration/frame.cc +++ b/test/integration/frame.cc @@ -489,7 +489,7 @@ TEST(DOMFrame, LoadModelFramesInvalidAttachedTo) EXPECT_NE(std::string::npos, errors[0].Message().find( "attached_to name[A] specified by frame with name[F3] does not match a " - "link, joint, or frame name in model")); + "nested model, link, joint, or frame name in model")); EXPECT_EQ(errors[1].Code(), sdf::ErrorCode::FRAME_ATTACHED_TO_CYCLE); EXPECT_NE(std::string::npos, errors[1].Message().find( @@ -502,7 +502,7 @@ TEST(DOMFrame, LoadModelFramesInvalidAttachedTo) EXPECT_NE(std::string::npos, errors[5].Message().find( "attached_to name[A] specified by frame with name[F3] does not match a " - "link, joint, or frame name in model")); + "nested model, link, joint, or frame name in model")); EXPECT_EQ(errors[6].Code(), sdf::ErrorCode::POSE_RELATIVE_TO_CYCLE); EXPECT_NE(std::string::npos, errors[6].Message().find( @@ -578,6 +578,55 @@ TEST(DOMFrame, LoadModelFramesAttachedToJoint) EXPECT_EQ("C", body); } +///////////////////////////////////////////////// +TEST(DOMFrame, LoadModelFramesAttachedToNestedModel) +{ + const std::string testFile = + sdf::filesystem::append(PROJECT_SOURCE_PATH, "test", "sdf", + "model_frame_attached_to_nested_model.sdf"); + + // Load the SDF file + sdf::Root root; + EXPECT_TRUE(root.Load(testFile).empty()); + + // Get the first model + const sdf::Model *model = root.ModelByIndex(0); + ASSERT_NE(nullptr, model); + EXPECT_EQ("model_frame_attached_to_nested_model", model->Name()); + EXPECT_EQ(1u, model->LinkCount()); + EXPECT_NE(nullptr, model->LinkByIndex(0)); + EXPECT_EQ(nullptr, model->LinkByIndex(1)); + + EXPECT_TRUE(model->LinkNameExists("link")); + + EXPECT_TRUE(model->CanonicalLinkName().empty()); + + EXPECT_EQ(0u, model->JointCount()); + EXPECT_EQ(nullptr, model->JointByIndex(0)); + + EXPECT_EQ(1u, model->ModelCount()); + EXPECT_NE(nullptr, model->ModelByIndex(0)); + EXPECT_EQ(nullptr, model->ModelByIndex(1)); + + EXPECT_TRUE(model->ModelNameExists("nested_model")); + + EXPECT_EQ(2u, model->FrameCount()); + EXPECT_NE(nullptr, model->FrameByIndex(0)); + EXPECT_NE(nullptr, model->FrameByIndex(1)); + EXPECT_EQ(nullptr, model->FrameByIndex(2)); + ASSERT_TRUE(model->FrameNameExists("F1")); + ASSERT_TRUE(model->FrameNameExists("F2")); + + EXPECT_EQ("nested_model", model->FrameByName("F1")->AttachedTo()); + EXPECT_EQ("F1", model->FrameByName("F2")->AttachedTo()); + + std::string body; + EXPECT_TRUE(model->FrameByName("F1")->ResolveAttachedToBody(body).empty()); + EXPECT_EQ("nested_model", body); + EXPECT_TRUE(model->FrameByName("F2")->ResolveAttachedToBody(body).empty()); + EXPECT_EQ("nested_model", body); +} + ///////////////////////////////////////////////// TEST(DOMFrame, LoadWorldFramesAttachedTo) { @@ -837,7 +886,7 @@ TEST(DOMFrame, LoadModelFramesInvalidRelativeTo) EXPECT_NE(std::string::npos, errors[0].Message().find( "relative_to name[A] specified by frame with name[F] does not match a " - "link, joint, or frame name in model")); + "nested model, link, joint, or frame name in model")); EXPECT_EQ(errors[1].Code(), sdf::ErrorCode::POSE_RELATIVE_TO_CYCLE); EXPECT_NE(std::string::npos, errors[1].Message().find( diff --git a/test/integration/joint_dom.cc b/test/integration/joint_dom.cc index a7d7b0cd3..255a0e0fc 100644 --- a/test/integration/joint_dom.cc +++ b/test/integration/joint_dom.cc @@ -343,7 +343,7 @@ TEST(DOMJoint, LoadInvalidJointPoseRelativeTo) EXPECT_NE(std::string::npos, errors[1].Message().find( "relative_to name[A] specified by joint with name[J] does not match a " - "link, joint, or frame name in model")); + "nested model, link, joint, or frame name in model")); // errors[2] // errors[3] // errors[4] diff --git a/test/integration/link_dom.cc b/test/integration/link_dom.cc index 0633d8f22..19b018da5 100644 --- a/test/integration/link_dom.cc +++ b/test/integration/link_dom.cc @@ -672,7 +672,7 @@ TEST(DOMLink, LoadInvalidLinkPoseRelativeTo) EXPECT_NE(std::string::npos, errors[0].Message().find( "relative_to name[A] specified by link with name[L] does not match a " - "link, joint, or frame name in model")); + "nested model, link, joint, or frame name in model")); EXPECT_EQ(errors[1].Code(), sdf::ErrorCode::POSE_RELATIVE_TO_CYCLE); EXPECT_NE(std::string::npos, errors[1].Message().find( diff --git a/test/integration/model_dom.cc b/test/integration/model_dom.cc index 171ba1edb..299100509 100644 --- a/test/integration/model_dom.cc +++ b/test/integration/model_dom.cc @@ -155,10 +155,7 @@ TEST(DOMRoot, NestedModel) // Load the SDF file sdf::Root root; auto errors = root.Load(testFile); - - // it should complain because nested models aren't yet supported - EXPECT_FALSE(errors.empty()); - EXPECT_EQ(errors[0].Code(), sdf::ErrorCode::NESTED_MODELS_UNSUPPORTED); + EXPECT_TRUE(errors.empty()); EXPECT_EQ(1u, root.ModelCount()); @@ -181,6 +178,107 @@ TEST(DOMRoot, NestedModel) EXPECT_EQ(nullptr, model->JointByIndex(1)); EXPECT_TRUE(model->JointNameExists("top_level_joint")); + + ASSERT_EQ(1u, model->ModelCount()); + const sdf::Model *nestedModel = model->ModelByIndex(0); + ASSERT_NE(nullptr, nestedModel); + EXPECT_EQ(nullptr, model->ModelByIndex(1)); + + EXPECT_TRUE(model->ModelNameExists("nested_model")); + EXPECT_EQ(nestedModel, model->ModelByName("nested_model")); + EXPECT_EQ("nested_model", nestedModel->Name()); + + EXPECT_EQ(1u, nestedModel->LinkCount()); + EXPECT_NE(nullptr, nestedModel->LinkByIndex(0)); + EXPECT_EQ(nullptr, nestedModel->LinkByIndex(1)); + + EXPECT_TRUE(nestedModel->LinkNameExists("nested_link01")); + + EXPECT_EQ(0u, nestedModel->JointCount()); + EXPECT_EQ(0u, nestedModel->FrameCount()); +} + +///////////////////////////////////////////////// +TEST(DOMLink, NestedModelPoseRelativeTo) +{ + const std::string testFile = + sdf::filesystem::append(PROJECT_SOURCE_PATH, "test", "sdf", + "model_nested_model_relative_to.sdf"); + + // Load the SDF file + sdf::Root root; + EXPECT_TRUE(root.Load(testFile).empty()); + + using Pose = ignition::math::Pose3d; + + // Get the first model + const sdf::Model *model = root.ModelByIndex(0); + ASSERT_NE(nullptr, model); + EXPECT_EQ("model_nested_model_relative_to", model->Name()); + EXPECT_EQ(1u, model->LinkCount()); + EXPECT_NE(nullptr, model->LinkByIndex(0)); + EXPECT_EQ(nullptr, model->LinkByIndex(1)); + EXPECT_EQ(Pose(0, 0, 0, 0, 0, 0), model->RawPose()); + EXPECT_EQ("", model->PoseRelativeTo()); + + ASSERT_TRUE(model->LinkNameExists("L")); + EXPECT_TRUE(model->LinkByName("L")->PoseRelativeTo().empty()); + EXPECT_EQ(Pose(0, 0, 0, 0, 0, 0), model->LinkByName("L")->RawPose()); + + ASSERT_TRUE(model->ModelNameExists("M1")); + ASSERT_TRUE(model->ModelNameExists("M2")); + ASSERT_TRUE(model->ModelNameExists("M3")); + EXPECT_TRUE(model->ModelByName("M1")->PoseRelativeTo().empty()); + EXPECT_TRUE(model->ModelByName("M2")->PoseRelativeTo().empty()); + EXPECT_EQ("M1", model->ModelByName("M3")->PoseRelativeTo()); + + EXPECT_EQ(Pose(1, 0, 0, 0, IGN_PI/2, 0), model->ModelByName("M1")->RawPose()); + EXPECT_EQ(Pose(2, 0, 0, 0, 0, 0), model->ModelByName("M2")->RawPose()); + EXPECT_EQ(Pose(3, 0, 0, 0, 0, 0), model->ModelByName("M3")->RawPose()); + + EXPECT_EQ(Pose(1, 0, 0, 0, IGN_PI / 2, 0), + model->ModelByName("M1")->SemanticPose().RawPose()); + EXPECT_EQ(Pose(2, 0, 0, 0, 0, 0), + model->ModelByName("M2")->SemanticPose().RawPose()); + EXPECT_EQ(Pose(3, 0, 0, 0, 0, 0), + model->ModelByName("M3")->SemanticPose().RawPose()); + + // Test SemanticPose().Resolve to get each nested model pose in the + // __model__ frame + Pose pose; + EXPECT_TRUE( + model->ModelByName("M1")->SemanticPose().Resolve(pose, + "__model__").empty()); + EXPECT_EQ(Pose(1, 0, 0, 0, IGN_PI/2, 0), pose); + EXPECT_TRUE( + model->ModelByName("M2")->SemanticPose().Resolve(pose, + "__model__").empty()); + EXPECT_EQ(Pose(2, 0, 0, 0, 0, 0), pose); + EXPECT_TRUE( + model->ModelByName("M3")->SemanticPose().Resolve(pose, + "__model__").empty()); + EXPECT_EQ(Pose(1, 0, -3, 0, IGN_PI/2, 0), pose); + // test other API too + EXPECT_TRUE(model->ModelByName("M1")->SemanticPose().Resolve(pose).empty()); + EXPECT_EQ(Pose(1, 0, 0, 0, IGN_PI/2, 0), pose); + EXPECT_TRUE(model->ModelByName("M2")->SemanticPose().Resolve(pose).empty()); + EXPECT_EQ(Pose(2, 0, 0, 0, 0, 0), pose); + EXPECT_TRUE(model->ModelByName("M3")->SemanticPose().Resolve(pose).empty()); + EXPECT_EQ(Pose(1, 0, -3, 0, IGN_PI/2, 0), pose); + + // resolve pose of M1 relative to M3 + // should be inverse of M3's Pose() + EXPECT_TRUE( + model->ModelByName("M1")->SemanticPose().Resolve(pose, "M3").empty()); + EXPECT_EQ(Pose(-3, 0, 0, 0, 0, 0), pose); + + EXPECT_TRUE(model->CanonicalLinkName().empty()); + + EXPECT_EQ(0u, model->JointCount()); + EXPECT_EQ(nullptr, model->JointByIndex(0)); + + EXPECT_EQ(0u, model->FrameCount()); + EXPECT_EQ(nullptr, model->FrameByIndex(0)); } ///////////////////////////////////////////////// diff --git a/test/sdf/model_frame_attached_to_nested_model.sdf b/test/sdf/model_frame_attached_to_nested_model.sdf new file mode 100644 index 000000000..995d828dd --- /dev/null +++ b/test/sdf/model_frame_attached_to_nested_model.sdf @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/test/sdf/model_invalid_nested_joint_child.sdf b/test/sdf/model_invalid_nested_joint_child.sdf new file mode 100644 index 000000000..efde66366 --- /dev/null +++ b/test/sdf/model_invalid_nested_joint_child.sdf @@ -0,0 +1,16 @@ + + + + + + 1 0 0 0 1.5707963267948966 0 + + + + P + + + M::C + + + diff --git a/test/sdf/model_nested_model_relative_to.sdf b/test/sdf/model_nested_model_relative_to.sdf new file mode 100644 index 000000000..fc3c4630b --- /dev/null +++ b/test/sdf/model_nested_model_relative_to.sdf @@ -0,0 +1,18 @@ + + + + + + 1 0 0 0 1.5707963267948966 0 + + + + 2 0 0 0 0 0 + + + + 3 0 0 0 0 0 + + + + From 436a848a3aab6f3844b4b2ea8d171d0f37620dfb Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Mon, 17 Aug 2020 11:45:58 -0700 Subject: [PATCH 15/42] bump to 9.3.0~pre1 (#337) Signed-off-by: Steve Peters --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e5264c3a..82e6510f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ set (SDF_MINOR_VERSION 3) set (SDF_PATCH_VERSION 0) set (SDF_VERSION ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}) -set (SDF_VERSION_FULL ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}.${SDF_PATCH_VERSION}) +set (SDF_VERSION_FULL ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}.${SDF_PATCH_VERSION}~pre1) string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) string(REGEX REPLACE "[0-9]+" "" PROJECT_NAME_NO_VERSION ${PROJECT_NAME}) From d800d1c3f294817528828e2fc8d84b926075f01e Mon Sep 17 00:00:00 2001 From: Luca Della Vedova Date: Wed, 1 Jul 2020 08:03:48 +0800 Subject: [PATCH 16/42] Fix Actor.cc copy operators and restructure tests (#301) * Simplify and fix copy constructors, restructure tests and increase coverage * Add joint and link tests * Add changelog Signed-off-by: Luca Della Vedova Co-authored-by: Ian Chen Co-authored-by: Steve Peters --- Changelog.md | 6 + src/Actor.cc | 16 +- src/Actor_TEST.cc | 556 +++++++++++++++++++++------------- test/integration/actor_dom.cc | 25 ++ test/sdf/world_complete.sdf | 9 + 5 files changed, 387 insertions(+), 225 deletions(-) diff --git a/Changelog.md b/Changelog.md index 82333b517..b8c4ed8ca 100644 --- a/Changelog.md +++ b/Changelog.md @@ -10,6 +10,9 @@ 1. Find python3 in cmake, fix cmake warning. * [Pull request 328](https://github.com/osrf/sdformat/pull/328) +1. Fix Actor copy operators and increase test coverage. + * [Pull request 301](https://github.com/osrf/sdformat/pull/301) + 1. Change bitbucket links to GitHub. * [Pull request 240](https://github.com/osrf/sdformat/pull/240) @@ -216,6 +219,9 @@ ### SDFormat 8.X.X (202X-XX-XX) +1. Fix Actor copy operators and increase test coverage. + * [Pull request 301](https://github.com/osrf/sdformat/pull/301) + 1. Increase output precision of URDF to SDF conversion, output -0 as 0. * [BitBucket pull request 675](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/675) diff --git a/src/Actor.cc b/src/Actor.cc index e075c8d15..1ff483879 100644 --- a/src/Actor.cc +++ b/src/Actor.cc @@ -129,9 +129,8 @@ Animation::~Animation() ////////////////////////////////////////////////// Animation::Animation(const Animation &_animation) - : dataPtr(new AnimationPrivate) + : dataPtr(new AnimationPrivate(*_animation.dataPtr)) { - this->CopyFrom(_animation); } ///////////////////////////////////////////////// @@ -156,6 +155,7 @@ Animation &Animation::operator=(Animation &&_animation) ///////////////////////////////////////////////// void Animation::CopyFrom(const Animation &_animation) { + // TODO(anyone) Deprecate function this->dataPtr->name = _animation.dataPtr->name; this->dataPtr->filename = _animation.dataPtr->filename; this->dataPtr->scale = _animation.dataPtr->scale; @@ -269,9 +269,8 @@ Waypoint::~Waypoint() ////////////////////////////////////////////////// Waypoint::Waypoint(const Waypoint &_waypoint) - : dataPtr(new WaypointPrivate) + : dataPtr(new WaypointPrivate(*_waypoint.dataPtr)) { - this->CopyFrom(_waypoint); } ///////////////////////////////////////////////// @@ -296,6 +295,7 @@ Waypoint &Waypoint::operator=(Waypoint &&_waypoint) ///////////////////////////////////////////////// void Waypoint::CopyFrom(const Waypoint &_waypoint) { + // TODO(anyone) deprecate function this->dataPtr->time = _waypoint.dataPtr->time; this->dataPtr->pose = _waypoint.dataPtr->pose; } @@ -364,9 +364,8 @@ Trajectory::~Trajectory() ////////////////////////////////////////////////// Trajectory::Trajectory(const Trajectory &_trajectory) - : dataPtr(new TrajectoryPrivate) + : dataPtr(new TrajectoryPrivate(*_trajectory.dataPtr)) { - this->CopyFrom(_trajectory); } ///////////////////////////////////////////////// @@ -391,6 +390,7 @@ Trajectory &Trajectory::operator=(Trajectory &&_trajectory) ///////////////////////////////////////////////// void Trajectory::CopyFrom(const Trajectory &_trajectory) { + // TODO(anyone) deprecate function this->dataPtr->id = _trajectory.dataPtr->id; this->dataPtr->type = _trajectory.dataPtr->type; this->dataPtr->tension = _trajectory.dataPtr->tension; @@ -501,9 +501,8 @@ Actor::~Actor() ////////////////////////////////////////////////// Actor::Actor(const Actor &_actor) - : dataPtr(new ActorPrivate) + : dataPtr(new ActorPrivate(*_actor.dataPtr)) { - this->CopyFrom(_actor); } ///////////////////////////////////////////////// @@ -528,6 +527,7 @@ Actor &Actor::operator=(Actor &&_actor) ////////////////////////////////////////////////// void Actor::CopyFrom(const Actor &_actor) { + // TODO(anyone) deprecate function this->dataPtr->name = _actor.dataPtr->name; this->dataPtr->pose = _actor.dataPtr->pose; this->dataPtr->poseRelativeTo = _actor.dataPtr->poseRelativeTo; diff --git a/src/Actor_TEST.cc b/src/Actor_TEST.cc index a19683ce8..bac434933 100644 --- a/src/Actor_TEST.cc +++ b/src/Actor_TEST.cc @@ -19,6 +19,127 @@ #include #include "sdf/Actor.hh" +///////////////////////////////////////////////// +sdf::Animation CreateDummyAnimation() +{ + sdf::Animation animation; + animation.SetName("animation"); + animation.SetFilename("animation_filename"); + animation.SetFilePath("animation_filepath"); + animation.SetScale(1.234); + animation.SetInterpolateX(true); + return animation; +} + +///////////////////////////////////////////////// +bool AnimationsEqual(const sdf::Animation &_anim1, const sdf::Animation &_anim2) +{ + constexpr double EPS = 1e-6; + return (_anim1.Name() == _anim2.Name()) && + (_anim1.Filename() == _anim2.Filename()) && + (_anim1.FilePath() == _anim2.FilePath()) && + (std::abs(_anim1.Scale() - _anim2.Scale()) < EPS) && + (_anim1.InterpolateX() == _anim2.InterpolateX()); +} + +///////////////////////////////////////////////// +sdf::Trajectory CreateDummyTrajectory() +{ + sdf::Trajectory trajectory; + sdf::Waypoint waypoint; + waypoint.SetTime(0.12); + waypoint.SetPose({3, 2, 1, 0, IGN_PI, 0}); + trajectory.SetId(1234); + trajectory.SetType("trajectory_type"); + trajectory.SetTension(4.567); + trajectory.AddWaypoint(waypoint); + return trajectory; +} + +///////////////////////////////////////////////// +bool TrajectoriesEqual(const sdf::Trajectory &_traj1, + const sdf::Trajectory &_traj2) +{ + constexpr double EPS = 1e-6; + bool waypointsEqual = true; + if (_traj1.WaypointCount() != _traj2.WaypointCount()) + { + return false; + } + for (uint64_t wp_idx = 0; wp_idx < _traj1.WaypointCount(); ++wp_idx) + { + auto wp1 = _traj1.WaypointByIndex(wp_idx); + auto wp2 = _traj2.WaypointByIndex(wp_idx); + waypointsEqual &= (std::abs(wp1->Time() - wp2->Time()) < EPS) && + wp1->Pose() == wp2->Pose(); + } + return waypointsEqual && + (_traj1.Id() == _traj2.Id()) && + (_traj1.Type() == _traj2.Type()) && + (std::abs(_traj1.Tension() - _traj2.Tension()) < EPS); +} + +///////////////////////////////////////////////// +sdf::Actor CreateDummyActor() +{ + sdf::Actor actor; + actor.SetName("test_dummy_actor"); + actor.SetRawPose({3, 2, 1, 0, IGN_PI, 0}); + actor.SetPoseRelativeTo("ground_plane"); + actor.SetSkinFilename("walk.dae"); + actor.SetSkinScale(2.0); + actor.SetScriptLoop(true); + actor.SetScriptDelayStart(2.8); + actor.SetScriptAutoStart(false); + actor.SetFilePath("/home/path/to/model.sdf"); + // Add a dummy trajectory and animation as well + actor.AddTrajectory(CreateDummyTrajectory()); + actor.AddAnimation(CreateDummyAnimation()); + return actor; +} + +///////////////////////////////////////////////// +bool ActorsEqual(const sdf::Actor &_actor1, const sdf::Actor &_actor2) +{ + constexpr double EPS = 1e-6; + // Check animations, trajectories and properties + bool animationsEqual = true; + if (_actor1.AnimationCount() != _actor2.AnimationCount()) + { + return false; + } + for (uint64_t anim_idx = 0; anim_idx < _actor1.AnimationCount(); ++anim_idx) + { + animationsEqual &= AnimationsEqual( + *_actor1.AnimationByIndex(anim_idx), + *_actor2.AnimationByIndex(anim_idx)); + } + bool trajectoriesEqual = true; + if (_actor1.TrajectoryCount() != _actor2.TrajectoryCount()) + { + return false; + } + for (uint64_t traj_idx = 0; traj_idx < _actor1.TrajectoryCount(); ++traj_idx) + { + trajectoriesEqual &= TrajectoriesEqual( + *_actor1.TrajectoryByIndex(traj_idx), + *_actor2.TrajectoryByIndex(traj_idx)); + } + return animationsEqual && trajectoriesEqual && + (_actor1.Name() == _actor2.Name()) && + (_actor1.RawPose() == _actor2.RawPose()) && + (_actor1.PoseRelativeTo() == _actor2.PoseRelativeTo()) && + (_actor1.SkinFilename() == _actor2.SkinFilename()) && + (std::abs(_actor1.SkinScale() - _actor2.SkinScale()) < EPS) && + (_actor1.ScriptLoop() == _actor2.ScriptLoop()) && + (std::abs(_actor1.ScriptDelayStart() - _actor2.ScriptDelayStart()) < EPS) && + (_actor1.ScriptAutoStart() == _actor2.ScriptAutoStart()) && + (_actor1.FilePath() == _actor2.FilePath()) && + (_actor1.LinkCount() == _actor2.LinkCount()) && + (_actor1.JointCount() == _actor2.JointCount()) && + (_actor1.Element() == _actor2.Element()); +} + ///////////////////////////////////////////////// TEST(DOMActor, DefaultConstruction) { @@ -63,227 +184,42 @@ TEST(DOMActor, DefaultConstruction) ///////////////////////////////////////////////// TEST(DOMActor, CopyConstructor) { - sdf::Actor actor; - actor.SetName("test_copy_actor"); - actor.SetRawPose({3, 2, 1, 0, IGN_PI, 0}); - actor.SetPoseRelativeTo("ground_plane"); - actor.SetSkinFilename("walk.dae"); - actor.SetSkinScale(2.0); - actor.SetScriptLoop(true); - actor.SetScriptDelayStart(2.8); - actor.SetScriptAutoStart(false); - actor.SetFilePath("/home/path/to/model.sdf"); - + sdf::Actor actor = CreateDummyActor(); sdf::Actor actor2(actor); - EXPECT_EQ("test_copy_actor", actor2.Name()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.RawPose()); - EXPECT_EQ("ground_plane", actor2.PoseRelativeTo()); - EXPECT_EQ("/home/path/to/model.sdf", actor2.FilePath()); - - EXPECT_EQ(0u, actor2.AnimationCount()); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(0)); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(1)); - EXPECT_FALSE(actor2.AnimationNameExists("")); - EXPECT_FALSE(actor2.AnimationNameExists("default")); - - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_EQ(0u, actor2.TrajectoryCount()); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(0)); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(1)); - EXPECT_FALSE(actor2.TrajectoryIdExists(0)); - EXPECT_FALSE(actor2.TrajectoryIdExists(1)); - - EXPECT_TRUE(actor2.ScriptLoop()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); - - EXPECT_EQ(0u, actor2.LinkCount()); - EXPECT_EQ(nullptr, actor2.LinkByIndex(0)); - EXPECT_EQ(nullptr, actor2.LinkByIndex(1)); - EXPECT_FALSE(actor2.LinkNameExists("")); - - EXPECT_EQ(0u, actor2.JointCount()); - EXPECT_EQ(nullptr, actor2.JointByIndex(0)); - EXPECT_EQ(nullptr, actor2.JointByIndex(1)); - EXPECT_FALSE(actor2.JointNameExists("")); + EXPECT_TRUE(ActorsEqual(actor, actor2)); } ///////////////////////////////////////////////// TEST(DOMActor, CopyAssignmentOperator) { - sdf::Actor actor; - actor.SetName("test_actor_assignment"); - actor.SetRawPose({3, 2, 1, 0, IGN_PI, 0}); - actor.SetPoseRelativeTo("ground_plane"); - actor.SetSkinFilename("walk.dae"); - actor.SetSkinScale(2.0); - actor.SetScriptLoop(true); - actor.SetScriptDelayStart(2.8); - actor.SetScriptAutoStart(false); - actor.SetFilePath("/home/path/to/model.sdf"); - + sdf::Actor actor = CreateDummyActor(); sdf::Actor actor2; actor2 = actor; - EXPECT_EQ("test_actor_assignment", actor2.Name()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.RawPose()); - EXPECT_EQ("ground_plane", actor2.PoseRelativeTo()); - EXPECT_EQ("/home/path/to/model.sdf", actor2.FilePath()); - - EXPECT_EQ(0u, actor2.AnimationCount()); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(0)); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(1)); - EXPECT_FALSE(actor2.AnimationNameExists("")); - EXPECT_FALSE(actor2.AnimationNameExists("default")); - - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_EQ(0u, actor2.TrajectoryCount()); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(0)); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(1)); - EXPECT_FALSE(actor2.TrajectoryIdExists(0)); - EXPECT_FALSE(actor2.TrajectoryIdExists(1)); - - EXPECT_TRUE(actor2.ScriptLoop()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); - - EXPECT_EQ(0u, actor2.LinkCount()); - EXPECT_EQ(nullptr, actor2.LinkByIndex(0)); - EXPECT_EQ(nullptr, actor2.LinkByIndex(1)); - EXPECT_FALSE(actor2.LinkNameExists("")); - - EXPECT_EQ(0u, actor2.JointCount()); - EXPECT_EQ(nullptr, actor2.JointByIndex(0)); - EXPECT_EQ(nullptr, actor2.JointByIndex(1)); - EXPECT_FALSE(actor2.JointNameExists("")); + EXPECT_TRUE(ActorsEqual(actor, actor2)); } ///////////////////////////////////////////////// TEST(DOMActor, MoveConstructor) { - sdf::Actor actor; - actor.SetName("test_actor_assignment"); - actor.SetRawPose({3, 2, 1, 0, IGN_PI, 0}); - actor.SetPoseRelativeTo("ground_plane"); - actor.SetSkinFilename("walk.dae"); - actor.SetSkinScale(2.0); - actor.SetScriptLoop(true); - actor.SetScriptDelayStart(2.8); - actor.SetScriptAutoStart(false); - actor.SetFilePath("/home/path/to/model.sdf"); - + sdf::Actor actor = CreateDummyActor(); sdf::Actor actor2(std::move(actor)); - EXPECT_EQ("test_actor_assignment", actor2.Name()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.RawPose()); - EXPECT_EQ("ground_plane", actor2.PoseRelativeTo()); - EXPECT_EQ("/home/path/to/model.sdf", actor2.FilePath()); - - EXPECT_EQ(0u, actor2.AnimationCount()); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(0)); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(1)); - EXPECT_FALSE(actor2.AnimationNameExists("")); - EXPECT_FALSE(actor2.AnimationNameExists("default")); - - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_EQ(0u, actor2.TrajectoryCount()); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(0)); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(1)); - EXPECT_FALSE(actor2.TrajectoryIdExists(0)); - EXPECT_FALSE(actor2.TrajectoryIdExists(1)); - - EXPECT_TRUE(actor2.ScriptLoop()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); - - EXPECT_EQ(0u, actor2.LinkCount()); - EXPECT_EQ(nullptr, actor2.LinkByIndex(0)); - EXPECT_EQ(nullptr, actor2.LinkByIndex(1)); - EXPECT_FALSE(actor2.LinkNameExists("")); - - EXPECT_EQ(0u, actor2.JointCount()); - EXPECT_EQ(nullptr, actor2.JointByIndex(0)); - EXPECT_EQ(nullptr, actor2.JointByIndex(1)); - EXPECT_FALSE(actor2.JointNameExists("")); + EXPECT_TRUE(ActorsEqual(CreateDummyActor(), actor2)); } ///////////////////////////////////////////////// TEST(DOMActor, MoveAssignment) { - sdf::Actor actor; - actor.SetName("test_actor_assignment"); - actor.SetRawPose({3, 2, 1, 0, IGN_PI, 0}); - actor.SetPoseRelativeTo("ground_plane"); - actor.SetSkinFilename("walk.dae"); - actor.SetSkinScale(2.0); - actor.SetScriptLoop(true); - actor.SetScriptDelayStart(2.8); - actor.SetScriptAutoStart(false); - actor.SetFilePath("/home/path/to/model.sdf"); - + sdf::Actor actor = CreateDummyActor(); sdf::Actor actor2; actor2 = std::move(actor); - EXPECT_EQ("test_actor_assignment", actor2.Name()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.RawPose()); - EXPECT_EQ("ground_plane", actor2.PoseRelativeTo()); - EXPECT_EQ("/home/path/to/model.sdf", actor2.FilePath()); - - EXPECT_EQ(0u, actor2.AnimationCount()); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(0)); - EXPECT_EQ(nullptr, actor2.AnimationByIndex(1)); - EXPECT_FALSE(actor2.AnimationNameExists("")); - EXPECT_FALSE(actor2.AnimationNameExists("default")); - - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_EQ(0u, actor2.TrajectoryCount()); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(0)); - EXPECT_EQ(nullptr, actor2.TrajectoryByIndex(1)); - EXPECT_FALSE(actor2.TrajectoryIdExists(0)); - EXPECT_FALSE(actor2.TrajectoryIdExists(1)); - - EXPECT_TRUE(actor2.ScriptLoop()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); - - EXPECT_EQ(0u, actor2.LinkCount()); - EXPECT_EQ(nullptr, actor2.LinkByIndex(0)); - EXPECT_EQ(nullptr, actor2.LinkByIndex(1)); - EXPECT_FALSE(actor2.LinkNameExists("")); - - EXPECT_EQ(0u, actor2.JointCount()); - EXPECT_EQ(nullptr, actor2.JointByIndex(0)); - EXPECT_EQ(nullptr, actor2.JointByIndex(1)); - EXPECT_FALSE(actor2.JointNameExists("")); + EXPECT_TRUE(ActorsEqual(CreateDummyActor(), actor2)); } ///////////////////////////////////////////////// TEST(DOMActor, CopyAssignmentAfterMove) { - sdf::Actor actor1; - actor1.SetName("actor1"); - actor1.SetRawPose({3, 2, 1, 0, IGN_PI, 0}); - actor1.SetPoseRelativeTo("ground_plane_1"); - actor1.SetSkinFilename("walk.dae"); - actor1.SetSkinScale(2.0); - actor1.SetScriptLoop(true); - actor1.SetScriptDelayStart(2.8); - actor1.SetScriptAutoStart(false); - + sdf::Actor actor1 = CreateDummyActor(); sdf::Actor actor2; - actor2.SetName("actor2"); - actor2.SetRawPose({1, 2, 3, 0, IGN_PI, 0}); - actor2.SetPoseRelativeTo("ground_plane_2"); - actor2.SetSkinFilename("run.dae"); - actor2.SetSkinScale(0.5); - actor2.SetScriptLoop(false); - actor2.SetScriptDelayStart(0.8); - actor2.SetScriptAutoStart(true); // This is similar to what std::swap does except it uses std::move for each // assignment @@ -291,29 +227,8 @@ TEST(DOMActor, CopyAssignmentAfterMove) actor1 = actor2; actor2 = tmp; - EXPECT_EQ("actor2", actor1.Name()); - EXPECT_EQ("actor1", actor2.Name()); - - EXPECT_EQ(ignition::math::Pose3d(1, 2, 3, 0, IGN_PI, 0), actor1.RawPose()); - EXPECT_EQ(ignition::math::Pose3d(3, 2, 1, 0, IGN_PI, 0), actor2.RawPose()); - - EXPECT_EQ("ground_plane_2", actor1.PoseRelativeTo()); - EXPECT_EQ("ground_plane_1", actor2.PoseRelativeTo()); - - EXPECT_EQ("run.dae", actor1.SkinFilename()); - EXPECT_EQ("walk.dae", actor2.SkinFilename()); - - EXPECT_DOUBLE_EQ(0.5, actor1.SkinScale()); - EXPECT_DOUBLE_EQ(2.0, actor2.SkinScale()); - - EXPECT_FALSE(actor1.ScriptLoop()); - EXPECT_TRUE(actor2.ScriptLoop()); - - EXPECT_DOUBLE_EQ(0.8, actor1.ScriptDelayStart()); - EXPECT_DOUBLE_EQ(2.8, actor2.ScriptDelayStart()); - - EXPECT_TRUE(actor1.ScriptAutoStart()); - EXPECT_FALSE(actor2.ScriptAutoStart()); + EXPECT_TRUE(ActorsEqual(sdf::Actor(), actor1)); + EXPECT_TRUE(ActorsEqual(CreateDummyActor(), actor2)); } ////////////////////////////////////////////////// @@ -380,3 +295,210 @@ TEST(DOMActor, Add) EXPECT_EQ(456u, actor.TrajectoryByIndex(1)->Id()); EXPECT_EQ("trajectory2", actor.TrajectoryByIndex(1)->Type()); } + +////////////////////////////////////////////////// +TEST(DOMAnimation, DefaultConstruction) +{ + sdf::Animation anim; + + EXPECT_EQ(anim.Name(), "__default__"); + EXPECT_EQ(anim.Filename(), "__default__"); + EXPECT_EQ(anim.FilePath(), ""); + EXPECT_DOUBLE_EQ(anim.Scale(), 1.0); + EXPECT_EQ(anim.InterpolateX(), false); +} + +////////////////////////////////////////////////// +TEST(DOMAnimation, CopyConstructor) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2(anim1); + EXPECT_TRUE(AnimationsEqual(anim1, anim2)); +} + +////////////////////////////////////////////////// +TEST(DOMAnimation, CopyAssignmentOperator) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2; + anim2 = anim1; + EXPECT_TRUE(AnimationsEqual(anim1, anim2)); +} + +////////////////////////////////////////////////// +TEST(DOMAnimation, MoveConstructor) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2(std::move(anim1)); + EXPECT_TRUE(AnimationsEqual(CreateDummyAnimation(), anim2)); +} + +////////////////////////////////////////////////// +TEST(DOMAnimation, MoveAssignment) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2; + anim2 = std::move(anim1); + EXPECT_TRUE(AnimationsEqual(CreateDummyAnimation(), anim2)); +} + +///////////////////////////////////////////////// +TEST(DOMAnimation, CopyAssignmentAfterMove) +{ + sdf::Animation anim1 = CreateDummyAnimation(); + sdf::Animation anim2; + + // This is similar to what std::swap does except it uses std::move for each + // assignment + sdf::Animation tmp = std::move(anim1); + anim1 = anim2; + anim2 = tmp; + + EXPECT_TRUE(AnimationsEqual(sdf::Animation(), anim1)); + EXPECT_TRUE(AnimationsEqual(CreateDummyAnimation(), anim2)); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, DefaultConstruction) +{ + sdf::Waypoint waypoint; + EXPECT_DOUBLE_EQ(waypoint.Time(), 0.0); + EXPECT_EQ(waypoint.Pose(), ignition::math::Pose3d::Zero); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, CopyConstructor) +{ + sdf::Waypoint waypoint1; + waypoint1.SetTime(1.23); + waypoint1.SetPose({3, 2, 1, 0, IGN_PI, 0}); + + sdf::Waypoint waypoint2(waypoint1); + EXPECT_DOUBLE_EQ(waypoint1.Time(), waypoint2.Time()); + EXPECT_EQ(waypoint1.Pose(), waypoint2.Pose()); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, CopyAssignmentOperator) +{ + sdf::Waypoint waypoint1; + waypoint1.SetTime(1.23); + waypoint1.SetPose({3, 2, 1, 0, IGN_PI, 0}); + + sdf::Waypoint waypoint2; + waypoint2 = waypoint1; + EXPECT_DOUBLE_EQ(waypoint1.Time(), waypoint2.Time()); + EXPECT_EQ(waypoint1.Pose(), waypoint2.Pose()); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, MoveConstructor) +{ + sdf::Waypoint waypoint1; + ignition::math::Pose3d pose1(3, 2, 1, 0, IGN_PI, 0); + waypoint1.SetTime(1.23); + waypoint1.SetPose(pose1); + + sdf::Waypoint waypoint2(std::move(waypoint1)); + EXPECT_DOUBLE_EQ(1.23, waypoint2.Time()); + EXPECT_EQ(pose1, waypoint2.Pose()); +} + +////////////////////////////////////////////////// +TEST(DOMWaypoint, MoveAssignment) +{ + sdf::Waypoint waypoint1; + ignition::math::Pose3d pose1(3, 2, 1, 0, IGN_PI, 0); + waypoint1.SetTime(1.23); + waypoint1.SetPose(pose1); + + sdf::Waypoint waypoint2; + waypoint2 = std::move(waypoint1); + EXPECT_DOUBLE_EQ(1.23, waypoint2.Time()); + EXPECT_EQ(pose1, waypoint2.Pose()); +} + +///////////////////////////////////////////////// +TEST(DOMWaypoint, CopyAssignmentAfterMove) +{ + sdf::Waypoint waypoint1; + ignition::math::Pose3d pose1(3, 2, 1, 0, IGN_PI, 0); + waypoint1.SetTime(1.23); + waypoint1.SetPose(pose1); + sdf::Waypoint waypoint2; + ignition::math::Pose3d pose2(1, 2, 3, 1, 2, IGN_PI); + waypoint2.SetTime(3.45); + waypoint2.SetPose(pose2); + + // This is similar to what std::swap does except it uses std::move for each + // assignment + sdf::Waypoint tmp = std::move(waypoint1); + waypoint1 = waypoint2; + waypoint2 = tmp; + + EXPECT_DOUBLE_EQ(1.23, waypoint2.Time()); + EXPECT_EQ(pose1, waypoint2.Pose()); + EXPECT_DOUBLE_EQ(3.45, waypoint1.Time()); + EXPECT_EQ(pose2, waypoint1.Pose()); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, DefaultConstruction) +{ + sdf::Trajectory trajectory; + + EXPECT_EQ(trajectory.Id(), 0u); + EXPECT_EQ(trajectory.Type(), "__default__"); + EXPECT_DOUBLE_EQ(trajectory.Tension(), 0.0); + EXPECT_EQ(trajectory.WaypointCount(), 0u); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, CopyConstructor) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2(trajectory1); + EXPECT_TRUE(TrajectoriesEqual(trajectory1, trajectory2)); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, CopyAssignmentOperator) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2; + trajectory2 = trajectory1; + EXPECT_TRUE(TrajectoriesEqual(trajectory1, trajectory2)); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, MoveConstructor) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2(std::move(trajectory1)); + EXPECT_TRUE(TrajectoriesEqual(CreateDummyTrajectory(), trajectory2)); +} + +////////////////////////////////////////////////// +TEST(DOMTrajectory, MoveAssignment) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2; + trajectory2 = std::move(trajectory1); + EXPECT_TRUE(TrajectoriesEqual(CreateDummyTrajectory(), trajectory2)); +} + +///////////////////////////////////////////////// +TEST(DOMTrajectory, CopyAssignmentAfterMove) +{ + sdf::Trajectory trajectory1 = CreateDummyTrajectory(); + sdf::Trajectory trajectory2; + + // This is similar to what std::swap does except it uses std::move for each + // assignment + sdf::Trajectory tmp = std::move(trajectory1); + trajectory1 = trajectory2; + trajectory2 = tmp; + + EXPECT_TRUE(TrajectoriesEqual(sdf::Trajectory(), trajectory1)); + EXPECT_TRUE(TrajectoriesEqual(CreateDummyTrajectory(), trajectory2)); +} diff --git a/test/integration/actor_dom.cc b/test/integration/actor_dom.cc index 60c32ee22..500a5d032 100644 --- a/test/integration/actor_dom.cc +++ b/test/integration/actor_dom.cc @@ -134,5 +134,30 @@ TEST(DOMActor, LoadActors) EXPECT_TRUE(actor2->ScriptLoop()); EXPECT_DOUBLE_EQ(1.0, actor2->ScriptDelayStart()); EXPECT_TRUE(actor2->ScriptAutoStart()); + + EXPECT_EQ(2u, actor2->LinkCount()); + EXPECT_EQ(1u, actor2->JointCount()); } +////////////////////////////////////////////////// +TEST(DOMActor, CopySdfLoadedProperties) +{ + // Verify that copying an actor also copies the underlying ElementPtr + // Joints and Links + const std::string testFile = + sdf::filesystem::append(PROJECT_SOURCE_PATH, "test", "sdf", + "world_complete.sdf"); + + sdf::Root root; + sdf::Errors errors = root.Load(testFile); + + ASSERT_NE(nullptr, root.Element()); + + const sdf::World *world = root.WorldByIndex(0); + const sdf::Actor *actor2 = world->ActorByIndex(1); + sdf::Actor actor1(*actor2); + + EXPECT_EQ(actor1.Element().get(), actor2->Element().get()); + EXPECT_EQ(actor1.LinkCount(), actor2->LinkCount()); + EXPECT_EQ(actor1.JointCount(), actor2->JointCount()); +} diff --git a/test/sdf/world_complete.sdf b/test/sdf/world_complete.sdf index 5e8844433..e0004de8e 100644 --- a/test/sdf/world_complete.sdf +++ b/test/sdf/world_complete.sdf @@ -182,6 +182,15 @@ + + + + + + 0 0 0 1 0 0 + link1 + link2 + From 8388f2777b338d0ded0d2a0cc3c9d6dc9ab6cfef Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 1 Sep 2020 17:30:11 -0700 Subject: [PATCH 17/42] Support implicit nested canonical links (#341) Allow models without links if they have nested models instead. When building FrameAttachedToGraph, if model has no links choose the first link of the first nested model as canonical link instead. A new private function `Model::CanonicalLinkAndRelativeName` is added that provides a `Link*` pointer to the canonical link and its nested name relative to the current model, which is needed in the FrameAttachedToGraph. This private prevents duplicate code in `FrameSemantics.cc` and `Model::CanonicalLink`. The method is private to hide :: syntax from libsdformat9, at least until there is a compelling reason to make the API public. A helper function is added to FrameSemantics.cc as a friend of Model so that buildFrameAttachedToGraph can call the private API. That function can't be added directly as a friend since it uses a `FrameAttachedToGraph&` as an argument, which isn't defined in Model.hh. Signed-off-by: Steve Peters --- Changelog.md | 1 + Migration.md | 19 ++++-- include/sdf/Model.hh | 19 +++++- src/FrameSemantics.cc | 56 ++++++++++++----- src/Model.cc | 38 ++++++++++-- src/ign_TEST.cc | 26 ++++++++ test/integration/model_dom.cc | 62 +++++++++++++++++++ test/sdf/model_canonical_link.sdf | 1 + test/sdf/nested_canonical_link.sdf | 19 ++++++ ...nested_invalid_explicit_canonical_link.sdf | 14 +++++ 10 files changed, 231 insertions(+), 24 deletions(-) create mode 100644 test/sdf/nested_canonical_link.sdf create mode 100644 test/sdf/nested_invalid_explicit_canonical_link.sdf diff --git a/Changelog.md b/Changelog.md index b8c4ed8ca..76cc42ac2 100644 --- a/Changelog.md +++ b/Changelog.md @@ -6,6 +6,7 @@ 1. Support nested models in DOM and frame semantics. * [Pull request 316](https://github.com/osrf/sdformat/pull/316) + + [Pull request 341](https://github.com/osrf/sdformat/pull/341) 1. Find python3 in cmake, fix cmake warning. * [Pull request 328](https://github.com/osrf/sdformat/pull/328) diff --git a/Migration.md b/Migration.md index 90385a0c9..653dc7caf 100644 --- a/Migration.md +++ b/Migration.md @@ -12,6 +12,21 @@ forward programmatically. This document aims to contain similar information to those files but with improved human-readability.. +## SDFormat 9.0 to 9.3 + +### Additions + +1. **sdf/Model.hh** + + uint64\_t ModelCount() const + + const Model \*ModelByIndex(const uint64\_t) const + + const Model \*ModelByName(const std::string &) const + + bool ModelNameExists(const std::string &) const + +### Modifications + +1. Permit models without links if they contain a nested canonical link. + + [pull request 341](https://github.com/osrf/sdformat/pull/341) + ## SDFormat 8.x to 9.0 ### Additions @@ -45,10 +60,6 @@ but with improved human-readability.. + const Frame \*FrameByIndex(const uint64\_t) const + const Frame \*FrameByName(const std::string &) const + bool FrameNameExists(const std::string &) const - + uint64\_t ModelCount() const - + const Model \*ModelByIndex(const uint64\_t) const - + const Model \*ModelByName(const std::string &) const - + bool ModelNameExists(const std::string &) const + sdf::SemanticPose SemanticPose() const 1. **sdf/SDFImpl.hh** diff --git a/include/sdf/Model.hh b/include/sdf/Model.hh index 677407212..cfa25454e 100644 --- a/include/sdf/Model.hh +++ b/include/sdf/Model.hh @@ -19,6 +19,7 @@ #include #include +#include #include #include "sdf/Element.hh" #include "sdf/SemanticPose.hh" @@ -254,12 +255,14 @@ namespace sdf public: const Link *CanonicalLink() const; /// \brief Get the name of the model's canonical link. An empty value - /// indicates that the first link in the model is the canonical link. + /// indicates that the first link in the model or the first link found + /// in a depth first search of nested models is the canonical link. /// \return The name of the canonical link. public: const std::string &CanonicalLinkName() const; /// \brief Set the name of the model's canonical link. An empty value - /// indicates that the first link in the model is the canonical link. + /// indicates that the first link in the model or the first link found + /// in a depth first search of nested models is the canonical link. /// \param[in] _canonicalLink The name of the canonical link. public: void SetCanonicalLinkName(const std::string &_canonicalLink); @@ -310,9 +313,21 @@ namespace sdf private: sdf::Errors SetPoseRelativeToGraph( std::weak_ptr _graph); + /// \brief Get the model's canonical link and the nested name of the link + /// relative to the current model, delimited by "::". + /// \return An immutable pointer to the canonical link and the nested + /// name of the link relative to the current model. + private: std::pair CanonicalLinkAndRelativeName() + const; + /// \brief Allow World::Load to call SetPoseRelativeToGraph. friend class World; + /// \brief Allow helper function in FrameSemantics.cc to call + /// CanonicalLinkAndRelativeName. + friend std::pair + modelCanonicalLinkAndRelativeName(const Model *); + /// \brief Private data pointer. private: ModelPrivate *dataPtr = nullptr; }; diff --git a/src/FrameSemantics.cc b/src/FrameSemantics.cc index a3918ab7a..57a0fe30a 100644 --- a/src/FrameSemantics.cc +++ b/src/FrameSemantics.cc @@ -15,6 +15,8 @@ * */ #include +#include +#include #include "sdf/Element.hh" #include "sdf/Error.hh" @@ -164,6 +166,17 @@ FindSinkVertex( return PairType(vertex, edges); } +///////////////////////////////////////////////// +std::pair + modelCanonicalLinkAndRelativeName(const Model *_model) +{ + if (nullptr == _model) + { + return std::make_pair(nullptr, ""); + } + return _model->CanonicalLinkAndRelativeName(); +} + ///////////////////////////////////////////////// Errors buildFrameAttachedToGraph( FrameAttachedToGraph &_out, const Model *_model) @@ -190,32 +203,47 @@ Errors buildFrameAttachedToGraph( "Invalid model element in sdf::Model."}); return errors; } - else if (_model->LinkCount() < 1) + else if (_model->LinkCount() < 1 && _model->ModelCount() < 1) { errors.push_back({ErrorCode::MODEL_WITHOUT_LINK, "A model must have at least one link."}); return errors; } - // identify canonical link - const sdf::Link *canonicalLink = nullptr; - if (_model->CanonicalLinkName().empty()) - { - canonicalLink = _model->LinkByIndex(0); - } - else - { - canonicalLink = _model->LinkByName(_model->CanonicalLinkName()); - } + // identify canonical link, which may be nested + auto canonicalLinkAndName = modelCanonicalLinkAndRelativeName(_model); + const sdf::Link *canonicalLink = canonicalLinkAndName.first; + const std::string canonicalLinkName = canonicalLinkAndName.second; if (nullptr == canonicalLink) { + if (canonicalLinkName.empty()) + { + errors.push_back({ErrorCode::MODEL_WITHOUT_LINK, + "A model must have at least one link."}); + } + else + { + errors.push_back({ErrorCode::MODEL_CANONICAL_LINK_INVALID, + "canonical_link with name[" + canonicalLinkName + + "] not found in model with name[" + _model->Name() + "]."}); + } // return early - errors.push_back({ErrorCode::MODEL_CANONICAL_LINK_INVALID, - "canonical_link with name[" + _model->CanonicalLinkName() + - "] not found in model with name[" + _model->Name() + "]."}); return errors; } + // Identify if the canonical link is in a nested model. + if (_model->LinkByName(canonicalLink->Name()) != canonicalLink) + { + // The canonical link is nested, so its vertex should be added + // here with an edge from __model__. + // The nested canonical link name should be a nested name + // relative to _model, delimited by "::". + auto linkId = + _out.graph.AddVertex(canonicalLinkName, sdf::FrameType::LINK).Id(); + _out.map[canonicalLinkName] = linkId; + _out.graph.AddEdge({modelFrameId, linkId}, true); + } + // add link vertices for (uint64_t l = 0; l < _model->LinkCount(); ++l) { diff --git a/src/Model.cc b/src/Model.cc index f359075ca..03629a798 100644 --- a/src/Model.cc +++ b/src/Model.cc @@ -269,10 +269,11 @@ Errors Model::Load(ElementPtr _sdf) frameNames.insert(linkName); } - // If the model is not static: + // If the model is not static and has no nested models: // Require at least one link so the implicit model frame can be attached to // something. - if (!this->Static() && this->dataPtr->links.empty()) + if (!this->Static() && this->dataPtr->links.empty() && + this->dataPtr->models.empty()) { errors.push_back({ErrorCode::MODEL_WITHOUT_LINK, "A model must have at least one link."}); @@ -617,14 +618,43 @@ const Model *Model::ModelByName(const std::string &_name) const ///////////////////////////////////////////////// const Link *Model::CanonicalLink() const +{ + return this->CanonicalLinkAndRelativeName().first; +} + +///////////////////////////////////////////////// +std::pair Model::CanonicalLinkAndRelativeName() const { if (this->CanonicalLinkName().empty()) { - return this->LinkByIndex(0); + if (this->LinkCount() > 0) + { + auto firstLink = this->LinkByIndex(0); + return std::make_pair(firstLink, firstLink->Name()); + } + else if (this->ModelCount() > 0) + { + // Recursively choose the canonical link of the first nested model + // (depth first search). + auto firstModel = this->ModelByIndex(0); + auto canonicalLinkAndName = firstModel->CanonicalLinkAndRelativeName(); + // Prepend firstModelName if a valid link is found. + if (nullptr != canonicalLinkAndName.first) + { + canonicalLinkAndName.second = + firstModel->Name() + "::" + canonicalLinkAndName.second; + } + return canonicalLinkAndName; + } + else + { + return std::make_pair(nullptr, ""); + } } else { - return this->LinkByName(this->CanonicalLinkName()); + return std::make_pair(this->LinkByName(this->CanonicalLinkName()), + this->CanonicalLinkName()); } } diff --git a/src/ign_TEST.cc b/src/ign_TEST.cc index 49ef7e680..46a0b0143 100644 --- a/src/ign_TEST.cc +++ b/src/ign_TEST.cc @@ -296,6 +296,32 @@ TEST(check, SDF) EXPECT_EQ("Valid.\n", output) << output; } + // Check an SDF file with a model that has a nested canonical link. + { + std::string path = pathBase +"/nested_canonical_link.sdf"; + + // Check nested_canonical_link.sdf + std::string output = + custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); + EXPECT_EQ("Valid.\n", output) << output; + } + + // Check an SDF file with a model that has a nested canonical link + // that is explicitly specified by //model/@canonical_link using :: + // syntax. + { + std::string path = pathBase +"/nested_invalid_explicit_canonical_link.sdf"; + + // Check nested_invalid_explicit_canonical_link.sdf + std::string output = + custom_exec_str(g_ignCommand + " sdf -k " + path + g_sdfVersion); + EXPECT_NE(output.find("Error: canonical_link with name[nested::link] not " + "found in model with name[top]."), + std::string::npos) << output; + EXPECT_NE(output.find("Error: A model must have at least one link."), + std::string::npos) << output; + } + // Check an invalid SDF file that uses reserved names. { std::string path = pathBase +"/model_invalid_reserved_names.sdf"; diff --git a/test/integration/model_dom.cc b/test/integration/model_dom.cc index 299100509..713d4cab0 100644 --- a/test/integration/model_dom.cc +++ b/test/integration/model_dom.cc @@ -22,6 +22,7 @@ #include "sdf/Element.hh" #include "sdf/Error.hh" #include "sdf/Filesystem.hh" +#include "sdf/Frame.hh" #include "sdf/Link.hh" #include "sdf/Model.hh" #include "sdf/Root.hh" @@ -313,5 +314,66 @@ TEST(DOMRoot, LoadCanonicalLink) EXPECT_EQ(0u, model->JointCount()); EXPECT_EQ(nullptr, model->JointByIndex(0)); + + EXPECT_EQ(1u, model->FrameCount()); + EXPECT_NE(nullptr, model->FrameByIndex(0)); + EXPECT_EQ(nullptr, model->FrameByIndex(1)); + + std::string body; + EXPECT_TRUE(model->FrameByName("F")->ResolveAttachedToBody(body).empty()); + EXPECT_EQ("link2", body); +} + +///////////////////////////////////////////////// +TEST(DOMRoot, LoadNestedCanonicalLink) +{ + const std::string testFile = + sdf::filesystem::append(PROJECT_SOURCE_PATH, "test", "sdf", + "nested_canonical_link.sdf"); + + // Load the SDF file + sdf::Root root; + EXPECT_TRUE(root.Load(testFile).empty()); + + // Get the first model + const sdf::Model *model = root.ModelByIndex(0); + ASSERT_NE(nullptr, model); + EXPECT_EQ("top", model->Name()); + EXPECT_EQ(0u, model->LinkCount()); + EXPECT_EQ(nullptr, model->LinkByIndex(0)); + + EXPECT_EQ(0u, model->JointCount()); + EXPECT_EQ(nullptr, model->JointByIndex(0)); + + EXPECT_EQ(1u, model->FrameCount()); + EXPECT_NE(nullptr, model->FrameByIndex(0)); + EXPECT_EQ(nullptr, model->FrameByIndex(1)); + + EXPECT_EQ(2u, model->ModelCount()); + EXPECT_TRUE(model->ModelNameExists("nested")); + EXPECT_TRUE(model->ModelNameExists("shallow")); + EXPECT_EQ(model->ModelByName("nested"), model->ModelByIndex(0)); + EXPECT_EQ(model->ModelByName("shallow"), model->ModelByIndex(1)); + EXPECT_EQ(nullptr, model->ModelByIndex(2)); + + // expect implicit canonical link + EXPECT_TRUE(model->CanonicalLinkName().empty()); + + // frame F is attached to __model__ and resolves to canonical link, + // which is "nested::link2" + std::string body; + EXPECT_TRUE(model->FrameByName("F")->ResolveAttachedToBody(body).empty()); + EXPECT_EQ("nested::link2", body); + + EXPECT_EQ(model->ModelByName("nested")->LinkByName("link2"), + model->CanonicalLink()); + // this reports the local name, not the nested name "nested::link2" + EXPECT_EQ("link2", model->CanonicalLink()->Name()); + + const sdf::Model *shallowModel = model->ModelByName("shallow"); + EXPECT_EQ(1u, shallowModel->FrameCount()); + EXPECT_TRUE( + shallowModel->FrameByName("F")->ResolveAttachedToBody(body).empty()); + EXPECT_EQ("deep::deeper::deepest::deepest_link", body); } diff --git a/test/sdf/model_canonical_link.sdf b/test/sdf/model_canonical_link.sdf index c3edfe0cb..a8dc55341 100644 --- a/test/sdf/model_canonical_link.sdf +++ b/test/sdf/model_canonical_link.sdf @@ -7,5 +7,6 @@ 0 2 0 0 0 0 + diff --git a/test/sdf/nested_canonical_link.sdf b/test/sdf/nested_canonical_link.sdf new file mode 100644 index 000000000..03ecc13bd --- /dev/null +++ b/test/sdf/nested_canonical_link.sdf @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/test/sdf/nested_invalid_explicit_canonical_link.sdf b/test/sdf/nested_invalid_explicit_canonical_link.sdf new file mode 100644 index 000000000..dfce81c1e --- /dev/null +++ b/test/sdf/nested_invalid_explicit_canonical_link.sdf @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + From e9939a504c5bc42c273ba0c21618415d59330b77 Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Thu, 3 Sep 2020 01:14:38 -0700 Subject: [PATCH 18/42] Store material file path information (#349) Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- include/sdf/Material.hh | 8 ++++++++ src/Material.cc | 18 ++++++++++++++++++ src/Material_TEST.cc | 12 ++++++++++++ 3 files changed, 38 insertions(+) diff --git a/include/sdf/Material.hh b/include/sdf/Material.hh index 9b3245554..152806e84 100644 --- a/include/sdf/Material.hh +++ b/include/sdf/Material.hh @@ -186,6 +186,14 @@ namespace sdf /// \return Pointer to the PBR material. Null if it does not exist. public: Pbr *PbrMaterial() const; + /// \brief The path to the file where this element was loaded from. + /// \return Full path to the file on disk. + public: const std::string &FilePath() const; + + /// \brief Set the path to the file where this element was loaded from. + /// \paramp[in] _filePath Full path to the file on disk. + public: void SetFilePath(const std::string &_filePath); + /// \brief Private data pointer. private: MaterialPrivate *dataPtr = nullptr; }; diff --git a/src/Material.cc b/src/Material.cc index dd465a942..84ed3a1e0 100644 --- a/src/Material.cc +++ b/src/Material.cc @@ -59,6 +59,9 @@ class sdf::MaterialPrivate /// \brief The SDF element pointer used during load. public: sdf::ElementPtr sdf; + + /// \brief The path to the file where this material was defined. + public: std::string filePath = ""; }; ///////////////////////////////////////////////// @@ -88,6 +91,7 @@ Material::Material(const Material &_material) this->dataPtr->specular = _material.dataPtr->specular; this->dataPtr->emissive = _material.dataPtr->emissive; this->dataPtr->sdf = _material.dataPtr->sdf; + this->dataPtr->filePath = _material.dataPtr->filePath; if (_material.dataPtr->pbr) this->dataPtr->pbr = std::make_unique(*_material.dataPtr->pbr); } @@ -118,6 +122,8 @@ Errors Material::Load(sdf::ElementPtr _sdf) this->dataPtr->sdf = _sdf; + this->dataPtr->filePath = _sdf->FilePath(); + // Check that the provided SDF element is a // This is an error that cannot be recovered, so return an error. if (_sdf->GetName() != "material") @@ -341,3 +347,15 @@ Pbr *Material::PbrMaterial() const { return this->dataPtr->pbr.get(); } + +////////////////////////////////////////////////// +const std::string &Material::FilePath() const +{ + return this->dataPtr->filePath; +} + +////////////////////////////////////////////////// +void Material::SetFilePath(const std::string &_filePath) +{ + this->dataPtr->filePath = _filePath; +} diff --git a/src/Material_TEST.cc b/src/Material_TEST.cc index 579bfa6d9..dcf6993e0 100644 --- a/src/Material_TEST.cc +++ b/src/Material_TEST.cc @@ -36,6 +36,7 @@ TEST(DOMMaterial, Construction) EXPECT_EQ(sdf::ShaderType::PIXEL, material.Shader()); EXPECT_EQ("", material.NormalMap()); EXPECT_EQ(nullptr, material.PbrMaterial()); + EXPECT_EQ("", material.FilePath()); } ///////////////////////////////////////////////// @@ -51,6 +52,7 @@ TEST(DOMMaterial, MoveConstructor) material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); material.SetNormalMap("blueberry"); + material.SetFilePath("/tmp/path"); sdf::Material material2(std::move(material)); EXPECT_EQ(ignition::math::Color(0.1f, 0.2f, 0.3f, 0.5f), material2.Ambient()); @@ -65,6 +67,7 @@ TEST(DOMMaterial, MoveConstructor) EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); EXPECT_EQ("blueberry", material2.NormalMap()); EXPECT_EQ(nullptr, material2.PbrMaterial()); + EXPECT_EQ("/tmp/path", material2.FilePath()); } ///////////////////////////////////////////////// @@ -80,6 +83,7 @@ TEST(DOMMaterial, CopyConstructor) material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); material.SetNormalMap("blueberry"); + material.SetFilePath("/tmp/other"); sdf::Material material2(material); EXPECT_EQ(ignition::math::Color(0.1f, 0.2f, 0.3f, 0.5f), material2.Ambient()); @@ -94,6 +98,7 @@ TEST(DOMMaterial, CopyConstructor) EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); EXPECT_EQ("blueberry", material2.NormalMap()); EXPECT_EQ(nullptr, material2.PbrMaterial()); + EXPECT_EQ("/tmp/other", material2.FilePath()); } ///////////////////////////////////////////////// @@ -109,6 +114,7 @@ TEST(DOMMaterial, AssignmentOperator) material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); material.SetNormalMap("blueberry"); + material.SetFilePath("/tmp/another"); sdf::Material material2; material2 = material; @@ -124,6 +130,7 @@ TEST(DOMMaterial, AssignmentOperator) EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); EXPECT_EQ("blueberry", material2.NormalMap()); EXPECT_EQ(nullptr, material2.PbrMaterial()); + EXPECT_EQ("/tmp/another", material2.FilePath()); } ///////////////////////////////////////////////// @@ -215,6 +222,10 @@ TEST(DOMMaterial, Set) material.SetNormalMap("map"); EXPECT_EQ("map", material.NormalMap()); + EXPECT_EQ("", material.FilePath()); + material.SetFilePath("/my/path"); + EXPECT_EQ("/my/path", material.FilePath()); + // set pbr material sdf::Pbr pbr; sdf::PbrWorkflow workflow; @@ -238,6 +249,7 @@ TEST(DOMMaterial, Set) EXPECT_EQ("map", moved.NormalMap()); EXPECT_EQ(workflow, *moved.PbrMaterial()->Workflow(sdf::PbrWorkflowType::METAL)); + EXPECT_EQ("/my/path", moved.FilePath()); } ///////////////////////////////////////////////// From 91a0bd8f8a8cf11341f51eb280176ae30f80e4cf Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Thu, 3 Sep 2020 01:14:38 -0700 Subject: [PATCH 19/42] Store material file path information (#349) Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- include/sdf/Material.hh | 8 ++++++++ src/Material.cc | 18 ++++++++++++++++++ src/Material_TEST.cc | 12 ++++++++++++ 3 files changed, 38 insertions(+) diff --git a/include/sdf/Material.hh b/include/sdf/Material.hh index 9b3245554..152806e84 100644 --- a/include/sdf/Material.hh +++ b/include/sdf/Material.hh @@ -186,6 +186,14 @@ namespace sdf /// \return Pointer to the PBR material. Null if it does not exist. public: Pbr *PbrMaterial() const; + /// \brief The path to the file where this element was loaded from. + /// \return Full path to the file on disk. + public: const std::string &FilePath() const; + + /// \brief Set the path to the file where this element was loaded from. + /// \paramp[in] _filePath Full path to the file on disk. + public: void SetFilePath(const std::string &_filePath); + /// \brief Private data pointer. private: MaterialPrivate *dataPtr = nullptr; }; diff --git a/src/Material.cc b/src/Material.cc index dd465a942..84ed3a1e0 100644 --- a/src/Material.cc +++ b/src/Material.cc @@ -59,6 +59,9 @@ class sdf::MaterialPrivate /// \brief The SDF element pointer used during load. public: sdf::ElementPtr sdf; + + /// \brief The path to the file where this material was defined. + public: std::string filePath = ""; }; ///////////////////////////////////////////////// @@ -88,6 +91,7 @@ Material::Material(const Material &_material) this->dataPtr->specular = _material.dataPtr->specular; this->dataPtr->emissive = _material.dataPtr->emissive; this->dataPtr->sdf = _material.dataPtr->sdf; + this->dataPtr->filePath = _material.dataPtr->filePath; if (_material.dataPtr->pbr) this->dataPtr->pbr = std::make_unique(*_material.dataPtr->pbr); } @@ -118,6 +122,8 @@ Errors Material::Load(sdf::ElementPtr _sdf) this->dataPtr->sdf = _sdf; + this->dataPtr->filePath = _sdf->FilePath(); + // Check that the provided SDF element is a // This is an error that cannot be recovered, so return an error. if (_sdf->GetName() != "material") @@ -341,3 +347,15 @@ Pbr *Material::PbrMaterial() const { return this->dataPtr->pbr.get(); } + +////////////////////////////////////////////////// +const std::string &Material::FilePath() const +{ + return this->dataPtr->filePath; +} + +////////////////////////////////////////////////// +void Material::SetFilePath(const std::string &_filePath) +{ + this->dataPtr->filePath = _filePath; +} diff --git a/src/Material_TEST.cc b/src/Material_TEST.cc index 579bfa6d9..dcf6993e0 100644 --- a/src/Material_TEST.cc +++ b/src/Material_TEST.cc @@ -36,6 +36,7 @@ TEST(DOMMaterial, Construction) EXPECT_EQ(sdf::ShaderType::PIXEL, material.Shader()); EXPECT_EQ("", material.NormalMap()); EXPECT_EQ(nullptr, material.PbrMaterial()); + EXPECT_EQ("", material.FilePath()); } ///////////////////////////////////////////////// @@ -51,6 +52,7 @@ TEST(DOMMaterial, MoveConstructor) material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); material.SetNormalMap("blueberry"); + material.SetFilePath("/tmp/path"); sdf::Material material2(std::move(material)); EXPECT_EQ(ignition::math::Color(0.1f, 0.2f, 0.3f, 0.5f), material2.Ambient()); @@ -65,6 +67,7 @@ TEST(DOMMaterial, MoveConstructor) EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); EXPECT_EQ("blueberry", material2.NormalMap()); EXPECT_EQ(nullptr, material2.PbrMaterial()); + EXPECT_EQ("/tmp/path", material2.FilePath()); } ///////////////////////////////////////////////// @@ -80,6 +83,7 @@ TEST(DOMMaterial, CopyConstructor) material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); material.SetNormalMap("blueberry"); + material.SetFilePath("/tmp/other"); sdf::Material material2(material); EXPECT_EQ(ignition::math::Color(0.1f, 0.2f, 0.3f, 0.5f), material2.Ambient()); @@ -94,6 +98,7 @@ TEST(DOMMaterial, CopyConstructor) EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); EXPECT_EQ("blueberry", material2.NormalMap()); EXPECT_EQ(nullptr, material2.PbrMaterial()); + EXPECT_EQ("/tmp/other", material2.FilePath()); } ///////////////////////////////////////////////// @@ -109,6 +114,7 @@ TEST(DOMMaterial, AssignmentOperator) material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); material.SetNormalMap("blueberry"); + material.SetFilePath("/tmp/another"); sdf::Material material2; material2 = material; @@ -124,6 +130,7 @@ TEST(DOMMaterial, AssignmentOperator) EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); EXPECT_EQ("blueberry", material2.NormalMap()); EXPECT_EQ(nullptr, material2.PbrMaterial()); + EXPECT_EQ("/tmp/another", material2.FilePath()); } ///////////////////////////////////////////////// @@ -215,6 +222,10 @@ TEST(DOMMaterial, Set) material.SetNormalMap("map"); EXPECT_EQ("map", material.NormalMap()); + EXPECT_EQ("", material.FilePath()); + material.SetFilePath("/my/path"); + EXPECT_EQ("/my/path", material.FilePath()); + // set pbr material sdf::Pbr pbr; sdf::PbrWorkflow workflow; @@ -238,6 +249,7 @@ TEST(DOMMaterial, Set) EXPECT_EQ("map", moved.NormalMap()); EXPECT_EQ(workflow, *moved.PbrMaterial()->Workflow(sdf::PbrWorkflowType::METAL)); + EXPECT_EQ("/my/path", moved.FilePath()); } ///////////////////////////////////////////////// From fb50d224c5c74abff9e3a826d071381e7c0623fd Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 6 Aug 2020 11:15:44 -0700 Subject: [PATCH 20/42] Find python3 in cmake, fix warning (#328) * Also use python3 in test Signed-off-by: Steve Peters --- cmake/SearchForStuff.cmake | 2 +- test/integration/element_memory_leak.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 965f1ecf7..86c810671 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -84,7 +84,7 @@ endif() ################################################ # Find the Python interpreter for running the # check_test_ran.py script -find_package(PythonInterp QUIET) +find_package(PythonInterp 3 QUIET) ################################################ # Find psutil python package for memory tests diff --git a/test/integration/element_memory_leak.cc b/test/integration/element_memory_leak.cc index f85c49786..aee5f7b8e 100644 --- a/test/integration/element_memory_leak.cc +++ b/test/integration/element_memory_leak.cc @@ -71,7 +71,7 @@ const std::string sdfString( const std::string getMemInfoPath = sdf::filesystem::append(PROJECT_SOURCE_PATH, "tools", "get_mem_info.py"); -const std::string pythonMeminfo("python " + getMemInfoPath); +const std::string pythonMeminfo("python3 " + getMemInfoPath); int getMemoryUsage() { From c62d8a3bc400729c75c466b13c7bc22ec9a718a3 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Sun, 6 Sep 2020 17:34:48 -0700 Subject: [PATCH 21/42] Add collection labeler (#347) (#362) Signed-off-by: Louise Poubel --- .github/workflows/pr-collection-labeler.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/pr-collection-labeler.yml diff --git a/.github/workflows/pr-collection-labeler.yml b/.github/workflows/pr-collection-labeler.yml new file mode 100644 index 000000000..99e9730bc --- /dev/null +++ b/.github/workflows/pr-collection-labeler.yml @@ -0,0 +1,13 @@ +name: PR Collection Labeler + +on: pull_request + +jobs: + pr_collection_labeler: + runs-on: ubuntu-latest + steps: + - name: Add collection labels + if: github.event.action == 'opened' + uses: ignition-tooling/pr-collection-labeler@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From be2b10d58227a3359cdfe87951ae2ba70fb76ce6 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Sun, 6 Sep 2020 18:44:30 -0700 Subject: [PATCH 22/42] Add collection labeler (#347) (#363) Signed-off-by: Louise Poubel --- .github/workflows/pr-collection-labeler.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/pr-collection-labeler.yml diff --git a/.github/workflows/pr-collection-labeler.yml b/.github/workflows/pr-collection-labeler.yml new file mode 100644 index 000000000..99e9730bc --- /dev/null +++ b/.github/workflows/pr-collection-labeler.yml @@ -0,0 +1,13 @@ +name: PR Collection Labeler + +on: pull_request + +jobs: + pr_collection_labeler: + runs-on: ubuntu-latest + steps: + - name: Add collection labels + if: github.event.action == 'opened' + uses: ignition-tooling/pr-collection-labeler@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} From 94055d1104063053dd331f848b438d93b27e9828 Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 7 Sep 2020 03:57:13 +0200 Subject: [PATCH 23/42] SearchForStuff: add logic to find urdfdom without pkg-config (#245) Signed-off-by: Silvio Traversaro --- cmake/SearchForStuff.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 86c810671..427e5e7a0 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -57,7 +57,13 @@ if (NOT DEFINED USE_INTERNAL_URDF OR NOT USE_INTERNAL_URDF) pkg_check_modules(URDF urdfdom>=1.0) if (NOT URDF_FOUND) - if (NOT DEFINED USE_INTERNAL_URDF) + find_package(urdfdom) + if (urdfdom_FOUND) + set(URDF_INCLUDE_DIRS ${urdfdom_INCLUDE_DIRS}) + # ${urdfdom_LIBRARIES} already contains absolute library filenames + set(URDF_LIBRARY_DIRS "") + set(URDF_LIBRARIES ${urdfdom_LIBRARIES}) + elseif (NOT DEFINED USE_INTERNAL_URDF) message(STATUS "Couldn't find urdfdom >= 1.0, using internal copy") set(USE_INTERNAL_URDF true) else() From e27010b2cfc0478a2f6f37a0eb7c319ee10a995b Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Mon, 7 Sep 2020 09:44:54 -0700 Subject: [PATCH 24/42] Changelog for 9.3.0 release (#368) Signed-off-by: Steve Peters --- CMakeLists.txt | 2 +- Changelog.md | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 82e6510f1..3e5264c3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ set (SDF_MINOR_VERSION 3) set (SDF_PATCH_VERSION 0) set (SDF_VERSION ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}) -set (SDF_VERSION_FULL ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}.${SDF_PATCH_VERSION}~pre1) +set (SDF_VERSION_FULL ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}.${SDF_PATCH_VERSION}) string (TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) string(REGEX REPLACE "[0-9]+" "" PROJECT_NAME_NO_VERSION ${PROJECT_NAME}) diff --git a/Changelog.md b/Changelog.md index 76cc42ac2..9770b87b7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,6 +4,9 @@ ### SDFormat 9.3.0 (2020-XX-XX) +1. Store material file path information. + + [Pull request 349](https://github.com/osrf/sdformat/pull/349) + 1. Support nested models in DOM and frame semantics. * [Pull request 316](https://github.com/osrf/sdformat/pull/316) + [Pull request 341](https://github.com/osrf/sdformat/pull/341) @@ -14,12 +17,19 @@ 1. Fix Actor copy operators and increase test coverage. * [Pull request 301](https://github.com/osrf/sdformat/pull/301) +1. GitHub Actions CI, pull request labels. + * [Pull request 311](https://github.com/osrf/sdformat/pull/311) + * [Pull request 363](https://github.com/osrf/sdformat/pull/363) + 1. Change bitbucket links to GitHub. * [Pull request 240](https://github.com/osrf/sdformat/pull/240) -1. Param_TEST: test parsing +Inf and -Inf. +1. Param\_TEST: test parsing +Inf and -Inf. * [Pull request 277](https://github.com/osrf/sdformat/pull/277) +1. SearchForStuff: add logic to find urdfdom without pkg-config. + * [Pull request 245](https://github.com/osrf/sdformat/pull/245) + 1. Observe the CMake variable `BUILD_TESTING` if it is defined. * [Pull request 269](https://github.com/osrf/sdformat/pull/269) From 246d978aef3092a400acf9dd9d8d2caf30d833ca Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Tue, 8 Sep 2020 09:34:50 -0700 Subject: [PATCH 25/42] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=208.9.0=20(#361)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Louise Poubel Co-authored-by: Steve Peters --- CMakeLists.txt | 2 +- Changelog.md | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bf81f001..65e5e710f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ project (sdformat8) set (SDF_PROTOCOL_VERSION 1.6) set (SDF_MAJOR_VERSION 8) -set (SDF_MINOR_VERSION 8) +set (SDF_MINOR_VERSION 9) set (SDF_PATCH_VERSION 0) set (SDF_VERSION ${SDF_MAJOR_VERSION}.${SDF_MINOR_VERSION}) diff --git a/Changelog.md b/Changelog.md index 12dd30546..7aabf2e95 100644 --- a/Changelog.md +++ b/Changelog.md @@ -2,9 +2,21 @@ ### SDFormat 8.X.X (202X-XX-XX) +### SDFormat 8.9.0 (2020-09-04) + +1. Find python3 in cmake, fix warning + * [Pull request 328](https://github.com/osrf/sdformat/pull/328) + +1. Store material file path information + * [Pull request 349](https://github.com/osrf/sdformat/pull/349) + 1. Fix Actor copy operators and increase test coverage. * [Pull request 301](https://github.com/osrf/sdformat/pull/301) +1. Migration to GitHub: CI, links... + * [Pull request 239](https://github.com/osrf/sdformat/pull/239) + * [Pull request 310](https://github.com/osrf/sdformat/pull/310) + 1. Increase output precision of URDF to SDF conversion, output -0 as 0. * [BitBucket pull request 675](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/675) From 7819366846cafa8f8d37b1bae214885bad64f246 Mon Sep 17 00:00:00 2001 From: Jose Luis Rivero Date: Wed, 9 Sep 2020 19:14:31 +0200 Subject: [PATCH 26/42] Define PATH_MAX for Debian Hurd system (#369) Signed-off-by: Jose Luis Rivero --- src/Filesystem.cc | 5 +++++ src/Filesystem_TEST.cc | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/Filesystem.cc b/src/Filesystem.cc index 2e1f206af..5096a6427 100644 --- a/src/Filesystem.cc +++ b/src/Filesystem.cc @@ -55,6 +55,11 @@ #include "sdf/Filesystem.hh" +/* PATH_MAX is undefined on GNU Hurd */ +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + namespace sdf { inline namespace SDF_VERSION_NAMESPACE { diff --git a/src/Filesystem_TEST.cc b/src/Filesystem_TEST.cc index a0b0ea87c..e96cc0198 100644 --- a/src/Filesystem_TEST.cc +++ b/src/Filesystem_TEST.cc @@ -25,6 +25,11 @@ #include #include +/* PATH_MAX is undefined on GNU Hurd */ +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + ///////////////////////////////////////////////// bool create_and_switch_to_temp_dir(std::string &_new_temp_path) { From b6c761ba38652ea440c4f728d60ef4b85cebf511 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Tue, 8 Sep 2020 09:34:50 -0700 Subject: [PATCH 27/42] Changelog for 8.9.0 (#361) Signed-off-by: Louise Poubel Co-authored-by: Steve Peters Signed-off-by: Steve Peters --- Changelog.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Changelog.md b/Changelog.md index 9770b87b7..b74cd5f76 100644 --- a/Changelog.md +++ b/Changelog.md @@ -230,9 +230,21 @@ ### SDFormat 8.X.X (202X-XX-XX) +### SDFormat 8.9.0 (2020-09-04) + +1. Find python3 in cmake, fix warning + * [Pull request 328](https://github.com/osrf/sdformat/pull/328) + +1. Store material file path information + * [Pull request 349](https://github.com/osrf/sdformat/pull/349) + 1. Fix Actor copy operators and increase test coverage. * [Pull request 301](https://github.com/osrf/sdformat/pull/301) +1. Migration to GitHub: CI, links... + * [Pull request 239](https://github.com/osrf/sdformat/pull/239) + * [Pull request 310](https://github.com/osrf/sdformat/pull/310) + 1. Increase output precision of URDF to SDF conversion, output -0 as 0. * [BitBucket pull request 675](https://osrf-migration.github.io/sdformat-gh-pages/#!/osrf/sdformat/pull-requests/675) From 2917733c45e5b471ee2d80cb302e7bfbfe5e9521 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Fri, 9 Oct 2020 10:00:51 -0700 Subject: [PATCH 28/42] Fix supported shader types (normal_map_X_space) (#383) Signed-off-by: Louise Poubel --- sdf/1.2/visual.sdf | 2 +- sdf/1.3/visual.sdf | 2 +- sdf/1.4/visual.sdf | 2 +- sdf/1.5/material.sdf | 2 +- sdf/1.6/material.sdf | 2 +- src/Material.cc | 4 ++++ test/sdf/material.sdf | 2 +- test/sdf/material_normal_map_missing.sdf | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/sdf/1.2/visual.sdf b/sdf/1.2/visual.sdf index 6b4913260..550fe4448 100644 --- a/sdf/1.2/visual.sdf +++ b/sdf/1.2/visual.sdf @@ -41,7 +41,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.3/visual.sdf b/sdf/1.3/visual.sdf index 029ef22bd..10dfb3a56 100644 --- a/sdf/1.3/visual.sdf +++ b/sdf/1.3/visual.sdf @@ -41,7 +41,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.4/visual.sdf b/sdf/1.4/visual.sdf index 644bff44a..f8043dfca 100644 --- a/sdf/1.4/visual.sdf +++ b/sdf/1.4/visual.sdf @@ -41,7 +41,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.5/material.sdf b/sdf/1.5/material.sdf index 137436eea..fdf5fa6a7 100644 --- a/sdf/1.5/material.sdf +++ b/sdf/1.5/material.sdf @@ -17,7 +17,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.6/material.sdf b/sdf/1.6/material.sdf index f17690759..7cd011598 100644 --- a/sdf/1.6/material.sdf +++ b/sdf/1.6/material.sdf @@ -17,7 +17,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/src/Material.cc b/src/Material.cc index 84ed3a1e0..722487afd 100644 --- a/src/Material.cc +++ b/src/Material.cc @@ -176,8 +176,12 @@ Errors Material::Load(sdf::ElementPtr _sdf) this->dataPtr->shader = ShaderType::VERTEX; else if (typePair.first == "normal_map_objectspace") this->dataPtr->shader = ShaderType::NORMAL_MAP_OBJECTSPACE; + else if (typePair.first == "normal_map_object_space") + this->dataPtr->shader = ShaderType::NORMAL_MAP_OBJECTSPACE; else if (typePair.first == "normal_map_tangentspace") this->dataPtr->shader = ShaderType::NORMAL_MAP_TANGENTSPACE; + else if (typePair.first == "normal_map_tangent_space") + this->dataPtr->shader = ShaderType::NORMAL_MAP_TANGENTSPACE; else { errors.push_back({ErrorCode::ELEMENT_INVALID, diff --git a/test/sdf/material.sdf b/test/sdf/material.sdf index 5869f6de4..5b1c2e68f 100644 --- a/test/sdf/material.sdf +++ b/test/sdf/material.sdf @@ -26,7 +26,7 @@ - + my_normal_map diff --git a/test/sdf/material_normal_map_missing.sdf b/test/sdf/material_normal_map_missing.sdf index 033efffb4..08607c335 100644 --- a/test/sdf/material_normal_map_missing.sdf +++ b/test/sdf/material_normal_map_missing.sdf @@ -4,7 +4,7 @@ - + From dd7ce2e103c9caf680d5e4ecd4cd497fe18d5001 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Fri, 9 Oct 2020 10:00:51 -0700 Subject: [PATCH 29/42] Fix supported shader types (normal_map_X_space) (#383) Signed-off-by: Louise Poubel --- sdf/1.2/visual.sdf | 2 +- sdf/1.3/visual.sdf | 2 +- sdf/1.4/visual.sdf | 2 +- sdf/1.5/material.sdf | 2 +- sdf/1.6/material.sdf | 2 +- sdf/1.7/material.sdf | 2 +- src/Material.cc | 4 ++++ test/sdf/material.sdf | 2 +- test/sdf/material_normal_map_missing.sdf | 2 +- 9 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sdf/1.2/visual.sdf b/sdf/1.2/visual.sdf index 6b4913260..550fe4448 100644 --- a/sdf/1.2/visual.sdf +++ b/sdf/1.2/visual.sdf @@ -41,7 +41,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.3/visual.sdf b/sdf/1.3/visual.sdf index 029ef22bd..10dfb3a56 100644 --- a/sdf/1.3/visual.sdf +++ b/sdf/1.3/visual.sdf @@ -41,7 +41,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.4/visual.sdf b/sdf/1.4/visual.sdf index 644bff44a..f8043dfca 100644 --- a/sdf/1.4/visual.sdf +++ b/sdf/1.4/visual.sdf @@ -41,7 +41,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.5/material.sdf b/sdf/1.5/material.sdf index 137436eea..fdf5fa6a7 100644 --- a/sdf/1.5/material.sdf +++ b/sdf/1.5/material.sdf @@ -17,7 +17,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.6/material.sdf b/sdf/1.6/material.sdf index f17690759..7cd011598 100644 --- a/sdf/1.6/material.sdf +++ b/sdf/1.6/material.sdf @@ -17,7 +17,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/sdf/1.7/material.sdf b/sdf/1.7/material.sdf index f17690759..7cd011598 100644 --- a/sdf/1.7/material.sdf +++ b/sdf/1.7/material.sdf @@ -17,7 +17,7 @@ - vertex, pixel, normal_map_objectspace, normal_map_tangentspace + vertex, pixel, normal_map_object_space, normal_map_tangent_space diff --git a/src/Material.cc b/src/Material.cc index 84ed3a1e0..722487afd 100644 --- a/src/Material.cc +++ b/src/Material.cc @@ -176,8 +176,12 @@ Errors Material::Load(sdf::ElementPtr _sdf) this->dataPtr->shader = ShaderType::VERTEX; else if (typePair.first == "normal_map_objectspace") this->dataPtr->shader = ShaderType::NORMAL_MAP_OBJECTSPACE; + else if (typePair.first == "normal_map_object_space") + this->dataPtr->shader = ShaderType::NORMAL_MAP_OBJECTSPACE; else if (typePair.first == "normal_map_tangentspace") this->dataPtr->shader = ShaderType::NORMAL_MAP_TANGENTSPACE; + else if (typePair.first == "normal_map_tangent_space") + this->dataPtr->shader = ShaderType::NORMAL_MAP_TANGENTSPACE; else { errors.push_back({ErrorCode::ELEMENT_INVALID, diff --git a/test/sdf/material.sdf b/test/sdf/material.sdf index 5869f6de4..5b1c2e68f 100644 --- a/test/sdf/material.sdf +++ b/test/sdf/material.sdf @@ -26,7 +26,7 @@ - + my_normal_map diff --git a/test/sdf/material_normal_map_missing.sdf b/test/sdf/material_normal_map_missing.sdf index 033efffb4..08607c335 100644 --- a/test/sdf/material_normal_map_missing.sdf +++ b/test/sdf/material_normal_map_missing.sdf @@ -4,7 +4,7 @@ - + From 6094b9d2ebf919a4b4b0d39a3fefefbf92a536db Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Wed, 14 Oct 2020 17:11:31 -0700 Subject: [PATCH 30/42] Make labeler work with PRs from forks (#390) Signed-off-by: Louise Poubel --- .github/workflows/pr-collection-labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-collection-labeler.yml b/.github/workflows/pr-collection-labeler.yml index 99e9730bc..7d7b4e179 100644 --- a/.github/workflows/pr-collection-labeler.yml +++ b/.github/workflows/pr-collection-labeler.yml @@ -1,6 +1,6 @@ name: PR Collection Labeler -on: pull_request +on: pull_request_target jobs: pr_collection_labeler: From f9c31c978e0fce907570810564b0b0ce9eb70fc2 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Wed, 21 Oct 2020 10:16:46 -0700 Subject: [PATCH 31/42] Move list of debian dependencies to packages.apt (#392) Signed-off-by: Louise Poubel --- .github/ci/packages.apt | 8 ++++++++ .github/workflows/linux-ubuntu-bionic.yml | 7 ++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .github/ci/packages.apt diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt new file mode 100644 index 000000000..9f012f67b --- /dev/null +++ b/.github/ci/packages.apt @@ -0,0 +1,8 @@ +libignition-cmake2-dev +libignition-math6-dev +libignition-tools-dev +libtinyxml-dev +liburdfdom-dev +libxml2-utils +python-psutil +ruby-dev diff --git a/.github/workflows/linux-ubuntu-bionic.yml b/.github/workflows/linux-ubuntu-bionic.yml index 236f50289..de34e7ad5 100644 --- a/.github/workflows/linux-ubuntu-bionic.yml +++ b/.github/workflows/linux-ubuntu-bionic.yml @@ -16,7 +16,7 @@ jobs: sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list'; sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743; sudo apt-get update; - sudo apt -y install cmake build-essential curl g++-8 git mercurial libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck; + sudo apt -y install cmake build-essential curl g++-8 git cppcheck; sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8; # workaround for https://github.com/rubygems/rubygems/issues/3068 # suggested in https://github.com/rubygems/rubygems/issues/3068#issuecomment-574775885 @@ -32,10 +32,7 @@ jobs: - name: Install ignition dependencies run: | sudo apt -y install \ - libignition-cmake2-dev \ - libignition-math6-dev \ - libignition-tools-dev \ - liburdfdom-dev; + $(sort -u $(find .github -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt') | tr '\n' ' ') - name: cmake run: | mkdir build; From d619e0a1b267cd3bb04bfc8baf00a73d0e43b296 Mon Sep 17 00:00:00 2001 From: Louise Poubel Date: Wed, 21 Oct 2020 10:16:46 -0700 Subject: [PATCH 32/42] Move list of debian dependencies to packages.apt (#392) Signed-off-by: Louise Poubel --- .github/ci/packages.apt | 8 ++++++++ .github/workflows/linux-ubuntu-bionic.yml | 7 ++----- 2 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 .github/ci/packages.apt diff --git a/.github/ci/packages.apt b/.github/ci/packages.apt new file mode 100644 index 000000000..9f012f67b --- /dev/null +++ b/.github/ci/packages.apt @@ -0,0 +1,8 @@ +libignition-cmake2-dev +libignition-math6-dev +libignition-tools-dev +libtinyxml-dev +liburdfdom-dev +libxml2-utils +python-psutil +ruby-dev diff --git a/.github/workflows/linux-ubuntu-bionic.yml b/.github/workflows/linux-ubuntu-bionic.yml index 236f50289..de34e7ad5 100644 --- a/.github/workflows/linux-ubuntu-bionic.yml +++ b/.github/workflows/linux-ubuntu-bionic.yml @@ -16,7 +16,7 @@ jobs: sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" > /etc/apt/sources.list.d/gazebo-stable.list'; sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743; sudo apt-get update; - sudo apt -y install cmake build-essential curl g++-8 git mercurial libtinyxml-dev libxml2-utils ruby-dev python-psutil cppcheck; + sudo apt -y install cmake build-essential curl g++-8 git cppcheck; sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8 --slave /usr/bin/gcov gcov /usr/bin/gcov-8; # workaround for https://github.com/rubygems/rubygems/issues/3068 # suggested in https://github.com/rubygems/rubygems/issues/3068#issuecomment-574775885 @@ -32,10 +32,7 @@ jobs: - name: Install ignition dependencies run: | sudo apt -y install \ - libignition-cmake2-dev \ - libignition-math6-dev \ - libignition-tools-dev \ - liburdfdom-dev; + $(sort -u $(find .github -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt') | tr '\n' ' ') - name: cmake run: | mkdir build; From 0d47aeb916f02db4435e1961e9a27f84a5494b3f Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Sat, 7 Nov 2020 22:17:41 -0800 Subject: [PATCH 33/42] Enable tests for #202 on macOS with Xcode 12+, add catalina workflow (#414) Signed-off-by: Steve Peters --- .github/workflows/macos.yml | 45 +++++++++++++++++++++++++++++++++++++ src/SDF_TEST.cc | 16 ++++++------- 2 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..c9a9f7264 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,45 @@ +name: macOS latest + +on: [push, pull_request] + +jobs: + build: + + env: + PACKAGE: sdformat8 + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + - run: brew config + + - name: Install base dependencies + run: | + brew tap osrf/simulation; + brew install --only-dependencies ${PACKAGE}; + + - run: mkdir build + - name: cmake + working-directory: build + run: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/${PACKAGE}/HEAD + - run: make + working-directory: build + - run: make test + working-directory: build + env: + CTEST_OUTPUT_ON_FAILURE: 1 + - name: make install + working-directory: build + run: | + make install; + brew link ${PACKAGE}; + - name: Compile example code + working-directory: examples + run: | + mkdir build; + cd build; + cmake ..; + make; + ./simple ../simple.sdf; diff --git a/src/SDF_TEST.cc b/src/SDF_TEST.cc index 27f194ad4..07083ca8b 100644 --- a/src/SDF_TEST.cc +++ b/src/SDF_TEST.cc @@ -132,9 +132,9 @@ TEST(SDF, UpdateElement) staticParam->Get(flagCheck); EXPECT_EQ(flagCheck, fixture.flag); poseParam->Get(poseCheck); - // test fails on homebrew see issue 202 + // test fails on homebrew with Xcode 11 and earlier, see issue 202 // https://github.com/osrf/sdformat/issues/202 -#ifndef __APPLE__ +#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) EXPECT_EQ(poseCheck, fixture.pose); #endif } @@ -419,9 +419,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew see issue 202 + // test fails on homebrew with Xcode 11 and earlier, see issue 202 // https://github.com/osrf/sdformat/issues/202 -#ifndef __APPLE__ +#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) FAIL(); #endif } @@ -437,9 +437,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew see issue 202 + // test fails on homebrew with Xcode 11 and earlier, see issue 202 // https://github.com/osrf/sdformat/issues/202 -#ifndef __APPLE__ +#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) FAIL(); #endif } @@ -481,9 +481,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew see issue 202 + // test fails on homebrew with Xcode 11 and earlier, see issue 202 // https://github.com/osrf/sdformat/issues/202 -#ifndef __APPLE__ +#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) FAIL(); #endif } From 0e778165ce43152acee9b9e9863ce6e1066fa26d Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Sat, 7 Nov 2020 22:17:41 -0800 Subject: [PATCH 34/42] Enable tests for #202 on macOS with Xcode 12+, add catalina workflow (#414) Signed-off-by: Steve Peters --- .github/workflows/macos.yml | 45 +++++++++++++++++++++++++++++++++++++ src/SDF_TEST.cc | 16 ++++++------- 2 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/macos.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..c9a9f7264 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,45 @@ +name: macOS latest + +on: [push, pull_request] + +jobs: + build: + + env: + PACKAGE: sdformat8 + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Homebrew + id: set-up-homebrew + uses: Homebrew/actions/setup-homebrew@master + - run: brew config + + - name: Install base dependencies + run: | + brew tap osrf/simulation; + brew install --only-dependencies ${PACKAGE}; + + - run: mkdir build + - name: cmake + working-directory: build + run: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/${PACKAGE}/HEAD + - run: make + working-directory: build + - run: make test + working-directory: build + env: + CTEST_OUTPUT_ON_FAILURE: 1 + - name: make install + working-directory: build + run: | + make install; + brew link ${PACKAGE}; + - name: Compile example code + working-directory: examples + run: | + mkdir build; + cd build; + cmake ..; + make; + ./simple ../simple.sdf; diff --git a/src/SDF_TEST.cc b/src/SDF_TEST.cc index a947cf55c..ccc2e718c 100644 --- a/src/SDF_TEST.cc +++ b/src/SDF_TEST.cc @@ -132,9 +132,9 @@ TEST(SDF, UpdateElement) staticParam->Get(flagCheck); EXPECT_EQ(flagCheck, fixture.flag); poseParam->Get(poseCheck); - // test fails on homebrew see issue 202 + // test fails on homebrew with Xcode 11 and earlier, see issue 202 // https://github.com/osrf/sdformat/issues/202 -#ifndef __APPLE__ +#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) EXPECT_EQ(poseCheck, fixture.pose); #endif } @@ -419,9 +419,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew see issue 202 + // test fails on homebrew with Xcode 11 and earlier, see issue 202 // https://github.com/osrf/sdformat/issues/202 -#ifndef __APPLE__ +#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) FAIL(); #endif } @@ -437,9 +437,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew see issue 202 + // test fails on homebrew with Xcode 11 and earlier, see issue 202 // https://github.com/osrf/sdformat/issues/202 -#ifndef __APPLE__ +#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) FAIL(); #endif } @@ -481,9 +481,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew see issue 202 + // test fails on homebrew with Xcode 11 and earlier, see issue 202 // https://github.com/osrf/sdformat/issues/202 -#ifndef __APPLE__ +#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) FAIL(); #endif } From 8cef85fd59b444c9fb0feb99756422c47fcd3bb8 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Mon, 23 Nov 2020 10:49:26 -0800 Subject: [PATCH 35/42] Test included model folders missing model.config (#422) Currently there is a confusing error message if a file is loaded that finds a folder matching the name of a model to be included but the folder does not have a model.config file. This improves the first error message and stops further loading to prevent additional confusing messages. Signed-off-by: Steve Peters --- src/parser.cc | 12 +++++- test/integration/includes.cc | 37 +++++++++++++++++++ .../model/box_missing_config/model.sdf | 22 +++++++++++ 3 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 test/integration/model/box_missing_config/model.sdf diff --git a/src/parser.cc b/src/parser.cc index 911ef50c4..eaff2a603 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -746,7 +746,8 @@ std::string getModelFilePath(const std::string &_modelDirPath) if (!sdf::filesystem::exists(configFilePath)) { // We didn't find manifest.xml either, output an error and get out. - sdferr << "Could not find model.config or manifest.xml for the model\n"; + sdferr << "Could not find model.config or manifest.xml in [" + << _modelDirPath << "]\n"; return std::string(); } else @@ -932,6 +933,15 @@ bool readXml(TiXmlElement *_xml, ElementPtr _sdf, Errors &_errors) // Get the config.xml filename filename = getModelFilePath(modelPath); + + if (filename.empty()) + { + _errors.push_back({ErrorCode::URI_LOOKUP, + "Unable to resolve uri[" + uri + "] to model path [" + + modelPath + "] since it does not contain a model.config " + + "file."}); + continue; + } } else { diff --git a/test/integration/includes.cc b/test/integration/includes.cc index bed8b9a8b..77862cfcd 100644 --- a/test/integration/includes.cc +++ b/test/integration/includes.cc @@ -318,3 +318,40 @@ TEST(IncludesTest, Includes_15_convert) EXPECT_EQ("1.6", modelElem->OriginalVersion()); EXPECT_EQ("1.6", linkElem->OriginalVersion()); } + +////////////////////////////////////////////////// +TEST(IncludesTest, IncludeModelMissingConfig) +{ + sdf::setFindCallback(findFileCb); + + std::ostringstream stream; + stream + << "" + << "" + << " box_missing_config" + << "" + << ""; + + sdf::SDFPtr sdfParsed(new sdf::SDF()); + sdf::init(sdfParsed); + sdf::Errors errors; + ASSERT_TRUE(sdf::readString(stream.str(), sdfParsed, errors)); + + ASSERT_GE(1u, errors.size()); + EXPECT_EQ(1u, errors.size()); + std::cout << errors[0] << std::endl; + EXPECT_EQ(errors[0].Code(), sdf::ErrorCode::URI_LOOKUP); + EXPECT_NE(std::string::npos, errors[0].Message().find( + "Unable to resolve uri[box_missing_config] to model path")) << errors[0]; + EXPECT_NE(std::string::npos, errors[0].Message().find( + "box_missing_config] since it does not contain a model.config file")) + << errors[0]; + + sdf::Root root; + errors = root.Load(sdfParsed); + for (auto e : errors) + std::cout << e.Message() << std::endl; + EXPECT_TRUE(errors.empty()); + + EXPECT_EQ(0u, root.ModelCount()); +} diff --git a/test/integration/model/box_missing_config/model.sdf b/test/integration/model/box_missing_config/model.sdf new file mode 100644 index 000000000..32d16f743 --- /dev/null +++ b/test/integration/model/box_missing_config/model.sdf @@ -0,0 +1,22 @@ + + + + 0 0 0.5 0 0 0 + + + + + 1 1 1 + + + + + + + 1 1 1 + + + + + + From f5c8bd94422960f5cdd5e0d8e15ecfafdb993141 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Thu, 29 Oct 2020 23:29:31 -0700 Subject: [PATCH 36/42] Prefix nested model names when flattening (#399) Currently the addNestedModel function in parser.cc prefixes link, joint, and frame names with the flattened model name delimited by "::". This applies the same prefix to the names of nested models within the flattened model as well. Signed-off-by: Steve Peters --- src/parser.cc | 3 ++- test/integration/model/test_model_with_frames/model.sdf | 6 ++++++ test/integration/nested_model_with_frames_expected.sdf | 6 ++++++ .../two_level_nested_model_with_frames_expected.sdf | 6 ++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/parser.cc b/src/parser.cc index eaff2a603..b94d08222 100644 --- a/src/parser.cc +++ b/src/parser.cc @@ -1285,6 +1285,7 @@ void addNestedModel(ElementPtr _sdf, ElementPtr _includeSDF, Errors &_errors) while (elem) { if ((elem->GetName() == "link") || + (elem->GetName() == "model") || (elem->GetName() == "joint") || (elem->GetName() == "frame")) { @@ -1293,7 +1294,7 @@ void addNestedModel(ElementPtr _sdf, ElementPtr _includeSDF, Errors &_errors) replace[elemName] = newName; } - if ((elem->GetName() == "link")) + if ((elem->GetName() == "link") || (elem->GetName() == "model")) { // Add a pose element even if the element doesn't originally have one auto elemPose = elem->GetElement("pose"); diff --git a/test/integration/model/test_model_with_frames/model.sdf b/test/integration/model/test_model_with_frames/model.sdf index f085ec4b8..b34e0375c 100644 --- a/test/integration/model/test_model_with_frames/model.sdf +++ b/test/integration/model/test_model_with_frames/model.sdf @@ -59,5 +59,11 @@ L3 L4 + + 1 0 0 0 0 0 + + 1 0 0 0 0 0 + + diff --git a/test/integration/nested_model_with_frames_expected.sdf b/test/integration/nested_model_with_frames_expected.sdf index 6e3f1dcbe..2385f000f 100644 --- a/test/integration/nested_model_with_frames_expected.sdf +++ b/test/integration/nested_model_with_frames_expected.sdf @@ -63,6 +63,12 @@ M1::L3 M1::L4 + + 1 0 0 0 -0 0 + + 1 0 0 0 -0 0 + + diff --git a/test/integration/two_level_nested_model_with_frames_expected.sdf b/test/integration/two_level_nested_model_with_frames_expected.sdf index f96fae7ba..807fa6d6c 100644 --- a/test/integration/two_level_nested_model_with_frames_expected.sdf +++ b/test/integration/two_level_nested_model_with_frames_expected.sdf @@ -66,6 +66,12 @@ M1::test_model_with_frames::L3 M1::test_model_with_frames::L4 + + 1 0 0 0 -0 0 + + 1 0 0 0 -0 0 + + From a0d4807cbe0f703e15d5a51ba719acce8b1a838e Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 24 Nov 2020 19:30:05 -0800 Subject: [PATCH 37/42] Add Sky DOM (#397) (#417) Signed-off-by: Ian Chen Co-authored-by: Louise Poubel Co-authored-by: Steve Peters --- include/sdf/CMakeLists.txt | 1 + include/sdf/Scene.hh | 9 ++ include/sdf/Sky.hh | 146 ++++++++++++++++++++ src/CMakeLists.txt | 2 + src/Scene.cc | 49 +++++++ src/Scene_TEST.cc | 17 +++ src/Sky.cc | 235 ++++++++++++++++++++++++++++++++ src/Sky_TEST.cc | 188 +++++++++++++++++++++++++ test/integration/CMakeLists.txt | 1 + test/integration/scene_dom.cc | 73 ++++++++++ test/sdf/scene_with_sky.sdf | 26 ++++ 11 files changed, 747 insertions(+) create mode 100644 include/sdf/Sky.hh create mode 100644 src/Sky.cc create mode 100644 src/Sky_TEST.cc create mode 100644 test/integration/scene_dom.cc create mode 100644 test/sdf/scene_with_sky.sdf diff --git a/include/sdf/CMakeLists.txt b/include/sdf/CMakeLists.txt index 3f6d5b118..8aa166955 100644 --- a/include/sdf/CMakeLists.txt +++ b/include/sdf/CMakeLists.txt @@ -39,6 +39,7 @@ set (headers SDFImpl.hh SemanticPose.hh Sensor.hh + Sky.hh Sphere.hh Surface.hh Types.hh diff --git a/include/sdf/Scene.hh b/include/sdf/Scene.hh index b4fea303b..27dc1a326 100644 --- a/include/sdf/Scene.hh +++ b/include/sdf/Scene.hh @@ -20,6 +20,7 @@ #include #include "sdf/Element.hh" +#include "sdf/Sky.hh" #include "sdf/Types.hh" #include "sdf/sdf_config.h" #include "sdf/system_util.hh" @@ -107,6 +108,14 @@ namespace sdf /// \param[in] enabled True to enable shadows public: void SetShadows(const bool _shadows); + /// \brief Set sky + /// \param[in] _sky Sky to set to + public: void SetSky(const Sky &_sky); + + /// \brief Get sky + /// \return Sky + public: const sdf::Sky *Sky() const; + /// \brief Get a pointer to the SDF element that was used during /// load. /// \return SDF element pointer. The value will be nullptr if Load has diff --git a/include/sdf/Sky.hh b/include/sdf/Sky.hh new file mode 100644 index 000000000..84f327a24 --- /dev/null +++ b/include/sdf/Sky.hh @@ -0,0 +1,146 @@ +/* + * Copyright 2020 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_SKY_HH_ +#define SDF_SKY_HH_ + +#include + +#include "sdf/Element.hh" +#include "sdf/Types.hh" +#include "sdf/sdf_config.h" +#include "sdf/system_util.hh" + +namespace sdf +{ + // Inline bracket to help doxygen filtering. + inline namespace SDF_VERSION_NAMESPACE { + // + + // Forward declarations. + class SkyPrivate; + + class SDFORMAT_VISIBLE Sky + { + /// \brief Default constructor + public: Sky(); + + /// \brief Copy constructor + /// \param[in] _sky Sky element to copy. + public: Sky(const Sky &_sky); + + /// \brief Move constructor + /// \param[in] _sky Sky to move. + public: Sky(Sky &&_sky) noexcept; + + /// \brief Destructor + public: ~Sky(); + + /// \brief Assignment operator. + /// \param[in] _sky The sky to set values from. + /// \return *this + public: Sky &operator=(const Sky &_sky); + + /// \brief Move assignment operator. + /// \param[in] _workflow The sky to move from. + /// \return *this + public: Sky &operator=(Sky &&_sky); + + /// \brief Get time of day [0..24] + /// \return Time of day + public: double Time() const; + + /// \brief Set time of day + /// \param[in] _time Time of day [0..24] + public: void SetTime(double _time); + + /// \brief Get sunrise time + /// \return sunrise time [0..24] + public: double Sunrise() const; + + /// \brief Set Sunrise time + /// \param[in] _time Sunrise time [0..24] + public: void SetSunrise(double _time); + + /// \brief Get sunset time + /// \return sunset time [0..24] + public: double Sunset() const; + + /// \brief Set Sunset time + /// \param[in] _time Sunset time [0..24] + public: void SetSunset(double _time); + + /// \brief Get cloud speed + /// \return cloud speed in meters per second + public: double CloudSpeed() const; + + /// \brief Set cloud speed + /// \param[in] _speed cloud speed in meters per second. + public: void SetCloudSpeed(double _speed); + + /// \brief Get cloud direction angle (angle around up axis) + /// \return cloud direction angle in world frame + public: ignition::math::Angle CloudDirection() const; + + /// \brief Set cloud direction angle (angle around up axis) + /// \param[in] _angle Cloud direction angle in world frame. + public: void SetCloudDirection(const ignition::math::Angle &_angle); + + /// \brief Get cloud humidity + /// \return cloud humidity [0..1] + public: double CloudHumidity() const; + + /// \brief Set cloud humidity + /// \param[in] _humidity cloud humidity [0..1] + public: void SetCloudHumidity(double _humidity); + + /// \brief Get cloud mean size + /// \return cloud mean size [0..1] + public: double CloudMeanSize() const; + + /// \brief Set cloud mean siz + /// \param[in] _size cloud mean size [0..1] + public: void SetCloudMeanSize(double _size); + + /// \brief Get cloud ambient color + /// \return cloud ambient color + public: ignition::math::Color CloudAmbient() const; + + /// \brief Set cloud ambient color + /// \param[in] _ambient cloud ambient color + public: void SetCloudAmbient(const ignition::math::Color &_ambient); + + /// \brief Load the sky based on a element pointer. This is *not* the + /// usual entry point. Typical usage of the SDF DOM is through the Root + /// object. + /// \param[in] _sdf The SDF Element pointer + /// \return Errors, which is a vector of Error objects. Each Error includes + /// an error code and message. An empty vector indicates no error. + public: Errors Load(ElementPtr _sdf); + + /// \brief Get a pointer to the SDF element that was used during + /// load. + /// \return SDF element pointer. The value will be nullptr if Load has + /// not been called. + public: sdf::ElementPtr Element() const; + + /// \brief Private data pointer. + private: SkyPrivate *dataPtr = nullptr; + }; + } +} +#endif diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c283a00a1..62638f5cc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -55,6 +55,7 @@ set (sources SDFExtension.cc SemanticPose.cc Sensor.cc + Sky.cc Sphere.cc Surface.cc Types.cc @@ -131,6 +132,7 @@ if (BUILD_SDF_TEST) SemanticPose_TEST.cc SDF_TEST.cc Sensor_TEST.cc + Sky_TEST.cc Sphere_TEST.cc Surface_TEST.cc Types_TEST.cc diff --git a/src/Scene.cc b/src/Scene.cc index 9458d0dbb..a042a1b07 100644 --- a/src/Scene.cc +++ b/src/Scene.cc @@ -22,6 +22,16 @@ using namespace sdf; /// \brief Scene private data. class sdf::ScenePrivate { + /// \brief Default constructor + public: ScenePrivate() = default; + + /// \brief Copy constructor + /// \param[in] _scenePrivate private data to copy + public: explicit ScenePrivate(const ScenePrivate &_scenePrivate); + + // Delete copy assignment so it is not accidentally used + public: ScenePrivate &operator=(const ScenePrivate &) = delete; + /// \brief True if grid should be enabled public: bool grid = true; @@ -39,10 +49,29 @@ class sdf::ScenePrivate public: ignition::math::Color background = ignition::math::Color(0.7f, 0.7f, .7f); + /// \brief Pointer to the sky properties. + public: std::unique_ptr sky; + /// \brief The SDF element pointer used during load. public: sdf::ElementPtr sdf; }; +///////////////////////////////////////////////// +ScenePrivate::ScenePrivate(const ScenePrivate &_scenePrivate) + : grid(_scenePrivate.grid), + shadows(_scenePrivate.shadows), + originVisual(_scenePrivate.originVisual), + ambient(_scenePrivate.ambient), + background(_scenePrivate.background), + sdf(_scenePrivate.sdf) +{ + if (_scenePrivate.sky) + { + this->sky = + std::make_unique(*(_scenePrivate.sky)); + } +} + ///////////////////////////////////////////////// Scene::Scene() : dataPtr(new ScenePrivate) @@ -118,6 +147,14 @@ Errors Scene::Load(ElementPtr _sdf) this->dataPtr->originVisual = _sdf->Get("origin_visual", this->dataPtr->originVisual).first; + // load sky + if (_sdf->HasElement("sky")) + { + this->dataPtr->sky = std::make_unique(); + Errors err = this->dataPtr->sky->Load(_sdf->GetElement("sky")); + errors.insert(errors.end(), err.begin(), err.end()); + } + return errors; } @@ -180,6 +217,18 @@ void Scene::SetOriginVisual(const bool _enabled) this->dataPtr->originVisual = _enabled; } +///////////////////////////////////////////////// +void Scene::SetSky(const sdf::Sky &_sky) +{ + this->dataPtr->sky = std::make_unique(_sky); +} + +///////////////////////////////////////////////// +const sdf::Sky *Scene::Sky() const +{ + return this->dataPtr->sky.get(); +} + ///////////////////////////////////////////////// sdf::ElementPtr Scene::Element() const { diff --git a/src/Scene_TEST.cc b/src/Scene_TEST.cc index e9a423970..0e10ece0d 100644 --- a/src/Scene_TEST.cc +++ b/src/Scene_TEST.cc @@ -27,6 +27,7 @@ TEST(DOMScene, Construction) EXPECT_TRUE(scene.Grid()); EXPECT_TRUE(scene.Shadows()); EXPECT_TRUE(scene.OriginVisual()); + EXPECT_EQ(nullptr, scene.Sky()); } ///////////////////////////////////////////////// @@ -41,6 +42,8 @@ TEST(DOMScene, CopyConstruction) scene.SetGrid(false); scene.SetShadows(false); scene.SetOriginVisual(false); + sdf::Sky sky; + scene.SetSky(sky); sdf::Scene scene2(scene); EXPECT_EQ(ignition::math::Color::Blue, scene2.Ambient()); @@ -48,6 +51,7 @@ TEST(DOMScene, CopyConstruction) EXPECT_FALSE(scene2.Grid()); EXPECT_FALSE(scene2.Shadows()); EXPECT_FALSE(scene2.OriginVisual()); + EXPECT_NE(nullptr, scene2.Sky()); EXPECT_NE(nullptr, scene2.Element()); EXPECT_EQ(scene.Element(), scene2.Element()); @@ -62,6 +66,8 @@ TEST(DOMScene, MoveConstruction) scene.SetGrid(false); scene.SetShadows(false); scene.SetOriginVisual(false); + sdf::Sky sky; + scene.SetSky(sky); sdf::Scene scene2(std::move(scene)); EXPECT_EQ(ignition::math::Color::Blue, scene2.Ambient()); @@ -69,6 +75,7 @@ TEST(DOMScene, MoveConstruction) EXPECT_FALSE(scene2.Grid()); EXPECT_FALSE(scene2.Shadows()); EXPECT_FALSE(scene2.OriginVisual()); + EXPECT_NE(nullptr, scene2.Sky()); } ///////////////////////////////////////////////// @@ -80,6 +87,8 @@ TEST(DOMScene, MoveAssignmentOperator) scene.SetGrid(false); scene.SetShadows(false); scene.SetOriginVisual(false); + sdf::Sky sky; + scene.SetSky(sky); sdf::Scene scene2; scene2 = std::move(scene); @@ -88,6 +97,7 @@ TEST(DOMScene, MoveAssignmentOperator) EXPECT_FALSE(scene2.Grid()); EXPECT_FALSE(scene2.Shadows()); EXPECT_FALSE(scene2.OriginVisual()); + EXPECT_NE(nullptr, scene2.Sky()); } ///////////////////////////////////////////////// @@ -99,6 +109,8 @@ TEST(DOMScene, AssignmentOperator) scene.SetGrid(false); scene.SetShadows(false); scene.SetOriginVisual(false); + sdf::Sky sky; + scene.SetSky(sky); sdf::Scene scene2; scene2 = scene; @@ -107,6 +119,7 @@ TEST(DOMScene, AssignmentOperator) EXPECT_FALSE(scene2.Grid()); EXPECT_FALSE(scene2.Shadows()); EXPECT_FALSE(scene2.OriginVisual()); + EXPECT_NE(nullptr, scene2.Sky()); } ///////////////////////////////////////////////// @@ -152,4 +165,8 @@ TEST(DOMScene, Set) EXPECT_TRUE(scene.OriginVisual()); scene.SetOriginVisual(false); EXPECT_FALSE(scene.OriginVisual()); + + sdf::Sky sky; + scene.SetSky(sky); + EXPECT_NE(nullptr, scene.Sky()); } diff --git a/src/Sky.cc b/src/Sky.cc new file mode 100644 index 000000000..2ce2ffb0a --- /dev/null +++ b/src/Sky.cc @@ -0,0 +1,235 @@ +/* + * Copyright 2020 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/Sky.hh" +#include "Utils.hh" + +using namespace sdf; + +/// \brief Sky private data. +class sdf::SkyPrivate +{ + /// \brief Time of day + public: double time = 10.0; + + /// \brief Sunrise time + public: double sunrise = 6.0; + + /// \brief Sunset time + public: double sunset = 20.0; + + /// \brief Cloud speed + public: double cloudSpeed = 0.6; + + /// \brief Cloud direction. + public: ignition::math::Angle cloudDirection; + + /// \brief Cloud humidity + public: double cloudHumidity = 0.5; + + /// \brief Cloud mean size + public: double cloudMeanSize = 0.5; + + /// \brief Cloud ambient color + public: ignition::math::Color cloudAmbient = + ignition::math::Color(0.8f, 0.8f, 0.8f); + + /// \brief The SDF element pointer used during load. + public: sdf::ElementPtr sdf; +}; + +///////////////////////////////////////////////// +Sky::Sky() + : dataPtr(new SkyPrivate) +{ +} + +///////////////////////////////////////////////// +Sky::~Sky() +{ + delete this->dataPtr; + this->dataPtr = nullptr; +} + +///////////////////////////////////////////////// +Sky::Sky(const Sky &_sky) + : dataPtr(new SkyPrivate(*_sky.dataPtr)) +{ +} + +///////////////////////////////////////////////// +Sky::Sky(Sky &&_sky) noexcept + : dataPtr(std::exchange(_sky.dataPtr, nullptr)) +{ +} + +///////////////////////////////////////////////// +Sky &Sky::operator=(const Sky &_sky) +{ + return *this = Sky(_sky); +} + +///////////////////////////////////////////////// +Sky &Sky::operator=(Sky &&_sky) +{ + std::swap(this->dataPtr, _sky.dataPtr); + return *this; +} + +///////////////////////////////////////////////// +double Sky::Time() const +{ + return this->dataPtr->time; +} + +///////////////////////////////////////////////// +void Sky::SetTime(double _time) +{ + this->dataPtr->time = _time; +} + +///////////////////////////////////////////////// +double Sky::Sunrise() const +{ + return this->dataPtr->sunrise; +} + +///////////////////////////////////////////////// +void Sky::SetSunrise(double _sunrise) +{ + this->dataPtr->sunrise = _sunrise; +} + +///////////////////////////////////////////////// +double Sky::Sunset() const +{ + return this->dataPtr->sunset; +} + +///////////////////////////////////////////////// +void Sky::SetSunset(double _sunset) +{ + this->dataPtr->sunset = _sunset; +} + +///////////////////////////////////////////////// +double Sky::CloudSpeed() const +{ + return this->dataPtr->cloudSpeed; +} + +///////////////////////////////////////////////// +void Sky::SetCloudSpeed(double _speed) +{ + this->dataPtr->cloudSpeed = _speed; +} + +///////////////////////////////////////////////// +ignition::math::Angle Sky::CloudDirection() const +{ + return this->dataPtr->cloudDirection; +} + +///////////////////////////////////////////////// +void Sky::SetCloudDirection(const ignition::math::Angle &_angle) +{ + this->dataPtr->cloudDirection = _angle; +} + +///////////////////////////////////////////////// +double Sky::CloudHumidity() const +{ + return this->dataPtr->cloudHumidity; +} + +///////////////////////////////////////////////// +void Sky::SetCloudHumidity(double _humidity) +{ + this->dataPtr->cloudHumidity = _humidity; +} + +///////////////////////////////////////////////// +double Sky::CloudMeanSize() const +{ + return this->dataPtr->cloudMeanSize; +} + +///////////////////////////////////////////////// +void Sky::SetCloudMeanSize(double _size) +{ + this->dataPtr->cloudMeanSize = _size; +} + +///////////////////////////////////////////////// +ignition::math::Color Sky::CloudAmbient() const +{ + return this->dataPtr->cloudAmbient; +} + +///////////////////////////////////////////////// +void Sky::SetCloudAmbient(const ignition::math::Color &_ambient) +{ + this->dataPtr->cloudAmbient = _ambient; +} + +///////////////////////////////////////////////// +Errors Sky::Load(ElementPtr _sdf) +{ + Errors errors; + + this->dataPtr->sdf = _sdf; + + // Check that the provided SDF element is a element. + // This is an error that cannot be recovered, so return an error. + if (_sdf->GetName() != "sky") + { + errors.push_back({ErrorCode::ELEMENT_INCORRECT_TYPE, + "Attempting to load a Sky, but the provided SDF element is not a " + "."}); + return errors; + } + + this->dataPtr->time = _sdf->Get("time", this->dataPtr->time).first; + this->dataPtr->sunrise = + _sdf->Get("sunrise", this->dataPtr->sunrise).first; + this->dataPtr->sunset = + _sdf->Get("sunset", this->dataPtr->sunset).first; + + if ( _sdf->HasElement("clouds")) + { + sdf::ElementPtr cloudElem = _sdf->GetElement("clouds"); + this->dataPtr->cloudSpeed = + cloudElem->Get("speed", this->dataPtr->cloudSpeed).first; + this->dataPtr->cloudDirection = + cloudElem->Get("direction", + this->dataPtr->cloudDirection).first; + this->dataPtr->cloudHumidity = + cloudElem->Get("humidity", this->dataPtr->cloudHumidity).first; + this->dataPtr->cloudMeanSize = + cloudElem->Get("mean_size", this->dataPtr->cloudMeanSize).first; + this->dataPtr->cloudAmbient = + cloudElem->Get("ambient", + this->dataPtr->cloudAmbient).first; + } + + return errors; +} + +///////////////////////////////////////////////// +sdf::ElementPtr Sky::Element() const +{ + return this->dataPtr->sdf; +} diff --git a/src/Sky_TEST.cc b/src/Sky_TEST.cc new file mode 100644 index 000000000..03461bc43 --- /dev/null +++ b/src/Sky_TEST.cc @@ -0,0 +1,188 @@ +/* + * Copyright (C) 2020 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 +#include "sdf/Sky.hh" + +///////////////////////////////////////////////// +TEST(DOMSky, Construction) +{ + sdf::Sky sky; + EXPECT_DOUBLE_EQ(10.0, sky.Time()); + EXPECT_DOUBLE_EQ(6.0, sky.Sunrise()); + EXPECT_DOUBLE_EQ(20.0, sky.Sunset()); + EXPECT_DOUBLE_EQ(0.6, sky.CloudSpeed()); + EXPECT_EQ(ignition::math::Angle(), sky.CloudDirection()); + EXPECT_DOUBLE_EQ(0.5, sky.CloudHumidity()); + EXPECT_DOUBLE_EQ(0.5, sky.CloudMeanSize()); + EXPECT_EQ(ignition::math::Color(0.8f, 0.8f, 0.8f), + sky.CloudAmbient()); +} + +///////////////////////////////////////////////// +TEST(DOMSky, CopyConstruction) +{ + sdf::ElementPtr sdf(std::make_shared()); + + sdf::Sky sky; + sky.Load(sdf); + sky.SetTime(1.0); + sky.SetSunrise(5.0); + sky.SetSunset(15.0); + sky.SetCloudSpeed(0.3); + sky.SetCloudDirection(ignition::math::Angle(1.2)); + sky.SetCloudHumidity(0.9); + sky.SetCloudMeanSize(0.123); + sky.SetCloudAmbient(ignition::math::Color::Blue); + + sdf::Sky sky2(sky); + EXPECT_DOUBLE_EQ(1.0, sky2.Time()); + EXPECT_DOUBLE_EQ(5.0, sky2.Sunrise()); + EXPECT_DOUBLE_EQ(15.0, sky2.Sunset()); + EXPECT_DOUBLE_EQ(0.3, sky2.CloudSpeed()); + EXPECT_EQ(ignition::math::Angle(1.2), sky2.CloudDirection()); + EXPECT_DOUBLE_EQ(0.9, sky2.CloudHumidity()); + EXPECT_DOUBLE_EQ(0.123, sky2.CloudMeanSize()); + EXPECT_EQ(ignition::math::Color::Blue, sky2.CloudAmbient()); + + EXPECT_NE(nullptr, sky2.Element()); + EXPECT_EQ(sky.Element(), sky2.Element()); +} + +///////////////////////////////////////////////// +TEST(DOMSky, MoveConstruction) +{ + sdf::Sky sky; + sky.SetTime(1.0); + sky.SetSunrise(5.0); + sky.SetSunset(15.0); + sky.SetCloudSpeed(0.3); + sky.SetCloudDirection(ignition::math::Angle(1.2)); + sky.SetCloudHumidity(0.9); + sky.SetCloudMeanSize(0.123); + sky.SetCloudAmbient(ignition::math::Color::Blue); + + sdf::Sky sky2(std::move(sky)); + EXPECT_DOUBLE_EQ(1.0, sky2.Time()); + EXPECT_DOUBLE_EQ(5.0, sky2.Sunrise()); + EXPECT_DOUBLE_EQ(15.0, sky2.Sunset()); + EXPECT_DOUBLE_EQ(0.3, sky2.CloudSpeed()); + EXPECT_EQ(ignition::math::Angle(1.2), sky2.CloudDirection()); + EXPECT_DOUBLE_EQ(0.9, sky2.CloudHumidity()); + EXPECT_DOUBLE_EQ(0.123, sky2.CloudMeanSize()); + EXPECT_EQ(ignition::math::Color::Blue, sky2.CloudAmbient()); +} + +///////////////////////////////////////////////// +TEST(DOMSky, MoveAssignmentOperator) +{ + sdf::Sky sky; + sky.SetTime(1.0); + sky.SetSunrise(5.0); + sky.SetSunset(15.0); + sky.SetCloudSpeed(0.3); + sky.SetCloudDirection(ignition::math::Angle(1.2)); + sky.SetCloudHumidity(0.9); + sky.SetCloudMeanSize(0.123); + sky.SetCloudAmbient(ignition::math::Color::Blue); + + sdf::Sky sky2; + sky2 = std::move(sky); + EXPECT_DOUBLE_EQ(1.0, sky2.Time()); + EXPECT_DOUBLE_EQ(5.0, sky2.Sunrise()); + EXPECT_DOUBLE_EQ(15.0, sky2.Sunset()); + EXPECT_DOUBLE_EQ(0.3, sky2.CloudSpeed()); + EXPECT_EQ(ignition::math::Angle(1.2), sky2.CloudDirection()); + EXPECT_DOUBLE_EQ(0.9, sky2.CloudHumidity()); + EXPECT_DOUBLE_EQ(0.123, sky2.CloudMeanSize()); + EXPECT_EQ(ignition::math::Color::Blue, sky2.CloudAmbient()); +} + +///////////////////////////////////////////////// +TEST(DOMSky, AssignmentOperator) +{ + sdf::Sky sky; + sky.SetTime(1.0); + sky.SetSunrise(5.0); + sky.SetSunset(15.0); + sky.SetCloudSpeed(0.3); + sky.SetCloudDirection(ignition::math::Angle(1.2)); + sky.SetCloudHumidity(0.9); + sky.SetCloudMeanSize(0.123); + sky.SetCloudAmbient(ignition::math::Color::Blue); + + sdf::Sky sky2; + sky2 = sky; + EXPECT_DOUBLE_EQ(1.0, sky2.Time()); + EXPECT_DOUBLE_EQ(5.0, sky2.Sunrise()); + EXPECT_DOUBLE_EQ(15.0, sky2.Sunset()); + EXPECT_DOUBLE_EQ(0.3, sky2.CloudSpeed()); + EXPECT_EQ(ignition::math::Angle(1.2), sky2.CloudDirection()); + EXPECT_DOUBLE_EQ(0.9, sky2.CloudHumidity()); + EXPECT_DOUBLE_EQ(0.123, sky2.CloudMeanSize()); + EXPECT_EQ(ignition::math::Color::Blue, sky2.CloudAmbient()); +} + +///////////////////////////////////////////////// +TEST(DOMSky, CopyAssignmentAfterMove) +{ + sdf::Sky sky1; + sky1.SetTime(21.0); + + sdf::Sky sky2; + sky2.SetTime(1.0); + + // This is similar to what std::swap does except it uses std::move for each + // assignment + sdf::Sky tmp = std::move(sky1); + sky1 = sky2; + sky2 = tmp; + + EXPECT_DOUBLE_EQ(1.0, sky1.Time()); + EXPECT_DOUBLE_EQ(21.0, sky2.Time()); +} + +///////////////////////////////////////////////// +TEST(DOMSky, Set) +{ + sdf::Sky sky; + + sky.SetTime(1.0); + EXPECT_DOUBLE_EQ(1.0, sky.Time()); + + sky.SetSunrise(5.0); + EXPECT_DOUBLE_EQ(5.0, sky.Sunrise()); + + sky.SetSunset(15.0); + EXPECT_DOUBLE_EQ(15.0, sky.Sunset()); + + sky.SetCloudSpeed(0.3); + EXPECT_DOUBLE_EQ(0.3, sky.CloudSpeed()); + + sky.SetCloudDirection(ignition::math::Angle(1.2)); + EXPECT_EQ(ignition::math::Angle(1.2), sky.CloudDirection()); + + sky.SetCloudHumidity(0.9); + EXPECT_DOUBLE_EQ(0.9, sky.CloudHumidity()); + + sky.SetCloudMeanSize(0.123); + EXPECT_DOUBLE_EQ(0.123, sky.CloudMeanSize()); + + sky.SetCloudAmbient(ignition::math::Color(0.1f, 0.2f, 0.3f)); + EXPECT_EQ(ignition::math::Color(0.1f, 0.2f, 0.3f), + sky.CloudAmbient()); +} diff --git a/test/integration/CMakeLists.txt b/test/integration/CMakeLists.txt index d039ba030..1bb4d3719 100644 --- a/test/integration/CMakeLists.txt +++ b/test/integration/CMakeLists.txt @@ -33,6 +33,7 @@ set(tests plugin_include.cc provide_feedback.cc root_dom.cc + scene_dom.cc sdf_basic.cc sdf_custom.cc surface_dom.cc diff --git a/test/integration/scene_dom.cc b/test/integration/scene_dom.cc new file mode 100644 index 000000000..84ae92805 --- /dev/null +++ b/test/integration/scene_dom.cc @@ -0,0 +1,73 @@ +/* + * Copyright 2020 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 +#include +#include + +#include + +#include "sdf/Filesystem.hh" +#include "sdf/parser.hh" +#include "sdf/Root.hh" +#include "sdf/Scene.hh" +#include "sdf/SDFImpl.hh" +#include "sdf/Sky.hh" +#include "sdf/World.hh" + +#include "test_config.h" + +////////////////////////////////////////////////// +TEST(DOMScene, LoadScene) +{ + const std::string testFile = + sdf::filesystem::append(PROJECT_SOURCE_PATH, "test", "sdf", + "scene_with_sky.sdf"); + + sdf::Root root; + sdf::Errors errors = root.Load(testFile); + for (auto e : errors) + std::cout << e.Message() << std::endl; + EXPECT_TRUE(errors.empty()); + + ASSERT_NE(nullptr, root.Element()); + EXPECT_EQ(testFile, root.Element()->FilePath()); + + const sdf::World *world = root.WorldByIndex(0); + ASSERT_NE(nullptr, world); + + const sdf::Scene *scene = world->Scene(); + ASSERT_NE(nullptr, scene); + + EXPECT_EQ(ignition::math::Color(0.3f, 0.4f, 0.5f), scene->Ambient()); + EXPECT_EQ(ignition::math::Color(0.6f, 0.7f, 0.8f), scene->Background()); + EXPECT_TRUE(scene->Grid()); + EXPECT_TRUE(scene->Shadows()); + EXPECT_TRUE(scene->OriginVisual()); + + const sdf::Sky *sky = scene->Sky(); + ASSERT_NE(nullptr, sky); + + EXPECT_DOUBLE_EQ(3.0, sky->Time()); + EXPECT_DOUBLE_EQ(4.0, sky->Sunrise()); + EXPECT_DOUBLE_EQ(21.0, sky->Sunset()); + EXPECT_DOUBLE_EQ(1.2, sky->CloudSpeed()); + EXPECT_EQ(ignition::math::Angle(1.5), sky->CloudDirection()); + EXPECT_DOUBLE_EQ(0.2, sky->CloudMeanSize()); + EXPECT_DOUBLE_EQ(0.9, sky->CloudHumidity()); + EXPECT_EQ(ignition::math::Color(0.1f, 0.2f, 0.3f), sky->CloudAmbient()); +} diff --git a/test/sdf/scene_with_sky.sdf b/test/sdf/scene_with_sky.sdf new file mode 100644 index 000000000..1f794c443 --- /dev/null +++ b/test/sdf/scene_with_sky.sdf @@ -0,0 +1,26 @@ + + + + + + 0.3 0.4 0.5 + 0.6 0.7 0.8 + true + true + true + + + 4 + 21 + + 1.2 + 1.5 + 0.2 + 0.9 + 0.1 0.2 0.3 + + + + + + From 9995007e4b50005caab56889da3771cbfca975be Mon Sep 17 00:00:00 2001 From: Nate Koenig Date: Mon, 14 Dec 2020 14:07:58 -0800 Subject: [PATCH 38/42] Decrease far clip lower bound (#435) Signed-off-by: Nate Koenig Co-authored-by: Nate Koenig --- sdf/1.6/camera.sdf | 2 +- sdf/1.7/camera.sdf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sdf/1.6/camera.sdf b/sdf/1.6/camera.sdf index b5a906d65..5f7bc220a 100644 --- a/sdf/1.6/camera.sdf +++ b/sdf/1.6/camera.sdf @@ -29,7 +29,7 @@ Near clipping plane - + Far clipping plane diff --git a/sdf/1.7/camera.sdf b/sdf/1.7/camera.sdf index 273f07191..448f8a516 100644 --- a/sdf/1.7/camera.sdf +++ b/sdf/1.7/camera.sdf @@ -29,7 +29,7 @@ Near clipping plane - + Far clipping plane From 940eb3bd8811f438b7c414c8a423496bd3f4a84e Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Mon, 14 Dec 2020 17:22:30 -0800 Subject: [PATCH 39/42] Re-disable tests for #202, since they are broken (#438) This reverts part of commit 0e778165ce43152acee9b9e9863ce6e1066fa26d. Signed-off-by: Steve Peters --- src/SDF_TEST.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/SDF_TEST.cc b/src/SDF_TEST.cc index ccc2e718c..a947cf55c 100644 --- a/src/SDF_TEST.cc +++ b/src/SDF_TEST.cc @@ -132,9 +132,9 @@ TEST(SDF, UpdateElement) staticParam->Get(flagCheck); EXPECT_EQ(flagCheck, fixture.flag); poseParam->Get(poseCheck); - // test fails on homebrew with Xcode 11 and earlier, see issue 202 + // test fails on homebrew see issue 202 // https://github.com/osrf/sdformat/issues/202 -#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) +#ifndef __APPLE__ EXPECT_EQ(poseCheck, fixture.pose); #endif } @@ -419,9 +419,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew with Xcode 11 and earlier, see issue 202 + // test fails on homebrew see issue 202 // https://github.com/osrf/sdformat/issues/202 -#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) +#ifndef __APPLE__ FAIL(); #endif } @@ -437,9 +437,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew with Xcode 11 and earlier, see issue 202 + // test fails on homebrew see issue 202 // https://github.com/osrf/sdformat/issues/202 -#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) +#ifndef __APPLE__ FAIL(); #endif } @@ -481,9 +481,9 @@ TEST(SDF, GetAny) } catch(std::bad_any_cast &/*_e*/) { - // test fails on homebrew with Xcode 11 and earlier, see issue 202 + // test fails on homebrew see issue 202 // https://github.com/osrf/sdformat/issues/202 -#if !(defined(__APPLE__) && defined(__clang_major__) && __clang_major__ < 12) +#ifndef __APPLE__ FAIL(); #endif } From 4805742fb743dcb836d680c7e4ac51eba553b41b Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Mon, 16 Nov 2020 16:17:49 -0800 Subject: [PATCH 40/42] Add to material spec (#410) * add double sided materail param Signed-off-by: Ian Chen * fix loading param Signed-off-by: Ian Chen --- include/sdf/Material.hh | 9 +++++++++ sdf/1.7/material.sdf | 5 +++++ src/Material.cc | 22 ++++++++++++++++++++++ src/Material_TEST.cc | 14 ++++++++++++++ test/integration/visual_dom.cc | 2 ++ test/sdf/material.sdf | 2 ++ 6 files changed, 54 insertions(+) diff --git a/include/sdf/Material.hh b/include/sdf/Material.hh index 152806e84..ac6cb86ef 100644 --- a/include/sdf/Material.hh +++ b/include/sdf/Material.hh @@ -133,6 +133,15 @@ namespace sdf /// \param[in] _lighting False disables dynamic lighting. public: void SetLighting(const bool _lighting); + /// \brief Get whether double sided material is enabled. The default + /// value is false. + /// \return False if double sided material should be disabled. + public: bool DoubleSided() const; + + /// \brief Set whether double sided material is enabled. + /// \param[in] _lighting False disables double sided material. + public: void SetDoubleSided(bool _doubleSided); + /// \brief Get a pointer to the SDF element that was used during /// load. /// \return SDF element pointer. The value will be nullptr if Load has diff --git a/sdf/1.7/material.sdf b/sdf/1.7/material.sdf index 7cd011598..00ed20924 100644 --- a/sdf/1.7/material.sdf +++ b/sdf/1.7/material.sdf @@ -45,6 +45,11 @@ The emissive color of a material specified by set of four numbers representing red/green/blue, each in the range of [0,1]. + + If true, the mesh that this material is applied to will be rendered as double sided + + + Physically Based Rendering (PBR) material. There are two PBR workflows: metal and specular. While both workflows and their parameters can be specified at the same time, typically only one of them will be used (depending on the underlying renderer capability). It is also recommended to use the same workflow for all materials in the world. diff --git a/src/Material.cc b/src/Material.cc index 722487afd..df060e9e4 100644 --- a/src/Material.cc +++ b/src/Material.cc @@ -42,6 +42,9 @@ class sdf::MaterialPrivate /// \brief Lighting enabled? public: bool lighting = true; + /// \brief Double sided material + public: bool doubleSided = false; + /// \brief Ambient color public: ignition::math::Color ambient {0, 0, 0, 1}; @@ -86,6 +89,7 @@ Material::Material(const Material &_material) this->dataPtr->shader = _material.dataPtr->shader; this->dataPtr->normalMap = _material.dataPtr->normalMap; this->dataPtr->lighting = _material.dataPtr->lighting; + this->dataPtr->doubleSided = _material.dataPtr->doubleSided; this->dataPtr->ambient = _material.dataPtr->ambient; this->dataPtr->diffuse = _material.dataPtr->diffuse; this->dataPtr->specular = _material.dataPtr->specular; @@ -215,6 +219,12 @@ Errors Material::Load(sdf::ElementPtr _sdf) this->dataPtr->emissive = _sdf->Get("emissive", this->dataPtr->emissive).first; + this->dataPtr->lighting = _sdf->Get("lighting", + this->dataPtr->lighting).first; + + this->dataPtr->doubleSided = _sdf->Get("double_sided", + this->dataPtr->doubleSided).first; + // load pbr param if (_sdf->HasElement("pbr")) { @@ -286,6 +296,18 @@ void Material::SetLighting(const bool _lighting) this->dataPtr->lighting = _lighting; } +////////////////////////////////////////////////// +bool Material::DoubleSided() const +{ + return this->dataPtr->doubleSided; +} + +////////////////////////////////////////////////// +void Material::SetDoubleSided(const bool _doubleSided) +{ + this->dataPtr->doubleSided = _doubleSided; +} + ////////////////////////////////////////////////// sdf::ElementPtr Material::Element() const { diff --git a/src/Material_TEST.cc b/src/Material_TEST.cc index dcf6993e0..4f4972c1f 100644 --- a/src/Material_TEST.cc +++ b/src/Material_TEST.cc @@ -30,6 +30,7 @@ TEST(DOMMaterial, Construction) EXPECT_EQ(ignition::math::Color(0, 0, 0, 1), material.Specular()); EXPECT_EQ(ignition::math::Color(0, 0, 0, 1), material.Emissive()); EXPECT_TRUE(material.Lighting()); + EXPECT_FALSE(material.DoubleSided()); EXPECT_EQ(nullptr, material.Element()); EXPECT_EQ("", material.ScriptUri()); EXPECT_EQ("", material.ScriptName()); @@ -48,6 +49,7 @@ TEST(DOMMaterial, MoveConstructor) material.SetSpecular(ignition::math::Color(0.3f, 0.4f, 0.5f, 0.7f)); material.SetEmissive(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f)); material.SetLighting(false); + material.SetDoubleSided(true); material.SetScriptUri("banana"); material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); @@ -62,6 +64,7 @@ TEST(DOMMaterial, MoveConstructor) EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f), material2.Emissive()); EXPECT_FALSE(material2.Lighting()); + EXPECT_TRUE(material2.DoubleSided()); EXPECT_EQ("banana", material2.ScriptUri()); EXPECT_EQ("orange", material2.ScriptName()); EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); @@ -79,6 +82,7 @@ TEST(DOMMaterial, CopyConstructor) material.SetSpecular(ignition::math::Color(0.3f, 0.4f, 0.5f, 0.7f)); material.SetEmissive(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f)); material.SetLighting(false); + material.SetDoubleSided(true); material.SetScriptUri("banana"); material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); @@ -93,6 +97,7 @@ TEST(DOMMaterial, CopyConstructor) EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f), material2.Emissive()); EXPECT_FALSE(material2.Lighting()); + EXPECT_TRUE(material2.DoubleSided()); EXPECT_EQ("banana", material2.ScriptUri()); EXPECT_EQ("orange", material2.ScriptName()); EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); @@ -110,6 +115,7 @@ TEST(DOMMaterial, AssignmentOperator) material.SetSpecular(ignition::math::Color(0.3f, 0.4f, 0.5f, 0.7f)); material.SetEmissive(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f)); material.SetLighting(false); + material.SetDoubleSided(true); material.SetScriptUri("banana"); material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); @@ -125,6 +131,7 @@ TEST(DOMMaterial, AssignmentOperator) EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f), material2.Emissive()); EXPECT_FALSE(material2.Lighting()); + EXPECT_TRUE(material2.DoubleSided()); EXPECT_EQ("banana", material2.ScriptUri()); EXPECT_EQ("orange", material2.ScriptName()); EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); @@ -142,6 +149,7 @@ TEST(DOMMaterial, MoveAssignmentOperator) material.SetSpecular(ignition::math::Color(0.3f, 0.4f, 0.5f, 0.7f)); material.SetEmissive(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f)); material.SetLighting(false); + material.SetDoubleSided(true); material.SetScriptUri("banana"); material.SetScriptName("orange"); material.SetShader(sdf::ShaderType::VERTEX); @@ -156,6 +164,7 @@ TEST(DOMMaterial, MoveAssignmentOperator) EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f), material2.Emissive()); EXPECT_FALSE(material2.Lighting()); + EXPECT_TRUE(material2.DoubleSided()); EXPECT_EQ("banana", material2.ScriptUri()); EXPECT_EQ("orange", material2.ScriptName()); EXPECT_EQ(sdf::ShaderType::VERTEX, material2.Shader()); @@ -206,6 +215,10 @@ TEST(DOMMaterial, Set) material.SetLighting(false); EXPECT_FALSE(material.Lighting()); + EXPECT_FALSE(material.DoubleSided()); + material.SetDoubleSided(true); + EXPECT_TRUE(material.DoubleSided()); + EXPECT_EQ("", material.ScriptUri()); material.SetScriptUri("uri"); EXPECT_EQ("uri", material.ScriptUri()); @@ -243,6 +256,7 @@ TEST(DOMMaterial, Set) EXPECT_EQ(ignition::math::Color(0.3f, 0.4f, 0.5f, 0.7f), moved.Specular()); EXPECT_EQ(ignition::math::Color(0.4f, 0.5f, 0.6f, 0.8f), moved.Emissive()); EXPECT_FALSE(moved.Lighting()); + EXPECT_TRUE(moved.DoubleSided()); EXPECT_EQ("uri", moved.ScriptUri()); EXPECT_EQ("name", moved.ScriptName()); EXPECT_EQ(sdf::ShaderType::VERTEX, moved.Shader()); diff --git a/test/integration/visual_dom.cc b/test/integration/visual_dom.cc index b58e2aa4f..dd7d27fcc 100644 --- a/test/integration/visual_dom.cc +++ b/test/integration/visual_dom.cc @@ -120,6 +120,8 @@ TEST(DOMVisual, Material) EXPECT_EQ(ignition::math::Color(0.2f, 0.5f, 0.1f, 1.0f), mat->Diffuse()); EXPECT_EQ(ignition::math::Color(0.7f, 0.3f, 0.5f, 0.9f), mat->Specular()); EXPECT_EQ(ignition::math::Color(1.0f, 0.0f, 0.2f, 1.0f), mat->Emissive()); + EXPECT_FALSE(mat->Lighting()); + EXPECT_TRUE(mat->DoubleSided()); EXPECT_EQ(sdf::ShaderType::VERTEX, mat->Shader()); EXPECT_EQ("myuri", mat->ScriptUri()); EXPECT_EQ("myname", mat->ScriptName()); diff --git a/test/sdf/material.sdf b/test/sdf/material.sdf index 5b1c2e68f..f43e4e6ed 100644 --- a/test/sdf/material.sdf +++ b/test/sdf/material.sdf @@ -8,6 +8,8 @@ 0.2 0.5 0.1 1.0 0.7 0.3 0.5 0.9 1.0 0.0 0.2 1.0 + false + true