ProximityRayPlugin.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: Proximity Ray Plugin
19  * Author: Nate Koenig mod by John Hsu, Deanna Hood
20  */
21 
22 #ifndef _GAZEBO_LIGHT_CURTAIN_PLUGIN_HH_
23 #define _GAZEBO_LIGHT_CURTAIN_PLUGIN_HH_
24 
25 #include "gazebo/common/Plugin.hh"
26 #include "gazebo/msgs/msgs.hh"
27 #include "gazebo/sensors/SensorTypes.hh"
28 #include "gazebo/sensors/RaySensor.hh"
29 #include "gazebo/util/system.hh"
30 
31 namespace gazebo
32 {
34  class GAZEBO_VISIBLE ProximityRayPlugin : public SensorPlugin
35  {
37  public: ProximityRayPlugin();
38 
40  public: virtual ~ProximityRayPlugin();
41 
43  public: virtual void OnNewLaserScans();
44 
47  public: virtual bool ProcessScan();
48 
51  public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
52 
55  protected: std::string Topic(std::string topicName) const;
56 
58  protected: transport::PublisherPtr statePub;
59 
61  protected: transport::PublisherPtr stateChangePub;
62 
64  protected: msgs::Header stateMsg;
65 
67  protected: std::mutex mutex;
68 
70  protected: std::string stateTopic;
71 
73  protected: std::string stateChangeTopic;
74 
76  protected: bool objectDetected;
77 
79  protected: bool useLinkFrame;
80 
82  protected: double sensingRangeMin;
83 
85  protected: double sensingRangeMax;
86 
88  protected: bool normallyOpen;
89 
91  protected: physics::LinkPtr link;
92 
94  protected: physics::WorldPtr world;
95 
97  protected: transport::NodePtr node;
98 
100  protected: sensors::RaySensorPtr parentSensor;
101 
103  protected: event::ConnectionPtr newLaserScansConnection;
104 
105  };
106 }
107 #endif
event::ConnectionPtr newLaserScansConnection
The connection tied to ProximityRayPlugin::OnNewLaserScans()
physics::WorldPtr world
Pointer to world.
bool useLinkFrame
Convert sensor ranges to parent link frame?
physics::LinkPtr link
Pointer to parent link.
transport::NodePtr node
Pointer to this node for publishing.
A Ray Sensor Plugin which makes it act as a proximity sensor.
msgs::Header stateMsg
State message.
bool normallyOpen
Whether or not the output function is normally open (default) or normally closed. ...
double sensingRangeMin
Minimum sensing range in meters.
bool objectDetected
Sensor detection state.
std::mutex mutex
Mutex to protect interruptionMsg.
sensors::RaySensorPtr parentSensor
The parent sensor.
std::string stateTopic
Topic name for state message.
transport::PublisherPtr stateChangePub
Publisher for the sensor state change.
double sensingRangeMax
Maximum sensing range in meters.
transport::PublisherPtr statePub
Publisher for the sensor state.
std::string stateChangeTopic
Topic name for state change message.


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