Gazebo Gazebo

API Reference

6.16.0
PerformerDetector Class Reference

A system system that publishes on a topic when a performer enters or leaves a specified region. More...

#include <PerformerDetector.hh>

Public Member Functions

 PerformerDetector ()=default
 Documentation inherited. More...
 
void Configure (const Entity &_entity, const std::shared_ptr< const sdf::Element > &_sdf, EntityComponentManager &_ecm, EventManager &_eventMgr) final
 Documentation inherited. More...
 
void PostUpdate (const gz::sim::UpdateInfo &_info, const gz::sim::EntityComponentManager &_ecm) final
 Documentation inherited. More...
 
- Public Member Functions inherited from System
 System ()=default
 Constructor. More...
 
virtual ~System ()=default
 Destructor. More...
 

Detailed Description

A system system that publishes on a topic when a performer enters or leaves a specified region.

A performer is detected when a performer's volume, which is represented by an gz::math::AxisAlignedBox, intersects with the PerformerDetector's region, which is also represented by an gz::math::AxisAlignedBox. When a performer is detected, the system publishes an ignition.msgs.Pose message with the pose of the detected performer with respect to the model containing the PerformerDetector. The name and id fields of the Pose message will be set to the name and the entity of the detected performer respectively. The header of the Pose message contains the time stamp of detection. The data field of the header will contain the key "frame_id" with a value set to the name of the model containing the PerformerDetector system and the key "state" with a value set to "1" if the performer is entering the detector's region and "0" if the performer is leaving the region. The data field of the header will also contain the key "count" with a value set to the number of performers currently in the region.

The PerformerDetector has to be attached to a <model> and it's region is centered on the containing model's origin.

The system does not assume that levels are enabled, but it does require performers to be specified.

System parameters

<topic>: Custom topic to be used for publishing when a performer is detected. If not set, the default topic with the following pattern would be used "/model/<model_name>/performer_detector/status". The topic type is ignition.msgs.Pose <geometry>: Detection region. Currently, only the <box> geometry is supported. The position of the geometry is derived from the pose of the containing model. <pose>: Additional pose offset relative to the parent model's pose. This pose is added to the parent model pose when computing the detection region. Only the position component of the <pose> is used. <header_data>: Zero or more key-value pairs that will be included in the header of the detection messages. A <header_data> element should have child <key> and <value> elements whose contents are interpreted as strings. Keys value pairs are stored in a map, which means the keys are unique.

Constructor & Destructor Documentation

◆ PerformerDetector()

PerformerDetector ( )
default

Documentation inherited.

Member Function Documentation

◆ Configure()

void Configure ( const Entity _entity,
const std::shared_ptr< const sdf::Element > &  _sdf,
EntityComponentManager _ecm,
EventManager _eventMgr 
)
finalvirtual

Documentation inherited.

Implements ISystemConfigure.

◆ PostUpdate()

void PostUpdate ( const gz::sim::UpdateInfo _info,
const gz::sim::EntityComponentManager _ecm 
)
finalvirtual

Documentation inherited.

Implements ISystemPostUpdate.


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