TouchPlugin Class Reference
Plugin which publishes a message if the model it is attached to has touched one or more specified targets continuously during a given time. More...
#include <TouchPlugin.hh>
Public Member Functions | |
TouchPlugin () | |
Constructor. More... | |
~TouchPlugin () override=default | |
Destructor. More... | |
void | Configure (const Entity &_entity, const std::shared_ptr< const sdf::Element > &_sdf, EntityComponentManager &_ecm, EventManager &_eventMgr) override |
Configure the system. More... | |
void | PostUpdate (const UpdateInfo &_info, const EntityComponentManager &_ecm) override |
void | PreUpdate (const UpdateInfo &_info, EntityComponentManager &_ecm) final |
Documentation inherited. More... | |
void | Reset (const UpdateInfo &_info, EntityComponentManager &_ecm) final |
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
Plugin which publishes a message if the model it is attached to has touched one or more specified targets continuously during a given time.
After publishing, the plugin is disabled. It can be re-enabled through a Gazebo Transport service call.
The plugin requires that a contact sensors is placed in at least one link on the model on which this plugin is attached.
System Parameters
<target>
Name, or substring of a name, that identifies the target collision entity/entities. This value is searched in the scoped name of all collision entities, so it can possibly match more than one collision. For example, using the name of a model will match all of its collisions (scoped name/model_name/link_name/collision_name
).<time>
Target time in seconds to maintain contact.<namespace>
Namespace for transport topics/services:/<namespace>/enable
: Service used to enable and disable the plugin./<namespace>/touched
: Topic where a message is published once the touch event occurs.
<enabled>
Set this to true so the plugin works from the start and doesn't need to be enabled.
Constructor & Destructor Documentation
◆ TouchPlugin()
TouchPlugin | ( | ) |
Constructor.
◆ ~TouchPlugin()
|
overridedefault |
Destructor.
Member Function Documentation
◆ Configure()
|
overridevirtual |
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.
◆ PostUpdate()
|
overridevirtual |
Implements ISystemPostUpdate.
◆ PreUpdate()
|
finalvirtual |
Documentation inherited.
Implements ISystemPreUpdate.
◆ Reset()
|
finalvirtual |
Implements ISystemReset.
The documentation for this class was generated from the following file: