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>
113 public:
void SetNeverDropContacts(
const bool _neverDrop);
118 public:
bool NeverDropContacts()
const;
140 public:
bool SubscribersConnected(
Collision *_collision1,
144 public:
unsigned int GetContactCount()
const;
150 public:
Contact *GetContact(
unsigned int _index)
const;
157 public:
const std::vector<Contact *> &GetContacts()
const;
160 public:
void Clear();
163 public:
void PublishContacts();
166 public:
void ResetCount();
173 public: std::string CreateFilter(
const std::string &_topic,
174 const std::vector<std::string> &_collisions);
181 public: std::string CreateFilter(
const std::string &_topic,
182 const std::string &_collision);
190 public: std::string CreateFilter(
const std::string &_name,
191 const std::map<std::string, physics::CollisionPtr>
196 public:
void RemoveFilter(
const std::string &_name);
200 public:
unsigned int GetFilterCount();
205 public:
bool HasFilter(
const std::string &_name);
214 private:
void GetCustomPublishers(
Collision *_collision1,
215 Collision *_collision2,
const bool _getOnlyConnected,
216 std::vector<ContactPublisher*> &_publishers);
218 private: std::vector<Contact*> contacts;
220 private:
unsigned int contactIndex;
233 private: boost::unordered_map<std::string, ContactPublisher *>
234 customContactPublishers;
237 private: boost::recursive_mutex *customMutex;
243 private: ignition::transport::Node nodeIgn;
246 private: ignition::transport::Node::Publisher contactPubIgn;
251 private:
bool neverDropContacts;
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