17 #ifndef _GAZEBO_SENSORS_CONTACTSENSOR_HH_
18 #define _GAZEBO_SENSORS_CONTACTSENSOR_HH_
37 class ContactSensorPrivate;
56 public:
virtual void Load(
const std::string &_worldName,
57 sdf::ElementPtr _sdf);
61 public:
virtual void Load(
const std::string &_worldName);
64 public:
virtual void Init();
67 protected:
virtual bool UpdateImpl(
const bool _force);
70 protected:
virtual void Fini();
74 public:
unsigned int GetCollisionCount()
const;
79 public: std::string GetCollisionName(
unsigned int _index)
const;
84 public:
unsigned int GetCollisionContactCount(
85 const std::string &_collisionName)
const;
125 public: msgs::Contacts Contacts()
const;
130 public: std::map<std::string, physics::Contact> Contacts(
131 const std::string &_collisionName)
const;
134 public:
virtual bool IsActive()
const;
137 private:
void OnContacts(ConstContactsPtr &_msg);
141 private: std::unique_ptr<ContactSensorPrivate> dataPtr;
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Base class for sensors.
Definition: Sensor.hh:51
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:58