Ignition Gazebo

API Reference

3.7.0

A system for creating Breadcrumbs in the form of models that can get deployed/spawned at the location of the model to which this system is attached. Each breadcrumb is a complete sdf::Model. When deployed, the pose of the breadcrumb model is offset from the containing model by the pose specified in the <pose> element of the breadcrumb model. A name is generated for the breadcrumb by appending the current count of deployments to the name specified in the breadcrumb <model> element. The model specified in the <breadcrumb> parameter serves as a template for deploying multiple breadcrumbs of the same type. Including models from Fuel is accomplished by creating a <model> that includes the Fuel model using the tag. See the example in examples/worlds/breadcrumbs.sdf. More...

#include <Breadcrumbs.hh>

Public Member Functions

 Breadcrumbs ()=default
 Constructor. More...
 
void Configure (const Entity &_entity, const std::shared_ptr< const sdf::Element > &_sdf, EntityComponentManager &_ecm, EventManager &_eventMgr) override
 Configure the system. More...
 
bool MakeStatic (Entity _entity, EntityComponentManager &_ecm)
 Make an entity static. More...
 
void PreUpdate (const UpdateInfo &_info, EntityComponentManager &_ecm) override
 
- Public Member Functions inherited from System
 System ()
 Constructor. More...
 
virtual ~System ()
 Destructor. More...
 

Public Attributes

std::unique_ptr< SdfEntityCreatorcreator {nullptr}
 Creator interface. More...
 
transport::Node::Publisher remainingPub
 Publishes remaining deployments. More...
 

Detailed Description

A system for creating Breadcrumbs in the form of models that can get deployed/spawned at the location of the model to which this system is attached. Each breadcrumb is a complete sdf::Model. When deployed, the pose of the breadcrumb model is offset from the containing model by the pose specified in the <pose> element of the breadcrumb model. A name is generated for the breadcrumb by appending the current count of deployments to the name specified in the breadcrumb <model> element. The model specified in the <breadcrumb> parameter serves as a template for deploying multiple breadcrumbs of the same type. Including models from Fuel is accomplished by creating a <model> that includes the Fuel model using the tag. See the example in examples/worlds/breadcrumbs.sdf.

System Paramters

<topic>: Custom topic to be used to deploy breadcrumbs. If topic is not set, the default topic with the following pattern would be used "/model/<model_name>/breadcrumbs/<breadcrumb_name>/deploy". The topic type is ignition.msgs.Empty <max_deployments>: The maximum number of times this breadcrumb can be deployed. Once this many are deployed, publishing on the deploy topic will have no effect. If a negative number is set, the maximum deployment will be unbounded. If a value of zero is used, then the breadcrumb system will be disabled. A zero value is useful for situations where SDF files are programmatically created. The remaining deployment count is available on the <topic>/remaining topic. <disable_physics_time>: The time in which the breadcrumb entity's dynamics remain enabled. After his specified time, the breadcrumb will be made static. If this value is <= 0 or the param is not specified, the breadcrumb model's dynamics will not be modified. <performer_volume>: Geometry that represents the bounding volume of the performer. Only <geometry><box> is supported currently. When this parameter is present, the deployed models will be performers. <allow_renaming>: If true, the deployed model will be renamed if another model with the same name already exists in the world. If false and there is another model with the same name, the breadcrumb will not be deployed. Defaults to false. <breadcrumb>: This is the model used as a template for deploying breadcrumbs.

Constructor & Destructor Documentation

◆ Breadcrumbs()

Breadcrumbs ( )
default

Constructor.

Member Function Documentation

◆ Configure()

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

Configure the system.

Parameters
[in]_entityThe entity this plugin is attached to.
[in]_sdfThe SDF Element associated with this system plugin.
[in]_ecmThe EntityComponentManager of the given simulation instance.
[in]_eventMgrThe EventManager of the given simulation instance.

Implements ISystemConfigure.

◆ MakeStatic()

bool MakeStatic ( Entity  _entity,
EntityComponentManager _ecm 
)

Make an entity static.

Parameters
[in]_entityEntity to make static
[in]_ecmEntity component manager
Returns
True if operation is successful, false otherwise

◆ PreUpdate()

void PreUpdate ( const UpdateInfo _info,
EntityComponentManager _ecm 
)
overridevirtual

Implements ISystemPreUpdate.

Member Data Documentation

◆ creator

std::unique_ptr<SdfEntityCreator> creator {nullptr}

Creator interface.

◆ remainingPub

Publishes remaining deployments.


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