17 #ifndef _GAZEBO_CONTACTSENSOR_HH_
18 #define _GAZEBO_CONTACTSENSOR_HH_
54 public:
virtual void Load(
const std::string &_worldName,
55 sdf::ElementPtr _sdf);
59 public:
virtual void Load(
const std::string &_worldName);
62 public:
virtual void Init();
65 protected:
virtual bool UpdateImpl(
bool _force);
68 protected:
virtual void Fini();
72 public:
unsigned int GetCollisionCount()
const;
77 public: std::string GetCollisionName(
unsigned int _index)
const;
82 public:
unsigned int GetCollisionContactCount(
83 const std::string &_collisionName)
const;
123 public: msgs::Contacts GetContacts()
const;
128 public: std::map<std::string, physics::Contact> GetContacts(
129 const std::string &_collisionName);
132 public:
virtual bool IsActive();
135 private:
void OnContacts(ConstContactsPtr &_msg);
138 private: std::vector<std::string> collisions;
147 private:
mutable boost::mutex mutex;
150 private: msgs::Contacts contactsMsg;
152 typedef std::list<boost::shared_ptr<msgs::Contacts const> > ContactMsgs_L;
153 private: ContactMsgs_L incomingContacts;
boost::shared_ptr< Subscriber > SubscriberPtr
Definition: TransportTypes.hh:53
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
Base class for sensors.
Definition: Sensor.hh:69
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:66