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... | |
Public Member Functions inherited from System | |
System ()=default | |
Constructor. More... | |
virtual | ~System ()=default |
Destructor. 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.
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.
The documentation for this class was generated from the following file: