18 #ifndef GAZEBO_PHYSICS_CONTACTMANAGER_HH_
19 #define GAZEBO_PHYSICS_CONTACTMANAGER_HH_
24 #include <ignition/transport/Node.hh>
26 #include <boost/unordered/unordered_set.hpp>
27 #include <boost/unordered/unordered_map.hpp>
28 #include <boost/thread/recursive_mutex.hpp>
104 public:
unsigned int GetContactCount()
const;
110 public:
Contact *GetContact(
unsigned int _index)
const;
117 public:
const std::vector<Contact *> &GetContacts()
const;
120 public:
void Clear();
123 public:
void PublishContacts();
126 public:
void ResetCount();
133 public: std::string CreateFilter(
const std::string &_topic,
134 const std::vector<std::string> &_collisions);
141 public: std::string CreateFilter(
const std::string &_topic,
142 const std::string &_collision);
150 public: std::string CreateFilter(
const std::string &_name,
151 const std::map<std::string, physics::CollisionPtr>
156 public:
void RemoveFilter(
const std::string &_name);
160 public:
unsigned int GetFilterCount();
165 public:
bool HasFilter(
const std::string &_name);
167 private: std::vector<Contact*> contacts;
169 private:
unsigned int contactIndex;
182 private: boost::unordered_map<std::string, ContactPublisher *>
183 customContactPublishers;
186 private: boost::recursive_mutex *customMutex;
192 private: ignition::transport::Node nodeIgn;
195 private: ignition::transport::Node::Publisher contactPubIgn;
boost::shared_ptr< World > WorldPtr
Definition: PhysicsTypes.hh:89
Base class for all collision entities.
Definition: Collision.hh:38
Forward declarations for transport.
boost::shared_ptr< Publisher > PublisherPtr
Definition: TransportTypes.hh:49
boost::shared_ptr< Node > NodePtr
Definition: TransportTypes.hh:57
default namespace for gazebo
GAZEBO_VISIBLE void Init(google::protobuf::Message &_message, const std::string &_id="")
Initialize a message.
A Time class, can be used to hold wall- or sim-time.
Definition: Time.hh:44