-
Notifications
You must be signed in to change notification settings - Fork 276
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
Support SDFormat 1.8 Composition #542
Conversation
7d87eb2
to
b342f6e
Compare
b342f6e
to
f51154c
Compare
Fixed a cppcheck error and rebased onto main |
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.
Thanks @azeey!
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 left a few comments that should be easy to address. The one comment that might be more involved is the FreeGroup feature. We can tackle that in a follow up PR if you'd like. Otherwise, this is looking great!
TEST_F(SdfFrameSemanticsTest, IncludeNestedModelsRelativeTo) | ||
{ | ||
std::string path = std::string(PROJECT_SOURCE_PATH) + "/test/worlds/models"; | ||
setenv("IGN_GAZEBO_RESOURCE_PATH", |
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 not sure how well this works across multiple platforms. An alternative is to use sdf::setFindCallback
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.
It seems to be the preferred way of setting the resource path in these test files. I got it from test/integration/physics_system.cc
src/systems/physics/Physics.cc
Outdated
@@ -1458,14 +1458,6 @@ void PhysicsPrivate::UpdatePhysics(EntityComponentManager &_ecm) | |||
if (modelIt == this->entityModelMap.end()) | |||
return true; | |||
|
|||
// world pose cmd currently not supported for nested models | |||
if (_entity != topLevelModel(_entity, _ecm)) |
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 not sure TPE supports moving nested models separately from their top level model. So, maybe we shouldn't remove this yet?
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.
Restored
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.
Hmm, if you have this check then a nested model won't transform correctly, even if it's fully connected by joints.
src/SdfEntityCreator.cc
Outdated
@@ -280,6 +304,9 @@ Entity SdfEntityCreator::CreateEntities(const sdf::Model *_model, | |||
|
|||
// Links | |||
bool canonicalLinkCreated = false; | |||
const auto[canonicalLink, canonicalLinkName] = |
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.
nit: canonicalLinkName
is not used, so can just be const auto *canonicalLink = _model->CanonicalLink();
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.
Done
</link> | ||
|
||
<joint name="joint_01" type="continuous"> | ||
<parent>frame_00</parent> |
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 was getting the error Failed to resolve parent link for joint 'joint_01' with parent name 'frame_00'
when I ran INTEGRATION_sdf_frame_semantics
. This is because frame_00
can't be referenced from this scope.
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.
Moved the joint up one level.
</visual> | ||
</link> | ||
|
||
<joint name="joint_01" type="continuous"> |
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.
DART doesn't support continuous
joints yet. Can you change this to revolute
?
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.
Done
2c6e372
to
cbd49c6
Compare
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Stephen Brawner <[email protected]>
Signed-off-by: Stephen Brawner <[email protected]>
Signed-off-by: Stephen Brawner <[email protected]>
Signed-off-by: Stephen Brawner <[email protected]>
Signed-off-by: Stephen Brawner <[email protected]>
cbd49c6
to
f9b456e
Compare
Rebased onto main, and resolved a nullptr issue which was showing up in the breadcrumbs test. There appears to be a memory error with the user_commands integration test, which seems to be unrelated to this PR, but nonetheless I'll try to resolve it first. |
Signed-off-by: Stephen Brawner <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #542 +/- ##
==========================================
- Coverage 64.88% 64.87% -0.01%
==========================================
Files 235 235
Lines 16889 16941 +52
==========================================
+ Hits 10958 10991 +33
- Misses 5931 5950 +19
Continue to review full report at Codecov.
|
Signed-off-by: Stephen Brawner <[email protected]>
Added integration test which fails without the nested model dartsim PR (gazebosim/gz-physics#189). |
I haven't looked at the code yet, just run some tests locally. The
|
Signed-off-by: Stephen Brawner <[email protected]>
Failures in tests are expected until dependent ign-physics is merged and released |
I think the windows build is failing due to |
The transform control is not working for me. I also found out that it doesn't work for nested models in Dome with TPE neither since gazebosim/gz-physics#142. I will go ahead remove the changes related to that and fix it in a follow up PR. |
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
e1dfbc4
to
cf6f4f3
Compare
|
Fixed in cf6f4f3 |
I'm going to unsubscribe from this PR. Thanks for taking over @azeey. Feel free to ping me if you have any questions. |
…_sdf_18 Signed-off-by: Addisu Z. Taddese <[email protected]>
I believe test failures on macOS are unrelated to this PR. Merging! |
[Dome] Support <actor><pose> and <actor><plugin> Approved-by: Luca Della Vedova
This PR adds support for model composition via
<include>
'd models. This PR adds the following functionality related to nested models:Work towards #479