Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _GAZEBO_VACUUM_GRIPPER_PLUGIN_HH_
00019 #define _GAZEBO_VACUUM_GRIPPER_PLUGIN_HH_
00020
00021 #include <memory>
00022 #include <string>
00023 #include <gazebo/common/Events.hh>
00024 #include <gazebo/common/Plugin.hh>
00025 #include <gazebo/msgs/contacts.pb.h>
00026 #include <gazebo/physics/PhysicsTypes.hh>
00027 #include <sdf/sdf.hh>
00028
00029 namespace gazebo
00030 {
00032 class VacuumGripperPluginPrivate;
00033
00035 class GAZEBO_VISIBLE VacuumGripperPlugin : public ModelPlugin
00036 {
00038 public: explicit VacuumGripperPlugin();
00039
00041 public: virtual ~VacuumGripperPlugin();
00042
00043
00044 public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
00045
00047 public: virtual void Reset();
00048
00050 public: std::string Name() const;
00051
00053 public: bool Enabled() const;
00054
00058 public: bool Attached() const;
00059
00061 public: void Enable();
00062
00064 public: void Disable();
00065
00067 private: void OnUpdate();
00068
00071 private: void OnContacts(ConstContactsPtr &_msg);
00072
00074 private: void HandleAttach();
00075
00077 private: void HandleDetach();
00078
00081 private: virtual void Publish() const;
00082
00085 private: std::unique_ptr<VacuumGripperPluginPrivate> dataPtr;
00086 };
00087 }
00088 #endif