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;
166 public: msgs::Contacts Contacts()
const;
172 public: std::map<std::string, physics::Contact> GetContacts(
178 public: std::map<std::string, physics::Contact> Contacts(
179 const std::string &_collisionName)
const;
182 public:
virtual bool IsActive()
const;
185 private:
void OnContacts(ConstContactsPtr &_msg);
189 private: std::unique_ptr<ContactSensorPrivate> dataPtr;
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:48
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
Base class for sensors.
Definition: Sensor.hh:50
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59