-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ign -> gz Namespace Migration : gz-sim #1496
Conversation
b7de1b3
to
cf2a4bb
Compare
A double free issue appears for new (compared to |
Two gz-sim tests are failing, but one necessitates no further actions:
101 git clones 195: |
a2647ff
to
daff093
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b1bc54f
to
5f6d2b8
Compare
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
5f6d2b8
to
0dfe036
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/gui/plugins/entity_context_menu/EntityContextMenuPlugin.qml
Outdated
Show resolved
Hide resolved
@@ -6,20 +6,20 @@ | |||
<world name="actors"> | |||
<plugin | |||
filename="ignition-gazebo-physics-system" | |||
name="ignition::gazebo::systems::Physics"> | |||
name="gz::sim::systems::Physics"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still compiling this, so just leaving a note here that we should check if ignition::gazebo
still works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I just tested it and it doesn't work. But the fix is simple, we need to add aliases like this to every system plugin:
diff --git a/src/systems/physics/Physics.cc b/src/systems/physics/Physics.cc
index b9df0909b..451773597 100644
--- a/src/systems/physics/Physics.cc
+++ b/src/systems/physics/Physics.cc
@@ -3604,3 +3604,5 @@ IGNITION_ADD_PLUGIN(Physics,
Physics::ISystemUpdate)
IGNITION_ADD_PLUGIN_ALIAS(Physics, "gz::sim::systems::Physics")
+// Deprecated, remove on version 8
+IGNITION_ADD_PLUGIN_ALIAS(Physics, "ignition::gazebo::systems::Physics")
You can check it worked either by changing a world to load the ignition::gazebo
version of the plugin, or with the ign plugin
CLI:
$ ign plugin -i -v -p install/lib/libignition-gazebo7-physics-system.so
Loading plugin library file [install/lib/libignition-gazebo7-physics-system.so]
Loader State
Known Interfaces: 4
gz::sim::v7::ISystemUpdate
gz::sim::v7::System
gz::sim::v7::ISystemReset
gz::sim::v7::ISystemConfigure
Known Plugins: 1
[gz::sim::v7::systems::Physics]
has 2 aliases:
[gz::sim::systems::Physics]
[ignition::gazebo::systems::Physics]
implements 4 interfaces:
gz::sim::v7::ISystemConfigure
gz::sim::v7::ISystemReset
gz::sim::v7::ISystemUpdate
gz::sim::v7::System
Note the alias
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
5c21f04
:>
The specific steps I did are in the commit message
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
06b9a96
to
fa1601b
Compare
@@ -6,20 +6,20 @@ | |||
<world name="actors"> | |||
<plugin | |||
filename="ignition-gazebo-physics-system" | |||
name="ignition::gazebo::systems::Physics"> | |||
name="gz::sim::systems::Physics"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I just tested it and it doesn't work. But the fix is simple, we need to add aliases like this to every system plugin:
diff --git a/src/systems/physics/Physics.cc b/src/systems/physics/Physics.cc
index b9df0909b..451773597 100644
--- a/src/systems/physics/Physics.cc
+++ b/src/systems/physics/Physics.cc
@@ -3604,3 +3604,5 @@ IGNITION_ADD_PLUGIN(Physics,
Physics::ISystemUpdate)
IGNITION_ADD_PLUGIN_ALIAS(Physics, "gz::sim::systems::Physics")
+// Deprecated, remove on version 8
+IGNITION_ADD_PLUGIN_ALIAS(Physics, "ignition::gazebo::systems::Physics")
You can check it worked either by changing a world to load the ignition::gazebo
version of the plugin, or with the ign plugin
CLI:
$ ign plugin -i -v -p install/lib/libignition-gazebo7-physics-system.so
Loading plugin library file [install/lib/libignition-gazebo7-physics-system.so]
Loader State
Known Interfaces: 4
gz::sim::v7::ISystemUpdate
gz::sim::v7::System
gz::sim::v7::ISystemReset
gz::sim::v7::ISystemConfigure
Known Plugins: 1
[gz::sim::v7::systems::Physics]
has 2 aliases:
[gz::sim::systems::Physics]
[ignition::gazebo::systems::Physics]
implements 4 interfaces:
gz::sim::v7::ISystemConfigure
gz::sim::v7::ISystemReset
gz::sim::v7::ISystemUpdate
gz::sim::v7::System
Note the alias
Find: IGNITION_ADD_PLUGIN_ALIAS\((.*),$ Replace: // TODO(CH3): Deprecated, remove on version 8 IGNITION_ADD_PLUGIN_ALIAS($1, "ignition::gazebo::$1") IGNITION_ADD_PLUGIN_ALIAS($1, ----------- Find: IGNITION_ADD_PLUGIN_ALIAS(.*)gz::sim::(.*) Replace: IGNITION_ADD_PLUGIN_ALIAS$1gz::sim::$2 // TODO(CH3): Deprecated, remove on version 8 IGNITION_ADD_PLUGIN_ALIAS$1ignition::gazebo::$2 ----------- And manual replacements for IGNITION_ADD_PLUGIN_ALIAS($ Signed-off-by: methylDragon <[email protected]>
Co-authored-by: Louise Poubel <[email protected]> Signed-off-by: methylDragon <[email protected]>
Signed-off-by: methylDragon <[email protected]>
e79792f
to
f73e7a5
Compare
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with 🟢 CI! I pushed a few changes toward the end:
- Recorded updated rolling shapes log for test
- Support logs recorded with
ignition
messages if possible. Thelevels_log
test is still using the old messages, mainly because I didn't know how to record a new log and would probably need to tweak the test. That log was recorded with Blueprint as has been working until now, it would be a shame to stop supporting it instead of doing the 2-line change I did. - I fixed the plugin aliases, it looks like at some point some of them got messed up and failed to compile, while others had lost the
systems
namespace. - Updated more instances of
~/.gz
path, leaving~/.ignition/fuel
untouched for now
Codecov Report
@@ Coverage Diff @@
## main #1496 +/- ##
=======================================
Coverage 35.01% 35.01%
=======================================
Files 44 44
Lines 2356 2356
=======================================
Hits 825 825
Misses 1531 1531
Continue to review full report at Codecov.
|
No new test failures or warnings! Merging 🚀 |
@@ -59,7 +59,7 @@ struct LoggingPlugin | |||
public: static std::string &RecordPluginName() | |||
{ | |||
static std::string recordPluginName = | |||
"ignition::gazebo::systems::LogRecord"; | |||
"gz::sim::systems::LogRecord"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this while testing something else. This change in together with the logic in
Line 214 in 59b76c2
name == LoggingPlugin::RecordPluginName()) |
ignition::gazebo::systems::LogRecord
won't work in Garden. Can you confirm @methylDragon ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right actually :o
It might be better to do a suffix comparison/regex match for LogRecord$
then :/
See gazebo-tooling/release-tools#711