8 #ifndef _CONTACT_WORLD_PLUGIN_HH_ 9 #define _CONTACT_WORLD_PLUGIN_HH_ 12 #include "gazebo/msgs/MessageTypes.hh" 13 #include "gazebo/common/Plugin.hh" 14 #include <gazebo/msgs/msgs.hh> 15 #include <gazebo/physics/physics.hh> 16 #include <gazebo/transport/transport.hh> 19 #include "contact_request.pb.h" 20 #include "contact_response.pb.h" 27 #define REQUEST_TOPIC "~/grasp/contact" 28 #define RESPONSE_TOPIC "~/grasp/contact/response" 37 typedef const boost::shared_ptr<const grasp::msgs::ContactRequest>
42 typedef const boost::shared_ptr<const grasp::msgs::ContactResponse>
54 private: std::unique_ptr<ContactWorldPluginPrivate>
data_ptr;
57 private: physics::WorldPtr
world;
62 private:
bool recv_msg {
false};
64 private:
bool enabled {
false};
66 private: boost::shared_ptr<ContactRequest const>
msg_req;
79 public:
virtual void Load(physics::WorldPtr _world, sdf::ElementPtr _sdf);
83 public:
void onUpdate();
88 public:
void onContact(ConstContactsPtr & _msg);
102 public:
void checkCollision(ContactResponse & _msg);
Definition: ContactSensorPlugin.cc:12
grasp::msgs::ContactResponse ContactResponse
Declaration for response message type.
Definition: run_trials.hh:132
const boost::shared_ptr< const grasp::msgs::ContactRequest > ContactRequestPtr
Shared pointer declaration for request message type.
Definition: ContactWorldPlugin.hh:38
grasp::msgs::ContactRequest ContactRequest
Declaration for request message type.
Definition: ContactWorldPlugin.hh:35
const boost::shared_ptr< const grasp::msgs::ContactRequest > ContactRequestPtr
Shared pointer declaration for request message type.
Definition: run_trials.hh:130
const boost::shared_ptr< const grasp::msgs::ContactResponse > ContactResponsePtr
Shared pointer declaration for response message type.
Definition: ContactWorldPlugin.hh:43