From e04e410b0dca940942438550750166a0e1362d54 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 13 Jun 2022 17:04:27 -0700 Subject: [PATCH 1/5] Migrate shared lib references Signed-off-by: methylDragon --- dartsim/worlds/falling.world | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dartsim/worlds/falling.world b/dartsim/worlds/falling.world index b3e2d9283..580339501 100644 --- a/dartsim/worlds/falling.world +++ b/dartsim/worlds/falling.world @@ -2,7 +2,7 @@ From dd28a2913d22fac9f8f2fb481f7c2bb4c00a3538 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 27 Jun 2022 14:05:44 -0700 Subject: [PATCH 2/5] Migrate SDF params Signed-off-by: methylDragon --- Migration.md | 2 ++ dartsim/src/SDFFeatures.cc | 16 +++++++++++++++- dartsim/worlds/falling.world | 2 +- tutorials/04-switching-physics-engines.md | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Migration.md b/Migration.md index 68fd79fb0..276ef06f0 100644 --- a/Migration.md +++ b/Migration.md @@ -26,6 +26,8 @@ release will remove the deprecated code. 1. `IGNITION_PHYSICS_CONST_GET_ERROR` (hard-tocked, inside detail header) 1. `IGNITION_UNITTEST_EXPECTDATA_ACCESS` (hard-tocked, inside test and detail headers) 1. `IGNITION_PHYSICS_DEFINE_COORDINATE_SPACE` (hard-tocked, inside detail header) +1. The `ignition:expressed_in` SDF attribute is deprecated and will be removed. + Please use `gz:expressed_in` instead. ### Breaking Changes diff --git a/dartsim/src/SDFFeatures.cc b/dartsim/src/SDFFeatures.cc index d066fb41e..6f7bc49aa 100644 --- a/dartsim/src/SDFFeatures.cc +++ b/dartsim/src/SDFFeatures.cc @@ -829,7 +829,21 @@ Identity SDFFeatures::ConstructSdfCollision( math::Vector3d fdir1 = frictionDirectionElem->Get(); aspect->setFirstFrictionDirection(math::eigen3::convert(fdir1)); - const std::string kExpressedIn = "ignition:expressed_in"; + std::string kExpressedIn = "gz:expressed_in"; + + // TODO(CH3): Deprecated. Remove on tock. + // Try deprecated ignition:expressed_in attribute + // if gz:expressed_in attribute is missing + if (!frictionDirectionElem->HasAttribute("gz:expressed_in")) + { + if (frictionDirectionElem->HasAttribute("ignition:expressed_in")) + { + gzwarn << "The `ignition:expressed_in` attribute is deprecated. " + << "Please use `gz:expressed_in` instead." << std::endl; + kExpressedIn = "ignition:expressed_in"; + } + } + if (frictionDirectionElem->HasAttribute(kExpressedIn)) { auto skeleton = bn->getSkeleton(); diff --git a/dartsim/worlds/falling.world b/dartsim/worlds/falling.world index 580339501..1d2ea2f43 100644 --- a/dartsim/worlds/falling.world +++ b/dartsim/worlds/falling.world @@ -3,7 +3,7 @@ + name="gz::sim::systems::v0::Physics"> 0 0 2 0 0.78539816339 0 diff --git a/tutorials/04-switching-physics-engines.md b/tutorials/04-switching-physics-engines.md index 83c9d8326..866c52aa0 100644 --- a/tutorials/04-switching-physics-engines.md +++ b/tutorials/04-switching-physics-engines.md @@ -86,7 +86,7 @@ gz sim --physics-engine CustomEngine ### From C++ API All features available through the command line are also available through -[gz::gazebo::ServerConfig](https://gazebosim.org/api/gazebo/4.0/classignition_1_1gazebo_1_1ServerConfig.html). +[gz::sim::ServerConfig](https://gazebosim.org/api/gazebo/4.0/classignition_1_1gazebo_1_1ServerConfig.html). When instantiating a server programmatically, a physics engine can be passed to the constructor, for example: From 6ea659a78ae73f37566afbca67de6edd7f59acc5 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Mon, 27 Jun 2022 18:38:00 -0700 Subject: [PATCH 3/5] Add migration notes for shared libraries Signed-off-by: methylDragon --- Migration.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Migration.md b/Migration.md index 276ef06f0..c1cd05fe8 100644 --- a/Migration.md +++ b/Migration.md @@ -14,6 +14,10 @@ release will remove the deprecated code. 1. Header files under `ignition/...` are deprecated and will be removed in future versions. Use `gz/...` instead. +1. The shared libraries have `gz` where there used to be `ignition`, and also have their `lib` and `.so` prefixes and suffixes removed. + E.g. `libignition-XXX-system.so` -> `gz-XXX-system`. + 1. Using the un-migrated version is still possible due to tick-tocks, but will be removed in future versions. + 1. The following `IGN_` / `IGNITION_` prefixed macros are deprecated and will be removed in future versions. Additionally, they will only be available when including the corresponding `ignition/...` header. Use the `GZ_` prefix instead. From 9b3f65745957d3619ddf9db05748de5080a3eac9 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Tue, 28 Jun 2022 12:50:43 -0700 Subject: [PATCH 4/5] Update kExpressedIn -> expressedIn Signed-off-by: methylDragon --- dartsim/src/SDFFeatures.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dartsim/src/SDFFeatures.cc b/dartsim/src/SDFFeatures.cc index 6f7bc49aa..628489f70 100644 --- a/dartsim/src/SDFFeatures.cc +++ b/dartsim/src/SDFFeatures.cc @@ -829,7 +829,7 @@ Identity SDFFeatures::ConstructSdfCollision( math::Vector3d fdir1 = frictionDirectionElem->Get(); aspect->setFirstFrictionDirection(math::eigen3::convert(fdir1)); - std::string kExpressedIn = "gz:expressed_in"; + std::string expressedIn = "gz:expressed_in"; // TODO(CH3): Deprecated. Remove on tock. // Try deprecated ignition:expressed_in attribute @@ -840,15 +840,15 @@ Identity SDFFeatures::ConstructSdfCollision( { gzwarn << "The `ignition:expressed_in` attribute is deprecated. " << "Please use `gz:expressed_in` instead." << std::endl; - kExpressedIn = "ignition:expressed_in"; + expressedIn = "ignition:expressed_in"; } } - if (frictionDirectionElem->HasAttribute(kExpressedIn)) + if (frictionDirectionElem->HasAttribute(expressedIn)) { auto skeleton = bn->getSkeleton(); auto directionFrameBodyNode = skeleton->getBodyNode( - frictionDirectionElem->Get(kExpressedIn)); + frictionDirectionElem->Get(expressedIn)); if (nullptr != directionFrameBodyNode) { aspect->setFirstFrictionDirectionFrame(directionFrameBodyNode); From bdbd669bfe05f6eedef7da53600717f72fb62c86 Mon Sep 17 00:00:00 2001 From: methylDragon Date: Wed, 29 Jun 2022 09:58:11 -0700 Subject: [PATCH 5/5] Update migration notes Signed-off-by: methylDragon --- Migration.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Migration.md b/Migration.md index c1cd05fe8..65fea3e8c 100644 --- a/Migration.md +++ b/Migration.md @@ -14,8 +14,7 @@ release will remove the deprecated code. 1. Header files under `ignition/...` are deprecated and will be removed in future versions. Use `gz/...` instead. -1. The shared libraries have `gz` where there used to be `ignition`, and also have their `lib` and `.so` prefixes and suffixes removed. - E.g. `libignition-XXX-system.so` -> `gz-XXX-system`. +1. The shared libraries have `gz` where there used to be `ignition`. 1. Using the un-migrated version is still possible due to tick-tocks, but will be removed in future versions. 1. The following `IGN_` / `IGNITION_` prefixed macros are deprecated and will be removed in future versions.