Skip to content

Commit

Permalink
store canonical link mappings in its own class, not in a component
Browse files Browse the repository at this point in the history
Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
  • Loading branch information
adlarkin committed Apr 29, 2021
1 parent 2d096fe commit 24ebe9e
Show file tree
Hide file tree
Showing 7 changed files with 314 additions and 755 deletions.
124 changes: 0 additions & 124 deletions include/ignition/gazebo/components/ReferenceModels.hh

This file was deleted.

8 changes: 2 additions & 6 deletions src/SdfEntityCreator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
#include "ignition/gazebo/components/ParentEntity.hh"
#include "ignition/gazebo/components/Physics.hh"
#include "ignition/gazebo/components/Pose.hh"
#include "ignition/gazebo/components/ReferenceModels.hh"
#include "ignition/gazebo/components/RgbdCamera.hh"
#include "ignition/gazebo/components/Scene.hh"
#include "ignition/gazebo/components/SelfCollide.hh"
Expand Down Expand Up @@ -404,11 +403,8 @@ Entity SdfEntityCreator::CreateEntities(const sdf::Model *_model,
canonicalLinkPair.second, modelEntity, *this->dataPtr->ecm);
if (kNullEntity != canonicalLinkEntity)
{
// Map this canonical link to the model. Since a link may be the
// canonical link for multiple models (example: nested models), create
// a component that completes this mapping if it doesn't already exist.
this->dataPtr->ecm->ComponentDefault<components::ReferenceModels>(
canonicalLinkEntity)->Data().AddModel(modelEntity);
this->dataPtr->ecm->CreateComponent(
modelEntity, components::ModelCanonicalLink(canonicalLinkEntity));
}
else
{
Expand Down
Loading

0 comments on commit 24ebe9e

Please sign in to comment.