gazebo_lidar_plugin.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2012-2014 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: Ray Plugin
00019  * Author: Nate Koenig mod by John Hsu
00020  */
00021 
00022 #ifndef _GAZEBO_RAY_PLUGIN_HH_
00023 #define _GAZEBO_RAY_PLUGIN_HH_
00024 
00025 #include "gazebo/common/Plugin.hh"
00026 #include "gazebo/sensors/SensorTypes.hh"
00027 #include "gazebo/sensors/RaySensor.hh"
00028 #include "gazebo/util/system.hh"
00029 
00030 #include "Lidar.pb.h"
00031 
00032 namespace gazebo
00033 {
00035   class GAZEBO_VISIBLE GazeboLidarPlugin : public SensorPlugin
00036   {
00038     public: GazeboLidarPlugin();
00039 
00041     public: virtual ~GazeboLidarPlugin();
00042 
00044     public: virtual void OnNewLaserScans();
00045 
00048     public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf);
00049 
00051     protected: physics::WorldPtr world;
00052 
00054     private: 
00055       sensors::RaySensorPtr parentSensor;
00056       transport::NodePtr node_handle_;
00057       transport::PublisherPtr lidar_pub_;
00058       std::string namespace_;
00059 
00060 
00062     private: 
00063       event::ConnectionPtr newLaserScansConnection;
00064       lidar_msgs::msgs::lidar lidar_message;
00065   };
00066 }
00067 #endif


rotors_gazebo_plugins
Author(s): Fadri Furrer, Michael Burri, Mina Kamel, Janosch Nikolic, Markus Achtelik
autogenerated on Thu Apr 18 2019 02:43:43