Skip to content

Commit

Permalink
Suppress missing canonical link error messages for static models (#1068)
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org>
  • Loading branch information
3 people committed Sep 29, 2021
1 parent 064dacc commit 4c35f6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SdfEntityCreator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ Entity SdfEntityCreator::CreateEntities(const sdf::Model *_model,
<< canonicalLinkPair.second << "\n";
}
}
else
else if(!isStatic)
{
ignerr << "Could not resolve the canonical link for " << _model->Name()
<< "\n";
Expand Down
4 changes: 3 additions & 1 deletion src/systems/physics/Physics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2308,7 +2308,9 @@ void PhysicsPrivate::UpdateModelPose(const Entity _model,
_ecm.Component<components::ModelCanonicalLink>(nestedModel);
if (!nestedModelCanonicalLinkComp)
{
ignerr << "Model [" << nestedModel << "] has no canonical link\n";
auto staticComp = _ecm.Component<components::Static>(nestedModel);
if (!staticComp || !staticComp->Data())
ignerr << "Model [" << nestedModel << "] has no canonical link\n";
continue;
}

Expand Down

0 comments on commit 4c35f6c

Please sign in to comment.