ProximityRayPlugin.hh
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2012-2016 Open Source Robotics Foundation
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *
00016 */
00017 /*
00018  * Desc: Proximity Ray Plugin
00019  * Author: Nate Koenig mod by John Hsu, Deanna Hood
00020  */
00021 
00022 #ifndef _GAZEBO_LIGHT_CURTAIN_PLUGIN_HH_
00023 #define _GAZEBO_LIGHT_CURTAIN_PLUGIN_HH_
00024 
00025 #include "gazebo/common/Plugin.hh"
00026 #include "gazebo/msgs/msgs.hh"
00027 #include "gazebo/sensors/SensorTypes.hh"
00028 #include "gazebo/sensors/RaySensor.hh"
00029 #include "gazebo/util/system.hh"
00030 
00031 namespace gazebo
00032 {
00034   class GAZEBO_VISIBLE ProximityRayPlugin : public SensorPlugin
00035   {
00037     public: ProximityRayPlugin();
00038 
00040     public: virtual ~ProximityRayPlugin();
00041 
00043     public: virtual void OnNewLaserScans();
00044 
00047     public: virtual bool ProcessScan();
00048 
00051     public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
00052 
00055     protected: std::string Topic(std::string topicName) const;
00056 
00058     protected: transport::PublisherPtr statePub;
00059 
00061     protected: transport::PublisherPtr stateChangePub;
00062 
00064     protected: msgs::Header stateMsg;
00065 
00067     protected: std::mutex mutex;
00068 
00070     protected: std::string stateTopic;
00071 
00073     protected: std::string stateChangeTopic;
00074 
00076     protected: bool objectDetected;
00077 
00079     protected: bool useLinkFrame;
00080 
00082     protected: double sensingRangeMin;
00083 
00085     protected: double sensingRangeMax;
00086 
00088     protected: bool normallyOpen;
00089 
00091     protected: physics::LinkPtr link;
00092 
00094     protected: physics::WorldPtr world;
00095 
00097     protected: transport::NodePtr node;
00098 
00100     protected: sensors::RaySensorPtr parentSensor;
00101 
00103     protected: event::ConnectionPtr newLaserScansConnection;
00104 
00105   };
00106 }
00107 #endif


osrf_gear
Author(s):
autogenerated on Mon Sep 5 2016 03:41:33