00001 //================================================================================================= 00002 // Copyright (c) 2012, Stefan Kohlbrecher, TU Darmstadt 00003 // All rights reserved. 00004 00005 // Redistribution and use in source and binary forms, with or without 00006 // modification, are permitted provided that the following conditions are met: 00007 // * Redistributions of source code must retain the above copyright 00008 // notice, this list of conditions and the following disclaimer. 00009 // * Redistributions in binary form must reproduce the above copyright 00010 // notice, this list of conditions and the following disclaimer in the 00011 // documentation and/or other materials provided with the distribution. 00012 // * Neither the name of the Simulation, Systems Optimization and Robotics 00013 // group, TU Darmstadt nor the names of its contributors may be used to 00014 // endorse or promote products derived from this software without 00015 // specific prior written permission. 00016 00017 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 00018 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 00019 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 00020 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY 00021 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00022 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00023 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00024 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00025 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00026 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 //================================================================================================= 00032 /* 00033 * Gazebo - Outdoor Multi-Robot Simulator 00034 * Copyright (C) 2003 00035 * Nate Koenig & Andrew Howard 00036 * 00037 * This program is free software; you can redistribute it and/or modify 00038 * it under the terms of the GNU General Public License as published by 00039 * the Free Software Foundation; either version 2 of the License, or 00040 * (at your option) any later version. 00041 * 00042 * This program is distributed in the hope that it will be useful, 00043 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00044 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00045 * GNU General Public License for more details. 00046 * 00047 * You should have received a copy of the GNU General Public License 00048 * along with this program; if not, write to the Free Software 00049 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00050 * 00051 */ 00052 00053 #ifndef GAZEBO_ROS_THERMAL_CAMERA_HH 00054 #define GAZEBO_ROS_THERMAL_CAMERA_HH 00055 00056 // camera stuff 00057 #include <gazebo_plugins/gazebo_ros_camera_utils.h> 00058 00059 namespace gazebo 00060 { 00061 template <typename Base> 00062 class GazeboRosThermalCamera_ : public Base, GazeboRosCameraUtils 00063 { 00066 public: GazeboRosThermalCamera_(); 00067 00069 public: ~GazeboRosThermalCamera_(); 00070 00073 public: void Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf); 00074 public: void LoadImpl(sensors::SensorPtr _parent, sdf::ElementPtr _sdf) {} 00075 00077 protected: virtual void OnNewFrame(const unsigned char *_image, 00078 unsigned int _width, unsigned int _height, 00079 unsigned int _depth, const std::string &_format); 00080 00082 protected: virtual void OnNewImageFrame(const unsigned char *_image, 00083 unsigned int _width, unsigned int _height, 00084 unsigned int _depth, const std::string &_format); 00085 00087 protected: void PutCameraData(const unsigned char *_src); 00088 protected: void PutCameraData(const unsigned char *_src, common::Time &last_update_time); 00089 }; 00090 00091 } 00092 #endif 00093