ContactSensorPlugin Class Reference

Contact sensor plugin. More...

#include <ContactSensorPlugin.hh>

Public Member Functions

 ContactSensorPlugin ()
 Constructs the object. More...
 
virtual ~ContactSensorPlugin ()
 Destroys the object. More...
 
virtual void Load (sensors::SensorPtr _sensor, sdf::ElementPtr _sdf)
 Loads the plugin. More...
 
void onUpdate ()
 Updates model on world update. More...
 
void onRequest (ContactSensorRequestPtr &_msg)
 Callback function for handling incoming requests. More...
 

Private Member Functions

bool inContact (std::string &name)
 Returns if sensor is in contact with given collision model. More...
 

Private Attributes

std::unique_ptr< ContactSensorPluginPrivatedata_ptr
 Class with private attributes. More...
 
sensors::ContactSensorPtr sensor
 Sensor to which the plugin is attached. More...
 
event::ConnectionPtr update_connection
 Connection to world update event. More...
 

Detailed Description

Contact sensor plugin.

Constructor & Destructor Documentation

Constructs the object.

~ContactSensorPlugin ( )
virtual

Destroys the object.

Member Function Documentation

bool inContact ( std::string &  name)
private

Returns if sensor is in contact with given collision model.

Parameters
nameName of collision to test
Returns
Whether sensor is in contact with collision model
void Load ( sensors::SensorPtr  _sensor,
sdf::ElementPtr  _sdf 
)
virtual

Loads the plugin.

Parameters
_sensorThe sensor pointer
_sdfThe sdf element pointer
void onRequest ( ContactSensorRequestPtr _msg)

Callback function for handling incoming requests.

Parameters
_msgThe message
void onUpdate ( )

Updates model on world update.

Member Data Documentation

std::unique_ptr<ContactSensorPluginPrivate> data_ptr
private

Class with private attributes.

sensors::ContactSensorPtr sensor
private

Sensor to which the plugin is attached.

event::ConnectionPtr update_connection
private

Connection to world update event.


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