Add support for namespace attribute on <model>#1663
Conversation
Signed-off-by: C88-YQ <1409947012@qq.com>
Signed-off-by: C88-YQ <1409947012@qq.com>
Signed-off-by: C88-YQ <1409947012@qq.com>
Signed-off-by: C88-YQ <1409947012@qq.com>
Signed-off-by: C88-YQ <1409947012@qq.com>
Signed-off-by: C88-YQ <1409947012@qq.com>
Signed-off-by: C88-YQ <1409947012@qq.com>
azeey
left a comment
There was a problem hiding this comment.
@scpeters We're hoping to add the namespace attribute and backport it to older versions (up to Harmonic). I know we don't have a clear policy on adding things to the spec in older versions so I'd like to know what your opinion is on this.
Signed-off-by: C88-YQ <1409947012@qq.com>
Signed-off-by: C88-YQ <1409947012@qq.com>
Signed-off-by: C88-YQ <1409947012@qq.com>
|
The tests pass for me as well! Can I check if there's a corresponding gz-sim branch to test this with? |
|
@cheriehu Thanks for testing! Yes, there is a corresponding gz-sim PR / branch for this work: gazebosim/gz-sim#3669 However, this branch currently includes changes for several related features, and we are planning to split it into several smaller PRs later to make the changes easier to review and test separately. |
|
Since there was some discussion around the placeholder syntax, I’ve started a Zulip thread to gather broader community input: I’ll update this PR once we’ve reached consensus on the placeholder syntax. |
🎉 New feature
Related to #1659
Summary
Add support for
namespaceattribute on<model>and expose it through thesdf::Model.This change adds:
A new optional
namespaceattribute in the SDF 1.12 model schema.sdf::Model::Namespace(),RawNamespace(), andSetNamespace().Support for the
__name__placeholder in namespace strings, which is resolved using the model name.Support for overriding an included model's namespace with
<include><namespace>...</namespace></include>.With this, a model can define its own namespace:
and an include can override it:
Test it
ctest -R "Model|includes|interface_api"Checklist
codecheckpassed (See contributing)