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 <include>
tag. See the example in examples/worlds/breadcrumbs.sdf.
More...
#include <Breadcrumbs.hh>
|
using | PriorityType = int32_t |
| Signed integer type used for specifying priority of the execution order of PreUpdate and Update phases.
|
|
static constexpr PriorityType | kDefaultPriority = {0} |
| Default priority value for execution order of the PreUpdate and Update phases.
|
|
static constexpr std::string_view | kPriorityElementName |
| Name of the XML element from which the priority value will be parsed.
|
|
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 <include>
tag. See the example in examples/worlds/breadcrumbs.sdf.
System Parameters
<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 gz.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.
<topic_statistics>
: If true, then topic statistics are enabled on <topic>
and error messages will be generated when messages are dropped. Default to false.
◆ Breadcrumbs()
◆ Configure()
Configure the system.
- Parameters
-
[in] | _entity | The entity this plugin is attached to. |
[in] | _sdf | The SDF Element associated with this system plugin. |
[in] | _ecm | The EntityComponentManager of the given simulation instance. |
[in] | _eventMgr | The EventManager of the given simulation instance. |
Implements ISystemConfigure.
◆ MakeStatic()
Make an entity static.
- Parameters
-
[in] | _entity | Entity to make static |
[in] | _ecm | Entity component manager |
- Returns
- True if operation is successful, false otherwise
◆ PreUpdate()
◆ creator
◆ remainingPub
Publishes remaining deployments.
◆ topic
Name of the deploy topic.
◆ topicStatistics
bool topicStatistics {false} |
True when topic statistics are enabled.
The documentation for this class was generated from the following file: