Ignition Gazebo

API Reference

2.10.0
SdfEntityCreator.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef IGNITION_GAZEBO_CREATEREMOVE_HH_
18 #define IGNITION_GAZEBO_CREATEREMOVE_HH_
19 
20 #include <memory>
21 
22 #include <sdf/Collision.hh>
23 #include <sdf/Gui.hh>
24 #include <sdf/Joint.hh>
25 #include <sdf/Light.hh>
26 #include <sdf/Link.hh>
27 #include <sdf/Model.hh>
28 #include <sdf/Physics.hh>
29 #include <sdf/Sensor.hh>
30 #include <sdf/Visual.hh>
31 #include <sdf/World.hh>
32 
36 #include <ignition/gazebo/Types.hh>
37 
38 namespace ignition
39 {
40  namespace gazebo
41  {
42  // Inline bracket to help doxygen filtering.
43  inline namespace IGNITION_GAZEBO_VERSION_NAMESPACE {
44  // Forward declarations.
45  class SdfEntityCreatorPrivate;
46  //
56  class IGNITION_GAZEBO_VISIBLE SdfEntityCreator
57  {
63  public: explicit SdfEntityCreator(EntityComponentManager &_ecm,
64  EventManager &_eventManager);
65 
68  public: SdfEntityCreator(const SdfEntityCreator &_creator);
69 
72  public: SdfEntityCreator(SdfEntityCreator &&_creator) noexcept;
73 
77  public: SdfEntityCreator &operator=(SdfEntityCreator &&_creator) noexcept;
78 
82  public: SdfEntityCreator &operator=(const SdfEntityCreator &_creator);
83 
85  public: ~SdfEntityCreator();
86 
91  public: Entity CreateEntities(const sdf::World *_world);
92 
97  public: Entity CreateEntities(const sdf::Model *_model);
98 
103  public: Entity CreateEntities(const sdf::Light *_light);
104 
109  public: Entity CreateEntities(const sdf::Link *_link);
110 
115  public: Entity CreateEntities(const sdf::Joint *_joint);
116 
121  public: Entity CreateEntities(const sdf::Visual *_visual);
122 
127  public: Entity CreateEntities(const sdf::Collision *_collision);
128 
134  public: Entity CreateEntities(const sdf::Sensor *_sensor);
135 
142  public: void RequestRemoveEntity(const Entity _entity,
143  bool _recursive = true);
144 
149  public: void SetParent(Entity _child, Entity _parent);
150 
153  };
154  }
155  }
156 }
157 #endif
Component< NoData, class VisualTag > Visual
A component that identifies an entity as being a visual.
Definition: Visual.hh:33
Component< NoData, class WorldTag > World
A component that identifies an entity as being a world.
Definition: World.hh:33
Component< NoData, class JointTag > Joint
A component that identifies an entity as being a joint.
Definition: Joint.hh:33
The EntityComponentManager constructs, deletes, and returns components and entities. A component can be of any class which inherits from components::BaseComponent.
Definition: EntityComponentManager.hh:64
The EventManager is used to send/receive notifications of simulator events.
Definition: EventManager.hh:50
Component< NoData, class ModelTag > Model
A component that identifies an entity as being a model.
Definition: components/Model.hh:33
Component< sdf::Light, class LightTag, serializers::LightSerializer > Light
This component contains light source information. For more information on lights, see SDF&#39;s Light ele...
Definition: Light.hh:48
Provides convenient functions to spawn entities and load their plugins from SDF elements, to remove them, and to change their hierarchy.
Definition: SdfEntityCreator.hh:56
Component< NoData, class CollisionTag > Collision
A component that identifies an entity as being a collision.
Definition: Collision.hh:42
Component< NoData, class LinkTag > Link
A component that identifies an entity as being a link.
Definition: components/Link.hh:33
This library is part of the Ignition Robotics project.
uint64_t Entity
An Entity identifies a single object in simulation such as a model, link, or light. At its core, an Entity is just an identifier.
Definition: Entity.hh:59
Component< NoData, class SensorTag > Sensor
A component that identifies an entity as being a link.
Definition: Sensor.hh:33