VacuumGripperPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 #ifndef _GAZEBO_VACUUM_GRIPPER_PLUGIN_HH_
19 #define _GAZEBO_VACUUM_GRIPPER_PLUGIN_HH_
20 
21 #include <memory>
22 #include <string>
23 #include <gazebo/common/Events.hh>
24 #include <gazebo/common/Plugin.hh>
25 #include <gazebo/msgs/contacts.pb.h>
26 #include <gazebo/physics/PhysicsTypes.hh>
27 #include <sdf/sdf.hh>
28 
29 namespace gazebo
30 {
32  class VacuumGripperPluginPrivate;
33 
35  class GAZEBO_VISIBLE VacuumGripperPlugin : public ModelPlugin
36  {
38  public: explicit VacuumGripperPlugin();
39 
41  public: virtual ~VacuumGripperPlugin();
42 
43  // Documentation inherited.
44  public: virtual void Load(physics::ModelPtr _model, sdf::ElementPtr _sdf);
45 
47  public: virtual void Reset();
48 
50  public: std::string Name() const;
51 
53  public: bool Enabled() const;
54 
58  public: bool Attached() const;
59 
61  public: void Enable();
62 
64  public: void Disable();
65 
67  private: void OnUpdate();
68 
71  private: void OnContacts(ConstContactsPtr &_msg);
72 
74  private: void HandleAttach();
75 
77  private: void HandleDetach();
78 
81  private: virtual void Publish() const;
82 
85  private: std::unique_ptr<VacuumGripperPluginPrivate> dataPtr;
86  };
87 }
88 #endif
std::unique_ptr< VacuumGripperPluginPrivate > dataPtr


osrf_gear
Author(s):
autogenerated on Wed Sep 7 2016 03:48:12