ContactPlugin.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-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  * Desc: Contact Plugin
19  * Author: Nate Koenig mod by John Hsu
20  */
21 #ifndef _GAZEBO_CONTACT_PLUGIN_HH_
22 #define _GAZEBO_CONTACT_PLUGIN_HH_
23 
24 #include <string>
25 
26 #include <gazebo/common/Plugin.hh>
27 #include <gazebo/sensors/sensors.hh>
28 #include "gazebo/util/system.hh"
29 
30 namespace gazebo
31 {
35  {
37  public: ContactPlugin();
38 
40  public: virtual ~ContactPlugin();
41 
45  public: virtual void Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf);
46 
50  private: virtual void OnUpdate();
51 
53  private: sensors::ContactSensorPtr parentSensor;
54 
57  private: event::ConnectionPtr updateConnection;
58  };
59 }
60 #endif
std::shared_ptr< Sensor > SensorPtr
Definition: SensorTypes.hh:63
std::shared_ptr< ContactSensor > ContactSensorPtr
Definition: SensorTypes.hh:87
boost::shared_ptr< Connection > ConnectionPtr
Definition: CommonTypes.hh:153
A plugin for a contact sensor.
Definition: ContactPlugin.hh:34
A plugin with access to physics::Sensor.
Definition: Plugin.hh:274
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:59