EntityFeatureMap.hh
Go to the documentation of this file.
uint64_t Entity
An Entity identifies a single object in simulation such as a model, link, or light....
Definition: gz/sim/Entity.hh:58
Entity Get(const RequiredEntityPtr &_physEntity) const
Get Gazebo entity that corresponds to the physics entity with required features.
Definition: EntityFeatureMap.hh:181
const std::unordered_map< Entity, RequiredEntityPtr > & Map() const
Get the map from Gazebo entity to physics entities with required features.
Definition: EntityFeatureMap.hh:291
T find(T... args)
T size(T... args)
bool Remove(Entity _entity)
Remove entity from all associated maps.
Definition: EntityFeatureMap.hh:255
RequiredEntityPtr Get(const Entity &_entity) const
Get the physics entity with required features that corresponds to the input Gazebo entity.
Definition: EntityFeatureMap.hh:166
PhysicsEntityPtr< ToFeatureList > EntityCast(gz::sim::Entity _entity) const
Helper function to cast from an entity type with minimum features to an entity with a different set o...
Definition: EntityFeatureMap.hh:97
EntityFeatureMap< PhysicsEntityT, physics::FeaturePolicy3d, RequiredFeatureList, OptionalFeatureLists... > EntityFeatureMap3d
Convenience template that presets EntityFeatureMap with FeaturePolicy3d.
Definition: EntityFeatureMap.hh:330
const Entity kNullEntity
Indicates a non-existant or invalid Entity.
Definition: gz/sim/Entity.hh:61
Gazebo is a leading open source robotics simulator, that provides high fidelity physics,...
Definition: gz/sim/Actor.hh:35
std::disjunction< std::is_same< T, OptionalFeatureLists >... > HasFeatureList
Checks whether type T is in the OptionalFeatureLists.
Definition: EntityFeatureMap.hh:77
Definition: EntityFeatureMap.hh:63
T erase(T... args)
std::size_t TotalMapEntryCount() const
Get the total number of entries in the maps. Only used for testing.
Definition: EntityFeatureMap.hh:299
void AddEntity(const Entity &_entity, const RequiredEntityPtr &_physicsEntity)
Add a mapping between gazebo and physics entities.
Definition: EntityFeatureMap.hh:243
Entity GetByPhysicsId(std::size_t _id) const
Get Gazebo entity that corresponds to the physics entity ID.
Definition: EntityFeatureMap.hh:210
bool Remove(const RequiredEntityPtr &_physicsEntity)
Remove physics entity from all associated maps.
Definition: EntityFeatureMap.hh:273
PhysicsEntityPtr< ToFeatureList > EntityCast(const RequiredEntityPtr &_physicsEntity) const
Helper function to cast from an entity type with minimum features to an entity with a different set o...
Definition: EntityFeatureMap.hh:151
physics::EntityPtr< PhysicsEntityT< PolicyT, T > > PhysicsEntityPtr
Template that's preset with the class's Policy type.
Definition: EntityFeatureMap.hh:68
bool HasEntity(const Entity &_entity) const
Check whether there is a physics entity associated with the given Gazebo entity.
Definition: EntityFeatureMap.hh:225
T end(T... args)
PhysicsEntityPtr< RequiredFeatureList > RequiredEntityPtr
A EntityPtr with made from RequiredFeatureList.
Definition: EntityFeatureMap.hh:71
RequiredEntityPtr GetPhysicsEntityPtr(std::size_t _id) const
Get the physics entity with required features that has a particular ID.
Definition: EntityFeatureMap.hh:196
bool HasEntity(const RequiredEntityPtr &_physicsEntity) const
Check whether there is a gazebo entity associated with the given physics entity.
Definition: EntityFeatureMap.hh:235