Gazebo Sim

API Reference

8.10.0
EntitySemantics Class Reference

System for assigning semantics to entities, such as models, by classifying them into categories and assigning them tags. Reference: https://github.com/ros-simulation/simulation_interfaces/blob/main/msg/EntityInfo.msg, https://github.com/ros-simulation/simulation_interfaces/blob/main/msg/EntityCategory.msg, https://github.com/ros-simulation/simulation_interfaces/blob/main/msg/TagsFilter.msg. More...

#include <EntitySemantics.hh>

Public Member Functions

void PreUpdate (const UpdateInfo &_info, EntityComponentManager &_ecm) override
 
- Public Member Functions inherited from System
 System ()=default
 Constructor. More...
 
virtual ~System ()=default
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from System
using PriorityType = int32_t
 Signed integer type used for specifying priority of the execution order of PreUpdate and Update phases. More...
 
- Static Public Attributes inherited from System
constexpr static PriorityType kDefaultPriority = {0}
 Default priority value for execution order of the PreUpdate and Update phases. More...
 
constexpr static std::string_view kPriorityElementName
 Name of the XML element from which the priority value will be parsed. More...
 

Detailed Description

System for assigning semantics to entities, such as models, by classifying them into categories and assigning them tags. Reference: https://github.com/ros-simulation/simulation_interfaces/blob/main/msg/EntityInfo.msg, https://github.com/ros-simulation/simulation_interfaces/blob/main/msg/EntityCategory.msg, https://github.com/ros-simulation/simulation_interfaces/blob/main/msg/TagsFilter.msg.

System Parameters

This system is meant to be attached to a <world>, but it parses parameters found in entities such as models.

Entity Parameters

  • <gz:semantics>: Root element to be specified inside entities, e.g. <model>. It has the following child parameters:
    • <category>: string representation of the value as defined in https://github.com/ros-simulation/simulation_interfaces/blob/1.0.0/msg/EntityCategory.msg. The string is formed by removing the prefix CATEGORY_ from the categories listed in the EntityCategory message. Example: for CATEGORY_ROBOT, it would be <category>ROBOT</category>. Lowercase values will also be accepted. There can only be one instance of the <category> element for an entity.
    • <tag>: string labels that can be assigned according to the user's classification scheme. They serve as a secondary layer of classification in on top of categories. Multiple instances of the <tag> elements are allowed for an entity.
    • <description>: freeform string that describes the entity. There can only be one instance of the <description> element for an entity.

Example:

<model name="robot1">
<gz:semantics>
<category>ROBOT</category>
<tag>mobile</tag>
<tag>diff_drive</tag>
<description>Food delivery mobile robot</description>
</gz:semantics>
</model>

Member Function Documentation

◆ PreUpdate()

void PreUpdate ( const UpdateInfo _info,
EntityComponentManager _ecm 
)
overridevirtual

Implements ISystemPreUpdate.


The documentation for this class was generated from the following file: